Added bookingsTable.html, reconfigured JSP layout for old pages.
This commit is contained in:
committed by
Rossen Stoyanchev
parent
72402f6f2d
commit
60581276a7
@@ -5,11 +5,11 @@
|
||||
|
||||
<tiles-definitions>
|
||||
|
||||
<definition name="enterBookingDetails" extends="standardLayout" templateType="jsp">
|
||||
<definition name="enterBookingDetails" extends="standardLayoutJSP" templateType="jsp">
|
||||
<put-attribute name="body" value="/WEB-INF/hotels/booking/enterBookingDetails.jsp" type="jsp"/>
|
||||
</definition>
|
||||
|
||||
<definition name="reviewBooking" extends="standardLayout" templateType="jsp">
|
||||
<definition name="reviewBooking" extends="standardLayoutJSP" templateType="jsp">
|
||||
<put-attribute name="body" value="/WEB-INF/hotels/booking/reviewBooking.jsp" type="jsp"/>
|
||||
</definition>
|
||||
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
<div id="bookings" sec:authorize="hasRole('ROLE_USER')">
|
||||
|
||||
<h2>Current Hotel Bookings</h2>
|
||||
|
||||
<p th:unless="${bookingList}">
|
||||
No bookings found
|
||||
</p>
|
||||
|
||||
<table class="summary" th:if="${bookingList}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Address</th>
|
||||
<th>City, State</th>
|
||||
<th>Check in Date</th>
|
||||
<th>Check out Date</th>
|
||||
<th>Confirmation Number</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="booking : ${bookingList}" th:object="${booking}">
|
||||
<td th:text="*{hotel.name}">The Herb Plaza</td>
|
||||
<td th:text="*{hotel.address}">Thyme Square, 13</td>
|
||||
<td th:text="*{hotel.city} + ', ' + *{hotel.state}">Icetown, North Pole</td>
|
||||
<td th:text="*{checkinDate}">2012-12-21</td>
|
||||
<td th:text="*{checkoutDate}">2012-12-21</td>
|
||||
<td th:text="*{id}">1</td>
|
||||
<td>
|
||||
<form action="#" th:action="@{'/bookings/' + *{id}}" th:method="'delete'">
|
||||
<button type="submit">Cancel</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
@@ -9,12 +9,12 @@
|
||||
<put-attribute name="body">
|
||||
<definition template="hotels/search.html" templateType="thymeleaf">
|
||||
<put-attribute name="searchForm" value="hotels/searchForm.html" type="thymeleaf"/>
|
||||
<put-attribute name="bookingsTable" value="/WEB-INF/hotels/bookingsTable.jsp" type="jsp"/>
|
||||
<put-attribute name="bookingsTable" value="hotels/bookingsTable.html" type="thymeleaf"/>
|
||||
</definition>
|
||||
</put-attribute>
|
||||
</definition>
|
||||
|
||||
<definition name="hotels/*" extends="standardLayout">
|
||||
<definition name="hotels/*" extends="standardLayoutJSP" templateType="jsp">
|
||||
<put-attribute name="body" value="/WEB-INF/hotels/{1}.jsp" type="jsp"/>
|
||||
</definition>
|
||||
|
||||
|
||||
@@ -6,5 +6,6 @@
|
||||
<tiles-definitions>
|
||||
|
||||
<definition name="standardLayout" template="layouts/standard.html" templateType="thymeleaf"/>
|
||||
|
||||
<definition name="standardLayoutJSP" template="/WEB-INF/layouts/standard.jsp" templateType="jsp"/>
|
||||
|
||||
</tiles-definitions>
|
||||
|
||||
Reference in New Issue
Block a user