<%= link_to l(:label_user_new), {:action => 'add'}, :class => 'icon icon-add' %>

<%=l(:label_user_plural)%>

<% form_tag({}, :method => :get) do %>
<%= l(:label_filter_plural) %> <%= select_tag 'status', status_options_for_select(@status), :class => "small", :onchange => "this.form.submit(); return false;" %>
<% end %>   <%= sort_header_tag('login', :caption => l(:field_login)) %> <%= sort_header_tag('firstname', :caption => l(:field_firstname)) %> <%= sort_header_tag('lastname', :caption => l(:field_lastname)) %> <%= sort_header_tag('mail', :caption => l(:field_mail)) %> <%= sort_header_tag('admin', :caption => l(:field_admin), :default_order => 'desc') %> <%= sort_header_tag('created_on', :caption => l(:field_created_on), :default_order => 'desc') %> <%= sort_header_tag('last_login_on', :caption => l(:field_last_login_on), :default_order => 'desc') %> <% for user in @users -%> <%= %w(anon active registered locked)[user.status] %>"> <% end -%>
<%= link_to user.login, :action => 'edit', :id => user %> <%= user.firstname %> <%= user.lastname %> <%= image_tag('true.png') if user.admin? %> <%= format_time(user.created_on) %> <% if user.locked? -%> <%= link_to l(:button_unlock), {:action => 'edit', :id => user, :user => {:status => User::STATUS_ACTIVE}}, :method => :post, :class => 'icon icon-unlock' %> <% elsif user.registered? -%> <%= link_to l(:button_activate), {:action => 'edit', :id => user, :user => {:status => User::STATUS_ACTIVE}}, :method => :post, :class => 'icon icon-unlock' %> <% else -%> <%= link_to l(:button_lock), {:action => 'edit', :id => user, :user => {:status => User::STATUS_LOCKED}}, :method => :post, :class => 'icon icon-lock' %> <% end -%>

<%= pagination_links_full @user_pages, @user_count %>

<% html_title(l(:label_user_plural)) -%>