Avance en mejora de responsive jsps

He modificado las vistas de bienvenida, de listado de ofertas y de login para que se puedan visualizar de manera correcta desde dispositivos móviles
This commit is contained in:
Angel Caballero Dominguez 2021-04-10 01:13:58 +02:00
parent 54cdcb0546
commit b976a8f496
7 changed files with 429 additions and 380 deletions

View file

@ -216,9 +216,15 @@ img.img-responsive{
padding: 20px;
}
.btn-home{
display: table;
margin: 0 auto;
.btn-block {
display: block;
width: 25%;
}
.btn-home {
display: flex;
justify-content: center;
align-items: center;
}
.btn-home button {
@ -227,7 +233,6 @@ img.img-responsive{
color: white;
padding: 10px 24px;
cursor: pointer;
width: 100%;
display: block;
}
@ -240,9 +245,12 @@ img.img-responsive{
background-color: rgb(40, 140, 215);
}
.btn-home{
display: table;
margin: 0 auto;
.btn-home-max button {
padding: 20px;
margin-left:auto;
margin-right: auto;
margin-bottom: 20px;
}
.btn-create button {
@ -342,6 +350,13 @@ text-align: center;
float:left;
}
.btn-menu button {
margin-left:auto;
margin-right: auto;
margin-bottom: 20px;
margin-right: 20px;
}
.btns-edit{
display: table;
margin: 0 auto;
@ -356,10 +371,6 @@ text-align: center;
cursor: pointer;
}
.btns-edit button:not(:last-child) {
border-bottom: none;
}
.btns-edit button:hover {
background-color: rgb(40, 140, 215);
@ -518,6 +529,14 @@ text-align: center;
color: rgb(29, 142, 226);
}
.row-full{
width: 100vw;
position: relative;
margin-left: -50vw;
height: 100px;
left: 50%;
}
.alert-success {
.alert-variant(fade(@alert-success-bg, 70%); @alert-success-border; @alert-success-text);
}

View file

@ -38,4 +38,13 @@
margin-bottom: 30px;
}
.btn-home button {
background-color: rgb(0, 64, 128);
border: 1px solid rgb(0, 0, 160);
color: white;
padding: 10px 24px;
cursor: pointer;
width: 70%;
display: block;
}
}

View file

@ -94,7 +94,7 @@
background-color: #56baed;
border: none;
color: white;
padding: 15px 80px;
padding: 15px;
text-align: center;
text-decoration: none;
display: inline-block;
@ -110,6 +110,7 @@
-ms-transition: all 0.3s ease-in-out;
-o-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
width: 60%;
}
input[type=button]:hover, input[type=submit]:hover, input[type=reset]:hover {
@ -143,6 +144,7 @@
transition: all 0.5s ease-in-out;
-webkit-border-radius: 5px 5px 5px 5px;
border-radius: 5px 5px 5px 5px;
margin: 0 auto;
}
input[type=text]:focus {
@ -292,7 +294,9 @@
<input type="text" id="username" class="fadeIn second" name="username" placeholder="Usuario" required autofocus>
<input type="password" id="password" class="fadeIn third" name="password" placeholder="Contraseña" required>
<sec:csrfInput />
<input type="submit" class="fadeIn fourth" value="Iniciar sesión">
<div style="text-align: center;">
<input type="submit" class="fadeIn fourth" value="Iniciar sesión">
</div>
</form>
<!-- Remind Passowrd

View file

@ -12,95 +12,99 @@
<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">
<thead>
<tr>
<!-- <th style="width: 150px;">Restaurante</th> -->
<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>-->
</tr>
</thead>
<tbody>
<c:forEach items="${foodOfferLs}" var="foodOffer">
<tr>
<td>
<c:out value="${foodOffer.food}"/>
</td>
<td>
<c:out value="${localDateTimeFormat.format(foodOffer.start)}"/>
</td>
<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}"/>
</spring:url>
<div class="btn-detalles">
<button type="button" role="link" onclick="window.location='${fn:escapeXml(foodOfferUrl)}'" style="font-family: 'Lobster'; font-size: 20px;">
<span class="glyphicon glyphicon-info-sign" aria-hidden="true" style="padding: 5px"> </span>
<fmt:message key="details"/></button>
</div>
</td>
</tr>
</c:forEach>
</tbody>
</table>
<div class="table-responsive">
<table id="foodOfferTable" class="table table-striped">
<thead>
<tr>
<!-- <th style="width: 150px;">Restaurante</th> -->
<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>-->
</tr>
</thead>
<tbody>
<c:forEach items="${foodOfferLs}" var="foodOffer">
<tr>
<td>
<c:out value="${foodOffer.food}"/>
</td>
<td>
<c:out value="${localDateTimeFormat.format(foodOffer.start)}"/>
</td>
<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}"/>
</spring:url>
<div class="btn-detalles">
<button type="button" role="link" onclick="window.location='${fn:escapeXml(foodOfferUrl)}'" style="font-family: 'Lobster'; font-size: 20px;">
<span class="glyphicon glyphicon-info-sign" aria-hidden="true" style="padding: 5px"> </span>
<fmt:message key="details"/></button>
</div>
</td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
</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 número de comensales creada.</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="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>-->
</tr>
</thead>
<tbody>
<c:forEach items="${nuOfferLs}" var="nuOffer">
<tr>
<td>
<c:out value="${localDateTimeFormat.format(nuOffer.start)}"/>
</td>
<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}"/>
</spring:url>
<div class="btn-detalles">
<button type="button" role="link" onclick="window.location='${fn:escapeXml(nuOfferUrl)}'" class="btn-detalles" style="font-family: 'Lobster'; font-size: 20px;">
<span class="glyphicon glyphicon-info-sign" aria-hidden="true" style="padding: 5px"> </span>
<fmt:message key="details"/> </button>
</div>
</td>
</tr>
</c:forEach>
</tbody>
</table>
<div class="table-responsive">
<table id="nuOfferTable" class="table table-striped">
<thead>
<tr>
<!-- <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>-->
</tr>
</thead>
<tbody>
<c:forEach items="${nuOfferLs}" var="nuOffer">
<tr>
<td>
<c:out value="${localDateTimeFormat.format(nuOffer.start)}"/>
</td>
<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}"/>
</spring:url>
<div class="btn-detalles">
<button type="button" role="link" onclick="window.location='${fn:escapeXml(nuOfferUrl)}'" class="btn-detalles" style="font-family: 'Lobster'; font-size: 20px;">
<span class="glyphicon glyphicon-info-sign" aria-hidden="true" style="padding: 5px"> </span>
<fmt:message key="details"/> </button>
</div>
</td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
</c:if>
<h2 style="text-align:center;padding:5px"><fmt:message key="speedOffers"/></h2>
@ -108,47 +112,49 @@
<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">
<thead>
<tr>
<!-- <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>-->
</tr>
</thead>
<tbody>
<c:forEach items="${speedOfferLs}" var="speedOffer">
<tr>
<td>
<c:out value="${localDateTimeFormat.format(speedOffer.start)}"/>
</td>
<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}"/>
</spring:url>
<div class="btn-detalles">
<button type="button" role="link" onclick="window.location='${fn:escapeXml(speedOfferUrl)}'" class="btn-detalles" style="font-family: 'Lobster'; font-size: 20px;">
<span class="glyphicon glyphicon-info-sign" aria-hidden="true" style="padding: 5px"> </span>
<fmt:message key="details"/> </button>
</div>
</td>
</tr>
</c:forEach>
</tbody>
</table>
<div class="table-responsive">
<table id="speedOfferTable" class="table table-striped">
<thead>
<tr>
<!-- <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>-->
</tr>
</thead>
<tbody>
<c:forEach items="${speedOfferLs}" var="speedOffer">
<tr>
<td>
<c:out value="${localDateTimeFormat.format(speedOffer.start)}"/>
</td>
<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}"/>
</spring:url>
<div class="btn-detalles">
<button type="button" role="link" onclick="window.location='${fn:escapeXml(speedOfferUrl)}'" class="btn-detalles" style="font-family: 'Lobster'; font-size: 20px;">
<span class="glyphicon glyphicon-info-sign" aria-hidden="true" style="padding: 5px"> </span>
<fmt:message key="details"/> </button>
</div>
</td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
</c:if>
<h2 style="text-align:center;padding:5px"><fmt:message key="timeOffers"/></h2>
@ -156,44 +162,46 @@
<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">
<thead>
<tr>
<!-- <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>-->
</tr>
</thead>
<tbody>
<c:forEach items="${timeOfferLs}" var="timeOffer">
<tr>
<td>
<c:out value="${localDateTimeFormat.format(timeOffer.start)}"/>
</td>
<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}"/>
</spring:url>
<div class="btn-detalles">
<button type="button" role="link" onclick="window.location='${fn:escapeXml(timeOfferUrl)}'" class="btn-detalles" style="font-family: 'Lobster'; font-size: 20px;">
<span class="glyphicon glyphicon-info-sign" aria-hidden="true" style="padding: 5px"> </span>
<fmt:message key="details"/> </button>
</div>
</td>
</tr>
</c:forEach>
</tbody>
</table>
<div class="table-responsive">
<table id="timeOfferTable" class="table table-striped">
<thead>
<tr>
<!-- <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>-->
</tr>
</thead>
<tbody>
<c:forEach items="${timeOfferLs}" var="timeOffer">
<tr>
<td>
<c:out value="${localDateTimeFormat.format(timeOffer.start)}"/>
</td>
<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}"/>
</spring:url>
<div class="btn-detalles">
<button type="button" role="link" onclick="window.location='${fn:escapeXml(timeOfferUrl)}'" class="btn-detalles" style="font-family: 'Lobster'; font-size: 20px;">
<span class="glyphicon glyphicon-info-sign" aria-hidden="true" style="padding: 5px"> </span>
<fmt:message key="details"/> </button>
</div>
</td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
</c:if>
</cheapy:layout>

View file

@ -14,104 +14,108 @@
<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>
<!-- <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>
<td>
<c:out value="${foodOffer.discount}%"/>
</td>
<td>
<c:out value="${localDateTimeFormat.format(foodOffer.start)}"/>
</td>
<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}"/>
</spring:url>
<div class="btn-detalles">
<button type="button" role="link" onclick="window.location='${fn:escapeXml(foodOfferUrl)}'" style="font-family: 'Lobster'; font-size: 20px;">
<span class="glyphicon glyphicon-info-sign" aria-hidden="true" style="padding: 5px"> </span>
<fmt:message key="details"/></button>
</div>
</td>
</tr>
</c:forEach>
</tbody>
</table>
<div class="table-responsive">
<table id="foodOfferTable" class="table table-striped">
<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>
<td>
<c:out value="${foodOffer.discount}%"/>
</td>
<td>
<c:out value="${localDateTimeFormat.format(foodOffer.start)}"/>
</td>
<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}"/>
</spring:url>
<div class="btn-detalles">
<button type="button" role="link" onclick="window.location='${fn:escapeXml(foodOfferUrl)}'" style="font-family: 'Lobster'; font-size: 20px;">
<span class="glyphicon glyphicon-info-sign" aria-hidden="true" style="padding: 5px"> </span>
<fmt:message key="details"/></button>
</div>
</td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
</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 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>
<th><fmt:message key="goldDiscount"/></th>
<th> </th>
</tr>
</thead>
<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>
<td>
<c:out value="${localDateTimeFormat.format(nuOffer.end)}"/>
</td>
<td>
<c:out value="${nuOffer.gold} comensales"/>
</td>
<td>
<c:out value="${nuOffer.discountGold}%"/>
</td>
<td>
<spring:url value="/offers/nu/{nuOfferId}" var="nuOfferUrl">
<spring:param name="nuOfferId" value="${nuOffer.id}"/>
</spring:url>
<div class="btn-detalles">
<button type="button" role="link" onclick="window.location='${fn:escapeXml(nuOfferUrl)}'" class="btn-detalles" style="font-family: 'Lobster'; font-size: 20px;">
<span class="glyphicon glyphicon-info-sign" aria-hidden="true" style="padding: 5px"> </span>
<fmt:message key="details"/> </button>
</div>
</td>
</tr>
</c:forEach>
</tbody>
</table>
<div class="table-responsive">
<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>
<th><fmt:message key="goldDiscount"/></th>
<th> </th>
</tr>
</thead>
<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>
<td>
<c:out value="${localDateTimeFormat.format(nuOffer.end)}"/>
</td>
<td>
<c:out value="${nuOffer.gold} comensales"/>
</td>
<td>
<c:out value="${nuOffer.discountGold}%"/>
</td>
<td>
<spring:url value="/offers/nu/{nuOfferId}" var="nuOfferUrl">
<spring:param name="nuOfferId" value="${nuOffer.id}"/>
</spring:url>
<div class="btn-detalles">
<button type="button" role="link" onclick="window.location='${fn:escapeXml(nuOfferUrl)}'" class="btn-detalles" style="font-family: 'Lobster'; font-size: 20px;">
<span class="glyphicon glyphicon-info-sign" aria-hidden="true" style="padding: 5px"> </span>
<fmt:message key="details"/> </button>
</div>
</td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
</c:if>
<h2 style="text-align:center;padding:5px"><fmt:message key="speedOffers"/></h2>
@ -119,52 +123,54 @@
<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>
<th><fmt:message key="goldDiscount"/></th>
<th> </th>
</tr>
</thead>
<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>
<td>
<c:out value="${localDateTimeFormat.format(speedOffer.end)}"/>
</td>
<td>
<c:out value="${speedOffer.gold} minutos"/>
</td>
<td>
<c:out value="${speedOffer.discountGold}%"/>
</td>
<td>
<spring:url value="/offers/speed/{speedOfferId}" var="speedOfferUrl">
<spring:param name="speedOfferId" value="${speedOffer.id}"/>
</spring:url>
<div class="btn-detalles">
<button type="button" role="link" onclick="window.location='${fn:escapeXml(speedOfferUrl)}'" class="btn-detalles" style="font-family: 'Lobster'; font-size: 20px;">
<span class="glyphicon glyphicon-info-sign" aria-hidden="true" style="padding: 5px"> </span>
<fmt:message key="details"/> </button>
</div>
</td>
</tr>
</c:forEach>
</tbody>
</table>
<div class="table-responsive">
<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>
<th><fmt:message key="goldDiscount"/></th>
<th> </th>
</tr>
</thead>
<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>
<td>
<c:out value="${localDateTimeFormat.format(speedOffer.end)}"/>
</td>
<td>
<c:out value="${speedOffer.gold} minutos"/>
</td>
<td>
<c:out value="${speedOffer.discountGold}%"/>
</td>
<td>
<spring:url value="/offers/speed/{speedOfferId}" var="speedOfferUrl">
<spring:param name="speedOfferId" value="${speedOffer.id}"/>
</spring:url>
<div class="btn-detalles">
<button type="button" role="link" onclick="window.location='${fn:escapeXml(speedOfferUrl)}'" class="btn-detalles" style="font-family: 'Lobster'; font-size: 20px;">
<span class="glyphicon glyphicon-info-sign" aria-hidden="true" style="padding: 5px"> </span>
<fmt:message key="details"/> </button>
</div>
</td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
</c:if>
<h2 style="text-align:center;padding:5px"><fmt:message key="timeOffers"/></h2>
@ -172,51 +178,53 @@
<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>
<th><fmt:message key="finishOffer"/></th>
<th> </th>
</tr>
</thead>
<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>
<td>
<c:out value="${localDateTimeFormat.format(timeOffer.end)}"/>
</td>
<td>
<c:out value="${timeOffer.init}h"/>
</td>
<td>
<c:out value="${timeOffer.finish}h"/>
</td>
<td>
<spring:url value="/offers/time/{timeOfferId}" var="timeOfferUrl">
<spring:param name="timeOfferId" value="${timeOffer.id}"/>
</spring:url>
<div class="btn-detalles">
<button type="button" role="link" onclick="window.location='${fn:escapeXml(timeOfferUrl)}'" class="btn-detalles" style="font-family: 'Lobster'; font-size: 20px;">
<span class="glyphicon glyphicon-info-sign" aria-hidden="true" style="padding: 5px"> </span>
<fmt:message key="details"/> </button>
</div>
</td>
</tr>
</c:forEach>
</tbody>
</table>
<div class="table-responsive">
<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>
<th><fmt:message key="finishOffer"/></th>
<th> </th>
</tr>
</thead>
<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>
<td>
<c:out value="${localDateTimeFormat.format(timeOffer.end)}"/>
</td>
<td>
<c:out value="${timeOffer.init}h"/>
</td>
<td>
<c:out value="${timeOffer.finish}h"/>
</td>
<td>
<spring:url value="/offers/time/{timeOfferId}" var="timeOfferUrl">
<spring:param name="timeOfferId" value="${timeOffer.id}"/>
</spring:url>
<div class="btn-detalles">
<button type="button" role="link" onclick="window.location='${fn:escapeXml(timeOfferUrl)}'" class="btn-detalles" style="font-family: 'Lobster'; font-size: 20px;">
<span class="glyphicon glyphicon-info-sign" aria-hidden="true" style="padding: 5px"> </span>
<fmt:message key="details"/> </button>
</div>
</td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
</c:if>

View file

@ -9,32 +9,33 @@
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<cheapy:layout pageName="home">
<h2 class="text-center" style="font-family: 'Lobster'; font-size: 60px; color: rgb(0, 64, 128); padding:30px"><fmt:message key="welcome"/></h2>
<h2 class="text-center" style="font-family: 'Lobster'; font-size: 300%; color: rgb(0, 64, 128); padding:30px"><fmt:message key="welcome"/></h2>
<div class="row">
<div class="col-md-12">
<div class="img-home">
<spring:url value="/resources/images/Logo Cheapy.png" htmlEscape="true" var="cheapyImage"/>
<img class="img-responsive" src="${cheapyImage}"/>
</div>
<div class="btn-home">
<button type="button" role="link" onclick="window.location='/offers'" style="font-family: 'Lobster'; font-size: 20px;margin:5px;">
<span class="glyphicon glyphicon-cutlery" aria-hidden="true" style="padding: 5px"> </span>
<fmt:message key="listOffers"/> </button>
</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>
<fmt:message key="createOffers"/> </button>
</div>
</sec:authorize>
<div class="btn-home-max">
<div class="btn-home">
<button type="button" role="link" onclick="window.location='/offers'" style="font-family: 'Lobster'; font-size: 20px;margin:5px;" class="btn-block">
<span class="glyphicon glyphicon-cutlery" aria-hidden="true" style="padding: 5px"> </span>
<fmt:message key="listOffers"/> </button>
</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;" class="btn-block">
<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;" class="btn-block">
<span class="glyphicon glyphicon-cutlery" aria-hidden="true" style="padding: 5px"> </span>
<fmt:message key="createOffers"/> </button>
</div>
</sec:authorize>
</div>
</div>
</div>
</cheapy:layout>

View file

@ -2,7 +2,7 @@
<br/>
<br/>
<div class="container">
<div class="row-full">
<div class="row">
<div class="col-12 text-center"><img src="<spring:url value="/resources/images/eslogan.png" htmlEscape="true" />"
alt="Eat fast, eat cheapy"/></div>