mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-23 15:55:49 +00:00
Merge pull request #57 from cheapy-ispp/009-cambiarVistas
Eliminado los botones return y más cambios de vistas
This commit is contained in:
commit
ec7f755549
21 changed files with 173 additions and 217 deletions
|
@ -6,10 +6,11 @@ import javax.persistence.JoinColumn;
|
|||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.Table;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import org.hibernate.validator.constraints.Range;
|
||||
|
||||
import com.sun.istack.NotNull;
|
||||
|
||||
|
||||
@Entity
|
||||
@Table(name = "review")
|
||||
|
@ -21,8 +22,8 @@ public class Review extends BaseEntity{
|
|||
@Column(length=16777215)
|
||||
private String opinion;
|
||||
|
||||
@NotNull
|
||||
@Range(min = 1, max = 5)
|
||||
@NotNull(message= "Por favor rellene este campo")
|
||||
@Range(min = 1, max = 5,message="Las estrellas deben ir entre 1 y 5")
|
||||
private Integer stars;
|
||||
|
||||
@ManyToOne
|
||||
|
|
|
@ -297,23 +297,23 @@ img.img-responsive{
|
|||
}
|
||||
|
||||
#foodOfferTable th {
|
||||
width: 25%;
|
||||
width: 20%;
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
|
||||
#nuOfferTable th {
|
||||
width: 25%;
|
||||
width: 20%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#speedOfferTable th {
|
||||
width: 25%;
|
||||
width: 20%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#timeOfferTable th {
|
||||
width: 25%;
|
||||
width: 20%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
@ -365,6 +365,29 @@ text-align: center;
|
|||
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{
|
||||
display: table;
|
||||
margin: 0 auto;
|
||||
|
|
|
@ -48,3 +48,6 @@ createSpeedOffers= Crear ofertas por rapidez comiendo
|
|||
createTimeOffers= Crear ofertas por franja horaria
|
||||
init= Inicio del intervalo
|
||||
finish= Fin del intervalo
|
||||
name= Nombre del restaurante
|
||||
status= Estado de oferta
|
||||
myOffers= Ver mis Ofertas
|
|
@ -42,15 +42,4 @@
|
|||
</div>
|
||||
</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>
|
||||
|
|
|
@ -9,27 +9,17 @@
|
|||
<cheapy:layout pageName="foodOffer">
|
||||
|
||||
<jsp:body>
|
||||
<h2 class="text-center" style="font-family: 'Lobster'; font-size: 30px; color: rgb(0, 64, 128); padding:30px"><em>¿Está seguro de que quiere eliminar su oferta?</em></h2>
|
||||
<h2 class="text-center" style="font-family: 'Lobster'; font-size: 30px; color: rgb(0, 64, 128); padding:30px"><em>¿Está seguro de que quiere eliminar su oferta?</em></h2>
|
||||
|
||||
<form:form modelAttribute="foodOffer" class="form-horizontal">
|
||||
|
||||
<div class="btns-edit">
|
||||
<div class="btns-edit2">
|
||||
<button type="submit" style="font-family: 'Lobster'; font-size: 20px;">
|
||||
<span class="glyphicon glyphicon glyphicon-trash" aria-hidden="true" style="padding: 5px"> </span>
|
||||
Dar de baja</button>
|
||||
</div>
|
||||
</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>
|
||||
|
||||
</cheapy:layout>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<h2 style="text-align:center;padding:5px"><fmt:message key="foodOffer"/></h2>
|
||||
|
||||
|
||||
|
||||
|
||||
<table class="table table-striped" id="foodOfferTable">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -40,44 +40,42 @@
|
|||
</table>
|
||||
|
||||
<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:authentication var="principal" property="principal" />
|
||||
<div class="btns-edit">
|
||||
<spring:url value="{foodOfferId}/edit" var="editUrl">
|
||||
<spring:param name="foodOfferId" value="${foodOffer.id}"/>
|
||||
</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 test="${ principal.username eq foodOffer.client.usuar.username}">
|
||||
<c:if test="${foodOffer.status eq 'active' || foodOffer.status eq 'hidden' }">
|
||||
|
||||
<spring:url value="{foodOfferId}/edit" var="editUrl">
|
||||
<spring:param name="foodOfferId" value="${foodOffer.id}"/>
|
||||
</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' }">
|
||||
<spring:url value="{foodOfferId}/activate" var="activateUrl">
|
||||
<spring:param name="foodOfferId" value="${foodOffer.id}"/>
|
||||
</spring:url>
|
||||
<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>
|
||||
Activar oferta</button>
|
||||
<spring:url value="{foodOfferId}/activate" var="activateUrl">
|
||||
<spring:param name="foodOfferId" value="${foodOffer.id}"/>
|
||||
</spring:url>
|
||||
<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>
|
||||
Activar oferta</button>
|
||||
</c:if>
|
||||
|
||||
<c:if test="${foodOffer.status eq 'active' }">
|
||||
<spring:url value="{foodOfferId}/disable" var="deactivateUrl">
|
||||
<spring:param name="foodOfferId" value="${foodOffer.id}"/>
|
||||
</spring:url>
|
||||
<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>
|
||||
Desactivar oferta</button>
|
||||
<spring:url value="{foodOfferId}/disable" var="deactivateUrl">
|
||||
<spring:param name="foodOfferId" value="${foodOffer.id}"/>
|
||||
</spring:url>
|
||||
<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>
|
||||
Desactivar oferta</button>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</div>
|
||||
</sec:authorize>
|
||||
</div>
|
||||
<script>
|
||||
function goBack() {
|
||||
window.history.back()
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
</cheapy:layout>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<cheapy:layout pageName="ofertasM">
|
||||
<h2 style="text-align:center;padding:5px"><fmt:message key="foodOffers"/></h2>
|
||||
<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 test="${not empty foodOfferLs }">
|
||||
<table id="foodOfferTable" class="table table-striped">
|
||||
|
@ -19,6 +19,7 @@
|
|||
<th><fmt:message key="food"/></th>
|
||||
<th><fmt:message key="startDate"/></th>
|
||||
<th><fmt:message key="endDate"/></th>
|
||||
<th><fmt:message key="status"/></th>
|
||||
<th> <spring:url value="/offers/food/new" var="newFoodUrl">
|
||||
</spring:url>
|
||||
<!-- <a href="${fn:escapeXml(newFoodUrl)}" class="btn btn-default">Nueva oferta</a></th>-->
|
||||
|
@ -36,6 +37,9 @@
|
|||
<td>
|
||||
<c:out value="${localDateTimeFormat.format(foodOffer.end)}"/>
|
||||
</td>
|
||||
<td>
|
||||
<c:out value="${foodOffer.status}"/>
|
||||
</td>
|
||||
<td>
|
||||
<spring:url value="/offers/food/{foodOfferId}" var="foodOfferUrl">
|
||||
<spring:param name="foodOfferId" value="${foodOffer.id}"/>
|
||||
|
@ -54,7 +58,7 @@
|
|||
</c:if>
|
||||
<h2 style="text-align:center;padding:5px"><fmt:message key="nuOffers"/></h2>
|
||||
<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 test="${not empty nuOfferLs }">
|
||||
<table id="nuOfferTable" class="table table-striped">
|
||||
|
@ -63,6 +67,7 @@
|
|||
<!-- <th style="width: 150px;">Restaurante</th> -->
|
||||
<th><fmt:message key="startDate"/></th>
|
||||
<th><fmt:message key="endDate"/></th>
|
||||
<th><fmt:message key="status"/></th>
|
||||
<th> <spring:url value="/offers/nu/new" var="newNuUrl">
|
||||
</spring:url>
|
||||
<!-- <a href="${fn:escapeXml(newNuUrl)}" class="btn btn-default">Nueva oferta</a></th>-->
|
||||
|
@ -79,6 +84,9 @@
|
|||
<td>
|
||||
<c:out value="${localDateTimeFormat.format(nuOffer.end)}"/>
|
||||
</td>
|
||||
<td>
|
||||
<c:out value="${nuOffer.status}"/>
|
||||
</td>
|
||||
<td>
|
||||
<spring:url value="/offers/nu/{nuOfferId}" var="nuOfferUrl">
|
||||
<spring:param name="nuOfferId" value="${nuOffer.id}"/>
|
||||
|
@ -96,8 +104,8 @@
|
|||
</c:if>
|
||||
|
||||
<h2 style="text-align:center;padding:5px"><fmt:message key="speedOffers"/></h2>
|
||||
<c:if test="${empty foodOfferLs }">
|
||||
<p id="vacio" >No hay ninguna oferta por plato específico activa.</p>
|
||||
<c:if test="${empty speedOfferLs }">
|
||||
<p id="vacio" >No hay ninguna oferta por tiempo empleado en comer creada.</p>
|
||||
</c:if>
|
||||
<c:if test="${not empty speedOfferLs }">
|
||||
<table id="speedOfferTable" class="table table-striped">
|
||||
|
@ -106,6 +114,7 @@
|
|||
<!-- <th style="width: 150px;">Restaurante</th> -->
|
||||
<th><fmt:message key="startDate"/></th>
|
||||
<th><fmt:message key="endDate"/></th>
|
||||
<th><fmt:message key="status"/></th>
|
||||
<th> <spring:url value="/offers/speed/new" var="newSpeedUrl">
|
||||
</spring:url>
|
||||
<!-- <a href="${fn:escapeXml(newSpeedUrl)}" class="btn btn-default">Nueva oferta</a></th>-->
|
||||
|
@ -122,6 +131,9 @@
|
|||
<td>
|
||||
<c:out value="${localDateTimeFormat.format(speedOffer.end)}"/>
|
||||
</td>
|
||||
<td>
|
||||
<c:out value="${speedOffer.status}"/>
|
||||
</td>
|
||||
<td>
|
||||
<spring:url value="/offers/speed/{speedOfferId}" var="speedOfferUrl">
|
||||
<spring:param name="speedOfferId" value="${speedOffer.id}"/>
|
||||
|
@ -141,7 +153,7 @@
|
|||
|
||||
<h2 style="text-align:center;padding:5px"><fmt:message key="timeOffers"/></h2>
|
||||
<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 test="${not empty timeOfferLs }">
|
||||
<table id="timeOfferTable" class="table table-striped">
|
||||
|
@ -150,6 +162,7 @@
|
|||
<!-- <th style="width: 150px;">Restaurante</th> -->
|
||||
<th><fmt:message key="startDate"/></th>
|
||||
<th><fmt:message key="endDate"/></th>
|
||||
<th><fmt:message key="status"/></th>
|
||||
<th><spring:url value="/offers/time/new" var="newTimeUrl">
|
||||
</spring:url>
|
||||
<!--<a href="${fn:escapeXml(newTimeUrl)}" class="btn btn-default">Nueva oferta</a> </th>-->
|
||||
|
@ -165,6 +178,9 @@
|
|||
<td>
|
||||
<c:out value="${localDateTimeFormat.format(timeOffer.end)}"/>
|
||||
</td>
|
||||
<td>
|
||||
<c:out value="${timeOffer.status}"/>
|
||||
</td>
|
||||
<td>
|
||||
<spring:url value="/offers/time/{timeOfferId}" var="timeOfferUrl">
|
||||
<spring:param name="timeOfferId" value="${timeOffer.id}"/>
|
||||
|
|
|
@ -47,15 +47,5 @@
|
|||
</div>
|
||||
</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>
|
||||
|
|
|
@ -13,23 +13,13 @@
|
|||
|
||||
<form:form modelAttribute="nuOffer" class="form-horizontal">
|
||||
|
||||
<div class="btns-edit">
|
||||
<div class="btns-edit2">
|
||||
<button type="submit" style="font-family: 'Lobster'; font-size: 20px;">
|
||||
<span class="glyphicon glyphicon glyphicon-trash" aria-hidden="true" style="padding: 5px"> </span>
|
||||
Dar de baja</button>
|
||||
</div>
|
||||
</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>
|
||||
</cheapy:layout>
|
||||
|
|
|
@ -53,19 +53,19 @@
|
|||
</table>
|
||||
|
||||
<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:authentication var="principal" property="principal" />
|
||||
<div class="btns-edit">
|
||||
<spring:url value="{nuOfferId}/edit" var="editUrl">
|
||||
<spring:param name="nuOfferId" value="${nuOffer.id}"/>
|
||||
</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 test="${ principal.username eq nuOffer.client.usuar.username}">
|
||||
<c:if test="${nuOffer.status eq 'active' || nuOffer.status eq 'hidden' }">
|
||||
<spring:url value="{nuOfferId}/edit" var="editUrl">
|
||||
<spring:param name="nuOfferId" value="${nuOffer.id}"/>
|
||||
</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="${nuOffer.status eq 'hidden' }">
|
||||
<spring:url value="{nuOfferId}/activate" var="activateUrl">
|
||||
<spring:param name="nuOfferId" value="${nuOffer.id}"/>
|
||||
|
@ -83,13 +83,11 @@
|
|||
<span class="glyphicon glyphicon glyphicon-trash" aria-hidden="true" style="padding: 5px"> </span>
|
||||
Desactivar oferta</button>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</div>
|
||||
|
||||
</sec:authorize>
|
||||
</div>
|
||||
<script>
|
||||
function goBack() {
|
||||
window.history.back()
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
</cheapy:layout>
|
||||
|
|
|
@ -33,14 +33,5 @@
|
|||
</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>
|
||||
|
|
|
@ -4,10 +4,12 @@
|
|||
<%@ 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" %>
|
||||
<link href='https://fonts.googleapis.com/css?family=Lobster' rel='stylesheet'>
|
||||
|
||||
<cheapy:layout pageName="ofertas">
|
||||
<h2 style="text-align:center;padding:5px"><fmt:message key="foodOffers"/></h2>
|
||||
|
||||
<c:if test="${empty foodOfferLs }">
|
||||
<p id="vacio" >No hay ninguna oferta por plato específico activa.</p>
|
||||
</c:if>
|
||||
|
@ -16,16 +18,21 @@
|
|||
<thead>
|
||||
<tr>
|
||||
<!-- <th style="width: 150px;">Restaurante</th> -->
|
||||
<th><fmt:message key="name"/></th>
|
||||
<th><fmt:message key="food"/></th>
|
||||
<th><fmt:message key="discount"/></th>
|
||||
<th><fmt:message key="startDate"/></th>
|
||||
<th><fmt:message key="endDate"/></th>
|
||||
|
||||
<th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${foodOfferLs}" var="foodOffer">
|
||||
<tr>
|
||||
<td>
|
||||
<c:out value="${foodOffer.client.name}"/>
|
||||
</td>
|
||||
<td>
|
||||
<c:out value="${foodOffer.food}"/>
|
||||
</td>
|
||||
|
@ -38,6 +45,7 @@
|
|||
<td>
|
||||
<c:out value="${localDateTimeFormat.format(foodOffer.end)}"/>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<spring:url value="/offers/food/{foodOfferId}" var="foodOfferUrl">
|
||||
<spring:param name="foodOfferId" value="${foodOffer.id}"/>
|
||||
|
@ -56,13 +64,14 @@
|
|||
</c:if>
|
||||
<h2 style="text-align:center;padding:5px"><fmt:message key="nuOffers"/></h2>
|
||||
<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 test="${not empty nuOfferLs }">
|
||||
<table id="nuOfferTable" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<!-- <th style="width: 150px;">Restaurante</th> -->
|
||||
<th><fmt:message key="name"/></th>
|
||||
<th><fmt:message key="startDate"/></th>
|
||||
<th><fmt:message key="endDate"/></th>
|
||||
<th><fmt:message key="goldGoal"/></th>
|
||||
|
@ -74,7 +83,9 @@
|
|||
<tbody>
|
||||
<c:forEach items="${nuOfferLs}" var="nuOffer">
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
<c:out value="${nuOffer.client.name}"/>
|
||||
</td>
|
||||
<td>
|
||||
<c:out value="${localDateTimeFormat.format(nuOffer.start)}"/>
|
||||
</td>
|
||||
|
@ -105,13 +116,14 @@
|
|||
|
||||
<h2 style="text-align:center;padding:5px"><fmt:message key="speedOffers"/></h2>
|
||||
<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 test="${not empty speedOfferLs }">
|
||||
<table id="speedOfferTable" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<!-- <th style="width: 150px;">Restaurante</th> -->
|
||||
<th><fmt:message key="name"/></th>
|
||||
<th><fmt:message key="startDate"/></th>
|
||||
<th><fmt:message key="endDate"/></th>
|
||||
<th><fmt:message key="goldGoal"/></th>
|
||||
|
@ -123,7 +135,9 @@
|
|||
<tbody>
|
||||
<c:forEach items="${speedOfferLs}" var="speedOffer">
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
<c:out value="${speedOffer.client.name}"/>
|
||||
</td>
|
||||
<td>
|
||||
<c:out value="${localDateTimeFormat.format(speedOffer.start)}"/>
|
||||
</td>
|
||||
|
@ -155,13 +169,14 @@
|
|||
|
||||
<h2 style="text-align:center;padding:5px"><fmt:message key="timeOffers"/></h2>
|
||||
<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 test="${not empty timeOfferLs }">
|
||||
<table id="timeOfferTable" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<!-- <th style="width: 150px;">Restaurante</th> -->
|
||||
<th><fmt:message key="name"/></th>
|
||||
<th><fmt:message key="startDate"/></th>
|
||||
<th><fmt:message key="endDate"/></th>
|
||||
<th><fmt:message key="init"/></th>
|
||||
|
@ -172,7 +187,9 @@
|
|||
<tbody>
|
||||
<c:forEach items="${timeOfferLs}" var="timeOffer">
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
<c:out value="${timeOffer.client.name}"/>
|
||||
</td>
|
||||
<td>
|
||||
<c:out value="${localDateTimeFormat.format(timeOffer.start)}"/>
|
||||
</td>
|
||||
|
@ -201,15 +218,6 @@
|
|||
</tbody>
|
||||
</table>
|
||||
</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>
|
||||
|
|
|
@ -44,16 +44,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</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>
|
||||
|
|
|
@ -9,27 +9,18 @@
|
|||
<cheapy:layout pageName="speedOffer">
|
||||
|
||||
<jsp:body>
|
||||
<h2 class="text-center" style="font-family: 'Lobster'; font-size: 30px; color: rgb(0, 64, 128); padding:30px"><em>¿Está seguro de que quiere eliminar su oferta?</em></h2>
|
||||
<h2 class="text-center" style="font-family: 'Lobster'; font-size: 30px; color: rgb(0, 64, 128); padding:30px"><em>¿Está seguro de que quiere eliminar su oferta?</em></h2>
|
||||
|
||||
<form:form modelAttribute="speedOffer" class="form-horizontal">
|
||||
|
||||
<div class="btns-edit">
|
||||
<div class="btns-edit2">
|
||||
|
||||
<button type="submit" style="font-family: 'Lobster'; font-size: 20px;">
|
||||
<span class="glyphicon glyphicon glyphicon-trash" aria-hidden="true" style="padding: 5px"> </span>
|
||||
Dar de baja</button>
|
||||
</div>
|
||||
</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>
|
||||
</cheapy:layout>
|
||||
|
|
|
@ -53,19 +53,19 @@
|
|||
</table>
|
||||
|
||||
<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:authentication var="principal" property="principal" />
|
||||
<div class="btns-edit">
|
||||
<spring:url value="{speedOfferId}/edit" var="editUrl">
|
||||
<spring:param name="speedOfferId" value="${speedOffer.id}"/>
|
||||
</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 test="${ principal.username eq speedOffer.client.usuar.username}">
|
||||
<c:if test="${speedOffer.status eq 'active' || speedOffer.status eq 'hidden' }">
|
||||
<spring:url value="{speedOfferId}/edit" var="editUrl">
|
||||
<spring:param name="speedOfferId" value="${speedOffer.id}"/>
|
||||
</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="${speedOffer.status eq 'hidden' }">
|
||||
<spring:url value="{speedOfferId}/activate" var="activateUrl">
|
||||
|
@ -84,14 +84,12 @@
|
|||
<span class="glyphicon glyphicon glyphicon-trash" aria-hidden="true" style="padding: 5px"> </span>
|
||||
Desactivar oferta</button>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</div>
|
||||
</sec:authorize>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function goBack() {
|
||||
window.history.back()
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
</cheapy:layout>
|
||||
|
|
|
@ -45,15 +45,6 @@
|
|||
</div>
|
||||
</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>
|
||||
|
|
|
@ -13,23 +13,13 @@
|
|||
|
||||
<form:form modelAttribute="timeOffer" class="form-horizontal">
|
||||
|
||||
<div class="btns-edit">
|
||||
<div class="btns-edit2">
|
||||
<button type="submit" style="font-family: 'Lobster'; font-size: 20px;">
|
||||
<span class="glyphicon glyphicon glyphicon-trash" aria-hidden="true" style="padding: 5px"> </span>
|
||||
Dar de baja</button>
|
||||
</div>
|
||||
</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>
|
||||
</cheapy:layout>
|
||||
|
|
|
@ -42,20 +42,19 @@
|
|||
</table>
|
||||
|
||||
<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:authentication var="principal" property="principal" />
|
||||
<div class="btns-edit">
|
||||
<spring:url value="{timeOfferId}/edit" var="editUrl">
|
||||
<spring:param name="timeOfferId" value="${timeOffer.id}"/>
|
||||
</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 test="${ principal.username eq timeOffer.client.usuar.username}">
|
||||
<c:if test="${timeOffer.status eq 'active' || timeOffer.status eq 'hidden' }">
|
||||
<spring:url value="{timeOfferId}/edit" var="editUrl">
|
||||
<spring:param name="timeOfferId" value="${timeOffer.id}"/>
|
||||
</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="${timeOffer.status eq 'hidden' }">
|
||||
<spring:url value="{timeOfferId}/activate" var="activateUrl">
|
||||
<spring:param name="timeOfferId" value="${timeOffer.id}"/>
|
||||
|
@ -73,15 +72,11 @@
|
|||
<span class="glyphicon glyphicon glyphicon-trash" aria-hidden="true" style="padding: 5px"> </span>
|
||||
Desactivar oferta</button>
|
||||
</c:if>
|
||||
|
||||
</c:if>
|
||||
</div>
|
||||
</sec:authorize>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function goBack() {
|
||||
window.history.back()
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
</cheapy:layout>
|
||||
|
|
|
@ -18,15 +18,22 @@
|
|||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<div class="btn-mod">
|
||||
<c:choose>
|
||||
<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:otherwise>
|
||||
<button class="btn btn-default" type="submit">Modificar Reseña</button>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</form:form>
|
||||
</cheapy:layout>
|
||||
|
|
|
@ -24,11 +24,7 @@
|
|||
|
||||
</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" />
|
||||
<div class="btns-edit">
|
||||
|
@ -42,10 +38,6 @@
|
|||
Editar opinión</button>
|
||||
</c:if>
|
||||
</div>
|
||||
<script>
|
||||
function goBack() {
|
||||
window.history.back()
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
</cheapy:layout>
|
||||
|
|
|
@ -23,6 +23,11 @@
|
|||
</div>
|
||||
|
||||
<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">
|
||||
<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>
|
||||
|
|
Loading…
Reference in a new issue