This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
orbit-4-1/app/views/admin/users/index.html.erb

44 lines
1.5 KiB
Plaintext

<% content_for :secondary do %>
<%= render 'side_bar' %>
<% end %>
<div class="main_list">
<%= flash_messages %>
<div class="button_bar up">
<%= link_to t('admin.new_user'), new_admin_user_path, :class => 'new' %>
</div>
<table>
<thead>
<tr>
<td class="roles"><%= t('admin.role') %></td>
<td class="name"><%= t('admin.name') %></td>
<td class="email"><%= t('admin.email') %></td>
<td class="admin"><%= t('admin.admin') %></td>
<td class="action"><%= t('admin.action') %></td>
</tr>
</thead>
<tbody>
<% @users.each do |user| %>
<% active_role = UserRoleModel.get_role_model_from_key(user.active_role) %>
<tr class="have">
<td class="roles <%= active_role.key.downcase rescue nil %>"><%= active_role.i18n_variable[I18n.locale] rescue nil %></td>
<td class="name"><%= user.name ? user.name : 'bob' %></td>
<td class="email"><%= user.email %></td>
<td class="admin"><%= user.admin ? t(:yes_) : t(:no_) %></td>
<td class="action">
<%= link_to t(:show), admin_user_path(user), :class => 'show' %>
<%= link_to t(:edit), edit_admin_user_path(user), :class => 'edit' %>
<%= link_to t(:delete), admin_user_path(user), :class => 'delete', :confirm => t('sure?'), :method => :delete %>
</td>
</tr>
<tr>
<td colspan="5"></td>
</tr>
<% end %>
</tbody>
</table>
<div class="button_bar">
<%= link_to t('admin.new_user'), new_admin_user_path, :class => 'new' %>
</div>
</div>