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

24 lines
859 B
HTML

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