mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-23 15:55:49 +00:00
Arreglos del merge más cambios a las nuevas vistas
This commit is contained in:
parent
7124228491
commit
f7b8a236f0
18 changed files with 160 additions and 97 deletions
|
@ -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")
|
||||
|
||||
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
<petclinic:layout pageName="foodOffer">
|
||||
|
||||
<jsp:body>
|
||||
<h2> ¿Esta seguro de que quiere eliminar su oferta? </h2>
|
||||
<h2> ¿Está seguro de que quiere eliminar su oferta? </h2>
|
||||
|
||||
<form:form modelAttribute="foodOffer" class="form-horizontal">
|
||||
<input type="hidden" name="food" value="${food_offer.food}" />
|
||||
<input type="hidden" name="discount" value="${food_offer.discount}" />
|
||||
<input type="hidden" name="food" value="${foodOffer.food}" />
|
||||
<input type="hidden" name="discount" value="${foodOffer.discount}" />
|
||||
|
||||
<button class="btn btn-default" type="submit">Eliminar Oferta</button>
|
||||
</form:form>
|
||||
|
|
|
@ -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" %>
|
||||
<link href='https://fonts.googleapis.com/css?family=Lobster' rel='stylesheet'>
|
||||
|
||||
<cheapy:layout pageName="foodOffer">
|
||||
|
@ -45,7 +46,7 @@
|
|||
<span class="glyphicon glyphicon-arrow-left" aria-hidden="true" style="padding: 5px"> </span>
|
||||
<fmt:message key="return"/> </button>
|
||||
</div>
|
||||
|
||||
<sec:authorize access="hasAnyAuthority('client')">
|
||||
<div class="btns-edit">
|
||||
<spring:url value="{foodOfferId}/edit" var="editUrl">
|
||||
<spring:param name="foodOfferId" value="${foodOffer.id}"/>
|
||||
|
@ -53,23 +54,28 @@
|
|||
<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="${foodOffer.status eq 'inactive' }">
|
||||
<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>
|
||||
</c:if>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</sec:authorize>
|
||||
<script>
|
||||
function goBack() {
|
||||
window.history.back()
|
||||
|
|
|
@ -8,7 +8,10 @@
|
|||
|
||||
<cheapy:layout pageName="myOffers">
|
||||
<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>
|
||||
<c:if test="${not empty foodOfferLs }">
|
||||
<table id="foodOfferTable" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -18,7 +21,7 @@
|
|||
<th><fmt:message key="endDate"/></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>
|
||||
<!-- <a href="${fn:escapeXml(newFoodUrl)}" class="btn btn-default">Nueva oferta</a></th>-->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -48,9 +51,12 @@
|
|||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</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>
|
||||
</c:if>
|
||||
<c:if test="${not empty nuOfferLs }">
|
||||
<table id="nuOfferTable" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -59,7 +65,7 @@
|
|||
<th><fmt:message key="endDate"/></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>
|
||||
<!-- <a href="${fn:escapeXml(newNuUrl)}" class="btn btn-default">Nueva oferta</a></th>-->
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -87,8 +93,13 @@
|
|||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
</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>
|
||||
<c:if test="${not empty speedOfferLs }">
|
||||
<table id="speedOfferTable" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -97,7 +108,7 @@
|
|||
<th><fmt:message key="endDate"/></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>
|
||||
<!-- <a href="${fn:escapeXml(newSpeedUrl)}" class="btn btn-default">Nueva oferta</a></th>-->
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -126,8 +137,13 @@
|
|||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
</c:if>
|
||||
|
||||
<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>
|
||||
</c:if>
|
||||
<c:if test="${not empty timeOfferLs }">
|
||||
<table id="timeOfferTable" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -136,7 +152,7 @@
|
|||
<th><fmt:message key="endDate"/></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>
|
||||
<!--<a href="${fn:escapeXml(newTimeUrl)}" class="btn btn-default">Nueva oferta</a> </th>-->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -163,4 +179,5 @@
|
|||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
</c:if>
|
||||
</cheapy:layout>
|
||||
|
|
|
@ -5,18 +5,18 @@
|
|||
<%@ taglib prefix="petclinic" tagdir="/WEB-INF/tags"%>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||||
|
||||
<petclinic:layout pageName="nuOffer">
|
||||
<petclinic:layout pageName="nuOfferDisable">
|
||||
|
||||
<jsp:body>
|
||||
<h2> ¿Esta seguro de que quiere dar de baja su offer? </h2>
|
||||
<h2> ¿Está seguro de que quiere dar de baja su offer? </h2>
|
||||
|
||||
<form:form modelAttribute="nuOffer" class="form-horizontal">
|
||||
<input type="hidden" name="gold" value="${nu_offer.gold}" />
|
||||
<input type="hidden" name="discountGold" value="${nu_offer.discount_gold}" />
|
||||
<input type="hidden" name="silver" value="${nu_offer.silver}" />
|
||||
<input type="hidden" name="discountSilver" value="${nu_offer.discount_silver}" />
|
||||
<input type="hidden" name="bronze" value="${nu_offer.bronze}" />
|
||||
<input type="hidden" name="discountBronze" value="${nu_offer.discount_bronze}" />
|
||||
<input type="hidden" name="gold" value="${nuOffer.gold}" />
|
||||
<input type="hidden" name="discountGold" value="${nuOffer.discountGold}" />
|
||||
<input type="hidden" name="silver" value="${nuOffer.silver}" />
|
||||
<input type="hidden" name="discountSilver" value="${nuOffer.discountSilver}" />
|
||||
<input type="hidden" name="bronze" value="${nuOffer.bronze}" />
|
||||
<input type="hidden" name="discountBronze" value="${nuOffer.discountBronze}" />
|
||||
|
||||
<button class="btn btn-default" type="submit">Dar de baja</button>
|
||||
</form:form>
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
|
||||
<link href='https://fonts.googleapis.com/css?family=Lobster' rel='stylesheet'>
|
||||
|
||||
<cheapy:layout pageName="nuOffer">
|
||||
|
@ -56,7 +57,7 @@
|
|||
<span class="glyphicon glyphicon-arrow-left" aria-hidden="true" style="padding: 5px"> </span>
|
||||
<fmt:message key="return"/> </button>
|
||||
</div>
|
||||
|
||||
<sec:authorize access="hasAnyAuthority('client')">
|
||||
<div class="btns-edit">
|
||||
<spring:url value="{nuOfferId}/edit" var="editUrl">
|
||||
<spring:param name="nuOfferId" value="${nuOffer.id}"/>
|
||||
|
@ -64,23 +65,26 @@
|
|||
<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>
|
||||
|
||||
<spring:url value="{nuOfferId}/activate" var="activateUrl">
|
||||
<spring:param name="nuOfferId" value="${nuOffer.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="{nuOfferId}/disable" var="deactivateUrl">
|
||||
<spring:param name="nuOfferId" value="${nuOffer.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 test="${nuOffer.status eq 'inactive' }">
|
||||
<spring:url value="{nuOfferId}/activate" var="activateUrl">
|
||||
<spring:param name="nuOfferId" value="${nuOffer.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="${nuOffer.status eq 'active' }">
|
||||
<spring:url value="{nuOfferId}/disable" var="deactivateUrl">
|
||||
<spring:param name="nuOfferId" value="${nuOffer.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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</sec:authorize>
|
||||
<script>
|
||||
function goBack() {
|
||||
window.history.back()
|
||||
|
|
|
@ -9,25 +9,25 @@
|
|||
<cheapy:layout pageName="crearOfertas">
|
||||
<div class="btn-create-max">
|
||||
<div class="btn-create">
|
||||
<button type="button" role="link" onclick="window.location='/foodOffers/new'" style="font-family: 'Lobster'; font-size: 20px;">
|
||||
<button type="button" role="link" onclick="window.location='/offers/food/new'" style="font-family: 'Lobster'; font-size: 20px;">
|
||||
<span class="glyphicon glyphicon-cutlery" aria-hidden="true" style="padding: 5px"> </span>
|
||||
<fmt:message key="createFoodOffers"/> </button>
|
||||
</div>
|
||||
|
||||
<div class="btn-create">
|
||||
<button type="button" role="link" onclick="window.location='/nuOffers/new'" style="font-family: 'Lobster'; font-size: 20px;">
|
||||
<button type="button" role="link" onclick="window.location='/offers/nu/new'" style="font-family: 'Lobster'; font-size: 20px;">
|
||||
<span class="glyphicon glyphicon-cutlery" aria-hidden="true" style="padding: 5px"> </span>
|
||||
<fmt:message key="createNuOffers"/> </button>
|
||||
</div>
|
||||
|
||||
<div class="btn-create">
|
||||
<button type="button" role="link" onclick="window.location='/speedOffers/new'" style="font-family: 'Lobster'; font-size: 20px;">
|
||||
<button type="button" role="link" onclick="window.location='/offers/speed/new'" style="font-family: 'Lobster'; font-size: 20px;">
|
||||
<span class="glyphicon glyphicon-cutlery" aria-hidden="true" style="padding: 5px"> </span>
|
||||
<fmt:message key="createSpeedOffers"/> </button>
|
||||
</div>
|
||||
|
||||
<div class="btn-create">
|
||||
<button type="button" role="link" onclick="window.location='/timeOffers/new'" style="font-family: 'Lobster'; font-size: 20px;">
|
||||
<button type="button" role="link" onclick="window.location='/offers/time/new'" style="font-family: 'Lobster'; font-size: 20px;">
|
||||
<span class="glyphicon glyphicon-cutlery" aria-hidden="true" style="padding: 5px"> </span>
|
||||
<fmt:message key="createTimeOffers"/> </button>
|
||||
</div>
|
||||
|
|
|
@ -8,7 +8,10 @@
|
|||
|
||||
<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>
|
||||
<c:if test="${not empty foodOfferLs }">
|
||||
<table id="foodOfferTable" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -50,9 +53,12 @@
|
|||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</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>
|
||||
</c:if>
|
||||
<c:if test="${not empty nuOfferLs }">
|
||||
<table id="nuOfferTable" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -95,8 +101,13 @@
|
|||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
</c:if>
|
||||
|
||||
<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>
|
||||
</c:if>
|
||||
<c:if test="${not empty speedOfferLs }">
|
||||
<table id="speedOfferTable" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -140,8 +151,13 @@
|
|||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
</c:if>
|
||||
|
||||
<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>
|
||||
</c:if>
|
||||
<c:if test="${not empty timeOfferLs }">
|
||||
<table id="timeOfferTable" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -184,6 +200,8 @@
|
|||
</c:forEach>
|
||||
</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>
|
||||
|
|
|
@ -11,12 +11,12 @@
|
|||
<h2> ¿Esta seguro de que quiere dar de baja su offer? </h2>
|
||||
|
||||
<form:form modelAttribute="speedOffer" class="form-horizontal">
|
||||
<input type="hidden" name="gold" value="${nu_offer.gold}" />
|
||||
<input type="hidden" name="discountGold" value="${nu_offer.discount_gold}" />
|
||||
<input type="hidden" name="silver" value="${nu_offer.silver}" />
|
||||
<input type="hidden" name="discountSilver" value="${nu_offer.discount_silver}" />
|
||||
<input type="hidden" name="bronze" value="${nu_offer.bronze}" />
|
||||
<input type="hidden" name="discountBronze" value="${nu_offer.discount_bronze}" />
|
||||
<input type="hidden" name="gold" value="${speedOffer.gold}" />
|
||||
<input type="hidden" name="discountGold" value="${speedOffer.discountGold}" />
|
||||
<input type="hidden" name="silver" value="${speedOffer.silver}" />
|
||||
<input type="hidden" name="discountSilver" value="${speedOffer.discountSilver}" />
|
||||
<input type="hidden" name="bronze" value="${speedOffer.bronze}" />
|
||||
<input type="hidden" name="discountBronze" value="${speedOffer.discountBronze}" />
|
||||
|
||||
<button class="btn btn-default" type="submit">Dar de baja</button>
|
||||
</form:form>
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
|
||||
<link href='https://fonts.googleapis.com/css?family=Lobster' rel='stylesheet'>
|
||||
|
||||
<cheapy:layout pageName="speedOffer">
|
||||
|
@ -56,7 +57,7 @@
|
|||
<span class="glyphicon glyphicon-arrow-left" aria-hidden="true" style="padding: 5px"> </span>
|
||||
<fmt:message key="return"/> </button>
|
||||
</div>
|
||||
|
||||
<sec:authorize access="hasAnyAuthority('client')">
|
||||
<div class="btns-edit">
|
||||
<spring:url value="{speedOfferId}/edit" var="editUrl">
|
||||
<spring:param name="speedOfferId" value="${speedOffer.id}"/>
|
||||
|
@ -65,22 +66,26 @@
|
|||
<span class="glyphicon glyphicon glyphicon-edit" aria-hidden="true" style="padding: 5px"> </span>
|
||||
Editar oferta</button>
|
||||
|
||||
<spring:url value="{speedOfferId}/activate" var="activateUrl">
|
||||
<spring:param name="speedOfferId" value="${speedOffer.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="{speedOfferId}/disable" var="deactivateUrl">
|
||||
<spring:param name="speedOfferId" value="${speedOffer.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 test="${speedOffer.status eq 'inactive' }">
|
||||
<spring:url value="{speedOfferId}/activate" var="activateUrl">
|
||||
<spring:param name="speedOfferId" value="${speedOffer.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="${speedOffer.status eq 'active' }">
|
||||
<spring:url value="{speedOfferId}/disable" var="deactivateUrl">
|
||||
<spring:param name="speedOfferId" value="${speedOffer.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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</sec:authorize>
|
||||
<script>
|
||||
function goBack() {
|
||||
window.history.back()
|
||||
|
|
|
@ -5,15 +5,15 @@
|
|||
<%@ taglib prefix="petclinic" tagdir="/WEB-INF/tags"%>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||||
|
||||
<petclinic:layout pageName="foodOffer">
|
||||
<petclinic:layout pageName="timeOffer">
|
||||
|
||||
<jsp:body>
|
||||
<h2> ¿Esta seguro de que quiere eliminar su oferta? </h2>
|
||||
|
||||
<form:form modelAttribute="foodOffer" class="form-horizontal">
|
||||
<input type="hidden" name="init" value="${time_offer.init}" />
|
||||
<input type="hidden" name="finish" value="${time_offer.finish}" />
|
||||
<input type="hidden" name="discount" value="${time_offer.discount}" />
|
||||
<form:form modelAttribute="timeOffer" class="form-horizontal">
|
||||
<input type="hidden" name="init" value="${timeOffer.init}" />
|
||||
<input type="hidden" name="finish" value="${timeOffer.finish}" />
|
||||
<input type="hidden" name="discount" value="${timeOffer.discount}" />
|
||||
|
||||
<button class="btn btn-default" type="submit">Eliminar Oferta</button>
|
||||
</form:form>
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
|
||||
<link href='https://fonts.googleapis.com/css?family=Lobster' rel='stylesheet'>
|
||||
|
||||
<cheapy:layout pageName="timeOffer">
|
||||
|
@ -46,7 +47,7 @@
|
|||
<span class="glyphicon glyphicon-arrow-left" aria-hidden="true" style="padding: 5px"> </span>
|
||||
<fmt:message key="return"/> </button>
|
||||
</div>
|
||||
|
||||
<sec:authorize access="hasAnyAuthority('client')">
|
||||
<div class="btns-edit">
|
||||
<spring:url value="{timeOfferId}/edit" var="editUrl">
|
||||
<spring:param name="timeOfferId" value="${timeOffer.id}"/>
|
||||
|
@ -55,22 +56,27 @@
|
|||
<span class="glyphicon glyphicon glyphicon-edit" aria-hidden="true" style="padding: 5px"> </span>
|
||||
Editar oferta</button>
|
||||
|
||||
<spring:url value="{timeOfferId}/activate" var="activateUrl">
|
||||
<spring:param name="timeOfferId" value="${timeOffer.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="{timeOfferId}/disable" var="deactivateUrl">
|
||||
<spring:param name="timeOfferId" value="${timeOffer.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 test="${timeOffer.status eq 'inactive' }">
|
||||
<spring:url value="{timeOfferId}/activate" var="activateUrl">
|
||||
<spring:param name="timeOfferId" value="${timeOffer.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="${timeOffer.status eq 'active' }">
|
||||
<spring:url value="{timeOfferId}/disable" var="deactivateUrl">
|
||||
<spring:param name="timeOfferId" value="${timeOffer.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>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</sec:authorize>
|
||||
<script>
|
||||
function goBack() {
|
||||
window.history.back()
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<fmt:message key="listOffers"/> </button>
|
||||
</div>
|
||||
|
||||
<sec:authorize access="hasAnyAuthority('cliente')">
|
||||
<sec:authorize access="hasAnyAuthority('client')">
|
||||
<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