This repository has been archived on 2025-02-26. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
tp_twigg/tpCrudTwig/templates/users/index.twig
2024-10-25 16:49:52 +02:00

43 lines
1.1 KiB
Twig

{% extends "base.twig" %}
{% block title %}Liste des utilisateurs{% endblock %}
{% block content %}
<h1 class="">Liste des utilisateurs</h1>
<table class="table table-striped table-bordered table-condensed">
<thead>
<th>ID</th>
<th>Login</th>
<th>Nom</th>
<th>Prenom</th>
<th>Rôle</th>
<th>Actions</th>
</thead>
<tbody>
{# afficher les utilisateurs #}
{% for user in users %}
<tr>
<td>{{ user.id }}</td>
<td>{{ user.login }}</td>
<td>{{ user.lastname }}</td>
<td>{{ user.firstname }}</td>
<td>{{ user.role.name }}</td>
<td>
<button type="button" class="btn btn-info"
onclick="window.location.href='users/details.php?id={{ user.id }}'">Voir</button>
<button type="button" class="btn btn-warning"
onclick="window.location.href='users/edit.php?id= {{ user.id }}'">Modifier</button>
<button type="button" class="btn btn-danger"
onclick="window.location.href='users/delete.php?id= {{ user.id }}'">Supprimer</button>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<button type="button" class="btn btn-success mb-2" onclick="window.location.href='users/add.php'">Ajouter</button>
{% endblock %}