Eliminado los botones return y más cambios de vistas

This commit is contained in:
David 2021-04-03 14:03:00 +02:00
parent e82006d71c
commit af2fbd1738
21 changed files with 170 additions and 215 deletions

View file

@ -6,10 +6,11 @@ import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne; import javax.persistence.ManyToOne;
import javax.persistence.Table; import javax.persistence.Table;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Range; import org.hibernate.validator.constraints.Range;
import com.sun.istack.NotNull;
@Entity @Entity
@Table(name = "review") @Table(name = "review")
@ -21,8 +22,8 @@ public class Review extends BaseEntity{
@Column(length=16777215) @Column(length=16777215)
private String opinion; private String opinion;
@NotNull @NotNull(message= "Por favor rellene este campo")
@Range(min = 1, max = 5) @Range(min = 1, max = 5,message="Las estrellas deben ir entre 1 y 5")
private Integer stars; private Integer stars;
@ManyToOne @ManyToOne

View file

@ -297,23 +297,23 @@ img.img-responsive{
} }
#foodOfferTable th { #foodOfferTable th {
width: 25%; width: 20%;
text-align: center; text-align: center;
} }
#nuOfferTable th { #nuOfferTable th {
width: 25%; width: 20%;
text-align: center; text-align: center;
} }
#speedOfferTable th { #speedOfferTable th {
width: 25%; width: 20%;
text-align: center; text-align: center;
} }
#timeOfferTable th { #timeOfferTable th {
width: 25%; width: 20%;
text-align: center; text-align: center;
} }
@ -365,6 +365,29 @@ text-align: center;
background-color: rgb(40, 140, 215); background-color: rgb(40, 140, 215);
} }
.btns-edit2{
display: table;
margin:auto;
}
.btns-edit2 button{
background-color: rgb(0, 64, 128);
border: 1px solid rgb(0, 0, 160);
color: white;
padding: 10px 24px;
cursor: pointer;
}
.btns-edit2 button:not(:last-child) {
border-bottom: none;
}
.btns-edit2 button:hover {
background-color: rgb(40, 140, 215);
}
.btns-delete{ .btns-delete{
display: table; display: table;
margin: 0 auto; margin: 0 auto;

View file

@ -48,3 +48,6 @@ createSpeedOffers= Crear ofertas por rapidez comiendo
createTimeOffers= Crear ofertas por franja horaria createTimeOffers= Crear ofertas por franja horaria
init= Inicio del intervalo init= Inicio del intervalo
finish= Fin del intervalo finish= Fin del intervalo
name= Nombre del restaurante
status= Estado de oferta
myOffers= Ver mis Ofertas

View file

@ -42,15 +42,4 @@
</div> </div>
</form:form> </form:form>
<div class="btn-return">
<button type="button" role="link" onclick="goBack()" style="font-family: 'Lobster'; font-size: 20px;">
<span class="glyphicon glyphicon-arrow-left" aria-hidden="true" style="padding: 5px"> </span>
<fmt:message key="return"/> </button>
</div>
<script>
function goBack() {
window.history.back()
}
</script>
</cheapy:layout> </cheapy:layout>

View file

@ -15,23 +15,13 @@
<input type="hidden" name="food" value="${foodOffer.food}" /> <input type="hidden" name="food" value="${foodOffer.food}" />
<input type="hidden" name="discount" value="${foodOffer.discount}" /> <input type="hidden" name="discount" value="${foodOffer.discount}" />
<div class="btns-edit"> <div class="btns-edit2">
<button type="submit" style="font-family: 'Lobster'; font-size: 20px;"> <button type="submit" style="font-family: 'Lobster'; font-size: 20px;">
<span class="glyphicon glyphicon glyphicon-trash" aria-hidden="true" style="padding: 5px"> </span> <span class="glyphicon glyphicon glyphicon-trash" aria-hidden="true" style="padding: 5px"> </span>
Dar de baja</button> Dar de baja</button>
</div> </div>
</form:form> </form:form>
<div class="btn-return">
<button type="button" role="link" onclick="goBack()" style="font-family: 'Lobster'; font-size: 20px;">
<span class="glyphicon glyphicon-arrow-left" aria-hidden="true" style="padding: 5px"> </span>
<fmt:message key="return"/> </button>
</div>
<script>
function goBack() {
window.history.back()
}
</script>
</jsp:body> </jsp:body>
</cheapy:layout> </cheapy:layout>

View file

@ -12,7 +12,7 @@
<h2 style="text-align:center;padding:5px"><fmt:message key="foodOffer"/></h2> <h2 style="text-align:center;padding:5px"><fmt:message key="foodOffer"/></h2>
<table class="table table-striped" id="foodOfferTable"> <table class="table table-striped" id="foodOfferTable">
<thead> <thead>
<tr> <tr>
@ -40,44 +40,42 @@
</table> </table>
<div class="btn-menu"> <div class="btn-menu">
<div class="btn-return">
<button type="button" role="link" onclick="goBack()" style="font-family: 'Lobster'; font-size: 20px;">
<span class="glyphicon glyphicon-arrow-left" aria-hidden="true" style="padding: 5px"> </span>
<fmt:message key="return"/> </button>
</div>
<sec:authorize access="hasAnyAuthority('client')"> <sec:authorize access="hasAnyAuthority('client')">
<sec:authentication var="principal" property="principal" />
<div class="btns-edit"> <div class="btns-edit">
<spring:url value="{foodOfferId}/edit" var="editUrl"> <c:if test="${ principal.username eq foodOffer.client.usuar.username}">
<spring:param name="foodOfferId" value="${foodOffer.id}"/> <c:if test="${foodOffer.status eq 'active' || foodOffer.status eq 'hidden' }">
</spring:url>
<button type="button" role="link" onclick="window.location='${fn:escapeXml(editUrl)}'" style="font-family: 'Lobster'; font-size: 20px;"> <spring:url value="{foodOfferId}/edit" var="editUrl">
<span class="glyphicon glyphicon glyphicon-edit" aria-hidden="true" style="padding: 5px"> </span> <spring:param name="foodOfferId" value="${foodOffer.id}"/>
Editar oferta</button> </spring:url>
<button type="button" role="link" onclick="window.location='${fn:escapeXml(editUrl)}'" style="font-family: 'Lobster'; font-size: 20px;">
<span class="glyphicon glyphicon glyphicon-edit" aria-hidden="true" style="padding: 5px"> </span>
Editar oferta</button>
</c:if>
<c:if test="${foodOffer.status eq 'hidden' }"> <c:if test="${foodOffer.status eq 'hidden' }">
<spring:url value="{foodOfferId}/activate" var="activateUrl"> <spring:url value="{foodOfferId}/activate" var="activateUrl">
<spring:param name="foodOfferId" value="${foodOffer.id}"/> <spring:param name="foodOfferId" value="${foodOffer.id}"/>
</spring:url> </spring:url>
<button type="button" role="link" onclick="window.location='${fn:escapeXml(activateUrl)}'" style="font-family: 'Lobster'; font-size: 20px;"> <button type="button" role="link" onclick="window.location='${fn:escapeXml(activateUrl)}'" style="font-family: 'Lobster'; font-size: 20px;">
<span class="glyphicon glyphicon glyphicon-edit" aria-hidden="true" style="padding: 5px"> </span> <span class="glyphicon glyphicon glyphicon-edit" aria-hidden="true" style="padding: 5px"> </span>
Activar oferta</button> Activar oferta</button>
</c:if> </c:if>
<c:if test="${foodOffer.status eq 'active' }"> <c:if test="${foodOffer.status eq 'active' }">
<spring:url value="{foodOfferId}/disable" var="deactivateUrl"> <spring:url value="{foodOfferId}/disable" var="deactivateUrl">
<spring:param name="foodOfferId" value="${foodOffer.id}"/> <spring:param name="foodOfferId" value="${foodOffer.id}"/>
</spring:url> </spring:url>
<button type="button" role="link" onclick="window.location='${fn:escapeXml(deactivateUrl)}'" style="font-family: 'Lobster'; font-size: 20px;"> <button type="button" role="link" onclick="window.location='${fn:escapeXml(deactivateUrl)}'" style="font-family: 'Lobster'; font-size: 20px;">
<span class="glyphicon glyphicon glyphicon-trash" aria-hidden="true" style="padding: 5px"> </span> <span class="glyphicon glyphicon glyphicon-trash" aria-hidden="true" style="padding: 5px"> </span>
Desactivar oferta</button> Desactivar oferta</button>
</c:if> </c:if>
</c:if>
</div> </div>
</sec:authorize> </sec:authorize>
</div> </div>
<script>
function goBack() {
window.history.back()
}
</script>
</cheapy:layout> </cheapy:layout>

View file

@ -9,7 +9,7 @@
<cheapy:layout pageName="ofertasM"> <cheapy:layout pageName="ofertasM">
<h2 style="text-align:center;padding:5px"><fmt:message key="foodOffers"/></h2> <h2 style="text-align:center;padding:5px"><fmt:message key="foodOffers"/></h2>
<c:if test="${empty foodOfferLs }"> <c:if test="${empty foodOfferLs }">
<p id="vacio" >No hay ninguna oferta por plato específico activa.</p> <p id="vacio" >No hay ninguna oferta por plato específico creada.</p>
</c:if> </c:if>
<c:if test="${not empty foodOfferLs }"> <c:if test="${not empty foodOfferLs }">
<table id="foodOfferTable" class="table table-striped"> <table id="foodOfferTable" class="table table-striped">
@ -19,6 +19,7 @@
<th><fmt:message key="food"/></th> <th><fmt:message key="food"/></th>
<th><fmt:message key="startDate"/></th> <th><fmt:message key="startDate"/></th>
<th><fmt:message key="endDate"/></th> <th><fmt:message key="endDate"/></th>
<th><fmt:message key="status"/></th>
<th> <spring:url value="/offers/food/new" var="newFoodUrl"> <th> <spring:url value="/offers/food/new" var="newFoodUrl">
</spring:url> </spring:url>
<!-- <a href="${fn:escapeXml(newFoodUrl)}" class="btn btn-default">Nueva oferta</a></th>--> <!-- <a href="${fn:escapeXml(newFoodUrl)}" class="btn btn-default">Nueva oferta</a></th>-->
@ -36,6 +37,9 @@
<td> <td>
<c:out value="${localDateTimeFormat.format(foodOffer.end)}"/> <c:out value="${localDateTimeFormat.format(foodOffer.end)}"/>
</td> </td>
<td>
<c:out value="${foodOffer.status}"/>
</td>
<td> <td>
<spring:url value="/offers/food/{foodOfferId}" var="foodOfferUrl"> <spring:url value="/offers/food/{foodOfferId}" var="foodOfferUrl">
<spring:param name="foodOfferId" value="${foodOffer.id}"/> <spring:param name="foodOfferId" value="${foodOffer.id}"/>
@ -54,7 +58,7 @@
</c:if> </c:if>
<h2 style="text-align:center;padding:5px"><fmt:message key="nuOffers"/></h2> <h2 style="text-align:center;padding:5px"><fmt:message key="nuOffers"/></h2>
<c:if test="${empty nuOfferLs }"> <c:if test="${empty nuOfferLs }">
<p id="vacio" >No hay ninguna oferta por plato específico activa.</p> <p id="vacio" >No hay ninguna oferta por número de comensales creada.</p>
</c:if> </c:if>
<c:if test="${not empty nuOfferLs }"> <c:if test="${not empty nuOfferLs }">
<table id="nuOfferTable" class="table table-striped"> <table id="nuOfferTable" class="table table-striped">
@ -63,6 +67,7 @@
<!-- <th style="width: 150px;">Restaurante</th> --> <!-- <th style="width: 150px;">Restaurante</th> -->
<th><fmt:message key="startDate"/></th> <th><fmt:message key="startDate"/></th>
<th><fmt:message key="endDate"/></th> <th><fmt:message key="endDate"/></th>
<th><fmt:message key="status"/></th>
<th> <spring:url value="/offers/nu/new" var="newNuUrl"> <th> <spring:url value="/offers/nu/new" var="newNuUrl">
</spring:url> </spring:url>
<!-- <a href="${fn:escapeXml(newNuUrl)}" class="btn btn-default">Nueva oferta</a></th>--> <!-- <a href="${fn:escapeXml(newNuUrl)}" class="btn btn-default">Nueva oferta</a></th>-->
@ -79,6 +84,9 @@
<td> <td>
<c:out value="${localDateTimeFormat.format(nuOffer.end)}"/> <c:out value="${localDateTimeFormat.format(nuOffer.end)}"/>
</td> </td>
<td>
<c:out value="${nuOffer.status}"/>
</td>
<td> <td>
<spring:url value="/offers/nu/{nuOfferId}" var="nuOfferUrl"> <spring:url value="/offers/nu/{nuOfferId}" var="nuOfferUrl">
<spring:param name="nuOfferId" value="${nuOffer.id}"/> <spring:param name="nuOfferId" value="${nuOffer.id}"/>
@ -96,8 +104,8 @@
</c:if> </c:if>
<h2 style="text-align:center;padding:5px"><fmt:message key="speedOffers"/></h2> <h2 style="text-align:center;padding:5px"><fmt:message key="speedOffers"/></h2>
<c:if test="${empty foodOfferLs }"> <c:if test="${empty speedOfferLs }">
<p id="vacio" >No hay ninguna oferta por plato específico activa.</p> <p id="vacio" >No hay ninguna oferta por tiempo empleado en comer creada.</p>
</c:if> </c:if>
<c:if test="${not empty speedOfferLs }"> <c:if test="${not empty speedOfferLs }">
<table id="speedOfferTable" class="table table-striped"> <table id="speedOfferTable" class="table table-striped">
@ -106,6 +114,7 @@
<!-- <th style="width: 150px;">Restaurante</th> --> <!-- <th style="width: 150px;">Restaurante</th> -->
<th><fmt:message key="startDate"/></th> <th><fmt:message key="startDate"/></th>
<th><fmt:message key="endDate"/></th> <th><fmt:message key="endDate"/></th>
<th><fmt:message key="status"/></th>
<th> <spring:url value="/offers/speed/new" var="newSpeedUrl"> <th> <spring:url value="/offers/speed/new" var="newSpeedUrl">
</spring:url> </spring:url>
<!-- <a href="${fn:escapeXml(newSpeedUrl)}" class="btn btn-default">Nueva oferta</a></th>--> <!-- <a href="${fn:escapeXml(newSpeedUrl)}" class="btn btn-default">Nueva oferta</a></th>-->
@ -122,6 +131,9 @@
<td> <td>
<c:out value="${localDateTimeFormat.format(speedOffer.end)}"/> <c:out value="${localDateTimeFormat.format(speedOffer.end)}"/>
</td> </td>
<td>
<c:out value="${speedOffer.status}"/>
</td>
<td> <td>
<spring:url value="/offers/speed/{speedOfferId}" var="speedOfferUrl"> <spring:url value="/offers/speed/{speedOfferId}" var="speedOfferUrl">
<spring:param name="speedOfferId" value="${speedOffer.id}"/> <spring:param name="speedOfferId" value="${speedOffer.id}"/>
@ -141,7 +153,7 @@
<h2 style="text-align:center;padding:5px"><fmt:message key="timeOffers"/></h2> <h2 style="text-align:center;padding:5px"><fmt:message key="timeOffers"/></h2>
<c:if test="${empty timeOfferLs }"> <c:if test="${empty timeOfferLs }">
<p id="vacio" >No hay ninguna oferta por plato específico activa.</p> <p id="vacio" >No hay ninguna oferta por franja horaria creada.</p>
</c:if> </c:if>
<c:if test="${not empty timeOfferLs }"> <c:if test="${not empty timeOfferLs }">
<table id="timeOfferTable" class="table table-striped"> <table id="timeOfferTable" class="table table-striped">
@ -150,6 +162,7 @@
<!-- <th style="width: 150px;">Restaurante</th> --> <!-- <th style="width: 150px;">Restaurante</th> -->
<th><fmt:message key="startDate"/></th> <th><fmt:message key="startDate"/></th>
<th><fmt:message key="endDate"/></th> <th><fmt:message key="endDate"/></th>
<th><fmt:message key="status"/></th>
<th><spring:url value="/offers/time/new" var="newTimeUrl"> <th><spring:url value="/offers/time/new" var="newTimeUrl">
</spring:url> </spring:url>
<!--<a href="${fn:escapeXml(newTimeUrl)}" class="btn btn-default">Nueva oferta</a> </th>--> <!--<a href="${fn:escapeXml(newTimeUrl)}" class="btn btn-default">Nueva oferta</a> </th>-->
@ -165,6 +178,9 @@
<td> <td>
<c:out value="${localDateTimeFormat.format(timeOffer.end)}"/> <c:out value="${localDateTimeFormat.format(timeOffer.end)}"/>
</td> </td>
<td>
<c:out value="${timeOffer.status}"/>
</td>
<td> <td>
<spring:url value="/offers/time/{timeOfferId}" var="timeOfferUrl"> <spring:url value="/offers/time/{timeOfferId}" var="timeOfferUrl">
<spring:param name="timeOfferId" value="${timeOffer.id}"/> <spring:param name="timeOfferId" value="${timeOffer.id}"/>

View file

@ -47,15 +47,5 @@
</div> </div>
</form:form> </form:form>
<div class="btn-return">
<button type="button" role="link" onclick="goBack()" style="font-family: 'Lobster'; font-size: 20px;">
<span class="glyphicon glyphicon-arrow-left" aria-hidden="true" style="padding: 5px"> </span>
<fmt:message key="return"/> </button>
</div>
<script>
function goBack() {
window.history.back()
}
</script>
</cheapy:layout> </cheapy:layout>

View file

@ -19,23 +19,13 @@
<input type="hidden" name="bronze" value="${nuOffer.bronze}" /> <input type="hidden" name="bronze" value="${nuOffer.bronze}" />
<input type="hidden" name="discountBronze" value="${nuOffer.discountBronze}" /> <input type="hidden" name="discountBronze" value="${nuOffer.discountBronze}" />
<div class="btns-edit"> <div class="btns-edit2">
<button type="submit" style="font-family: 'Lobster'; font-size: 20px;"> <button type="submit" style="font-family: 'Lobster'; font-size: 20px;">
<span class="glyphicon glyphicon glyphicon-trash" aria-hidden="true" style="padding: 5px"> </span> <span class="glyphicon glyphicon glyphicon-trash" aria-hidden="true" style="padding: 5px"> </span>
Dar de baja</button> Dar de baja</button>
</div> </div>
</form:form> </form:form>
<div class="btn-return">
<button type="button" role="link" onclick="goBack()" style="font-family: 'Lobster'; font-size: 20px;">
<span class="glyphicon glyphicon-arrow-left" aria-hidden="true" style="padding: 5px"> </span>
<fmt:message key="return"/> </button>
</div>
<script>
function goBack() {
window.history.back()
}
</script>
</jsp:body> </jsp:body>
</cheapy:layout> </cheapy:layout>

View file

@ -53,19 +53,19 @@
</table> </table>
<div class="btn-menu"> <div class="btn-menu">
<div class="btn-return">
<button type="button" role="link" onclick="goBack()" style="font-family: 'Lobster'; font-size: 20px;">
<span class="glyphicon glyphicon-arrow-left" aria-hidden="true" style="padding: 5px"> </span>
<fmt:message key="return"/> </button>
</div>
<sec:authorize access="hasAnyAuthority('client')"> <sec:authorize access="hasAnyAuthority('client')">
<sec:authentication var="principal" property="principal" />
<div class="btns-edit"> <div class="btns-edit">
<spring:url value="{nuOfferId}/edit" var="editUrl"> <c:if test="${ principal.username eq nuOffer.client.usuar.username}">
<spring:param name="nuOfferId" value="${nuOffer.id}"/> <c:if test="${nuOffer.status eq 'active' || nuOffer.status eq 'hidden' }">
</spring:url> <spring:url value="{nuOfferId}/edit" var="editUrl">
<button type="button" role="link" onclick="window.location='${fn:escapeXml(editUrl)}'" style="font-family: 'Lobster'; font-size: 20px;"> <spring:param name="nuOfferId" value="${nuOffer.id}"/>
<span class="glyphicon glyphicon glyphicon-edit" aria-hidden="true" style="padding: 5px"> </span> </spring:url>
Editar oferta</button> <button type="button" role="link" onclick="window.location='${fn:escapeXml(editUrl)}'" style="font-family: 'Lobster'; font-size: 20px;">
<span class="glyphicon glyphicon glyphicon-edit" aria-hidden="true" style="padding: 5px"> </span>
Editar oferta</button>
</c:if>
<c:if test="${nuOffer.status eq 'hidden' }"> <c:if test="${nuOffer.status eq 'hidden' }">
<spring:url value="{nuOfferId}/activate" var="activateUrl"> <spring:url value="{nuOfferId}/activate" var="activateUrl">
<spring:param name="nuOfferId" value="${nuOffer.id}"/> <spring:param name="nuOfferId" value="${nuOffer.id}"/>
@ -83,13 +83,11 @@
<span class="glyphicon glyphicon glyphicon-trash" aria-hidden="true" style="padding: 5px"> </span> <span class="glyphicon glyphicon glyphicon-trash" aria-hidden="true" style="padding: 5px"> </span>
Desactivar oferta</button> Desactivar oferta</button>
</c:if> </c:if>
</c:if>
</div> </div>
</sec:authorize> </sec:authorize>
</div> </div>
<script>
function goBack() {
window.history.back()
}
</script>
</cheapy:layout> </cheapy:layout>

View file

@ -33,14 +33,5 @@
</div> </div>
</div> </div>
<div class="btn-return">
<button type="button" role="link" onclick="goBack()" style="font-family: 'Lobster'; font-size: 20px;">
<span class="glyphicon glyphicon-arrow-left" aria-hidden="true" style="padding: 5px"> </span>
<fmt:message key="return"/> </button>
</div>
<script>
function goBack() {
window.history.back()
}
</script>
</cheapy:layout> </cheapy:layout>

View file

@ -4,10 +4,12 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %> <%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<link href='https://fonts.googleapis.com/css?family=Lobster' rel='stylesheet'> <link href='https://fonts.googleapis.com/css?family=Lobster' rel='stylesheet'>
<cheapy:layout pageName="ofertas"> <cheapy:layout pageName="ofertas">
<h2 style="text-align:center;padding:5px"><fmt:message key="foodOffers"/></h2> <h2 style="text-align:center;padding:5px"><fmt:message key="foodOffers"/></h2>
<c:if test="${empty foodOfferLs }"> <c:if test="${empty foodOfferLs }">
<p id="vacio" >No hay ninguna oferta por plato específico activa.</p> <p id="vacio" >No hay ninguna oferta por plato específico activa.</p>
</c:if> </c:if>
@ -16,16 +18,21 @@
<thead> <thead>
<tr> <tr>
<!-- <th style="width: 150px;">Restaurante</th> --> <!-- <th style="width: 150px;">Restaurante</th> -->
<th><fmt:message key="name"/></th>
<th><fmt:message key="food"/></th> <th><fmt:message key="food"/></th>
<th><fmt:message key="discount"/></th> <th><fmt:message key="discount"/></th>
<th><fmt:message key="startDate"/></th> <th><fmt:message key="startDate"/></th>
<th><fmt:message key="endDate"/></th> <th><fmt:message key="endDate"/></th>
<th> </th> <th> </th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<c:forEach items="${foodOfferLs}" var="foodOffer"> <c:forEach items="${foodOfferLs}" var="foodOffer">
<tr> <tr>
<td>
<c:out value="${foodOffer.client.name}"/>
</td>
<td> <td>
<c:out value="${foodOffer.food}"/> <c:out value="${foodOffer.food}"/>
</td> </td>
@ -38,6 +45,7 @@
<td> <td>
<c:out value="${localDateTimeFormat.format(foodOffer.end)}"/> <c:out value="${localDateTimeFormat.format(foodOffer.end)}"/>
</td> </td>
<td> <td>
<spring:url value="/offers/food/{foodOfferId}" var="foodOfferUrl"> <spring:url value="/offers/food/{foodOfferId}" var="foodOfferUrl">
<spring:param name="foodOfferId" value="${foodOffer.id}"/> <spring:param name="foodOfferId" value="${foodOffer.id}"/>
@ -56,13 +64,14 @@
</c:if> </c:if>
<h2 style="text-align:center;padding:5px"><fmt:message key="nuOffers"/></h2> <h2 style="text-align:center;padding:5px"><fmt:message key="nuOffers"/></h2>
<c:if test="${empty nuOfferLs }"> <c:if test="${empty nuOfferLs }">
<p id="vacio" >No hay ninguna oferta por plato específico activa.</p> <p id="vacio" >No hay ninguna oferta por número de comensales activa.</p>
</c:if> </c:if>
<c:if test="${not empty nuOfferLs }"> <c:if test="${not empty nuOfferLs }">
<table id="nuOfferTable" class="table table-striped"> <table id="nuOfferTable" class="table table-striped">
<thead> <thead>
<tr> <tr>
<!-- <th style="width: 150px;">Restaurante</th> --> <!-- <th style="width: 150px;">Restaurante</th> -->
<th><fmt:message key="name"/></th>
<th><fmt:message key="startDate"/></th> <th><fmt:message key="startDate"/></th>
<th><fmt:message key="endDate"/></th> <th><fmt:message key="endDate"/></th>
<th><fmt:message key="goldGoal"/></th> <th><fmt:message key="goldGoal"/></th>
@ -74,7 +83,9 @@
<tbody> <tbody>
<c:forEach items="${nuOfferLs}" var="nuOffer"> <c:forEach items="${nuOfferLs}" var="nuOffer">
<tr> <tr>
<td>
<c:out value="${nuOffer.client.name}"/>
</td>
<td> <td>
<c:out value="${localDateTimeFormat.format(nuOffer.start)}"/> <c:out value="${localDateTimeFormat.format(nuOffer.start)}"/>
</td> </td>
@ -105,13 +116,14 @@
<h2 style="text-align:center;padding:5px"><fmt:message key="speedOffers"/></h2> <h2 style="text-align:center;padding:5px"><fmt:message key="speedOffers"/></h2>
<c:if test="${empty speedOfferLs }"> <c:if test="${empty speedOfferLs }">
<p id="vacio" >No hay ninguna oferta por plato específico activa.</p> <p id="vacio" >No hay ninguna oferta por tiempo empleado en comer activa.</p>
</c:if> </c:if>
<c:if test="${not empty speedOfferLs }"> <c:if test="${not empty speedOfferLs }">
<table id="speedOfferTable" class="table table-striped"> <table id="speedOfferTable" class="table table-striped">
<thead> <thead>
<tr> <tr>
<!-- <th style="width: 150px;">Restaurante</th> --> <!-- <th style="width: 150px;">Restaurante</th> -->
<th><fmt:message key="name"/></th>
<th><fmt:message key="startDate"/></th> <th><fmt:message key="startDate"/></th>
<th><fmt:message key="endDate"/></th> <th><fmt:message key="endDate"/></th>
<th><fmt:message key="goldGoal"/></th> <th><fmt:message key="goldGoal"/></th>
@ -123,7 +135,9 @@
<tbody> <tbody>
<c:forEach items="${speedOfferLs}" var="speedOffer"> <c:forEach items="${speedOfferLs}" var="speedOffer">
<tr> <tr>
<td>
<c:out value="${speedOffer.client.name}"/>
</td>
<td> <td>
<c:out value="${localDateTimeFormat.format(speedOffer.start)}"/> <c:out value="${localDateTimeFormat.format(speedOffer.start)}"/>
</td> </td>
@ -155,13 +169,14 @@
<h2 style="text-align:center;padding:5px"><fmt:message key="timeOffers"/></h2> <h2 style="text-align:center;padding:5px"><fmt:message key="timeOffers"/></h2>
<c:if test="${empty timeOfferLs }"> <c:if test="${empty timeOfferLs }">
<p id="vacio" >No hay ninguna oferta por plato específico activa.</p> <p id="vacio" >No hay ninguna oferta por franja horaria activa.</p>
</c:if> </c:if>
<c:if test="${not empty timeOfferLs }"> <c:if test="${not empty timeOfferLs }">
<table id="timeOfferTable" class="table table-striped"> <table id="timeOfferTable" class="table table-striped">
<thead> <thead>
<tr> <tr>
<!-- <th style="width: 150px;">Restaurante</th> --> <!-- <th style="width: 150px;">Restaurante</th> -->
<th><fmt:message key="name"/></th>
<th><fmt:message key="startDate"/></th> <th><fmt:message key="startDate"/></th>
<th><fmt:message key="endDate"/></th> <th><fmt:message key="endDate"/></th>
<th><fmt:message key="init"/></th> <th><fmt:message key="init"/></th>
@ -172,7 +187,9 @@
<tbody> <tbody>
<c:forEach items="${timeOfferLs}" var="timeOffer"> <c:forEach items="${timeOfferLs}" var="timeOffer">
<tr> <tr>
<td>
<c:out value="${timeOffer.client.name}"/>
</td>
<td> <td>
<c:out value="${localDateTimeFormat.format(timeOffer.start)}"/> <c:out value="${localDateTimeFormat.format(timeOffer.start)}"/>
</td> </td>
@ -201,15 +218,6 @@
</tbody> </tbody>
</table> </table>
</c:if> </c:if>
<div class="btn-return">
<button type="button" role="link" onclick="goBack()" style="font-family: 'Lobster'; font-size: 20px;">
<span class="glyphicon glyphicon-arrow-left" aria-hidden="true" style="padding: 5px"> </span>
<fmt:message key="return"/> </button>
</div>
<script>
function goBack() {
window.history.back()
}
</script>
</cheapy:layout> </cheapy:layout>

View file

@ -44,16 +44,6 @@
</div> </div>
</div> </div>
</form:form> </form:form>
<div class="btn-return">
<button type="button" role="link" onclick="goBack()" style="font-family: 'Lobster'; font-size: 20px;">
<span class="glyphicon glyphicon-arrow-left" aria-hidden="true" style="padding: 5px"> </span>
<fmt:message key="return"/> </button>
</div>
<script>
function goBack() {
window.history.back()
}
</script>
</cheapy:layout> </cheapy:layout>

View file

@ -20,23 +20,13 @@
<input type="hidden" name="bronze" value="${speedOffer.bronze}" /> <input type="hidden" name="bronze" value="${speedOffer.bronze}" />
<input type="hidden" name="discountBronze" value="${speedOffer.discountBronze}" /> <input type="hidden" name="discountBronze" value="${speedOffer.discountBronze}" />
<div class="btns-edit"> <div class="btns-edit2">
<button type="submit" style="font-family: 'Lobster'; font-size: 20px;"> <button type="submit" style="font-family: 'Lobster'; font-size: 20px;">
<span class="glyphicon glyphicon glyphicon-trash" aria-hidden="true" style="padding: 5px"> </span> <span class="glyphicon glyphicon glyphicon-trash" aria-hidden="true" style="padding: 5px"> </span>
Dar de baja</button> Dar de baja</button>
</div> </div>
</form:form> </form:form>
<div class="btn-return">
<button type="button" role="link" onclick="goBack()" style="font-family: 'Lobster'; font-size: 20px;">
<span class="glyphicon glyphicon-arrow-left" aria-hidden="true" style="padding: 5px"> </span>
<fmt:message key="return"/> </button>
</div>
<script>
function goBack() {
window.history.back()
}
</script>
</jsp:body> </jsp:body>
</cheapy:layout> </cheapy:layout>

View file

@ -53,19 +53,19 @@
</table> </table>
<div class="btn-menu"> <div class="btn-menu">
<div class="btn-return">
<button type="button" role="link" onclick="goBack()" style="font-family: 'Lobster'; font-size: 20px;">
<span class="glyphicon glyphicon-arrow-left" aria-hidden="true" style="padding: 5px"> </span>
<fmt:message key="return"/> </button>
</div>
<sec:authorize access="hasAnyAuthority('client')"> <sec:authorize access="hasAnyAuthority('client')">
<sec:authentication var="principal" property="principal" />
<div class="btns-edit"> <div class="btns-edit">
<spring:url value="{speedOfferId}/edit" var="editUrl"> <c:if test="${ principal.username eq speedOffer.client.usuar.username}">
<spring:param name="speedOfferId" value="${speedOffer.id}"/> <c:if test="${speedOffer.status eq 'active' || speedOffer.status eq 'hidden' }">
</spring:url> <spring:url value="{speedOfferId}/edit" var="editUrl">
<button type="button" role="link" onclick="window.location='${fn:escapeXml(editUrl)}'" style="font-family: 'Lobster'; font-size: 20px;"> <spring:param name="speedOfferId" value="${speedOffer.id}"/>
<span class="glyphicon glyphicon glyphicon-edit" aria-hidden="true" style="padding: 5px"> </span> </spring:url>
Editar oferta</button> <button type="button" role="link" onclick="window.location='${fn:escapeXml(editUrl)}'" style="font-family: 'Lobster'; font-size: 20px;">
<span class="glyphicon glyphicon glyphicon-edit" aria-hidden="true" style="padding: 5px"> </span>
Editar oferta</button>
</c:if>
<c:if test="${speedOffer.status eq 'hidden' }"> <c:if test="${speedOffer.status eq 'hidden' }">
<spring:url value="{speedOfferId}/activate" var="activateUrl"> <spring:url value="{speedOfferId}/activate" var="activateUrl">
@ -84,14 +84,12 @@
<span class="glyphicon glyphicon glyphicon-trash" aria-hidden="true" style="padding: 5px"> </span> <span class="glyphicon glyphicon glyphicon-trash" aria-hidden="true" style="padding: 5px"> </span>
Desactivar oferta</button> Desactivar oferta</button>
</c:if> </c:if>
</c:if>
</div> </div>
</sec:authorize> </sec:authorize>
</div> </div>
<script>
function goBack() {
window.history.back()
}
</script>
</cheapy:layout> </cheapy:layout>

View file

@ -45,15 +45,6 @@
</div> </div>
</form:form> </form:form>
<div class="btn-return">
<button type="button" role="link" onclick="goBack()" style="font-family: 'Lobster'; font-size: 20px;">
<span class="glyphicon glyphicon-arrow-left" aria-hidden="true" style="padding: 5px"> </span>
<fmt:message key="return"/> </button>
</div>
<script>
function goBack() {
window.history.back()
}
</script>
</cheapy:layout> </cheapy:layout>

View file

@ -16,23 +16,13 @@
<input type="hidden" name="finish" value="${timeOffer.finish}" /> <input type="hidden" name="finish" value="${timeOffer.finish}" />
<input type="hidden" name="discount" value="${timeOffer.discount}" /> <input type="hidden" name="discount" value="${timeOffer.discount}" />
<div class="btns-edit"> <div class="btns-edit2">
<button type="submit" style="font-family: 'Lobster'; font-size: 20px;"> <button type="submit" style="font-family: 'Lobster'; font-size: 20px;">
<span class="glyphicon glyphicon glyphicon-trash" aria-hidden="true" style="padding: 5px"> </span> <span class="glyphicon glyphicon glyphicon-trash" aria-hidden="true" style="padding: 5px"> </span>
Dar de baja</button> Dar de baja</button>
</div> </div>
</form:form> </form:form>
<div class="btn-return">
<button type="button" role="link" onclick="goBack()" style="font-family: 'Lobster'; font-size: 20px;">
<span class="glyphicon glyphicon-arrow-left" aria-hidden="true" style="padding: 5px"> </span>
<fmt:message key="return"/> </button>
</div>
<script>
function goBack() {
window.history.back()
}
</script>
</jsp:body> </jsp:body>
</cheapy:layout> </cheapy:layout>

View file

@ -42,20 +42,19 @@
</table> </table>
<div class="btn-menu"> <div class="btn-menu">
<div class="btn-return">
<button type="button" role="link" onclick="goBack()" style="font-family: 'Lobster'; font-size: 20px;">
<span class="glyphicon glyphicon-arrow-left" aria-hidden="true" style="padding: 5px"> </span>
<fmt:message key="return"/> </button>
</div>
<sec:authorize access="hasAnyAuthority('client')"> <sec:authorize access="hasAnyAuthority('client')">
<sec:authentication var="principal" property="principal" />
<div class="btns-edit"> <div class="btns-edit">
<spring:url value="{timeOfferId}/edit" var="editUrl"> <c:if test="${ principal.username eq timeOffer.client.usuar.username}">
<spring:param name="timeOfferId" value="${timeOffer.id}"/> <c:if test="${timeOffer.status eq 'active' || timeOffer.status eq 'hidden' }">
</spring:url> <spring:url value="{timeOfferId}/edit" var="editUrl">
<button type="button" role="link" onclick="window.location='${fn:escapeXml(editUrl)}'" style="font-family: 'Lobster'; font-size: 20px;"> <spring:param name="timeOfferId" value="${timeOffer.id}"/>
<span class="glyphicon glyphicon glyphicon-edit" aria-hidden="true" style="padding: 5px"> </span> </spring:url>
Editar oferta</button> <button type="button" role="link" onclick="window.location='${fn:escapeXml(editUrl)}'" style="font-family: 'Lobster'; font-size: 20px;">
<span class="glyphicon glyphicon glyphicon-edit" aria-hidden="true" style="padding: 5px"> </span>
Editar oferta</button>
</c:if>
<c:if test="${timeOffer.status eq 'hidden' }"> <c:if test="${timeOffer.status eq 'hidden' }">
<spring:url value="{timeOfferId}/activate" var="activateUrl"> <spring:url value="{timeOfferId}/activate" var="activateUrl">
<spring:param name="timeOfferId" value="${timeOffer.id}"/> <spring:param name="timeOfferId" value="${timeOffer.id}"/>
@ -73,15 +72,11 @@
<span class="glyphicon glyphicon glyphicon-trash" aria-hidden="true" style="padding: 5px"> </span> <span class="glyphicon glyphicon glyphicon-trash" aria-hidden="true" style="padding: 5px"> </span>
Desactivar oferta</button> Desactivar oferta</button>
</c:if> </c:if>
</c:if>
</div> </div>
</sec:authorize> </sec:authorize>
</div> </div>
<script>
function goBack() {
window.history.back()
}
</script>
</cheapy:layout> </cheapy:layout>

View file

@ -18,15 +18,22 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<div class="col-sm-offset-2 col-sm-10"> <div class="col-sm-offset-2 col-sm-10">
<div class="btn-mod">
<c:choose> <c:choose>
<c:when test="${review['new']}"> <c:when test="${review['new']}">
<button class="btn btn-default" type="submit">Crear Reseña</button> <button class="btn btn-default" type="submit" style="font-family: 'Lobster'; font-size: 20px;">
<span class="glyphicon glyphicon-floppy-save" aria-hidden="true" style="padding: 5px"> </span>
Crear reseña</button>
</c:when> </c:when>
<c:otherwise> <c:otherwise>
<button class="btn btn-default" type="submit">Modificar Reseña</button> <button class="btn btn-default" type="submit">Modificar Reseña</button>
</c:otherwise> </c:otherwise>
</c:choose> </c:choose>
</div>
</div> </div>
</div> </div>
</form:form> </form:form>
</cheapy:layout> </cheapy:layout>

View file

@ -24,11 +24,7 @@
</table> </table>
<div class="btn-return">
<button type="button" role="link" onclick="goBack()" style="font-family: 'Lobster'; font-size: 20px;">
<span class="glyphicon glyphicon-arrow-left" aria-hidden="true" style="padding: 5px"> </span>
<fmt:message key="return"/> </button>
</div>
<sec:authentication var="principal" property="principal" /> <sec:authentication var="principal" property="principal" />
<div class="btns-edit"> <div class="btns-edit">
@ -42,10 +38,6 @@
Editar opinión</button> Editar opinión</button>
</c:if> </c:if>
</div> </div>
<script>
function goBack() {
window.history.back()
}
</script>
</cheapy:layout> </cheapy:layout>

View file

@ -23,6 +23,11 @@
</div> </div>
<sec:authorize access="hasAnyAuthority('client')"> <sec:authorize access="hasAnyAuthority('client')">
<div class="btn-home">
<button type="button" role="link" onclick="window.location='/myOffers'" style="font-family: 'Lobster'; font-size: 20px;margin:5px;">
<span class="glyphicon glyphicon-cutlery" aria-hidden="true" style="padding: 5px"> </span>
<fmt:message key="myOffers"/> </button>
</div>
<div class="btn-home"> <div class="btn-home">
<button type="button" role="link" onclick="window.location='/offersCreate'" style="font-family: 'Lobster'; font-size: 20px;margin:5px;"> <button type="button" role="link" onclick="window.location='/offersCreate'" style="font-family: 'Lobster'; font-size: 20px;margin:5px;">
<span class="glyphicon glyphicon-cutlery" aria-hidden="true" style="padding: 5px"> </span> <span class="glyphicon glyphicon-cutlery" aria-hidden="true" style="padding: 5px"> </span>