Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
- <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
- <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
- <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
- <c:set var="language"
- value="${not empty param.language ? param.language : not empty language ? language : pageContext.request.locale}"
- scope="session"/>
- <fmt:setLocale value="${language}"/>
- <fmt:setBundle basename="com.lelyak.i18n.text"/>
- <html lang="${language}">
- <head>
- <title>Apartments</title>
- <jsp:include page="parts/header.jsp"/>
- <link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
- <script src="//code.jquery.com/jquery-1.9.1.js"></script>
- <script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
- <script>
- $(function() {
- $("#arrivaldate").datepicker();
- $("#departdate").datepicker();
- });
- </script>
- </head>
- <body>
- <div class="container tours">
- <div class="col-md-10 col-xs-12 col-md-offset-1">
- <jsp:include page="parts/navbar.jsp"/>
- </div>
- <div class="row">
- <div class="col-md-10 col-xs-12 col-md-offset-1">
- <%--@elvariable id="apartments" type="com.lelyak.model.Apartment"--%>
- <c:forEach items="${apartments}" var="apartment">
- <div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
- <h5 class="tour-type text-left">
- <c:choose>
- <c:when test="${apartment.rating.description == 'two stars'}">
- <fmt:message key="apartments.rating.two"/>
- </c:when>
- <c:when test="${apartment.rating.description == 'three stars'}">
- <fmt:message key="apartments.rating.three"/>
- </c:when>
- <c:when test="${apartment.rating.description == 'four stars'}">
- <fmt:message key="apartments.rating.four"/>
- </c:when>
- <c:when test="${apartment.rating.description == 'five stars'}">
- <fmt:message key="apartments.rating.five"/>
- </c:when>
- </c:choose>
- <%--${ apartments.places }--%>
- <c:choose>
- <c:when test="${apartment.sleepPlaces.places == 'one person'}">
- <fmt:message key="apartments.places.one"/>
- </c:when>
- <c:when test="${apartment.sleepPlaces.places == 'two persons'}">
- <fmt:message key="apartments.places.two"/>
- </c:when>
- <c:when test="${apartment.sleepPlaces.places == 'three persons'}">
- <fmt:message key="apartments.places.three"/>
- </c:when>
- <c:when test="${apartment.sleepPlaces.places == 'four persons'}">
- <fmt:message key="apartments.places.four"/>
- </c:when>
- </c:choose>
- </h5>
- <div class="tour-image flow-img" style="background-image:url(../img/apartment/room_default.jpg)"></div>
- <h3 class="tile-title">${apartment.roomName}</h3>
- <p class="text-left">
- <strong><fmt:message key="apartments.arrival"/>:</strong> <input type="text" id="arrivaldate" name="arrivaldate"/> <br/>
- <strong><fmt:message key="apartments.depart"/>:</strong> <input type="text" id="departdate" name="departdate"/> <br/>
- <strong><fmt:message key="apartments.price"/>:</strong> ${apartment.price} <br/>
- </p>
- <a class="btn btn-primary btn-large btn-block"
- href="<c:url value="/purchase?apartment=${apartment.id}"/>"><fmt:message key="button.book"/>
- </a>
- </div>
- </div>
- </c:forEach>
- </div>
- </div>
- <!-- /tiles -->
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement