Reorganizando el proyecto y quitando el menu para operaciones crud. Sale muy raro la configuracion sale mejor tener botones en las tablas que indican si el usuario qiere crear/editar/borar el usuario. Ajustes adicionales a la tabla para que sale x entradas y aparecen paginas. Cambios a las ojas del estilo. Pero este preparado el formulario y controlador para crear una nueva familia que va aservir despues de reorganizar las tablas

master
vicsash 5 months ago
parent 626a595c23
commit bfe2ce00ab

@ -27,10 +27,10 @@ public class DatabaseTest {
String[] familiaNames = {"Informatica", "Informatica2", "Informatica3", "Informatica4", "Informatica5"};
Random random = new Random();
for (int i = 0; i < 10; i++) {
for (int i = 0; i < 30; i++) {
int randomIndex = random.nextInt(cicloNames.length);
Familia familia = new Familia(familiaNames[randomIndex]);
Ciclo ciclo = new Ciclo(cicloNames[randomIndex], familia);
Ciclo ciclo = new Ciclo("Programacion cilclo",cicloNames[randomIndex], familia);
Skill skill = new Skill(faker.lorem().word() + i);
skillRepository.save(skill);

@ -45,8 +45,6 @@ public class BuscadorController {
@GetMapping("/search")
public String search(@RequestParam String query, @RequestParam String searchOption, Model model, HttpSession session) {
String[] word = query.split("\\b(y|o)\\b|[,/]");
session.setAttribute("query", query);
session.setAttribute("searchOption", searchOption);
if (searchOption.equals("OptEmpresa")) {
if(word.length == 1 && word[0].equalsIgnoreCase("all") || word[0].equalsIgnoreCase("todas")){
Set<Empresa> empresas = new HashSet<>(empressaRepository.findAll());

@ -1,11 +1,10 @@
package com.example.proyectofinal.controllers.editController;
package com.example.proyectofinal.controllers;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
@Controller
@RequestMapping("/editMain")
@ -16,19 +15,20 @@ public class EditController {
return "admin/editMain";
}
@GetMapping("/FamiliaEdit")
public String editFamilia(@RequestParam String text, Model model){
@GetMapping("/{text}")
public String editMain(@PathVariable String text, Model model){
model.addAttribute("text", text);
return "admin/editMenu/edit_menu";
}
@GetMapping("/{action}/{text}")
public String editFamilia(@PathVariable String action, @PathVariable String text, Model model){
System.out.println(text);
@GetMapping("/{text}/{action}")
public String operationSwitch(@PathVariable String text, @PathVariable String action, Model model){
model.addAttribute("text", text);
switch(action) {
case "crear":
System.out.println("crear "+text);
if(text.equalsIgnoreCase("familia")){
return "admin/editMenu/familia/familia_crear";
}
break;
case "editar":
System.out.println("editar "+text);

@ -1,4 +1,4 @@
package com.example.proyectofinal.controllers.searchController;
package com.example.proyectofinal.controllers.modelControllers;
import com.example.proyectofinal.models.empresas.Contacto;
import com.example.proyectofinal.repositories.empresas.ContactoRepository;
@ -22,6 +22,6 @@ public class EmpressaController {
public String getEmpressaBySector(@PathVariable Long id, Model model) {
Set<Contacto> contactoSet = new HashSet<>(contactoRepository.findBySector(id));
model.addAttribute("contactos", contactoSet);
return "/list/specific/list_empresa_contactos";
return "/list/list_contactos";
}
}

@ -0,0 +1,44 @@
package com.example.proyectofinal.controllers.modelControllers;
import com.example.proyectofinal.models.empresas.Ciclo;
import com.example.proyectofinal.repositories.empresas.CicloRepository;
import com.example.proyectofinal.servicios.FamiliaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
import java.util.HashSet;
import java.util.Set;
@Controller
@RequestMapping("/familia")
public class FamiliaController {
@Autowired
private CicloRepository cicloRepository;
@Autowired
private FamiliaService familiaService;
@PostMapping("/crearFamilia")
@ResponseBody
public String editFamilia(@RequestParam String name) {
String result = familiaService.createFamilia(name);
System.out.println(name);
if (result.equals("Familia creada")) {
return "redirect:/editMain";
}else if (result.equals("Familia ya existe")){
return result;
} else {
return "redirect:/error";
}
}
@GetMapping("/{id}")
public String getFamiliaById(@PathVariable Long id, Model model) {
Set<Ciclo> cicloSet = new HashSet<>(cicloRepository.findCicloByFamiliaId(id));
model.addAttribute("ciclos", cicloSet);
return "/list/list_ciclo";
}
}

@ -0,0 +1,5 @@
package com.example.proyectofinal.controllers.modelControllers;
//@RestController
public class LogInController {
}

@ -1,4 +1,4 @@
package com.example.proyectofinal.controllers.searchController;
package com.example.proyectofinal.controllers.modelControllers;
import com.example.proyectofinal.models.empresas.Empresa;
import com.example.proyectofinal.repositories.empresas.EmpressaRepository;
@ -22,6 +22,6 @@ public class SectorController {
public String getEmpressaBySector(@PathVariable Long id, Model model) {
Set<Empresa> empresaSet = new HashSet<>(empressaRepository.findBySector(id));
model.addAttribute("empresas", empresaSet);
return "/list/specific/list_sector_empresas";
return "/list/list_empresas";
}
}

@ -1,27 +0,0 @@
package com.example.proyectofinal.controllers.searchController;
import com.example.proyectofinal.models.empresas.Ciclo;
import com.example.proyectofinal.repositories.empresas.CicloRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import java.util.HashSet;
import java.util.Set;
@Controller
@RequestMapping("/familia")
public class FamiliaController {
@Autowired
private CicloRepository cicloRepository;
@GetMapping("/{id}")
public String getFamiliaById(@PathVariable Long id, Model model) {
Set<Ciclo> cicloSet = new HashSet<>(cicloRepository.findCicloByFamiliaId(id));
model.addAttribute("ciclos", cicloSet);
return "/list/specific/list_familia_ciclo";
}
}

@ -1,5 +0,0 @@
package com.example.proyectofinal.controllers.searchController;
//@RestController
public class LogInController {
}

@ -22,12 +22,17 @@ public class Ciclo {
private String nombre;
//TODO add String codigo 40
@NonNull
@Column(length = 70)
private String codigo;
@ManyToOne(cascade = {CascadeType.PERSIST,CascadeType.MERGE,CascadeType.REMOVE,CascadeType.REFRESH},fetch = FetchType.EAGER)
@JoinColumn(name = "Familia_id",referencedColumnName = "id")
private Familia familia;
public Ciclo(@NonNull String nombre, @NonNull Familia familia) {
public Ciclo(@NonNull String nombre, @NonNull String codigo, Familia familia) {
this.nombre = nombre;
this.codigo = codigo;
this.familia = familia;
}
}

@ -4,7 +4,12 @@ import com.example.proyectofinal.models.empresas.Familia;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import java.util.Optional;
public interface FamiliaRepository extends JpaRepository<Familia, Long> {
@Query(value = "SELECT * FROM familias u WHERE MATCH(u.nombre) AGAINST(?1 IN BOOLEAN MODE)", nativeQuery = true)
public Familia getFamiliaFullTextSeach(String keyword1);
@Query(value = "SELECT * FROM familias u WHERE MATCH(u.nombre) AGAINST(?1 IN BOOLEAN MODE)", nativeQuery = true)
Optional<Object> findByName(String name);
}

@ -0,0 +1,34 @@
package com.example.proyectofinal.servicios;
import com.example.proyectofinal.models.empresas.Familia;
import com.example.proyectofinal.repositories.empresas.FamiliaRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class FamiliaService {
@Autowired
private FamiliaRepository familiaRepository;
public String createFamilia(String name) {
if (familiaRepository.findByName(name).isPresent()) {
return "Familia ya existe";
} else {
Familia newFamilia = new Familia();
newFamilia.setNombre(name);
familiaRepository.save(newFamilia);
return "Familia creada";
}
}
public String updateFamilia(Long id, String name) {
if (familiaRepository.findById(id).isPresent()) {
Familia familia = familiaRepository.findById(id).get();
familia.setNombre(name);
familiaRepository.save(familia);
return "Familia actualizada";
} else {
return "Familia no encontrada";
}
}
}

@ -0,0 +1,17 @@
.back-button {
display: flex;
position: fixed;
bottom: 0;
left: 0;
width: 200px !important;
height: 50px !important;
font-size: 25px !important;
margin-top: 100px;
background-color: #007BFF;
color: white;
font-weight: bolder;
border-radius: 5px;
justify-content: center;
align-items: center;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}

@ -0,0 +1,23 @@
form {
display: flex;
flex-direction: column;
align-items: center;
width: 50%;
}
.search-container {
display: flex;
width: 100%;
justify-content: space-between;
}
input[type="text"] {
flex-grow: 1;
padding: 15px;
margin-right: 10px;
font-size: 18px;
}
select {
width: 100%;
padding: 15px;
font-size: 18px;
margin-top: 20px;
}

@ -17,43 +17,81 @@
height: 40px;
}
.back-button {
width: 200px !important;
height: 50px !important;
font-size: 25px !important;
margin-top: 100px;
background-color: #007BFF;
color: white;
font-weight: bolder;
border-radius: 5px;
justify-content: center;
align-items: center;
font-family: Verdana, Geneva, Tahoma, sans-serif;
th {
background-color: #f2f2f2; /* Change this to your preferred color */
color: black; /* Change this to your preferred color */
padding: 10px;
border: 1px solid #ddd; /* Adds border to the table headers */
}
h1 {
text-align: center;
text-decoration: underline;
background-color: #007BFF;
font-family: Verdana, Geneva, Tahoma, sans-serif;
font-size: 50px;
color: white;
margin-top: 0;
margin-left: 0;
margin-right: 0;
margin-bottom: 50px;
padding-top: 0;
padding-left: 0;
padding-right: 0;
width: 100%;
position: fixed;
top: 0;
position: relative;
}
.table {
padding-top: 5px;
width: 100%;
height: 90vh;
overflow-y: auto;
}
.cell{
height: 10px;
}
@media screen and (max-width: 600px) {
.table {
border: 1px solid black;
height: 75vh;
max-height: 100vh;
overflow-y: auto;
}
}
.table tr {
height: 10%;
}
body {
margin: 0;
padding: 0px;
}
.header {
display: flex;
align-items: center;
background-color: #007BFF;
justify-content: space-between;
padding: 0;
box-sizing: border-box;
}
.header h1 {
margin: 0;
}
.header button {
margin-right: auto;
}
.logout-button {
position: relative;
}
.logout-button {
position: relative;
}
html, body {
margin: 0;
padding: 0;
}

@ -33,32 +33,3 @@ h1 {
position: fixed;
top: 0;
}
.back-button {
position: fixed;
bottom: 0;
left: 0;
width: 200px !important;
height: 50px !important;
font-size: 25px !important;
margin-top: 100px;
background-color: #007BFF;
color: white;
font-weight: bolder;
border-radius: 5px;
justify-content: center;
align-items: center;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
body {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100vh;
}
.opt_butn {
display: flex;
justify-content: center;
align-items: center;
}

@ -1,53 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css">
<link rel="stylesheet" type="text/css" th:href="@{/style.css}">
<meta charset="UTF-8">
<title>EDITOR DE INFORMACIÓN</title>
<style>
.grid-container {
margin-top: 125px;
display: grid;
grid-template-columns: repeat(3,1fr);
grid-gap: 2px;
justify-content: center;
align-items: center;
height: 50vh;
}
a {
display: flex;
justify-content: center;
align-items: center;
font-size: 40px;
background-color: #f0f0f0;
text-decoration: none;
width: 80%;
height: 80%;
margin: auto;
}
body, h1 {
margin-left: 0;
padding-left: 0;
}
</style>
</head>
<body>
<h1>ZONA ADMINISTRADOR <a href="/logout" class="logout-button"><i class="fas fa-door-open"></i></a></h1>
<div class="grid-container">
<a>Empresa</a>
<a>Alumno</a>
<a>Oferta</a>
<a>Sector</a>
<a>Sucursal</a>
<a>Skill</a>
<a>Contactos</a>
<a>Ciclo</a>
<a href="/editMain/FamiliaEdit?text=Familia">Familia</a>
</div>
<a href="/buscador" class="back-button">Atras</a>
</body>
</html>

@ -1,18 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<link rel="stylesheet" type="text/css" th:href="@{/top_and_back.css}">
</head>
<body>
<h1 th:text="${text}"><a href="/logout" class="logout-button"><i class="fas fa-door-open"></i></a></h1>
<div>
<a th:href="@{'/editMain/crear/' + ${text}}" class="opt_butn">Crear</a>
<a th:href="@{'/editMain/editar/' + ${text}}" class="opt_butn">Editar</a>
<a th:href="@{'/editMain/borrar/' + ${text}}" class="opt_butn">Borrar</a>
</div>
<a href="/buscador" class="back-button">Atras</a>
</body>
</html>

@ -1,16 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<h1>CREAR FAMILIA</h1>
<form action="/yourActionURL" method="post">
<label for="name">Name:</label><br>
<input type="text" id="name" name="name"><br>
<input type="submit" value="Submit">
</form>
<a href="/edit/editMain" class="back-button">Atras a Menu Administrador</a>
</body>
</html>

@ -0,0 +1,77 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Creacion: Familia</title>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css">
<link rel="stylesheet" type="text/css" th:href="@{/top.css}">
<link rel="stylesheet" type="text/css" th:href="@{/back_button.css}">
<style>
form {
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: center;
width: 100%;
max-width: none;
margin: auto;
padding: 25px;
margin-top: 100px;
}
form input[type="text"], form input[type="submit"] {
font-size: 20px;
padding: 10px;
margin-bottom: 10px;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
form input[type="text"]{
width: 40%;
}
form label{
font-size: 20px;
margin-bottom: 10px;
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
body, h1 {
margin: 0;
padding: 0;
width: 100%;
box-sizing: border-box;
}
</style>
</head>
<body>
<h1>CREAR FAMILIA<a href="/logout" class="logout-button"><i class="fas fa-door-open"></i></a></h1>
<!--<form action="/familia/crearFamilia" method="post">-->
<!--TODO: Ask why this doesnt work and if it has to do with the jumping from editcontroler to familia controler-->
<form th:action="@{/familia/crearFamilia}" method="post">
<label for="name">Nombre de Familia de Ciclos:</label><br>
<input type="text" id="name" name="name"><br>
<input type="submit" value="Crear">
</form>
<button onclick="location.href='/editMain'" class="back-button">Atras</button>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("form").on("submit", function(event){
event.preventDefault();
$.ajax({
url: '/familia/crearFamilia',
type: 'post',
data: $(this).serialize(),
success: function(response){
if (response.startsWith('redirect:')) {
alert("Familia creada con exito");
window.location.href = response.substring(9);
} else {
alert(response);
}
}
});
});
});
</script>
</body>
</html>

@ -3,10 +3,10 @@
<head>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css">
<link rel="stylesheet" type="text/css" th:href="@{/style.css}">
<link rel="stylesheet" type="text/css" th:href="@{/form.css}">
<title>Buscador</title>
<style>
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
@ -14,47 +14,41 @@
background-color: #f0f0f0;
font-family: Arial, sans-serif;
}
form {
.header {
display: flex;
flex-direction: column;
align-items: center;
width: 50%;
}
.search-container {
display: flex;
width: 100%;
background-color: #007BFF;
justify-content: space-between;
padding: 0;
box-sizing: border-box;
}
input[type="text"] {
flex-grow: 1;
padding: 15px;
margin-right: 10px;
font-size: 18px;
}
select {
.header h1 {
margin: 0;
width: 100%;
padding: 15px;
font-size: 18px;
margin-top: 20px;
text-align: center;
}
.edit-button {
width: 200px; /* Adjust as needed */
height: 50px; /* Adjust as needed */
font-size: 20px; /* Adjust as needed */
background-color: blue;
color: white;
text-decoration: none;
border-radius: 5px;
display: flex; /* Add this line */
justify-content: center; /* Add this line */
align-items: center; /* Add this line */
margin-top: 40px; /* Increase the distance between the button and the select element */
.header button {
margin-right: auto;
}
.logout-button {
position: relative;
}
html, body {
margin: 0;
padding: 0;
}
</style>
</head>
<body >
<h1>PAGINA PRINCIPAL<a href="/logout" class="logout-button"><i class="fas fa-door-open"></i></a></h1>
<div class="header">
<h1>PAGINA PRINCIPAL</h1>
<a href="/logout" class="logout-button"><i class="fas fa-door-open"></i></a>
</div>
<div class="form-container" style="display: flex; justify-content: center; align-items: center; height: calc(100vh - 60px);">
<form action="/buscador/search" method="get" id="searchForm">
<div class="search-container" id="searchContainer">
<input type="text" name="query" placeholder="Buscar...">
@ -71,10 +65,9 @@
<option value="OptFamilias">Familias</option>
<option value="OptCiclos">Ciclos</option>
</select>
<a th:href="@{/editMain}" class="edit-button">
EDITAR
</a>
</form>
</div>
<script>
window.onload = function() {

@ -52,7 +52,13 @@
</tbody>
</table>
</div>
<a href="/buscador" class="back-button">Atras</a>
<button onclick="goBack()">Atras</button>
<script>
function goBack() {
window.history.back();
}
</script>
</body>
</html>

@ -32,7 +32,12 @@
</tbody>
</table>
</div>
<a href="/buscador" class="back-button"}} class="back-button">Atras</a>
<button onclick="goBack()">Atras</button>
<script>
function goBack() {
window.history.back();
}
</script>
</body>
</html>

@ -42,7 +42,12 @@
</tbody>
</table>
</div>
<a href="/buscador" class="back-button">Atras</a>
<button onclick="goBack()">Atras</button>
<script>
function goBack() {
window.history.back();
}
</script>
</body>
</html>

@ -2,20 +2,116 @@
<html lang="en">
<head>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css">
<link rel="stylesheet" type="text/css" th:href="@{/style.css}">
<!--<link rel="stylesheet" type="text/css" th:href="@{/style.css}">-->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">
<meta charset="UTF-8">
<title>Title</title>
<style>
.logout-button {
position: fixed;
top: 0px;
right: 0px;
background-color: red;
color: white;
border: none;
text-decoration: none;
font-size: 20px;
padding: 0px;
margin: 0px;
border-radius: 0;
display: flex;
justify-content: center;
align-items: center;
width: 40px;
height: 40px;
}
th {
background-color: #f2f2f2; /* Change this to your preferred color */
color: black; /* Change this to your preferred color */
padding: 10px;
border: 1px solid #ddd; /* Adds border to the table headers */
}
h1 {
text-align: center;
text-decoration: underline;
font-family: Verdana, Geneva, Tahoma, sans-serif;
font-size: 50px;
color: white;
margin-top: 0;
margin-left: 0;
margin-right: 0;
margin-bottom: 50px;
padding-top: 0;
padding-left: 0;
padding-right: 0;
width: 100%;
position: relative;
}
.table {
padding-top: 5px;
width: 100%;
height: 90vh;
overflow-y: auto;
}
.cell{
height: 10px;
}
@media screen and (max-width: 600px) {
.table {
}
}
.table tr {
height: 10%;
}
body {
margin: 0;
padding: 0px;
}
.header {
display: flex;
align-items: center;
background-color: #007BFF;
justify-content: space-between;
padding: 0;
box-sizing: border-box;
}
.header h1 {
margin: 0;
}
.header button {
margin-right: auto;
}
.logout-button {
position: relative;
}
.logout-button {
position: relative;
}
html, body {
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct" crossorigin="anonymous"></script>
<h1>Listado de Empresas<a href="/logout" class="logout-button"><i class="fas fa-door-open"></i></a></h1>
<div class="table">
<table class ="table table-hover table-responsive-xl">
<div class="header">
<button onclick="goBack()">Atras</button>
<h1>Listado de Empresas</h1>
<a href="/logout" class="logout-button"><i class="fas fa-door-open"></i></a>
</div>
<div class="table-container">
<table class="table">
<thead class="thread-light">
<tr>
<th>Id</th>
@ -42,7 +138,11 @@
</tbody>
</table>
</div>
<a href="/buscador" class="back-button">Atras</a>
<script>
function goBack() {
window.history.back();
}
</script>
</body>
</html>

@ -31,7 +31,12 @@
</tbody>
</table>
</div>
<a href="/buscador" class="back-button">Atras</a>
<button onclick="goBack()">Atras</button>
<script>
function goBack() {
window.history.back();
}
</script>
</body>
</html>

@ -34,7 +34,12 @@
</tbody>
</table>
</div>
<a href="/buscador" class="back-button">Atras</a>
<button onclick="goBack()">Atras</button>
<script>
function goBack() {
window.history.back();
}
</script>
</body>
</html>

@ -30,7 +30,12 @@
</tbody>
</table>
</div>
<a href="/buscador" class="back-button">Atras</a>
<button onclick="goBack()">Atras</button>
<script>
function goBack() {
window.history.back();
}
</script>
</body>
</html>

@ -30,7 +30,12 @@
</tbody>
</table>
</div>
<a href="/buscador" class="back-button">Atras</a>
<button onclick="goBack()">Atras</button>
<script>
function goBack() {
window.history.back();
}
</script>
</body>
</html>

@ -4,6 +4,10 @@
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css">
<link rel="stylesheet" type="text/css" th:href="@{/style.css}">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.11.3/css/jquery.dataTables.min.css">
<script type="text/javascript" src="https://cdn.datatables.net/1.11.3/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct" crossorigin="anonymous"></script>
<meta charset="UTF-8">
<title>Title</title>
<style>
@ -11,8 +15,6 @@
</style>
</head>
<body>
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct" crossorigin="anonymous"></script>
<h1>Listado de Sucursales<a href="/logout" class="logout-button"><i class="fas fa-door-open"></i></a></h1>
<div class="table">
<table class ="table table-hover table-responsive-xl">
@ -38,7 +40,12 @@
</tbody>
</table>
</div>
<a href="/buscador" class="back-button">Atras</a>
<button onclick="goBack()">Atras</button>
<script>
function goBack() {
window.history.back();
}
</script>
</body>
</html>

@ -1,48 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css">
<link rel="stylesheet" type="text/css" th:href="@{/style.css}">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">
<meta charset="UTF-8">
<title>Title</title>
<style>
</style>
</head>
<body>
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct" crossorigin="anonymous"></script>
<h1>Listado de Contactos<a href="/logout" class="logout-button"><i class="fas fa-door-open"></i></a></h1>
<div class="table">
<table class ="table table-hover table-responsive-xl">
<thead class="thread-light">
<tr>
<th>Id</th>
<th>Nombre</th>
<th>Apellido 1</th>
<th>Apellido 2</th>
<th>Correo</th>
<th>Telefono</th>
<th>Empressa</th>
</tr>
</thead>
<tbody>
<tr class="cell" th:each="contacto :${contactos}">
<td>[[${contacto.id}]]</td>
<td>[[${contacto.nombre}]]</td>
<td>[[${contacto.apellido}]]</td>
<td>[[${contacto.apellido2}]]</td>
<td>[[${contacto.correo}]]</td>
<td>[[${contacto.telefono}]]</td>
<td>[[${contacto.empresa.nombre}]]</td>
</tr>
</tbody>
</table>
</div>
<a th:href="@{/buscador/search(query=${session.query}, searchOption=${session.searchOption})}" class="back-button">Atras</a>
</body>
</html>

@ -1,38 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css">
<link rel="stylesheet" type="text/css" th:href="@{/style.css}">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">
<meta charset="UTF-8">
<title>Title</title>
<style>
</style>
</head>
<body>
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct" crossorigin="anonymous"></script>
<h1>Listado de Ciclos<a href="/logout" class="logout-button"><i class="fas fa-door-open"></i></a></h1>
<div class="table">
<table class ="table table-hover table-responsive-xl">
<thead class="thread-light">
<tr>
<th>Id</th>
<th>Nombre</th>
<th>Familia</th>
</tr>
</thead>
<tbody>
<tr class="cell" th:each="ciclo :${ciclos}">
<td>[[${ciclo.id}]]</td>
<td>[[${ciclo.nombre}]]</td>
<td>[[${ciclo.familia.nombre}]]</td>
</tr>
</tbody>
</table>
</div>
<a th:href="@{/buscador/search(query=${session.query}, searchOption=${session.searchOption})}" class="back-button">Atras</a>
</body>
</html>

@ -1,48 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css">
<link rel="stylesheet" type="text/css" th:href="@{/style.css}">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">
<meta charset="UTF-8">
<title>Title</title>
<style>
</style>
</head>
<body>
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct" crossorigin="anonymous"></script>
<h1>Listado de Empresas<a href="/logout" class="logout-button"><i class="fas fa-door-open"></i></a></h1>
<div class="table">
<table class ="table table-hover table-responsive-xl">
<thead class="thread-light">
<tr>
<th>Id</th>
<th>Nombre</th>
<th>Cif</th>
<th>Correo</th>
<th>Telefono</th>
<th class="keywords-cell">Keywords</th>
<th>Sector</th>
</tr>
</thead>
<tbody>
<tr class="cell" th:each="empresa :${empresas}">
<td>[[${empresa.id}]]</td>
<td>[[${empresa.nombre}]]</td>
<td>[[${empresa.cif}]]</td>
<td>[[${empresa.correo}]]</td>
<td>[[${empresa.telefono}]]</td>
<td class="keywords-cell">
<div th:each="keyword : ${#strings.arraySplit(empresa.keywords, ',')}">[[${keyword}]]</div>
</td>
<td>[[${empresa.sector.nombre}]]</td>
</tr>
</tbody>
</table>
</div>
<a th:href="@{/buscador/search(query=${session.query}, searchOption=${session.searchOption})}" class="back-button">Atras</a>
</body>
</html>
Loading…
Cancel
Save

Powered by INFORMATICA.FP.EDU.ES.