3
0
Fork 0
mirror of https://github.com/nanoy42/coope synced 2024-06-02 21:31:47 +00:00
coope/users/templates/users/groups_index.html
2018-12-02 19:26:33 +01:00

40 lines
1.2 KiB
HTML

{% extends "base.html" %}
{% block entete %}<h1>Gestion des utilisateurs</h1>{% endblock %}
{% block navbar %}
<ul>
<li><a href="#first">Liste des groupes de droit</a></li>
</ul>
{% endblock %}
{% block content %}
<section id="first" class="main">
<header class="major">
<h2>Liste des groupes de droit</h2>
</header>
{% if perms.auth.add_group %}
<a href="{% url 'users:createGroup' %}" class="button">Ajouter un groupe de droit</a><br><br>
{% endif %}
<div class="table-wrapper">
<table>
<thead>
<tr>
<th>Nom</th>
<th>Nombre de droits</th>
<th>Nombre d'utilisateurs</th>
<th>Administrer</th>
</tr>
</thead>
<tbody>
{% for group in groups %}
<tr>
<td>{{ group.name }}</td>
<td>{{ group.permissions.count }}</td>
<td>{{ group.user_set.count }}</td>
<td><a href="{% url 'users:groupProfile' group.pk %}" class="button small">Voir</a> {% if perms.auth.change_group %}<a href="{% url 'users:editGroup' group.pk %}" class="button small">Éditer</a> {% endif %}{% if perms.auth.delete_group %}<a href="{% url 'users:deleteGroup' group.pk %}" class="button small">Supprimer</a>{% endif %}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</section>
{% endblock %}