{% extends 'basic.html' %}
{% block content %}
<h1>Group: {{ name }}</h1>

<div style="margin-bottom: 10px">
  <a class="btn btn-default" href="/admin/groups" role="button">Back</a>
</div>

<p>
  <strong>Members:</strong>
  {% for uid, cn in members %}
    <a href="/admin/users/{{ uid }}">{{ uid }}</a>,
  {% endfor %}
</p>

<p>Full LDAP record:</p>

<table class="table profile-table">
  <tr>
    <th scope="col">Attribute</th>
    <th scope="col">Attribute</th>
    <th scope="col" class="profile-table-value">Value</th>
  </tr>
  {% for attr, attr_readable, value in attributes %}
    <tr>
      <td>{{ attr }}</td>
      <td>{{ attr_readable if attr_readable else '' }}</td>
      <td class="profile-table-value">{{ value }}</td>
    </tr>
  {% endfor %}
</table>

{% endblock %}

{% block head %}
<style type="text/css">
.profile-table td, .profile-table th {
  overflow: hidden;
  overflow-wrap: anywhere;
  width: 200px;
}
.profile-table td.profile-table-value,
.profile-table th.profile-table-value {
  width: max-content;
}
</style>
{% endblock %}
