<% 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="<%= 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>
      <span class="item-text"><%= sanitize_input(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' %>
