partitioncloud-server/partitioncloud/templates/admin/index.html
2024-01-19 13:38:05 +01:00

48 lines
1.5 KiB
HTML

{% extends 'base.html' %}
{% block content %}
<h2>{% block title %}Panneau d'administration{% endblock %}</h2>
<div id="actions-rapides">
<a href="/add-user">
<div class="button">Nouvel utilisateur</div>
</a>
<a href="/partition">
<div class="button">Voir les partitions</div>
</a>
<a href="/admin/logs">
<div class="button">Voir les logs</div>
</a>
</div>
<div class="x-scrollable">
<table>
<thead>
<tr>
<th scope="col">Utilisateur</th>
<th scope="col">Albums</th>
<th scope="col">Partitions</th>
<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>
<td>{{ user.partitions | length }}</td>
<td>{% if user.access_level != 1 %}❌{% else %}✅{% endif %}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}