<% 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 :page_tools do %>
<%=
toolbar do |tb|
  tb.link t('link.edit'),
          href: edit_ldap_service_path(@ldap_service),
          icon: 'pencil'

  tb.link t('link.destroy'),
          href: ldap_service_path(@ldap_service),
          confirm: t('destroy_confirm', object_name: @ldap_service.uid),
          method: 'delete',
          danger: true,
          icon: 'trash'
end %>
<% end %>
