2022-08-31 13:54:13 +02:00
|
|
|
{% extends 'base.html' %}
|
|
|
|
|
|
|
|
{% block header %}
|
|
|
|
<h1>Panneau d'administration</h1>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block header_actions %}
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
2022-12-19 15:19:58 +01:00
|
|
|
<div id="actions-rapides">
|
|
|
|
<a href="/add-user"><div class="button">Ajouter un utilisateur</div></a>
|
|
|
|
<a href="/partition"><div class="button">Voir toutes les partitions</div></a>
|
|
|
|
</div>
|
2022-08-31 13:54:13 +02:00
|
|
|
<table>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th scope="col">Utilisateur</th>
|
|
|
|
<th scope="col">Albums</th>
|
2022-12-19 15:19:58 +01:00
|
|
|
<th scope="col">Partitions</th>
|
2022-08-31 13:54:13 +02:00
|
|
|
<th scope="col">Privilèges</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for user in users %}
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<div class="user-profile">
|
|
|
|
<div class="user-profile-picture" style="background-color:{{ user.color }};" title="{{ user.username }}">
|
|
|
|
{{ user.username[0] | upper }}
|
|
|
|
</div>
|
|
|
|
<div class="table-username">{{ user.username }}</div>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
<td>{{ user.albums | length }}</td>
|
2022-12-19 15:19:58 +01:00
|
|
|
<td>{{ user.partitions | length }}</td>
|
2022-08-31 13:54:13 +02:00
|
|
|
<td>{% if user.access_level != 1 %}❌{% else %}✅{% endif %}</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
{% endblock %}
|