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">
|
2016-07-21 19:11:15 +08:00
|
|
|
<%= image_tag avatar_path(user, :icon_small), class: "img-circle pull-left" %>
|
2016-02-12 23:52:43 +08:00
|
|
|
</div>
|
|
|
|
<div class="col-xs-10">
|
|
|
|
<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>
|
|
|
|
<% if can_edit_users_on_module(@my_module) then %>
|
|
|
|
<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>
|
|
|
|
<% end %>
|