2016-07-28 22:41:10 +08:00
|
|
|
<h5 class="text-center"><%=t "experiments.canvas.popups.users_tab" %></h5>
|
2016-02-12 23:52:43 +08:00
|
|
|
<hr>
|
|
|
|
<ul class="no-style content-users">
|
|
|
|
<% if @user_my_modules.size == 0 then %>
|
2016-07-28 22:41:10 +08:00
|
|
|
<li><em><%= t "experiments.canvas.popups.no_users" %></em></li>
|
2016-02-12 23:52:43 +08:00
|
|
|
<% 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">
|
2019-05-21 21:19:44 +08:00
|
|
|
<span class='global-avatar-container'>
|
|
|
|
<%= image_tag avatar_path(user, :icon_small), class: "img-circle pull-left" %>
|
2016-02-12 23:52:43 +08:00
|
|
|
</div>
|
2019-05-21 21:19:44 +08:00
|
|
|
<div class="col-xs-10" style="line-height: 15px">
|
2016-02-12 23:52:43 +08:00
|
|
|
<span><%= user.full_name %></span><br>
|
2016-07-28 22:41:10 +08:00
|
|
|
<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) %>">
|
2016-02-12 23:52:43 +08:00
|
|
|
<em>
|
2016-07-28 22:41:10 +08:00
|
|
|
<%=t "experiments.canvas.popups.module_user_join", date: l(user_my_module.created_at, format: :full_date) %>
|
2016-02-12 23:52:43 +08:00
|
|
|
</em>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
2016-07-21 19:11:15 +08:00
|
|
|
</ul>
|
2018-03-04 21:49:28 +08:00
|
|
|
<% if can_manage_users_in_module?(@my_module) %>
|
2016-07-21 19:11:15 +08:00
|
|
|
<p>
|
2016-02-12 23:52:43 +08:00
|
|
|
<hr>
|
2016-07-28 22:41:10 +08:00
|
|
|
<%= link_to t('experiments.canvas.popups.manage_users'), my_module_users_edit_path(@my_module, format: :json), remote: true, class: "manage-users-link" %>
|
2016-07-21 19:11:15 +08:00
|
|
|
</p>
|
2018-02-09 23:14:40 +08:00
|
|
|
<% end %>
|