source: src/main/resources/templates/restaurants.html@ b78c0c1

main
Last change on this file since b78c0c1 was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 1.9 KB
Line 
1<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.w3.org/1999/xhtml">
2<head>
3 <meta charset="UTF-8">
4 <title>Restaurants</title>
5 <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
6 <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
7</head>
8<h1>Restaurant list</h1>
9<table class="table">
10 <thead class="thead-dark">
11 <tr>
12 <th scope="col">Name</th>
13<!-- <th scope="col">Restaurant ID</th>-->
14 <th scope="col">Address</th>
15 <th scope="col">Cuisine Type</th>
16 <th scope="col">Operating Hours</th>
17 <th scope="col">Rating</th>
18 <th scope="col">Website</th>
19 <th scope="col" sec:authorize="hasAnyRole('ADMIN', 'USER')">Available tables</th>
20 </tr>
21 </thead>
22 <tbody>
23 <tr class="item" th:each="r: ${restaurants}">
24 <td th:text="${r.getName()}"></td>
25<!-- <td th:text="${r.getRestaurantId()}"></td>-->
26 <td th:text="${r.getAddress()}"></td>
27 <td th:text="${r.getCuisineType()}"></td>
28 <td th:text="${r.getOperatingHours()}"></td>
29 <td th:text="${r.getRating()}"></td>
30 <td th:text="${r.getWebsite()}"></td>
31 <td>
32 <ul th:if="${r.tablesList != null}" th:each="table: ${r.tablesList}" sec:authorize="hasAnyRole('ADMIN', 'USER')">
33 <a th:href="@{'/restaurants/{tableNumber}' (tableNumber=${table.getId()})}" th:text="${'Table for ' + table.getCapacity()}"></a>
34 </ul>
35 <p th:if="${r.tablesList == null}">No tables available</p>
36 </td>
37 </tr>
38 </tbody>
39</table>
Note: See TracBrowser for help on using the repository browser.