Update button labels and styles in list.html; enhance button layout in table_style.css and clean up UserController

This commit is contained in:
jon ander 2025-04-29 15:26:36 +02:00
parent 77c4a3dd69
commit 138ba899f3
3 changed files with 8 additions and 9 deletions

View File

@ -19,14 +19,12 @@ import org.slf4j.LoggerFactory;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@Controller @Controller
public class UserController { public class UserController {
private final UserService userService; private final UserService userService;
private final DepartamentoService departamentoService; private final DepartamentoService departamentoService;
private static final Logger logger = LoggerFactory.getLogger(UserController.class); private static final Logger logger = LoggerFactory.getLogger(UserController.class);
@ -49,9 +47,6 @@ public class UserController {
private final BotonDTO home = new BotonDTO("Salir", "/home", false, "button_salir"); private final BotonDTO home = new BotonDTO("Salir", "/home", false, "button_salir");
private List<BotonDTO> filtrarBotones(Authentication auth,List<BotonDTO> botones){ private List<BotonDTO> filtrarBotones(Authentication auth,List<BotonDTO> botones){
List<BotonDTO> botones_response = new ArrayList<>(); List<BotonDTO> botones_response = new ArrayList<>();
List<String> roles = auth.getAuthorities() List<String> roles = auth.getAuthorities()
@ -69,7 +64,6 @@ public class UserController {
return botones_response; return botones_response;
} }
@GetMapping("/login") @GetMapping("/login")
public String loginPage() { public String loginPage() {
return "login"; // Retorna la vista login.html return "login"; // Retorna la vista login.html

View File

@ -78,10 +78,14 @@ table {
.botones { .botones {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
width: 100%;
gap: 10px;
}
a{
width: 100%;
} }
.botones button { .botones button {
margin: 10px 30px; margin: 10px 0;
padding: 10px; padding: 10px;
background-color: #007bff; background-color: #007bff;
color: #fff; color: #fff;
@ -89,6 +93,7 @@ table {
border-radius: 4px; border-radius: 4px;
cursor: pointer; cursor: pointer;
box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5); box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
width: 100%;
} }
.botones .button_salir { .botones .button_salir {

View File

@ -32,7 +32,7 @@
</div> </div>
<div class="botones"> <div class="botones">
<a th:if="${backUrl}" th:href="${backUrl}"> <a th:if="${backUrl}" th:href="${backUrl}">
<button class="button_salir">Volver</button> <button class="button_salir">Volver al inicio</button>
</a> </a>
<a th:if="${addUrl}" th:href="${addUrl}"> <a th:if="${addUrl}" th:href="${addUrl}">
<button>Añadir</button> <button>Añadir</button>