diff options
Diffstat (limited to 'app/views/users/index.html.erb')
| -rw-r--r-- | app/views/users/index.html.erb | 55 |
1 files changed, 30 insertions, 25 deletions
diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index 0a003cb1..854811a2 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb | |||
| @@ -1,27 +1,32 @@ | |||
| 1 | <h1><%= t(".admins") %></h1> | 1 | <h1><%= t(".title") %></h1> |
| 2 | <%= link_to new_user_path(admin: true), class: 'action_button' do %> | 2 | |
| 3 | <%= icon("plus", library: "tabler", "aria-hidden": true) %> <%= t(".create_admin") %> | 3 | <p class="button_row"> |
| 4 | <% end %> | 4 | <% UsersController::ROLE_PRESETS.each_key do |preset| %> |
| 5 | <table class="user_table"> | 5 | <%= link_to new_user_path(:preset => preset), class: 'action_button' do %> |
| 6 | <tr class="header"> | 6 | <%= icon("plus", library: "tabler", "aria-hidden": true) %> |
| 7 | <th><%= t("users.labels.login") %></th> | 7 | <%= t(".create_#{preset}") %> |
| 8 | <th></th> | 8 | <% end %> |
| 9 | <th></th> | 9 | <% end %> |
| 10 | <th></th> | 10 | </p> |
| 11 | </tr> | ||
| 12 | <%= render :partial => "user", :locals => {:users => @users[:admin] ||= []} %> | ||
| 13 | </table> | ||
| 14 | 11 | ||
| 15 | <h1><%= t(".users") %></h1> | 12 | <% UsersController::GROUP_ORDER.each do |group| %> |
| 16 | <%= link_to new_user_path, class: 'action_button' do %> | 13 | <% members = @users[group] || [] %> |
| 17 | <%= icon("plus", library: "tabler", "aria-hidden": true) %> <%= t(".create_user") %> | 14 | <h2 class="user_group_heading <%= "user_group_alumni" if group == :alumni %>"> |
| 15 | <%= t(".group_#{group}") %> | ||
| 16 | <span class="dashboard_widget_meta"><%= members.size %></span> | ||
| 17 | </h2> | ||
| 18 | <% if members.any? %> | ||
| 19 | <table class="user_table <%= "user_table_alumni" if group == :alumni %>"> | ||
| 20 | <tr class="header"> | ||
| 21 | <th><%= t("users.labels.login") %></th> | ||
| 22 | <th><%= t("users.labels.roles") %></th> | ||
| 23 | <th></th> | ||
| 24 | <th></th> | ||
| 25 | <th></th> | ||
| 26 | </tr> | ||
| 27 | <%= render :partial => "user", :locals => { :users => members } %> | ||
| 28 | </table> | ||
| 29 | <% else %> | ||
| 30 | <p class="field_hint"><%= t(".group_empty") %></p> | ||
| 31 | <% end %> | ||
| 18 | <% end %> | 32 | <% end %> |
| 19 | <table class="user_table"> | ||
| 20 | <tr class="header"> | ||
| 21 | <th><%= t("users.labels.login") %></th> | ||
| 22 | <th></th> | ||
| 23 | <th></th> | ||
| 24 | <th></th> | ||
| 25 | </tr> | ||
| 26 | <%= render :partial => "user", :locals => {:users => @users[:user] ||= []} %> | ||
| 27 | </table> | ||
