scinote-web/app/views/user_my_modules/_index.html.erb

33 lines
1.4 KiB
Text

<h5 class="text-center"><%=t "experiments.canvas.popups.users_tab" %></h5>
<hr>
<ul class="no-style content-users">
<% if @user_my_modules.size == 0 then %>
<li><em><%= t "experiments.canvas.popups.no_users" %></em></li>
<% else %>
<% @user_my_modules.each_with_index do |user_my_module, i| %>
<% user = user_my_module.user %>
<li>
<% if i > 0 %><hr><% end %>
<div class="row">
<div class="col-xs-2">
<%= image_tag avatar_path(user, :icon_small), class: "img-circle pull-left" %>
</div>
<div class="col-xs-10">
<span><%= user.full_name %></span><br>
<span class="text-muted" title="<%=t "experiments.canvas.popups.module_user_join_full", user: user.full_name, date: l(user_my_module.created_at, format: :full_date), time: l(user_my_module.created_at, format: :time) %>">
<em>
<%=t "experiments.canvas.popups.module_user_join", date: l(user_my_module.created_at, format: :full_date) %>
</em>
</span>
</div>
</div>
</li>
<% end %>
<% end %>
</ul>
<% if can_manage_users_in_module?(@my_module) %>
<p>
<hr>
<%= link_to t('experiments.canvas.popups.manage_users'), my_module_users_edit_path(@my_module, format: :json), remote: true, class: "manage-users-link" %>
</p>
<% end %>