From 3f91497ee6df6096f585d286179313ace0890329 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Franco=20S=C3=A1nchez?= <56022165+pabfrasan@users.noreply.github.com> Date: Thu, 15 Apr 2021 21:50:02 +0200 Subject: [PATCH 1/2] =?UTF-8?q?A=C3=B1adido=20las=20estrellas=20a=20las=20?= =?UTF-8?q?rese=C3=B1as?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../springframework/cheapy/model/Client.java | 7 ---- src/main/less/cheapy.less | 1 + src/main/less/starRating.less | 40 +++++++++++++++++++ .../jsp/reviews/createOrUpdateReviewForm.jsp | 3 +- .../WEB-INF/jsp/reviews/reviewsList.jsp | 8 +++- .../WEB-INF/jsp/reviews/reviewsShow.jsp | 9 +++-- src/main/webapp/WEB-INF/tags/ratingStar.tag | 37 +++++++++++++++++ src/main/webapp/WEB-INF/tags/showStars.tag | 18 +++++++++ 8 files changed, 111 insertions(+), 12 deletions(-) create mode 100644 src/main/less/starRating.less create mode 100644 src/main/webapp/WEB-INF/tags/ratingStar.tag create mode 100644 src/main/webapp/WEB-INF/tags/showStars.tag diff --git a/src/main/java/org/springframework/cheapy/model/Client.java b/src/main/java/org/springframework/cheapy/model/Client.java index e9f56687d..6f4533166 100644 --- a/src/main/java/org/springframework/cheapy/model/Client.java +++ b/src/main/java/org/springframework/cheapy/model/Client.java @@ -145,13 +145,6 @@ public class Client extends BaseEntity { this.description = description; } - public Municipio getMunicipio() { - return municipio; - } - - public void setMunicipio(Municipio municipio) { - this.municipio = municipio; - } public Code getCode() { return cod; diff --git a/src/main/less/cheapy.less b/src/main/less/cheapy.less index a6a211767..6e05e3f98 100644 --- a/src/main/less/cheapy.less +++ b/src/main/less/cheapy.less @@ -642,3 +642,4 @@ hr { @import "typography.less"; @import "header.less"; @import "responsive.less"; +@import "starRating.less" diff --git a/src/main/less/starRating.less b/src/main/less/starRating.less new file mode 100644 index 000000000..0cf338fc6 --- /dev/null +++ b/src/main/less/starRating.less @@ -0,0 +1,40 @@ +.rating { + display: flex; + flex-direction: row-reverse; + justify-content: flex-end + } + + .rating>input { + display: none + } + + .rating>label { + position: relative; + width: 1em; + font-size: 200%; + color: #FFD600; + cursor: pointer + } + + .rating>label::before { + content: "\2605"; + position: absolute; + opacity: 0 + } + + .rating>label:hover:before, + .rating>label:hover~label:before { + opacity: 1 !important + } + + .rating>input:checked~label:before { + opacity: 1 + } + + .rating:hover>input:checked~label:before { + opacity: 0.4 + } + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/reviews/createOrUpdateReviewForm.jsp b/src/main/webapp/WEB-INF/jsp/reviews/createOrUpdateReviewForm.jsp index 93f628af0..ac2b3af7a 100644 --- a/src/main/webapp/WEB-INF/jsp/reviews/createOrUpdateReviewForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/reviews/createOrUpdateReviewForm.jsp @@ -14,7 +14,8 @@