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

17 lines
735 B
Text
Raw Normal View History

2020-09-11 19:00:13 +08:00
<% limit_reached = repository_rows.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
<% repository_rows.take(Constants::ATWHO_SEARCH_LIMIT).each do |row| %>
2020-09-09 20:17:19 +08:00
<li class="item" data-name="<%= row[:name] %>" data-id="<%= row[:id] %>" data-type="rep_item">
<span class='sa-type'><%= row[:repository_tag] %></span>
<span class="item-text"><%= row[:name] %></span>
</li>
<% end %>
2020-09-11 19:00:13 +08:00
<% if limit_reached %>
<div class="more-results">To get other results, please type more</div>
<% end %>
2020-09-09 20:17:19 +08:00
<% if repository_rows.empty? %>
<%= render partial: 'shared/smart_annotation/no_results.html.erb' %>
<% end %>
</div>
2020-09-07 16:46:51 +08:00
<%= render partial: 'shared/smart_annotation/footer.html.erb' %>