Début de la page admin

This commit is contained in:
jleroy
2024-04-25 16:58:47 +02:00
parent 85f4f52960
commit 658f1c3e9c
7 changed files with 108 additions and 4 deletions

View File

@@ -2,9 +2,68 @@
<html th:replace="~{modele-page :: layout('Panel administrateur',~{::link} , ~{::#container-main})}" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="style.css"> <!-- Ajoutez le lien vers votre fichier CSS si nécessaire -->
</head>
<body>
<div id="container-main">
<h2>Liste des catégories modifiées</h2>
<table>
<thead>
<tr>
<th>Nom</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr th:each="categorie : ${categories}">
<td>
<form th:action="@{/admin/new}" th:object="${categorie}" method="post">
<input type="text" th:field="*{libelle}" id="categorie" th:value="${categorie.libelle}">
<button>Sauvegarder</button>
</form>
</td>
<td>
<form th:action="@{/admin/catDelete}" method="post">
<input type="hidden" name="idCategorie" id="idCategorie" th:value="${categorie.id}">
<button>Supprimer</button>
</form>
</td>
<td th:text="${categorie.libelle}"></td>
</tr>
</tbody>
</table>
<h2>Liste des utilisateurs</h2>
<table>
<thead>
<tr>
<th>ID</th>
<th>Pseudo</th>
<th>Nom</th>
<th>Prénom</th>
<th>Email</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr th:each="user : ${userProfil}">
<td th:text="${user.id}"></td>
<td th:text="${user.pseudo}"></td>
<td th:text="${user.nom}"></td>
<td th:text="${user.prenom}"></td>
<td th:text="${user.email}"></td>
<td>
<form th:action="@{/admin/disabled}" method="post">
<input type="hidden" name="userDisabled" id="userDisabled" th:value="${user.id}">
<button >Désactiver</button>
</form>
<form th:action="@{/admin/delete}" method="post">
<input type="hidden" name="userDelete" id="userDelete" th:value="${user.id}">
<button>Supprimer</button>
</form>
</td>
</tr>
</tbody>
</table>
</div>
</body>