2020-09-11 19:00:13 +08:00
|
|
|
<% limit_reached = experiments.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(experiments.limit(Constants::ATWHO_SEARCH_LIMIT)).each do |experiment_group| %>
|
2020-09-09 20:17:19 +08:00
|
|
|
<div class="item-group">
|
|
|
|
<div class="atwho-breadcrumbs">
|
|
|
|
<span class="atwho-breadcrumb" title="<%= experiment_group[:project_name] %>"><%= experiment_group[:project_name] %></span>
|
|
|
|
</div>
|
|
|
|
<div class="items">
|
|
|
|
<% experiment_group[:experiments].each do |experiment| %>
|
2023-07-21 17:48:19 +08:00
|
|
|
<li class="item" data-name="<%= sanitize_input(experiment.name) %>" data-id="<%= experiment.id.base62_encode %>" data-type="exp">
|
2023-05-03 17:07:18 +08:00
|
|
|
<span class='sa-type'><%= experiment.code %></span>
|
|
|
|
<span class="dot">·</span>
|
2023-07-21 17:48:19 +08:00
|
|
|
<span class="item-text"><%= sanitize_input(experiment.name) %></span>
|
2023-06-21 20:13:20 +08:00
|
|
|
<%= render partial: 'shared/smart_annotation/atwho_control_buttons' %>
|
2020-09-09 20:17:19 +08:00
|
|
|
</li>
|
|
|
|
<% 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 experiments.blank? %>
|
2023-06-21 20:13:20 +08:00
|
|
|
<%= render partial: 'shared/smart_annotation/no_results', locals: { object_type: 'experiments' } %>
|
2020-09-09 20:17:19 +08:00
|
|
|
<% end %>
|
|
|
|
</div>
|
2023-06-21 20:13:20 +08:00
|
|
|
<%= render partial: 'shared/smart_annotation/footer' %>
|