From e3c9228185414e69e832ab828c0151a9ac614798 Mon Sep 17 00:00:00 2001 From: Angel Caballero Dominguez Date: Sun, 28 Mar 2021 15:27:46 +0200 Subject: [PATCH 1/5] Avance en las vistas de modificacion de las ofertas MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Se ha realizado la mayor parte de las vistas de modificacion de las ofertas, así como algunos cambios menores en las vistas de mostrar detalles --- src/main/less/cheapy.less | 73 ++++++++++++++++++- .../resources/messages/messages_es.properties | 4 + .../createOrUpdateFoodOfferForm.jsp | 27 ++++--- .../WEB-INF/jsp/foodOffers/foodOffersShow.jsp | 38 ++++++---- .../nuOffers/createOrUpdateNuOfferForm.jsp | 27 ++++--- .../WEB-INF/jsp/nuOffers/nuOffersShow.jsp | 36 +++++---- .../createOrUpdateSpeedOfferForm.jsp | 27 ++++--- .../jsp/speedOffers/speedOffersShow.jsp | 35 +++++---- .../createOrUpdateTimeOfferForm.jsp | 27 ++++--- .../WEB-INF/jsp/timeOffers/timeOffersShow.jsp | 36 +++++---- 10 files changed, 232 insertions(+), 98 deletions(-) diff --git a/src/main/less/cheapy.less b/src/main/less/cheapy.less index 2ad446686..17d012e1f 100644 --- a/src/main/less/cheapy.less +++ b/src/main/less/cheapy.less @@ -240,6 +240,30 @@ img.img-responsive{ background-color: rgb(40, 140, 215); } +.btn-mod{ + display: table; + margin: 0 auto; + float:left; +} + +.btn-mod button { + background-color: rgb(0, 64, 128); + border: 1px solid rgb(0, 0, 160); + color: white; + padding: 10px 24px; + cursor: pointer; + display: block; +} + +.btn-mod button:not(:last-child) { + border-bottom: none; +} + + +.btn-mod button:hover { + background-color: rgb(40, 140, 215); +} + #foodOfferTable th { width: 25%; } @@ -278,7 +302,52 @@ img.img-responsive{ .btn-return{ display: table; margin: 0 auto; - width: 100%; + float:left; +} + +.btns-edit{ + display: table; + margin: 0 auto; + float:right; +} + +.btns-edit button{ + background-color: rgb(0, 64, 128); + border: 1px solid rgb(0, 0, 160); + color: white; + padding: 10px 24px; + cursor: pointer; +} + +.btns-edit button:not(:last-child) { + border-bottom: none; +} + + +.btns-edit button:hover { + background-color: rgb(40, 140, 215); +} + +.btns-delete{ + display: table; + margin: 0 auto; + float:left; +} + +.btns-delete button{ + background-color: rgb(0, 64, 128); + border: 1px solid rgb(0, 0, 160); + color: white; + padding: 10px 24px; + cursor: pointer; +} + +.btns-delete button:not(:last-child) { + border-bottom: none; +} + +.btns-delete button:hover { + background-color: rgb(40, 140, 215); } .btn-return button { @@ -288,14 +357,12 @@ img.img-responsive{ padding: 10px 24px; cursor: pointer; display: block; - left: 0%; } .btn-return button:not(:last-child) { border-bottom: none; } - .btn-return button:hover { background-color: rgb(40, 140, 215); } diff --git a/src/main/resources/messages/messages_es.properties b/src/main/resources/messages/messages_es.properties index 81b71314d..f17c6626b 100644 --- a/src/main/resources/messages/messages_es.properties +++ b/src/main/resources/messages/messages_es.properties @@ -1,4 +1,8 @@ welcome=Bienvenido a +new=Nueva +deleteOffer=Eliminar Oferta +cancel=Cancelar +deleteOfferMessage=Confirme que quiere eliminar su oferta listOffers=Ver Ofertas foodOffers=Ofertas por plato especifico foodOffer=Oferta por plato especifico diff --git a/src/main/webapp/WEB-INF/jsp/foodOffers/createOrUpdateFoodOfferForm.jsp b/src/main/webapp/WEB-INF/jsp/foodOffers/createOrUpdateFoodOfferForm.jsp index daeeec363..5c636d761 100644 --- a/src/main/webapp/WEB-INF/jsp/foodOffers/createOrUpdateFoodOfferForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/foodOffers/createOrUpdateFoodOfferForm.jsp @@ -5,10 +5,11 @@ <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ taglib prefix="petclinic" tagdir="/WEB-INF/tags" %> + -

- New FoodOffer +

+

@@ -22,14 +23,20 @@
- - - - - - - - +
+ + + + + + + + +
diff --git a/src/main/webapp/WEB-INF/jsp/foodOffers/foodOffersShow.jsp b/src/main/webapp/WEB-INF/jsp/foodOffers/foodOffersShow.jsp index 44b10a7f0..211212e0c 100644 --- a/src/main/webapp/WEB-INF/jsp/foodOffers/foodOffersShow.jsp +++ b/src/main/webapp/WEB-INF/jsp/foodOffers/foodOffersShow.jsp @@ -29,7 +29,7 @@ - + @@ -39,20 +39,28 @@ -
- -
+
+
+ +
- - - - Editar oferta - - - - - Desactivar oferta +
+ + + + + + + + + +
+
diff --git a/src/main/webapp/WEB-INF/jsp/nuOffers/createOrUpdateNuOfferForm.jsp b/src/main/webapp/WEB-INF/jsp/nuOffers/createOrUpdateNuOfferForm.jsp index 904bbfffb..26707db2c 100644 --- a/src/main/webapp/WEB-INF/jsp/nuOffers/createOrUpdateNuOfferForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/nuOffers/createOrUpdateNuOfferForm.jsp @@ -5,10 +5,11 @@ <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ taglib prefix="petclinic" tagdir="/WEB-INF/tags" %> + -

- New NuOffer +

+

@@ -28,14 +29,20 @@
- - - - - - - - +
+ + + + + + + + +
diff --git a/src/main/webapp/WEB-INF/jsp/nuOffers/nuOffersShow.jsp b/src/main/webapp/WEB-INF/jsp/nuOffers/nuOffersShow.jsp index f5a351168..565d2bd43 100644 --- a/src/main/webapp/WEB-INF/jsp/nuOffers/nuOffersShow.jsp +++ b/src/main/webapp/WEB-INF/jsp/nuOffers/nuOffersShow.jsp @@ -50,20 +50,28 @@ -
- +
+
+ +
+ +
+ + + + + + + + + +
- - - - Editar oferta - - - - - Desactivar oferta - diff --git a/src/main/webapp/WEB-INF/jsp/speedOffers/createOrUpdateSpeedOfferForm.jsp b/src/main/webapp/WEB-INF/jsp/speedOffers/createOrUpdateSpeedOfferForm.jsp index 3327373db..2011952d6 100644 --- a/src/main/webapp/WEB-INF/jsp/speedOffers/createOrUpdateSpeedOfferForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/speedOffers/createOrUpdateSpeedOfferForm.jsp @@ -5,10 +5,11 @@ <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ taglib prefix="petclinic" tagdir="/WEB-INF/tags" %> + -

- New SpeedOffer +

+

@@ -26,14 +27,20 @@
- - - - - - - - +
+ + + + + + + + +
diff --git a/src/main/webapp/WEB-INF/jsp/speedOffers/speedOffersShow.jsp b/src/main/webapp/WEB-INF/jsp/speedOffers/speedOffersShow.jsp index de2a32a80..8659f8097 100644 --- a/src/main/webapp/WEB-INF/jsp/speedOffers/speedOffersShow.jsp +++ b/src/main/webapp/WEB-INF/jsp/speedOffers/speedOffersShow.jsp @@ -50,20 +50,29 @@ -
- +
+
+ +
+ +
+ + + + + + + + + +
- - - - Editar oferta - - - - - Desactivar oferta diff --git a/src/main/webapp/WEB-INF/jsp/timeOffers/createOrUpdateTimeOfferForm.jsp b/src/main/webapp/WEB-INF/jsp/timeOffers/createOrUpdateTimeOfferForm.jsp index e483ed81b..770fb5428 100644 --- a/src/main/webapp/WEB-INF/jsp/timeOffers/createOrUpdateTimeOfferForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/timeOffers/createOrUpdateTimeOfferForm.jsp @@ -5,10 +5,11 @@ <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ taglib prefix="petclinic" tagdir="/WEB-INF/tags" %> + -

- New TimeOffer +

+

@@ -25,14 +26,20 @@
- - - - - - - - +
+ + + + + + + + +
diff --git a/src/main/webapp/WEB-INF/jsp/timeOffers/timeOffersShow.jsp b/src/main/webapp/WEB-INF/jsp/timeOffers/timeOffersShow.jsp index 3db0c885a..b0ffd00a6 100644 --- a/src/main/webapp/WEB-INF/jsp/timeOffers/timeOffersShow.jsp +++ b/src/main/webapp/WEB-INF/jsp/timeOffers/timeOffersShow.jsp @@ -32,20 +32,30 @@ - - - - Editar oferta - - - - - Desactivar oferta +
+
+ +
-
- +
+ + + + + + + + + +
+ + From d5ded1d809dcc83abfd3c9bf4afb909c44e498e7 Mon Sep 17 00:00:00 2001 From: David Date: Thu, 1 Apr 2021 16:53:19 +0200 Subject: [PATCH 2/5] =?UTF-8?q?A=C3=B1adido=20placeholders=20a=20los=20for?= =?UTF-8?q?mularios,=20arreglo=20del=20login=20y=20m=C3=A1s=20cambios?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../configuration/SecurityConfiguration.java | 4 +-- .../cheapy/web/OfertaController.java | 9 +++++ src/main/less/cheapy.less | 32 +++++++++++++++++ .../resources/messages/messages_es.properties | 25 +++++++------ .../createOrUpdateFoodOfferForm.jsp | 8 ++--- src/main/webapp/WEB-INF/jsp/login.jsp | 19 ++++++---- .../nuOffers/createOrUpdateNuOfferForm.jsp | 16 ++++----- .../WEB-INF/jsp/offers/offersCreate.jsp | 36 +++++++++++++++++++ .../createOrUpdateSpeedOfferForm.jsp | 16 ++++----- .../createOrUpdateTimeOfferForm.jsp | 10 +++--- src/main/webapp/WEB-INF/jsp/welcome.jsp | 16 +++++++-- src/main/webapp/WEB-INF/tags/inputField.tag | 6 ++-- src/main/webapp/WEB-INF/tags/menu.tag | 2 +- 13 files changed, 150 insertions(+), 49 deletions(-) create mode 100644 src/main/webapp/WEB-INF/jsp/offers/offersCreate.jsp diff --git a/src/main/java/org/springframework/cheapy/configuration/SecurityConfiguration.java b/src/main/java/org/springframework/cheapy/configuration/SecurityConfiguration.java index 9435b1b30..747947a5a 100644 --- a/src/main/java/org/springframework/cheapy/configuration/SecurityConfiguration.java +++ b/src/main/java/org/springframework/cheapy/configuration/SecurityConfiguration.java @@ -47,10 +47,10 @@ public class SecurityConfiguration extends WebSecurityConfigurerAdapter { .antMatchers("/offers/speed/**").hasAnyAuthority("admin", "cliente") .antMatchers("/offers/food/**").hasAnyAuthority("admin", "cliente") .antMatchers("/owners/**").hasAnyAuthority("owner", "admin") - + .antMatchers("/clients/new").permitAll() .antMatchers("/offers").permitAll() - + .antMatchers("/offersCreate").hasAuthority("cliente") .and().formLogin() diff --git a/src/main/java/org/springframework/cheapy/web/OfertaController.java b/src/main/java/org/springframework/cheapy/web/OfertaController.java index c7cb3de71..d1fc6a407 100644 --- a/src/main/java/org/springframework/cheapy/web/OfertaController.java +++ b/src/main/java/org/springframework/cheapy/web/OfertaController.java @@ -12,6 +12,9 @@ import org.springframework.cheapy.service.FoodOfferService; import org.springframework.cheapy.service.NuOfferService; import org.springframework.cheapy.service.SpeedOfferService; import org.springframework.cheapy.service.TimeOfferService; +import org.springframework.security.authentication.AnonymousAuthenticationToken; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; @@ -50,6 +53,12 @@ public class OfertaController { return "offers/offersList"; } + + @GetMapping("/offersCreate") + public String createOffers() { + + return "offers/offersCreate"; + } // @GetMapping("/owners/{ownerId}/edit") // public String initUpdateOwnerForm(@PathVariable("ownerId") int ownerId, Model model) { diff --git a/src/main/less/cheapy.less b/src/main/less/cheapy.less index 17d012e1f..52ebdf6ab 100644 --- a/src/main/less/cheapy.less +++ b/src/main/less/cheapy.less @@ -240,6 +240,38 @@ img.img-responsive{ background-color: rgb(40, 140, 215); } +.btn-home{ + display: table; + margin: 0 auto; +} + +.btn-create button { + background-color: rgb(40, 140, 215); + border: 1px solid rgb(0, 0, 160); + color: white; + padding: 10px 24px; + cursor: pointer; + width: 70%; + display: block; + +} + +.btn-create button:not(:last-child) { + border-bottom: none; +} + + +.btn-create button:hover { + background-color: rgb(0, 64, 128) +} + +.btn-create-max button { + padding: 20px; + margin-left:auto; + margin-right: auto; + margin-bottom: 20px; +} + .btn-mod{ display: table; margin: 0 auto; diff --git a/src/main/resources/messages/messages_es.properties b/src/main/resources/messages/messages_es.properties index f17c6626b..52ca403e5 100644 --- a/src/main/resources/messages/messages_es.properties +++ b/src/main/resources/messages/messages_es.properties @@ -4,10 +4,11 @@ deleteOffer=Eliminar Oferta cancel=Cancelar deleteOfferMessage=Confirme que quiere eliminar su oferta listOffers=Ver Ofertas -foodOffers=Ofertas por plato especifico -foodOffer=Oferta por plato especifico -nuOffers=Ofertas por numero de comensales -nuOffer=Oferta por numero de comensales +createOffers=Crear Ofertas +foodOffers=Ofertas por plato específico +foodOffer=Oferta por plato específico +nuOffers=Ofertas por número de comensales +nuOffer=Oferta por número de comensales speedOffers=Ofertas rapidez comiendo speedOffer=Oferta por comer veloz timeOffers=Ofertas por franja horaria @@ -27,12 +28,16 @@ offerBeginning=Inicio de la oferta endDate=Fecha fin offerEnding=Fin de la oferta details=Detalles -offerCode=Codigo de la oferta +offerCode=Código de la oferta return=Volver -required=Es requeridOfertas por franja horariao +required=Es requerido Ofertas por franja horaria notFound=No ha sido encontrado duplicate=Ya se encuentra en uso -nonNumeric=Sólo debe contener numeros -duplicateFormSubmission=No se permite el envío de formularios duplicados -typeMismatch.date=Fecha invalida -typeMismatch.birthDate=Fecha invalida \ No newline at end of file +nonNumeric=Sólo debe contener números +duplicateFormSubmission=No se permite el envío de formularios duplicados +typeMismatch.date=Fecha inválida +typeMismatch.birthDate=Fecha inválida +createFoodOffers= Crear ofertas por plato específico +createNuOffers= Crear ofertas por número de comensales +createSpeedOffers= Crear ofertas por rapidez comiendo +createTimeOffers= Crear ofertas por franja horaria \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/foodOffers/createOrUpdateFoodOfferForm.jsp b/src/main/webapp/WEB-INF/jsp/foodOffers/createOrUpdateFoodOfferForm.jsp index 5c636d761..b5e5dcfaa 100644 --- a/src/main/webapp/WEB-INF/jsp/foodOffers/createOrUpdateFoodOfferForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/foodOffers/createOrUpdateFoodOfferForm.jsp @@ -16,10 +16,10 @@ - - - - + + + +
diff --git a/src/main/webapp/WEB-INF/jsp/login.jsp b/src/main/webapp/WEB-INF/jsp/login.jsp index 796cdceeb..89f886557 100644 --- a/src/main/webapp/WEB-INF/jsp/login.jsp +++ b/src/main/webapp/WEB-INF/jsp/login.jsp @@ -1,6 +1,8 @@ <%@ page session="false" trimDirectiveWhitespaces="true" %> <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %> <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> @@ -275,20 +277,23 @@
- +
+ +

El usuario y/o la contraseña son incorrectos

+ +
-
-

Invalid username or password

-
+ +
diff --git a/src/main/webapp/WEB-INF/jsp/offers/offersCreate.jsp b/src/main/webapp/WEB-INF/jsp/offers/offersCreate.jsp new file mode 100644 index 000000000..51fc8d8b1 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/offers/offersCreate.jsp @@ -0,0 +1,36 @@ +<%@ page session="false" trimDirectiveWhitespaces="true" %> +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %> + + + +
+
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+
diff --git a/src/main/webapp/WEB-INF/jsp/speedOffers/createOrUpdateSpeedOfferForm.jsp b/src/main/webapp/WEB-INF/jsp/speedOffers/createOrUpdateSpeedOfferForm.jsp index 2011952d6..8f76164d5 100644 --- a/src/main/webapp/WEB-INF/jsp/speedOffers/createOrUpdateSpeedOfferForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/speedOffers/createOrUpdateSpeedOfferForm.jsp @@ -16,14 +16,14 @@ - - - - - - - - + + + + + + + +
diff --git a/src/main/webapp/WEB-INF/jsp/timeOffers/createOrUpdateTimeOfferForm.jsp b/src/main/webapp/WEB-INF/jsp/timeOffers/createOrUpdateTimeOfferForm.jsp index 770fb5428..82d748b3a 100644 --- a/src/main/webapp/WEB-INF/jsp/timeOffers/createOrUpdateTimeOfferForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/timeOffers/createOrUpdateTimeOfferForm.jsp @@ -16,12 +16,12 @@ - - + + - - - + + +
diff --git a/src/main/webapp/WEB-INF/jsp/welcome.jsp b/src/main/webapp/WEB-INF/jsp/welcome.jsp index 95c506f42..7f7ac42a2 100644 --- a/src/main/webapp/WEB-INF/jsp/welcome.jsp +++ b/src/main/webapp/WEB-INF/jsp/welcome.jsp @@ -1,11 +1,14 @@ <%@ page session="false" trimDirectiveWhitespaces="true" %> <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %> +<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> - +

@@ -14,10 +17,19 @@
-
+ + +
+ +
+
+
diff --git a/src/main/webapp/WEB-INF/tags/inputField.tag b/src/main/webapp/WEB-INF/tags/inputField.tag index 0db10f39d..72de53f0b 100644 --- a/src/main/webapp/WEB-INF/tags/inputField.tag +++ b/src/main/webapp/WEB-INF/tags/inputField.tag @@ -5,15 +5,17 @@ description="Name of corresponding property in bean object" %> <%@ attribute name="label" required="true" rtexprvalue="true" description="Label appears in red color if input is considered as invalid after submission" %> +<%@ attribute name="placeholder" required="false" rtexprvalue="true" + description="Placeholder para los campos en los input fields" %>
- +
- + diff --git a/src/main/webapp/WEB-INF/tags/menu.tag b/src/main/webapp/WEB-INF/tags/menu.tag index daa63faa2..08772d137 100644 --- a/src/main/webapp/WEB-INF/tags/menu.tag +++ b/src/main/webapp/WEB-INF/tags/menu.tag @@ -25,7 +25,7 @@ - Home + Inicio Date: Thu, 1 Apr 2021 18:52:43 +0200 Subject: [PATCH 3/5] =?UTF-8?q?A=C3=B1adidos=20los=20botones=20de=20public?= =?UTF-8?q?ar=20ofertas=20y=20activar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WEB-INF/jsp/offers/food/foodOffersShow.jsp | 5 +++++ .../webapp/WEB-INF/jsp/offers/myOffersList.jsp | 16 ++++++++++++---- .../WEB-INF/jsp/offers/nu/nuOffersShow.jsp | 5 +++++ .../WEB-INF/jsp/offers/speed/speedOffersShow.jsp | 5 +++++ .../WEB-INF/jsp/offers/time/timeOffersShow.jsp | 5 +++++ 5 files changed, 32 insertions(+), 4 deletions(-) diff --git a/src/main/webapp/WEB-INF/jsp/offers/food/foodOffersShow.jsp b/src/main/webapp/WEB-INF/jsp/offers/food/foodOffersShow.jsp index 44b10a7f0..043248d25 100644 --- a/src/main/webapp/WEB-INF/jsp/offers/food/foodOffersShow.jsp +++ b/src/main/webapp/WEB-INF/jsp/offers/food/foodOffersShow.jsp @@ -49,6 +49,11 @@ Editar oferta + + + + + Activar oferta diff --git a/src/main/webapp/WEB-INF/jsp/offers/myOffersList.jsp b/src/main/webapp/WEB-INF/jsp/offers/myOffersList.jsp index 201065542..cdaa65a66 100644 --- a/src/main/webapp/WEB-INF/jsp/offers/myOffersList.jsp +++ b/src/main/webapp/WEB-INF/jsp/offers/myOffersList.jsp @@ -16,7 +16,9 @@ - + + + Nueva oferta @@ -55,7 +57,9 @@ - + + + Nueva oferta @@ -91,7 +95,9 @@ - + + + Nueva oferta @@ -128,7 +134,9 @@ - + + + Nueva oferta diff --git a/src/main/webapp/WEB-INF/jsp/offers/nu/nuOffersShow.jsp b/src/main/webapp/WEB-INF/jsp/offers/nu/nuOffersShow.jsp index f5a351168..8f916aeb6 100644 --- a/src/main/webapp/WEB-INF/jsp/offers/nu/nuOffersShow.jsp +++ b/src/main/webapp/WEB-INF/jsp/offers/nu/nuOffersShow.jsp @@ -60,6 +60,11 @@ Editar oferta + + + + + Activar oferta diff --git a/src/main/webapp/WEB-INF/jsp/offers/speed/speedOffersShow.jsp b/src/main/webapp/WEB-INF/jsp/offers/speed/speedOffersShow.jsp index de2a32a80..54d492ac2 100644 --- a/src/main/webapp/WEB-INF/jsp/offers/speed/speedOffersShow.jsp +++ b/src/main/webapp/WEB-INF/jsp/offers/speed/speedOffersShow.jsp @@ -61,6 +61,11 @@ Editar oferta + + + + Activar oferta + diff --git a/src/main/webapp/WEB-INF/jsp/offers/time/timeOffersShow.jsp b/src/main/webapp/WEB-INF/jsp/offers/time/timeOffersShow.jsp index 3db0c885a..a291144d9 100644 --- a/src/main/webapp/WEB-INF/jsp/offers/time/timeOffersShow.jsp +++ b/src/main/webapp/WEB-INF/jsp/offers/time/timeOffersShow.jsp @@ -37,6 +37,11 @@ Editar oferta + + + + Activar oferta + From 404547547950db17fdf7a59c9fb3d8ccc37095ee Mon Sep 17 00:00:00 2001 From: David Date: Fri, 2 Apr 2021 14:06:02 +0200 Subject: [PATCH 4/5] =?UTF-8?q?Cambios=20de=20dise=C3=B1o=20en=20algunas?= =?UTF-8?q?=20vistas=20(sobretodo=20en=20las=20vistas=20de=20ofertas)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/less/cheapy.less | 33 ++++++++++++++-- .../resources/messages/messages_es.properties | 26 +++++++------ .../createOrUpdateFoodOfferForm.jsp | 26 +++++++++---- .../WEB-INF/jsp/foodOffers/foodOffersShow.jsp | 10 ++++- src/main/webapp/WEB-INF/jsp/login.jsp | 4 +- .../nuOffers/createOrUpdateNuOfferForm.jsp | 34 ++++++++++------ .../WEB-INF/jsp/nuOffers/nuOffersShow.jsp | 20 ++++++---- .../WEB-INF/jsp/offers/offersCreate.jsp | 10 +++++ .../webapp/WEB-INF/jsp/offers/offersList.jsp | 39 +++++++++++++++++++ .../createOrUpdateSpeedOfferForm.jsp | 34 ++++++++++------ .../jsp/speedOffers/speedOffersShow.jsp | 21 ++++++---- .../createOrUpdateTimeOfferForm.jsp | 28 +++++++++---- .../WEB-INF/jsp/timeOffers/timeOffersShow.jsp | 19 +++++++-- 13 files changed, 229 insertions(+), 75 deletions(-) diff --git a/src/main/less/cheapy.less b/src/main/less/cheapy.less index 52ebdf6ab..6844c25df 100644 --- a/src/main/less/cheapy.less +++ b/src/main/less/cheapy.less @@ -56,7 +56,7 @@ .table-filter { background-color: @spring-brown; - padding: 9px 12px; + padding: 5px 12px; } .nav > li > a { @@ -298,18 +298,23 @@ img.img-responsive{ #foodOfferTable th { width: 25%; + text-align: center; + } #nuOfferTable th { - width: 33%; + width: 25%; +text-align: center; } #speedOfferTable th { - width: 33%; + width: 25%; +text-align: center; } #timeOfferTable th { - width: 33%; + width: 25%; +text-align: center; } .btn-detalles button { @@ -401,18 +406,38 @@ img.img-responsive{ #foodOfferTable td{ vertical-align:middle; +text-align: center; } #nuOfferTable td{ vertical-align:middle; +text-align: center; } #speedOfferTable td{ vertical-align:middle; +text-align: center; } #timeOfferTable td{ vertical-align:middle; +text-align: center; +} + +#nuOffer-table th{ + text-align: center; +} + +#nuOffer-table td{ + text-align: center; +} + +#speedOffer-table th{ + text-align: center; +} + +#speedOffer-table td{ + text-align: center; } #nuOffer-table tr:nth-child(3){ diff --git a/src/main/resources/messages/messages_es.properties b/src/main/resources/messages/messages_es.properties index 52ca403e5..c93d14f77 100644 --- a/src/main/resources/messages/messages_es.properties +++ b/src/main/resources/messages/messages_es.properties @@ -5,10 +5,10 @@ cancel=Cancelar deleteOfferMessage=Confirme que quiere eliminar su oferta listOffers=Ver Ofertas createOffers=Crear Ofertas -foodOffers=Ofertas por plato específico -foodOffer=Oferta por plato específico -nuOffers=Ofertas por número de comensales -nuOffer=Oferta por número de comensales +foodOffers=Ofertas por plato espec�fico +foodOffer=Oferta por plato espec�fico +nuOffers=Ofertas por n�mero de comensales +nuOffer=Oferta por n�mero de comensales speedOffers=Ofertas rapidez comiendo speedOffer=Oferta por comer veloz timeOffers=Ofertas por franja horaria @@ -28,16 +28,18 @@ offerBeginning=Inicio de la oferta endDate=Fecha fin offerEnding=Fin de la oferta details=Detalles -offerCode=Código de la oferta +offerCode=C�digo de la oferta return=Volver required=Es requerido Ofertas por franja horaria notFound=No ha sido encontrado duplicate=Ya se encuentra en uso -nonNumeric=Sólo debe contener números -duplicateFormSubmission=No se permite el envío de formularios duplicados -typeMismatch.date=Fecha inválida -typeMismatch.birthDate=Fecha inválida -createFoodOffers= Crear ofertas por plato específico -createNuOffers= Crear ofertas por número de comensales +nonNumeric=S�lo debe contener n�meros +duplicateFormSubmission=No se permite el env�o de formularios duplicados +typeMismatch.date=Fecha inv�lida +typeMismatch.birthDate=Fecha inv�lida +createFoodOffers= Crear ofertas por plato espec�fico +createNuOffers= Crear ofertas por n�mero de comensales createSpeedOffers= Crear ofertas por rapidez comiendo -createTimeOffers= Crear ofertas por franja horaria \ No newline at end of file +createTimeOffers= Crear ofertas por franja horaria +init= Inicio del intervalo +finish= Fin del intervalo \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/foodOffers/createOrUpdateFoodOfferForm.jsp b/src/main/webapp/WEB-INF/jsp/foodOffers/createOrUpdateFoodOfferForm.jsp index b5e5dcfaa..a2366158e 100644 --- a/src/main/webapp/WEB-INF/jsp/foodOffers/createOrUpdateFoodOfferForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/foodOffers/createOrUpdateFoodOfferForm.jsp @@ -4,10 +4,10 @@ <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> -<%@ taglib prefix="petclinic" tagdir="/WEB-INF/tags" %> +<%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %> - +

@@ -16,10 +16,10 @@ - - - - + + + +
@@ -40,4 +40,16 @@
- + +
+ +
+ + + diff --git a/src/main/webapp/WEB-INF/jsp/foodOffers/foodOffersShow.jsp b/src/main/webapp/WEB-INF/jsp/foodOffers/foodOffersShow.jsp index 211212e0c..36ff24281 100644 --- a/src/main/webapp/WEB-INF/jsp/foodOffers/foodOffersShow.jsp +++ b/src/main/webapp/WEB-INF/jsp/foodOffers/foodOffersShow.jsp @@ -29,7 +29,7 @@ - + @@ -41,7 +41,7 @@
-
@@ -63,4 +63,10 @@
+ + diff --git a/src/main/webapp/WEB-INF/jsp/login.jsp b/src/main/webapp/WEB-INF/jsp/login.jsp index 89f886557..aee0598c1 100644 --- a/src/main/webapp/WEB-INF/jsp/login.jsp +++ b/src/main/webapp/WEB-INF/jsp/login.jsp @@ -296,10 +296,10 @@ - +
diff --git a/src/main/webapp/WEB-INF/jsp/nuOffers/createOrUpdateNuOfferForm.jsp b/src/main/webapp/WEB-INF/jsp/nuOffers/createOrUpdateNuOfferForm.jsp index 352522764..d693e8ae9 100644 --- a/src/main/webapp/WEB-INF/jsp/nuOffers/createOrUpdateNuOfferForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/nuOffers/createOrUpdateNuOfferForm.jsp @@ -4,10 +4,10 @@ <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> -<%@ taglib prefix="petclinic" tagdir="/WEB-INF/tags" %> +<%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %> - +

@@ -16,15 +16,15 @@ - - + + - - - - - - + + + + + +
@@ -46,4 +46,16 @@
-
+ +
+ +
+ + + diff --git a/src/main/webapp/WEB-INF/jsp/nuOffers/nuOffersShow.jsp b/src/main/webapp/WEB-INF/jsp/nuOffers/nuOffersShow.jsp index 565d2bd43..af8ceb975 100644 --- a/src/main/webapp/WEB-INF/jsp/nuOffers/nuOffersShow.jsp +++ b/src/main/webapp/WEB-INF/jsp/nuOffers/nuOffersShow.jsp @@ -22,27 +22,27 @@ - + - + - + - + Meta bronce - + - + @@ -52,7 +52,7 @@
-
@@ -74,4 +74,10 @@
+ + diff --git a/src/main/webapp/WEB-INF/jsp/offers/offersCreate.jsp b/src/main/webapp/WEB-INF/jsp/offers/offersCreate.jsp index 51fc8d8b1..d0b418471 100644 --- a/src/main/webapp/WEB-INF/jsp/offers/offersCreate.jsp +++ b/src/main/webapp/WEB-INF/jsp/offers/offersCreate.jsp @@ -33,4 +33,14 @@
+
+ +
+ diff --git a/src/main/webapp/WEB-INF/jsp/offers/offersList.jsp b/src/main/webapp/WEB-INF/jsp/offers/offersList.jsp index 30ee72a07..baa17bde9 100644 --- a/src/main/webapp/WEB-INF/jsp/offers/offersList.jsp +++ b/src/main/webapp/WEB-INF/jsp/offers/offersList.jsp @@ -14,6 +14,7 @@ + @@ -25,6 +26,9 @@ + + + @@ -55,6 +59,8 @@ + + @@ -69,6 +75,12 @@ + + + + + + @@ -91,6 +103,8 @@ + + @@ -105,6 +119,12 @@ + + + + + + @@ -128,6 +148,8 @@ + + @@ -141,6 +163,13 @@ + + + + + + + @@ -155,4 +184,14 @@ +
+ +
+ diff --git a/src/main/webapp/WEB-INF/jsp/speedOffers/createOrUpdateSpeedOfferForm.jsp b/src/main/webapp/WEB-INF/jsp/speedOffers/createOrUpdateSpeedOfferForm.jsp index 8f76164d5..d466bc2f5 100644 --- a/src/main/webapp/WEB-INF/jsp/speedOffers/createOrUpdateSpeedOfferForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/speedOffers/createOrUpdateSpeedOfferForm.jsp @@ -4,10 +4,10 @@ <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> -<%@ taglib prefix="petclinic" tagdir="/WEB-INF/tags" %> +<%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %> - +

@@ -16,14 +16,14 @@ - - - - - - - - + + + + + + + +
@@ -44,4 +44,16 @@
-
+ +
+ +
+ + + diff --git a/src/main/webapp/WEB-INF/jsp/speedOffers/speedOffersShow.jsp b/src/main/webapp/WEB-INF/jsp/speedOffers/speedOffersShow.jsp index 8659f8097..85a81a438 100644 --- a/src/main/webapp/WEB-INF/jsp/speedOffers/speedOffersShow.jsp +++ b/src/main/webapp/WEB-INF/jsp/speedOffers/speedOffersShow.jsp @@ -22,27 +22,27 @@ - + - + - + - + - + - + @@ -52,7 +52,7 @@
-
@@ -73,6 +73,11 @@ Desactivar oferta
- + + diff --git a/src/main/webapp/WEB-INF/jsp/timeOffers/createOrUpdateTimeOfferForm.jsp b/src/main/webapp/WEB-INF/jsp/timeOffers/createOrUpdateTimeOfferForm.jsp index 82d748b3a..bc8c6fde5 100644 --- a/src/main/webapp/WEB-INF/jsp/timeOffers/createOrUpdateTimeOfferForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/timeOffers/createOrUpdateTimeOfferForm.jsp @@ -4,10 +4,10 @@ <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> -<%@ taglib prefix="petclinic" tagdir="/WEB-INF/tags" %> +<%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %> - +

@@ -16,12 +16,12 @@ - - + + - - - + + +
@@ -43,4 +43,16 @@
-
+ +
+ +
+ + + diff --git a/src/main/webapp/WEB-INF/jsp/timeOffers/timeOffersShow.jsp b/src/main/webapp/WEB-INF/jsp/timeOffers/timeOffersShow.jsp index b0ffd00a6..f39937b1a 100644 --- a/src/main/webapp/WEB-INF/jsp/timeOffers/timeOffersShow.jsp +++ b/src/main/webapp/WEB-INF/jsp/timeOffers/timeOffersShow.jsp @@ -11,7 +11,7 @@

- +
@@ -21,9 +21,17 @@ + + + + + + + + - + @@ -34,7 +42,7 @@
-
@@ -56,6 +64,11 @@
+ From f7b8a236f01400077c12872b71f2ae92bf60a3bc Mon Sep 17 00:00:00 2001 From: David Date: Fri, 2 Apr 2021 16:27:52 +0200 Subject: [PATCH 5/5] =?UTF-8?q?Arreglos=20del=20merge=20m=C3=A1s=20cambios?= =?UTF-8?q?=20a=20las=20nuevas=20vistas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../configuration/SecurityConfiguration.java | 4 +-- .../cheapy/web/FoodOfferController.java | 2 +- .../cheapy/web/NuOfferController.java | 2 +- .../cheapy/web/SpeedOfferController.java | 2 +- .../cheapy/web/TimeOfferController.java | 2 +- src/main/less/cheapy.less | 7 ++++ .../jsp/offers/food/foodOffersDisable.jsp | 6 ++-- .../jsp/offers/food/foodOffersShow.jsp | 14 +++++--- .../WEB-INF/jsp/offers/myOffersList.jsp | 35 +++++++++++++----- .../WEB-INF/jsp/offers/nu/nuOffersDisable.jsp | 16 ++++----- .../WEB-INF/jsp/offers/nu/nuOffersShow.jsp | 36 ++++++++++--------- .../WEB-INF/jsp/offers/offersCreate.jsp | 8 ++--- .../webapp/WEB-INF/jsp/offers/offersList.jsp | 28 ++++++++++++--- .../jsp/offers/speed/speedOffersDisable.jsp | 12 +++---- .../jsp/offers/speed/speedOffersShow.jsp | 35 ++++++++++-------- .../jsp/offers/time/timeOffersDisable.jsp | 10 +++--- .../jsp/offers/time/timeOffersShow.jsp | 36 +++++++++++-------- src/main/webapp/WEB-INF/jsp/welcome.jsp | 2 +- 18 files changed, 160 insertions(+), 97 deletions(-) diff --git a/src/main/java/org/springframework/cheapy/configuration/SecurityConfiguration.java b/src/main/java/org/springframework/cheapy/configuration/SecurityConfiguration.java index ce15fc2b0..e2c866bb3 100644 --- a/src/main/java/org/springframework/cheapy/configuration/SecurityConfiguration.java +++ b/src/main/java/org/springframework/cheapy/configuration/SecurityConfiguration.java @@ -44,12 +44,12 @@ public class SecurityConfiguration extends WebSecurityConfigurerAdapter { .antMatchers("/owners/**").hasAnyAuthority("owner", "admin") - + .antMatchers("/offers/**/edit").hasAnyAuthority("admin", "client") .antMatchers("/offers/**/new").hasAnyAuthority("admin", "client") .antMatchers("/offers/**/activate").hasAnyAuthority("admin","client") .antMatchers("/clients/new").permitAll() - .antMatchers("/offers/**").permitAll() + .antMatchers("/offers").permitAll() .antMatchers("/offersCreate").hasAuthority("client") diff --git a/src/main/java/org/springframework/cheapy/web/FoodOfferController.java b/src/main/java/org/springframework/cheapy/web/FoodOfferController.java index b2870d93b..056c45331 100644 --- a/src/main/java/org/springframework/cheapy/web/FoodOfferController.java +++ b/src/main/java/org/springframework/cheapy/web/FoodOfferController.java @@ -109,7 +109,7 @@ public class FoodOfferController { FoodOffer foodOffer = this.foodOfferService.findFoodOfferById(foodOfferId); model.put("foodOffer", foodOffer); - return "foodOffers/foodOffersDisable"; + return "offers/food/foodOffersDisable"; } @PostMapping(value = "/offers/food/{foodOfferId}/disable") diff --git a/src/main/java/org/springframework/cheapy/web/NuOfferController.java b/src/main/java/org/springframework/cheapy/web/NuOfferController.java index d8533842d..371f9c744 100644 --- a/src/main/java/org/springframework/cheapy/web/NuOfferController.java +++ b/src/main/java/org/springframework/cheapy/web/NuOfferController.java @@ -110,7 +110,7 @@ public class NuOfferController { NuOffer nuOffer = this.nuOfferService.findNuOfferById(nuOfferId); model.put("nuOffer", nuOffer); - return "nuOffers/nuOffersDisable"; + return "offers/nu/nuOffersDisable"; } @PostMapping(value = "/offers/nu/{nuOfferId}/disable") diff --git a/src/main/java/org/springframework/cheapy/web/SpeedOfferController.java b/src/main/java/org/springframework/cheapy/web/SpeedOfferController.java index 2162e8558..9451e570b 100644 --- a/src/main/java/org/springframework/cheapy/web/SpeedOfferController.java +++ b/src/main/java/org/springframework/cheapy/web/SpeedOfferController.java @@ -104,7 +104,7 @@ public class SpeedOfferController { SpeedOffer speedOffer = this.speedOfferService.findSpeedOfferById(speedOfferId); model.put("speedOffer", speedOffer); - return "speedOffers/speedOffersDisable"; + return "offers/speed/speedOffersDisable"; } @PostMapping(value = "/offers/speed/{speedOfferId}/disable") diff --git a/src/main/java/org/springframework/cheapy/web/TimeOfferController.java b/src/main/java/org/springframework/cheapy/web/TimeOfferController.java index 41fcb27ce..b0aaded83 100644 --- a/src/main/java/org/springframework/cheapy/web/TimeOfferController.java +++ b/src/main/java/org/springframework/cheapy/web/TimeOfferController.java @@ -115,7 +115,7 @@ public class TimeOfferController { TimeOffer timeOffer = this.timeOfferService.findTimeOfferById(timeOfferId); model.put("timeOffer", timeOffer); - return "timeOffers/timeOffersDisable"; + return "offers/time/timeOffersDisable"; } @PostMapping(value = "/offers/time/{timeOfferId}/disable") diff --git a/src/main/less/cheapy.less b/src/main/less/cheapy.less index 6844c25df..a0bff3551 100644 --- a/src/main/less/cheapy.less +++ b/src/main/less/cheapy.less @@ -488,6 +488,13 @@ text-align: center; background-color: rgb(204, 128, 51); } +#vacio { + text-align:center; + font-size: 120%; + padding:10px; + color: rgb(29, 142, 226); +} + .alert-success { .alert-variant(fade(@alert-success-bg, 70%); @alert-success-border; @alert-success-text); } diff --git a/src/main/webapp/WEB-INF/jsp/offers/food/foodOffersDisable.jsp b/src/main/webapp/WEB-INF/jsp/offers/food/foodOffersDisable.jsp index 14a7519e0..e293dbded 100644 --- a/src/main/webapp/WEB-INF/jsp/offers/food/foodOffersDisable.jsp +++ b/src/main/webapp/WEB-INF/jsp/offers/food/foodOffersDisable.jsp @@ -8,11 +8,11 @@ -

¿Esta seguro de que quiere eliminar su oferta?

+

¿Está seguro de que quiere eliminar su oferta?

- - + + diff --git a/src/main/webapp/WEB-INF/jsp/offers/food/foodOffersShow.jsp b/src/main/webapp/WEB-INF/jsp/offers/food/foodOffersShow.jsp index 84757189b..cf44e42c3 100644 --- a/src/main/webapp/WEB-INF/jsp/offers/food/foodOffersShow.jsp +++ b/src/main/webapp/WEB-INF/jsp/offers/food/foodOffersShow.jsp @@ -4,6 +4,7 @@ <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %> +<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> @@ -45,7 +46,7 @@ - +
@@ -53,23 +54,28 @@ - + + - + + + +
+ - +