Gestion-inventario/src/main/resources/templates/Home.html

27 lines
876 B
HTML
Raw Normal View History

2025-03-24 18:55:09 +00:00
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.w3.org/1999/xhtml">
2025-03-24 18:55:09 +00:00
<head>
<title>Home</title>
<link rel="stylesheet" th:href="@{/css/style.css}">
2025-03-24 18:55:09 +00:00
</head>
<body>
<h2 th:text="${message}"></h2>
<div class="container1">
<!-- Formulario de Logout (POST) -->
<form th:action="@{/logout}" method="post">
<button type="submit">Cerrar Sesión</button>
<!-- Token CSRF (obligatorio) -->
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
</form>
<!-- Botón visible solo para Administradores -->
<div sec:authorize="hasRole('ADMIN')">
<br>
<br>
<a href="/Inventario/register">
<button>Registrar Nuevo Usuario</button>
</a>
</div>
</div>
2025-03-24 18:55:09 +00:00
</body>
</html>