2021-12-21 08:27:25 +00:00
|
|
|
{% extends "layout/default.html" %}
|
2021-12-23 08:14:27 +00:00
|
|
|
{% block title %}{% trans %}group list{% endtrans %}{% endblock %}
|
2021-12-21 08:27:25 +00:00
|
|
|
{% block content %}
|
|
|
|
<table class="table table-hover align-middle">
|
|
|
|
<thead class="table-light">
|
|
|
|
<tr>
|
2021-12-23 08:14:27 +00:00
|
|
|
<th scope="col">{% trans %}group name{% endtrans %}</th>
|
|
|
|
<th scope="col">{% trans %}group description{% endtrans %}</th>
|
|
|
|
<th scope="col">{% trans %}member?{% endtrans %}</th>
|
|
|
|
<th scope="col">{% trans %}member count{% endtrans %}</th>
|
2021-12-21 08:27:25 +00:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for group in groups|sort %}
|
2021-12-21 10:12:34 +00:00
|
|
|
{% if CURRENT_USER.entry_dn in group["member"] or USER_IS_ADMIN %}
|
2021-12-21 08:27:25 +00:00
|
|
|
<tr>
|
2021-12-21 10:12:34 +00:00
|
|
|
<th scope="row">
|
|
|
|
{% if USER_IS_ADMIN %}
|
|
|
|
<a href="{{ url_for("group_edit", ou=group["ou"]) }}">{{ group["ou"] }}</a>
|
|
|
|
{% else %}
|
|
|
|
{{ group["ou"] }}
|
|
|
|
{% endif %}
|
|
|
|
</th>
|
|
|
|
<td>{{ group["description"]|e }}</td>
|
|
|
|
{% if CURRENT_USER.entry_dn in group["member"] %}
|
|
|
|
<td>✅</td>
|
|
|
|
{% else %}
|
|
|
|
<td>❌</td>
|
|
|
|
{% endif %}
|
2021-12-21 08:27:25 +00:00
|
|
|
<td>{{ group["member"]|length }}</td>
|
|
|
|
</tr>
|
2021-12-21 10:12:34 +00:00
|
|
|
{% endif %}
|
2021-12-21 08:27:25 +00:00
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
{% endblock %}
|