mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-12 12:16:06 +08:00
29 lines
1.2 KiB
Text
29 lines
1.2 KiB
Text
|
<% users = my_module.designated_users.order(:full_name) %>
|
||
|
<div ref="dropdown" class="assign-users-dropdown dropdown">
|
||
|
<div class="assigned-users-container" data-toggle="dropdown">
|
||
|
<% users[0..3].each_with_index do |user, i| %>
|
||
|
<span class="avatar-container" style="z-index: <%= 5 - i %>">
|
||
|
<%= image_tag avatar_path(user, :icon_small), title: user.full_name %>
|
||
|
</span>
|
||
|
<% end %>
|
||
|
<% if users.length > 4 %>
|
||
|
<span class="more-users avatar-container" title="<%= sanitize_input(users[4..].map(&:full_name).join('
')) %>">
|
||
|
+<%= users.length - 4 %>
|
||
|
</span>
|
||
|
<% end %>
|
||
|
<% if can_manage_my_module_users?(user, my_module) %>
|
||
|
<span class="new-user avatar-container">
|
||
|
<i class="fas fa-plus"></i>
|
||
|
</span>
|
||
|
<% end %>
|
||
|
</div>
|
||
|
<div class="dropdown-menu">
|
||
|
<div class="sci-input-container left-icon">
|
||
|
<input type="text" class="sci-input-field user-search" placeholder="<%= I18n.t('experiments.table.search') %>">
|
||
|
<i class="fas fa-search"></i>
|
||
|
</div>
|
||
|
<div class="users-list" data-list-url="<%= search_my_module_user_my_module_path(my_module, my_module_id: my_module.id) %>">
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|