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

33 lines
1.3 KiB
Plaintext
Raw Normal View History

2011-11-18 08:43:14 +00:00
<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">
2011-11-19 18:14:51 +00:00
<span class="roles"><%= t('admin.role') %></span>
<span class="name"><%= t('admin.name') %></span>
<span class="email"><%= t('admin.email') %></span>
<span class="admin"><%= t('admin.admin') %></span>
<span class="action"><%= t('admin.action') %></span>
2011-11-18 08:43:14 +00:00
</li>
<% @users.each do |user| %>
2011-11-17 12:02:58 +00:00
<li class="list_item clear">
2011-11-18 08:43:14 +00:00
<% 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>
2011-11-17 12:02:58 +00:00
<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">
2011-11-18 08:43:14 +00:00
<%= 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 %>
2011-11-17 12:02:58 +00:00
</span>
</li>
2011-11-18 08:43:14 +00:00
<% end %>
</ul>
<div id="add_new" class="buttom clear">
<%= link_to t('admin.new_user'), new_admin_user_path %>
</div>
2011-11-17 12:02:58 +00:00
</div>