66 lines
3.2 KiB
HTML
66 lines
3.2 KiB
HTML
|
{% extends "base.html" %}
|
||
|
|
||
|
{% block content %}
|
||
|
<div class="row border-bottom mb-3">
|
||
|
<div class="col"><p class="lead">Utilisateurs {% if active_users %}activés{% else %}désactivés{% endif %}</p></div>
|
||
|
{% if perms.aemo.add_utilisateur %}
|
||
|
<div class="col text-end">
|
||
|
{% if active_users %}
|
||
|
<a class="btn btn-sm btn-outline-primary" href="{% url 'charge-utilisateurs' %}">Charge dossiers</a>
|
||
|
<a class="btn btn-sm btn-outline-primary" href="{% url 'utilisateur-desactive-list' %}">Utilisateurs désactivés</a>
|
||
|
{% else %}
|
||
|
<a class="btn btn-sm btn-outline-primary" href="{% url 'utilisateur-list' %}">Utilisateurs actifs</a>
|
||
|
{% endif %}
|
||
|
<a class="btn btn-sm btn-outline-primary" href="{% url 'utilisateur-add' %}">Nouveau</a>
|
||
|
</div>
|
||
|
{% endif %}
|
||
|
</div>
|
||
|
<div class="row">
|
||
|
<div class="col">
|
||
|
<table id="user_table" class="table table-sm table-hover sortable">
|
||
|
<thead class="table-light">
|
||
|
<tr>
|
||
|
<th>Nom, prénom</th>
|
||
|
<th>Sigle</th>
|
||
|
<th>Courriel</th>
|
||
|
<th>Taux act.</th>
|
||
|
<th>Titre</th>
|
||
|
<th>Équipe</th>
|
||
|
<th>Rôles</th>
|
||
|
<th style="width: 250px;">Groupes</th>
|
||
|
{% if not active_users %}<th>Action</th>{% endif %}
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody>
|
||
|
{% with can_edit=perms.aemo.change_utilisateur %}
|
||
|
{% for util in object_list %}
|
||
|
<tr>
|
||
|
<td class="m-0 p-1">{% if can_edit %}<a href="{% url 'utilisateur-edit' util.pk %}">{% endif %}
|
||
|
{{ util.nom_prenom }}{% if can_edit %}</a>{% endif %}</td>
|
||
|
<td class="m-0 p-1">{{ util.sigle }}</td>
|
||
|
<td class="m-0 p-1">{{ util.email }}</td>
|
||
|
<td class="m-0 p-1">
|
||
|
{{ util.taux_activite }}%
|
||
|
{% if util.decharge %}<br><small title="Heures de décharge">D. {{ util.decharge }}h</small>{% endif %}
|
||
|
</td>
|
||
|
<td class="m-0 p-1">{{ util.profession }}</td>
|
||
|
<td class="m-0 p-1">{{ util.get_equipe_display }}</td>
|
||
|
<td class="m-0 p-1">{{ util.roles_str }}</td>
|
||
|
<td class="m-0 p-1">{{ util.groupes|join:", " }}</td>
|
||
|
{% if not active_users %}
|
||
|
<td>
|
||
|
<form method="post" action="{% url 'utilisateur-reactiver' util.pk %}">
|
||
|
{% csrf_token %}
|
||
|
<button class="btn btn-sm btn-outline-success" type="submit">Ré-activer</button>
|
||
|
</form>
|
||
|
</td>
|
||
|
{% endif %}
|
||
|
</tr>
|
||
|
{% endfor %}
|
||
|
{% endwith %}
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
</div>
|
||
|
{% endblock %}
|