2022-08-31 13:54:13 +02:00
|
|
|
{% extends 'base.html' %}
|
|
|
|
|
|
|
|
|
|
|
|
{% block content %}
|
2023-06-23 22:19:00 +02:00
|
|
|
<h2>{% block title %}Panneau d'administration{% endblock %}</h2>
|
|
|
|
|
2022-12-19 15:19:58 +01:00
|
|
|
<div id="actions-rapides">
|
2023-06-23 22:19:00 +02:00
|
|
|
<a href="/add-user">
|
|
|
|
<div class="button">Ajouter un utilisateur</div>
|
|
|
|
</a>
|
|
|
|
<a href="/partition">
|
|
|
|
<div class="button">Voir toutes les partitions</div>
|
|
|
|
</a>
|
2022-12-19 15:19:58 +01:00
|
|
|
</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>
|
2023-10-01 14:47:49 +02:00
|
|
|
<td>
|
2022-08-31 13:54:13 +02:00
|
|
|
<div class="user-profile">
|
2023-06-23 22:19:00 +02:00
|
|
|
<div class="user-profile-picture" style="background-color:{{ user.color }};"
|
|
|
|
title="{{ user.username }}">
|
2022-08-31 13:54:13 +02:00
|
|
|
{{ 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 %}
|