orbit-basic/app/views/admin/users/index.html.erb

35 lines
1.3 KiB
Plaintext

<% content_for :body_id do %>user_list<% end -%>
<div class="main_list">
<%= flash_messages %>
<div id="add_new" class="buttom clear">
<%= link_to t('admin.new_user'), new_admin_user_path %>
</div>
<ul>
<li class="list_head clear">
<span class="roles">Roles</span>
<span class="name">Name</span>
<span class="email">Email</span>
<span class="admin">Admin</span>
<span class="action">Action</span>
</li>
<% @users.each do |user| %>
<li class="list_item clear">
<% active_role = UserRoleModel.get_role_model_from_key(user.active_role) %>
<span class="roles <%= active_role.key.downcase rescue nil %>"><%= active_role.i18n_variable[I18n.locale] rescue nil %></span>
<span class="name"><%= user.name ? user.name : 'bob' %></span>
<span class="email"><%= user.email %></span>
<span class="admin"><%= user.admin ? t(:yes_) : t(:no_) %></span>
<span 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 %>
</span>
</li>
<% end %>
</ul>
<div id="add_new" class="buttom clear">
<%= link_to t('admin.new_user'), new_admin_user_path %>
</div>
</div>