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;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
.container1{
|
.container1{
|
||||||
|
display: inline-flex;
|
||||||
|
flex-direction: column;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
|
|
@ -34,7 +36,9 @@ p {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 400px;
|
max-width: 400px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
gap: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-group {
|
.input-group {
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
}
|
}
|
||||||
|
|
@ -53,6 +57,7 @@ p {
|
||||||
}
|
}
|
||||||
|
|
||||||
button {
|
button {
|
||||||
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
background-color: #007bff;
|
background-color: #007bff;
|
||||||
|
|
@ -65,6 +70,19 @@ button {
|
||||||
button:hover {
|
button:hover {
|
||||||
background-color: #0056b3;
|
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 {
|
#message {
|
||||||
margin-top: 15px;
|
margin-top: 15px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<!DOCTYPE html>
|
<!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>
|
<head>
|
||||||
<title>Home</title>
|
<title>Home</title>
|
||||||
<link rel="stylesheet" th:href="@{/css/style.css}">
|
<link rel="stylesheet" th:href="@{/css/style.css}">
|
||||||
|
|
@ -7,20 +7,18 @@
|
||||||
<body>
|
<body>
|
||||||
<h2 th:text="${message}"></h2>
|
<h2 th:text="${message}"></h2>
|
||||||
<div class="container1">
|
<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 -->
|
<!-- Botón visible solo para Administradores -->
|
||||||
<div sec:authorize="hasRole('ADMIN')">
|
<div sec:authorize="hasRole('ADMIN')">
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
<a href="/Inventario/management">
|
<a href="/Inventario/management">
|
||||||
<button>Gestión</button>
|
<button>Gestión</button>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<!DOCTYPE html>
|
<!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>
|
<head>
|
||||||
<title>Gestión</title>
|
<title>Gestión</title>
|
||||||
<link rel="stylesheet" th:href="@{/css/style.css}">
|
<link rel="stylesheet" th:href="@{/css/style.css}">
|
||||||
|
|
@ -10,6 +10,14 @@
|
||||||
<a href="/Inventario/user_managemment">
|
<a href="/Inventario/user_managemment">
|
||||||
<button>Gestión de Usuarios</button>
|
<button>Gestión de Usuarios</button>
|
||||||
</a>
|
</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>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html xmlns:th="http://www.thymeleaf.org">
|
<html lang="es" xmlns:th="http://www.thymeleaf.org">
|
||||||
<head>
|
<head>
|
||||||
<title>Registro</title>
|
<title>Registro</title>
|
||||||
<link rel="stylesheet" th:href="@{/css/style.css}">
|
<link rel="stylesheet" th:href="@{/css/style.css}">
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<!DOCTYPE html>
|
<!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>
|
<head>
|
||||||
<title>User management</title>
|
<title>User management</title>
|
||||||
<link rel="stylesheet" th:href="@{/css/style.css}">
|
<link rel="stylesheet" th:href="@{/css/style.css}">
|
||||||
|
|
@ -10,7 +10,15 @@
|
||||||
<a href="/Inventario/register">
|
<a href="/Inventario/register">
|
||||||
<button>Registrar usuario</button>
|
<button>Registrar usuario</button>
|
||||||
</a>
|
</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>
|
</div>
|
||||||
|
<!-- TODO: añadir botón para para editar usuarios -->
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue