2020-09-11 19:00:13 +08:00
|
|
|
<% limit_reached = users.length == Constants::ATWHO_SEARCH_LIMIT + 1 %>
|
2020-09-18 14:50:01 +08:00
|
|
|
<div class="atwho-header">
|
|
|
|
<span><%= t("atwho.users.header") %></span>
|
2023-06-08 14:33:37 +08:00
|
|
|
<div class="dismiss"><span class="sn-icon sn-icon-close-remove"></span></div>
|
2020-09-18 14:50:01 +08:00
|
|
|
</div>
|
2020-09-11 19:00:13 +08:00
|
|
|
<div class="atwho-scroll-container">
|
|
|
|
<% users.limit(Constants::ATWHO_SEARCH_LIMIT).each do |user| %>
|
2023-03-14 01:00:30 +08:00
|
|
|
<li class="atwho-user" data-full-name="<%= user.full_name %>" data-id="<%= user.id.base62_encode %>" data-type="rep_item">
|
2020-09-11 19:00:13 +08:00
|
|
|
<img src="<%= avatar_path(user, :icon_small) %>" class="avatar" />
|
|
|
|
<div class="user-info">
|
|
|
|
<div class="user-name item-text"><%= user.full_name %></div>
|
|
|
|
<div class="user-email item-text"><%= user.email %></div>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
<% 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 users.blank? %>
|
2020-09-18 14:50:01 +08:00
|
|
|
<%= render partial: 'shared/smart_annotation/no_results.html.erb', locals: { object_type: 'users' } %>
|
2020-09-11 19:00:13 +08:00
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<%= render partial: 'shared/smart_annotation/footer.html.erb' %>
|