scinote-web/app/views/shared/smart_annotation/_my_module_items.html.erb

28 lines
1.2 KiB
Text
Raw Normal View History

2020-09-11 19:00:13 +08:00
<% limit_reached = my_modules.length == Constants::ATWHO_SEARCH_LIMIT + 1 %>
2020-09-09 20:17:19 +08:00
<div class="atwho-scroll-container">
2020-09-11 19:00:13 +08:00
<% grouped_by_prj_exp(my_modules.limit(Constants::ATWHO_SEARCH_LIMIT)).each do |task_group| %>
2020-09-09 20:17:19 +08:00
<div class="item-group">
<div class="atwho-breadcrumbs">
<span class="atwho-breadcrumb" title="<%= task_group[:project_name] %>"><%= task_group[:project_name] %></span>
2020-09-04 22:48:53 +08:00
<span class="slash">/</span>
2020-09-09 20:17:19 +08:00
<span class="atwho-breadcrumb" title="<%= task_group[:experiment_name] %>"><%= task_group[:experiment_name] %></span>
2020-09-04 22:48:53 +08:00
</div>
2020-09-09 20:17:19 +08:00
<div class="items">
2020-09-04 22:48:53 +08:00
<% task_group[:tasks].each do |task| %>
<li class="item" data-name="<%= task.name %>" data-id="<%= task.id.base62_encode %>" data-type="tsk">
2020-09-09 20:17:19 +08:00
<span class='sa-type'>Tsk</span>
<span class="item-text"><%= task.name %></span>
</li>
2020-09-04 22:48:53 +08:00
<% end %>
</div>
</div>
<% end %>
2020-09-11 19:00:13 +08:00
<% if limit_reached %>
2020-09-15 20:47:57 +08:00
<div class="more-results"><%= t('atwho.more_results') %></div>
2020-09-11 19:00:13 +08:00
<% end %>
2021-07-23 17:56:28 +08:00
<% if my_modules.blank? %>
<%= render partial: 'shared/smart_annotation/no_results.html.erb', locals: { object_type: 'my_modules' } %>
2020-09-09 20:17:19 +08:00
<% end %>
2020-09-04 22:48:53 +08:00
</div>
2020-09-07 16:46:51 +08:00
<%= render partial: 'shared/smart_annotation/footer.html.erb' %>