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

16 lines
771 B
Text

<% limit_reached = repository_rows.length == Constants::ATWHO_SEARCH_LIMIT + 1 %>
<div class="atwho-scroll-container">
<% repository_rows.take(Constants::ATWHO_SEARCH_LIMIT).each do |row| %>
<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 %>
<% if limit_reached %>
<div class="more-results"><%= t('atwho.more_results') %></div>
<% end %>
<% if repository_rows.blank? %>
<%= render partial: 'shared/smart_annotation/no_results.html.erb', locals: { object_type: 'repository_rows' } %>
<% end %>
</div>
<%= render partial: 'shared/smart_annotation/footer.html.erb' %>