enorme push

This commit is contained in:
2024-10-25 16:49:52 +02:00
parent 829d121268
commit 52faa489fa
23 changed files with 448 additions and 166 deletions

View File

@@ -1,48 +1,43 @@
{% extends "base.twig" %}
<!DOCTYPE html>
<html lang="fr">
{% block title %}Liste des utilisateurs{% endblock %}
<head>
<meta charset="UTF-8">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
{# <link rel="stylesheet" href="style/style.css" /> #}
{# <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script> #}
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Liste des utilisateurs</title>
</head>
<body>
<div class="container text-center bg-light">
<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 }}</td>
<td>
<button type="button" class="btn btn-info" onclick="window.location.href='details.php?id={{ user.id }}'">Voir</button>
<button type="button" class="btn btn-warning" onclick="window.location.href='edit.php?id= {{ user.id }}'">Modifier</button>
<button type="button" class="btn btn-danger" onclick="window.location.href='delete.php?id= {{ user.id }}'">Supprimer</button>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<button type="button" class="btn btn-success" onclick="window.location.href='add.php'">Ajouter</button>
</div>
</body>
</html>
{% 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 %}