<% page_title t('titles.organisation'), t('titles.ldap_services'), @ldap_service.uid %>

<%= start_box t('ldap_services.index.infobox') %>

<table>
  <tr>
    <th><%= label "ldap_service", "uid" %></th>
    <td class="value_td"><%= @ldap_service.uid %></td>
  </tr>

  <tr>
    <th><%= label "ldap_service", "description" %></th>
    <td class="value_td"><%= @ldap_service.description %></td>
  </tr>

  <tr>
    <th><%= label "ldap_service", "dn" %></th>
    <td class="value_td"><%= @ldap_service.dn.to_s %></td>
  </tr>

  <tr>
    <th><%= label "ldap_service", "groups" %></th>
    <td class="value_td">
      <% @ldap_service.groups.each do |group| %>
      <div><%= group.description %></div>
      <% end %>
    </td>
  </tr>
</table>

<%= end_box %>

<hr>

<% content_for :tools do %>
<ul>
  <li>
    <%= link_to edit_ldap_service_path(@ldap_service), class: 'btn' do%>
      <i class="icon-pencil"></i><%= t('link.edit') %>
    <% end %>
  </li>

  <li>
    <%= link_to( ldap_service_path(@ldap_service),
                 data: { confirm: t('destroy_confirm', object_name: @ldap_service.uid) },
                 method: :delete, class: 'btn btn-danger' ) do %>
      <i class="icon-trash"></i><%= t('link.destroy') %>
    <% end %>
  </li>
</ul>
<% end %>
