2020-04-14 23:25:36 +08:00
|
|
|
<% user_my_modules = @my_module.user_my_modules %>
|
2020-06-30 15:20:53 +08:00
|
|
|
<a class="task-assigned-users manage-users-link <%= 'empty' unless user_my_modules.present? %>"
|
|
|
|
data-remote="true"
|
2020-07-09 19:52:45 +08:00
|
|
|
href="<%= my_module_users_edit_path(@my_module) %>"
|
2020-06-30 15:20:53 +08:00
|
|
|
data-module-id="<%= @my_module.id %>"
|
2020-07-09 19:52:45 +08:00
|
|
|
data-module-users-url="<%= my_module_user_my_modules_url(@my_module) %>">
|
2020-06-30 15:20:53 +08:00
|
|
|
<% if user_my_modules.present? %>
|
2020-04-14 23:25:36 +08:00
|
|
|
<% user_my_modules.each do |user_my_module| %>
|
|
|
|
<% user = user_my_module.user %>
|
2020-07-09 19:52:45 +08:00
|
|
|
<span class="global-avatar-container">
|
2020-04-14 23:25:36 +08:00
|
|
|
<%= image_tag avatar_path(user, :icon_small) %>
|
|
|
|
</span>
|
|
|
|
<% end %>
|
2020-06-30 15:20:53 +08:00
|
|
|
<% if can_manage_users_in_module?(@my_module) && @my_module.unassigned_users.any? %>
|
2020-07-09 19:52:45 +08:00
|
|
|
<span class="global-avatar-container assign-new-user">
|
2020-06-30 15:20:53 +08:00
|
|
|
<i class="fas fa-plus"></i>
|
|
|
|
</span>
|
|
|
|
<% end %>
|
|
|
|
<% else %>
|
|
|
|
<span class="empty-label">
|
|
|
|
<%= t('my_modules.details.no_assigned_users') %>
|
|
|
|
</span>
|
|
|
|
<% end %>
|
|
|
|
</a>
|