PCv5/app/templates/admin/index.html

52 lines
1.5 KiB
HTML

{% extends "base/base.html" %}
{% block title %}
Panneau d'administration » <h1>Utilisateurs et groupes</h1>
{% endblock %}
{% block content %}
<section>
<h2>Listes des membres utiles</h2>
<table style="width:90%; margin: auto;">
<tr><th>Pseudo</th><th>Email</th><th>Date d'inscription</th><th>XP</th>
<th>Innovation</th><th>Newsletter</th><th>Modifier</th></tr>
{% for user in users %}
<tr><td><a href="{{ url_for('user_by_id', user_id=user.id) }}" >{{ user.name }}</a></td>
<td>{{ user.email }}</td>
<td>{{ user.register_date }}</td><td>{{ user.xp }}</td>
<td>{{ user.innovation }}</td>
<td>{{ "Oui" if user.newsletter else "Non" }}</td>
<td><a href="{{ url_for('adm_edit_account', user_id=user.id) }}" class="button">Modifier</a></td>
</tr>
{% endfor %}
</table>
<h2>Groupes et privilèges</h2>
<table style="width:90%; margin: auto;">
<tr><th>Groupe</th><th>Membres</th><th>Privilèges</th></tr>
{% for group in groups %}
<tr><td><span style="{{ group.css }}">{{ group.name }}</span></td><td>
{% for user in group.members %}
{{ user.name }}
{% endfor %}
</td><td>
{% for priv in group.privs %}
<code>{{ priv }}</code>
{% endfor %}
</td></tr>
{% endfor %}
</table>
<h2>Maintenance et développement</h2>
<form action='' method='POST'>
{{ form.hidden_tag() }}
{{ form.submit(class="bg-orange") }}
</form>
</section>
{% endblock %}