summaryrefslogtreecommitdiff
path: root/app/views/users/index.html.erb
blob: 71102c2c45838b44242760397f0600deebd1affc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<%= render "shared/page_actions",
      :title => t(".title"),
      :icon_name => "user-plus",
      :label => t(".create_account"),
      :options => UsersController::ROLE_PRESETS.each_key.map { |preset|
                    [t(".create_#{preset}"), new_user_path(:preset => preset)] },
      :hint => t(".admin_hint") %>

<% UsersController::GROUP_ORDER.each do |group| %>
  <% members = @users[group] || [] %>
  <h2 class="user_group_heading <%= "user_group_alumni" if group == :alumni %>">
    <%= t(".group_#{group}") %>
    <span class="dashboard_widget_meta"><%= members.size %></span>
  </h2>
  <% if members.any? %>
    <table class="user_table <%= "user_table_alumni" if group == :alumni %>">
      <tr class="header">
        <th><%= t("users.labels.login") %></th>
        <th><%= t("users.labels.roles") %></th>
        <th></th>
        <th></th>
        <th></th>
      </tr>
      <%= render :partial => "user", :locals => { :users => members } %>
    </table>
  <% else %>
    <p class="field_hint"><%= t(".group_empty") %></p>
  <% end %>
<% end %>