summaryrefslogtreecommitdiff
path: root/app/views/users/index.html.erb
blob: e6c1fbda50f290f00f4c85e09eac7a1d45797335 (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
30
31
<%= 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="admin_table user_table <%= "user_table_alumni" if group == :alumni %>">
      <thead>
        <tr class="header">
          <th><%= t("users.labels.login") %></th>
          <th><%= t("users.labels.roles") %></th>
          <th></th>
        </tr>
      </thead>
      <tbody>
        <%= render :partial => "user", :locals => { :users => members } %>
      </tbody>
    </table>
  <% else %>
    <p class="field_hint"><%= t(".group_empty") %></p>
  <% end %>
<% end %>