aemo_fr/templates/aemo/role_list.html
2024-06-03 16:49:01 +02:00

41 lines
1.5 KiB
HTML
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% extends "base.html" %}
{% block title %}Rôles{% endblock %}
{% block content %}
<div class="row border-bottom mb-3">
<div class="col"><p class="lead">Rôles</p></div>
{% if perms.aemo.add_role %}
<div class="col text-end">
<a class="btn btn-sm btn-outline-primary" href="{% url 'role-add' %}">Nouveau</a>
</div>
{% endif %}
</div>
<div class="row">
<div class="col">
<table class="table table-sm table-hover">
<thead class="table-light">
<tr>
<th>Nom</th>
<th>Rôle familial</th>
<th>Rôle intervenant</th>
<th>Éditeur ? {% help_tooltip editeur_help %}</th>
</tr>
</thead>
<tbody>
{% with can_edit=perms.aemo.change_role %}
{% for role in object_list %}
<tr>
<td>{% if can_edit and role.editable %}<a href="{% url 'role-edit' role.pk %}">{% endif %}{{ role.nom }}{% if can_edit and role.editable %}</a>{% endif %}</td>
<td>{{ role.est_famille|boolean_icon }}</td>
<td>{{ role.est_intervenant|boolean_icon }}</td>
<td>{{ role.est_editeur|boolean_icon }}</td>
</tr>
{% endfor %}
{% endwith %}
</tbody>
</table>
</div>
</div>
{% endblock %}