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

19 lines
946 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| %>
2023-07-21 17:48:19 +08:00
<li class="item" data-name="<%= sanitize_input(row[:name]) %>" data-id="<%= row[:id_encoded] %>" data-type="rep_item">
<span class='sa-type'><%= row[:code] %></span>
<span class="dot">&middot;</span>
2023-07-21 17:48:19 +08:00
<span class="item-text"><%= sanitize_input(row[:name]) %></span>
<%= render partial: 'shared/smart_annotation/atwho_control_buttons', locals: { row: row, repository: repository } %>
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 repository_rows.blank? %>
<%= render partial: 'shared/smart_annotation/no_results', locals: { object_type: 'repository_rows' } %>
2020-09-09 20:17:19 +08:00
<% end %>
</div>
<%= render partial: 'shared/smart_annotation/footer' %>