Update HTML structure for localization, enhance logout functionality, and improve button styles
This commit is contained in:
parent
995a0cb2d4
commit
e8ccab6219
|
|
@ -27,6 +27,8 @@ p {
|
|||
box-sizing: border-box;
|
||||
}
|
||||
.container1{
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
background-color: #fff;
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
|
|
@ -34,7 +36,9 @@ p {
|
|||
width: 100%;
|
||||
max-width: 400px;
|
||||
box-sizing: border-box;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.input-group {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
|
@ -53,6 +57,7 @@ p {
|
|||
}
|
||||
|
||||
button {
|
||||
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
background-color: #007bff;
|
||||
|
|
@ -65,6 +70,19 @@ button {
|
|||
button:hover {
|
||||
background-color: #0056b3;
|
||||
}
|
||||
.button_salir {
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
background-color: #ff5050;
|
||||
color: #fff;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.button_salir:hover {
|
||||
background-color: #d90000;
|
||||
}
|
||||
#message {
|
||||
margin-top: 15px;
|
||||
text-align: center;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.w3.org/1999/xhtml">
|
||||
<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}">
|
||||
|
|
@ -7,20 +7,18 @@
|
|||
<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/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>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.w3.org/1999/xhtml">
|
||||
<html lang="es" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Gestión</title>
|
||||
<link rel="stylesheet" th:href="@{/css/style.css}">
|
||||
|
|
@ -10,6 +10,14 @@
|
|||
<a href="/Inventario/user_managemment">
|
||||
<button>Gestión de Usuarios</button>
|
||||
</a>
|
||||
<!-- TODO: Cambiar la ruta a la de gestionar inventario -->
|
||||
<a href="/Inventario/user_managemment">
|
||||
<button>Gestión de Inventario</button>
|
||||
</a>
|
||||
<a href="/Inventario/home">
|
||||
<button class="button_salir">Volver al inicio</button>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<html lang="es" xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<title>Registro</title>
|
||||
<link rel="stylesheet" th:href="@{/css/style.css}">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.w3.org/1999/xhtml">
|
||||
<html lang="es" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>User management</title>
|
||||
<link rel="stylesheet" th:href="@{/css/style.css}">
|
||||
|
|
@ -10,7 +10,15 @@
|
|||
<a href="/Inventario/register">
|
||||
<button>Registrar usuario</button>
|
||||
</a>
|
||||
<!-- TODO: modificar ruta-->
|
||||
<a href="/Inventario/register">
|
||||
<button>Borrar usuario</button>
|
||||
</a>
|
||||
<a href="/Inventario/home">
|
||||
<button class="button_salir">Volver al inicio</button>
|
||||
</a>
|
||||
</div>
|
||||
<!-- TODO: añadir botón para para editar usuarios -->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue