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

18 lines
825 B
Text
Raw Normal View History

2020-09-11 19:00:13 +08:00
<% limit_reached = projects.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
<% projects.limit(Constants::ATWHO_SEARCH_LIMIT).each do |project| %>
<li class="item" data-name="<%= project.name %>" data-id="<%= project.id.base62_encode %>" data-type="prj">
2020-09-09 20:17:19 +08:00
<span class='sa-type'>Prj</span>
<span class="item-text"><%= project.name %></span>
<%= render partial: 'shared/smart_annotation/atwho_control_buttons.html.erb' %>
2020-09-09 20:17:19 +08:00
</li>
<% 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 projects.blank? %>
<%= render partial: 'shared/smart_annotation/no_results.html.erb', locals: { object_type: 'projects' } %>
2020-09-09 20:17:19 +08:00
<% end %>
</div>
2020-09-07 16:46:51 +08:00
<%= render partial: 'shared/smart_annotation/footer.html.erb' %>