Logout y algunos cambios más de estilos

This commit is contained in:
David 2021-03-27 23:15:30 +01:00
parent 8ccda96390
commit 702664f615
8 changed files with 25 additions and 20 deletions

View file

@ -49,7 +49,7 @@ public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
.antMatchers("/owners/**").hasAnyAuthority("owner", "admin")
.antMatchers("/clients/new").permitAll()
.antMatchers("/offers/**").hasAnyAuthority("admin")
.antMatchers("/offers/**").permitAll()
.and().formLogin()
.loginPage("/login").permitAll()

View file

@ -5,7 +5,7 @@
<cheapy:layout pageName="error">
<h2>Algo malo ha pasado...</h2>
<h2 style="text-align:center">Algo malo ha pasado...</h2>
<spring:url value="/resources/images/Logo Cheapy.png" htmlEscape="true" var="cheapyImage"/>
<img class="img-responsive" src="${cheapyImage}"/>

View file

@ -1,17 +1,18 @@
<%@ page session="false" trimDirectiveWhitespaces="true" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ 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="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" %>
<link href='https://fonts.googleapis.com/css?family=Lobster' rel='stylesheet'>
<cheapy:layout pageName="foodOffer">
<h2><fmt:message key="foodOffer"/></h2>
<h2 style="text-align:center;padding:5px"><fmt:message key="foodOffer"/></h2>
<table class="table table-striped">
<table class="table table-striped" id="foodOfferTable">
<thead>
<tr>
<th><fmt:message key="offerBeginning"/></th>
<td><c:out value="${localDateTimeFormat.format(foodOffer.start)}"/></td>
@ -36,6 +37,7 @@
<th><fmt:message key="offerCode"/></th>
<td><c:out value="${foodOffer.code}"/></td>
</tr>
</thead>
</table>
<div class="btn-return">

View file

@ -8,7 +8,7 @@
<cheapy:layout pageName="nuOffer">
<h2><fmt:message key="nuOffer"/></h2>
<h2 style="text-align:center;padding:5px"><fmt:message key="nuOffer"/></h2>
<table class="table table-striped" id="nuOffer-table">

View file

@ -7,7 +7,7 @@
<link href='https://fonts.googleapis.com/css?family=Lobster' rel='stylesheet'>
<cheapy:layout pageName="ofertas">
<h2><fmt:message key="foodOffers"/></h2>
<h2 style="text-align:center;padding:5px"><fmt:message key="foodOffers"/></h2>
<table id="foodOfferTable" class="table table-striped">
<thead>
@ -47,7 +47,7 @@
</tbody>
</table>
<h2><fmt:message key="nuOffers"/></h2>
<h2 style="text-align:center;padding:5px"><fmt:message key="nuOffers"/></h2>
<table id="nuOfferTable" class="table table-striped">
<thead>
@ -83,7 +83,7 @@
</c:forEach>
</tbody>
</table>
<h2><fmt:message key="speedOffers"/></h2>
<h2 style="text-align:center;padding:5px"><fmt:message key="speedOffers"/></h2>
<table id="speedOfferTable" class="table table-striped">
<thead>
@ -120,7 +120,7 @@
</c:forEach>
</tbody>
</table>
<h2><fmt:message key="timeOffers"/></h2>
<h2 style="text-align:center;padding:5px"><fmt:message key="timeOffers"/></h2>
<table id="timeOfferTable" class="table table-striped">
<thead>

View file

@ -8,7 +8,7 @@
<cheapy:layout pageName="speedOffer">
<h2><fmt:message key="speedOffer"/></h2>
<h2 style="text-align:center;padding:5px"><fmt:message key="speedOffer"/></h2>
<table class="table table-striped" id="speedOffer-table">

View file

@ -8,10 +8,11 @@
<cheapy:layout pageName="timeOffer">
<h2><fmt:message key="timeOffer"/></h2>
<h2 style="text-align:center;padding:5px"><fmt:message key="timeOffer"/></h2>
<table class="table table-striped">
<thead>
<tr>
<th><fmt:message key="offerBeginning"/></th>
<td><c:out value="${localDateTimeFormat.format(timeOffer.start)}"/></td>
@ -28,6 +29,7 @@
<th><fmt:message key="offerCode"/></th>
<td><c:out value="${timeOffer.code}"/></td>
</tr>
</thead>
</table>
<div class="btn-return">

View file

@ -34,12 +34,13 @@
<span>Ver ofertas</span>
</cheapy:menuItem>
<!--
<cheapy:menuItem active="${name eq 'contactanos'}" url="/contactanos"
title="contactanos">
<span class="glyphicon glyphicon-earphone" aria-hidden="true"></span>
<span>Contáctanos</span>
</cheapy:menuItem>
-->
</ul>
@ -48,7 +49,7 @@
<ul class="nav navbar-nav navbar-right">
<sec:authorize access="!isAuthenticated()">
<li><a href="<c:url value="/login" />">Login</a></li>
<li><a href="<c:url value="/users/new" />">Register</a></li>
<!--<li><a href="<c:url value="/users/new" />">Register</a></li>-->
</sec:authorize>
<sec:authorize access="isAuthenticated()">
<li class="dropdown"><a href="#" class="dropdown-toggle"
@ -59,10 +60,10 @@
<ul class="dropdown-menu">
<li>
<div class="navbar-login">
<div class="row">
<div class="col-lg-4">
<div class="row" >
<div class="col-lg-4" style="">
<p class="text-center">
<span class="glyphicon glyphicon-user icon-size"></span>
<span class="glyphicon glyphicon-user icon-size" ></span>
</p>
</div>
<div class="col-lg-8">
@ -71,7 +72,7 @@
</p>
<form action="/logout" method=post>
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
<input type="submit" value="logout">
<input type="submit" value="logout" style="align-content:center;color:white;background-color:#004080;padding:10px; border:none; text-align:center">
</form>
</div>
</div>