scinote-web/app/views/shared/smart_annotation/_repository_items.html.erb
2023-06-21 14:38:32 +02:00

18 lines
914 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_encoded] %>" data-type="rep_item">
<span class='sa-type'><%= row[:code] %></span>
<span class="dot">&middot;</span>
<span class="item-text"><%= row[:name] %></span>
<%= render partial: 'shared/smart_annotation/atwho_control_buttons', locals: { row: row, repository: repository } %>
</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', locals: { object_type: 'repository_rows' } %>
<% end %>
</div>
<%= render partial: 'shared/smart_annotation/footer' %>