<% title _("Users") %>

<% title_actions  display_link_if_authorized(_("New User"), hash_for_new_user_path) %>

<table class="table table-bordered table-striped table-condensed table-two-pane">
  <tr>
    <th><%= sort :login, :as => s_("User|Login") %></th>
    <th><%= sort :firstname, :as => s_("User|Firstname")%></th>
    <th><%= sort :lastname, :as => s_("User|Lastname") %></th>
    <th><%= sort :mail, :as => s_("User|Mail") %></th>
    <th><%= sort :admin, :as => s_("User|Admin") %></th>
    <th><%= sort :last_login_on, :as => s_("User|Last login on") %></th>
    <th><%= _("Authorized by") %></th>
    <th></th>
  </tr>
  <% for user in @users %>
    <tr>
      <td><%= gravatar_image_tag user.mail, :class => "gravatar" %> <%=link_to_if_authorized h(user.login), hash_for_edit_user_path(:id => user.id) %></td>
      <td><%=h user.firstname %></td>
      <td><%=h user.lastname %></td>
      <td><%=h user.mail %></td>
      <td><%=checked_icon user.admin? %></td>
      <td><%=h last_login_on_column(user)%></td>
      <td><%=h auth_source_column(user)%></td>
      <td><%= display_delete_if_authorized hash_for_user_path(:id => user), :confirm => _("Delete %s?") % user.name %></td>
    </tr>
  <% end %>
</table>

<%= page_entries_info @users %>
<%= will_paginate @users %>
