<% html_title(l(:label_ldap_user_plural)) %>

<div class="contextual">
<%= link_to l(:label_user_new), {:action => 'new'}, :class => 'icon icon-add' %>
</div>

<h2><%= l(:label_ldap_user_plural) %></h2>

<table class="list">    
  <thead>
    <tr>
      <th><%= l(:field_login) %></th>
      <th><%= l(:field_firstname) %></th>
      <th><%= l(:field_lastname) %></th>
      <th><%= l(:field_mail) %></th>
      <th/>
    </tr>
  </thead>
  <tbody>
    <% @ldap_users.each do |user| %>
      <tr class="<%= cycle("odd", "even") %>">
        <td><%= link_to(h(user.login), :action => 'edit', :id => user.login) %></td>
        <td><%= h(user.firstname) %></td>
        <td><%= h(user.lastname) %></td>
        <td><%= h(user.mail) %></td>
        <td><%= link_to(l(:button_delete), user, :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del') unless User.current == User.find_by_login(user.login) %></td>
      </tr>
    <% end %>
  </tbody>
</table>
