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

34 lines
1.4 KiB
Text
Raw Normal View History

<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 %>
<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>
<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>
<%=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_manage_users_in_module?(@my_module) %>
2016-07-21 19:11:15 +08:00
<p>
2016-02-12 23:52:43 +08:00
<hr>
<%= 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 %>