Orbit/app/views/admin/users/index.html.erb

43 lines
1.4 KiB
Plaintext
Raw Normal View History

2011-11-17 12:02:58 +00:00
<% content_for :secondary do %>
<div id='user_list'>
<div class="member_setup">
<h1>Member Setup</h1>
<ul class="list">
<li class="set_1"><%= link_to content_tag(:span, t('admin.list_users')), admin_users_path %></li>
<li class="set_2"><%= link_to content_tag(:span, t('admin.list_user_roles')), admin_user_role_models_path %></li>
</ul>
</div>
</div>
<% end -%>
<%= flash_messages %>
<div id="add_new" class="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">
<span class="roles <%= user.get_roles.downcase %>"><%= user.get_roles %></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="clear">
<%= link_to t('admin.new_user'), new_admin_user_path %>
</div>