55 lines
1.9 KiB
HTML
55 lines
1.9 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="es" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<title>Gestión de Usuarios</title>
|
|
<link rel="stylesheet" th:href="@{/css/table_style.css}">
|
|
</head>
|
|
<body>
|
|
<div class="contenido">
|
|
<h2>Gestión de Usuarios</h2>
|
|
<div class="table-container">
|
|
<table class="table1">
|
|
<thead>
|
|
<tr>
|
|
<th class="celda-id">ID</th>
|
|
<th>Nombre</th>
|
|
<th>Rol</th>
|
|
<th>Email</th>
|
|
<th>Acciones</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr th:each="user : ${users}">
|
|
<td class="celda-id" th:text="${user.id}"></td>
|
|
<td th:text="${user.nombre}"></td>
|
|
<td th:text="${user.role}"></td>
|
|
<td th:title="${user.mail}" th:text="${user.mail}"></td>
|
|
<td class="celda-acciones">
|
|
<button th:title="Editar">✏️</button>
|
|
<form th:action="@{/delete_user}" method="get" style="display:inline;">
|
|
<input type="hidden" th:name="id" th:value="${user.id}"/>
|
|
<button type="submit" th:title="Borrar" formaction="#"
|
|
onclick="if(confirm('¿Estás seguro de que deseas borrar este usuario?')) { this.form.action = this.form.getAttribute('th:action'); } else { return false; }">
|
|
🗑️
|
|
</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="botones">
|
|
<a href="/Inventario/home">
|
|
<button class="button_salir">Volver al inicio</button>
|
|
</a>
|
|
<a href="/Inventario/register">
|
|
<button>Añadir usuario</button>
|
|
</a>
|
|
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|
|
|
|
|