source: src/main/resources/templates/available-rooms.html@ f7c05a1

Last change on this file since f7c05a1 was f7c05a1, checked in by Elena Shulevska <elena.shulevska@…>, 16 months ago

initial commit of the source code on origin

  • Property mode set to 100644
File size: 7.1 KB
RevLine 
[f7c05a1]1<!DOCTYPE html>
2<html lang="en" xmln="http://www.w3.org/1999/xhtml">
3<head>
4 <!-- Required meta tags -->
5 <meta charset="utf-8">
6 <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
7 <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
8 <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
9 <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
10 <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" crossorigin="anonymous"></script>
11 <!-- Bootstrap CSS -->
12 <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"
13 integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
14 <link href='https://fonts.googleapis.com/css?family=Montserrat' rel='stylesheet'>
15 <title>Available Rooms</title>
16 <style>
17 header{
18 font-size: 30px;
19 font-family: 'Montserrat', sans-serif;
20 }
21 body {
22 font-family: 'Montserrat', sans-serif;
23 }
24 h6{
25 text-align: center;
26 text-space: 5px;
27 font-size: 23px;
28 }
29
30 h1{
31 font-size:25px;
32 }
33 table{
34 font-size: 20px;
35 text-align: center;
36 }
37 .buttons
38 {
39 width: 100px;
40 }
41 .dropbtn {
42 background: white;
43 border: none;
44 }
45 .dropdown {
46 position: relative;
47 display: inline-block;
48 }
49 .dropdown-content {
50 display: none;
51 position: absolute;
52 background-color: #f1f1f1;
53 font-size: 20px;
54 min-width: 160px;
55 box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
56 z-index: 1;
57 }
58 .dropdown-content a {
59 padding: 12px 16px;
60 text-decoration: none;
61 display: block;
62 }
63 .dropdown-content a:hover {background-color: #ddd;}
64 .dropdown:hover .dropdown-content {display: block;}
65 /*.dropdown:hover .dropbtn {background-color: darkolivegreen;}*/
66 </style>
67</head>
68<body>
69<header>
70 <nav class="navbar navbar-expand-lg navbar-light bg-white">
71 <div class="container-fluid">
72 <img th:src="@{../logo.png}" class="img-fluid mx-auto d-block ms-0" width="200px" height="150px" alt="Logo">
73 <div class="collapse navbar-collapse justify-content-end mr-5" id="navbarNavAltMarkup">
74 <div class="navbar-nav me-0 text-black ml-5">
75 <a class="nav-link active mr-5 " aria-current="page" th:href="@{/home}">Home</a>
76 <div class="dropdown">
77 <button class="dropbtn nav-link mr-5">Reservations</button>
78 <div class="dropdown-content">
79 <li th:if="${session.role} != 'user' and ${session.role} != 'default'"><a th:href="@{/reservations/rooms}" class="text-secondary">New Reservations</a></li>
80 <li><a th:href="@{/rooms/available}" class="text-secondary">Available Reservations</a></li>
81 </div>
82 </div>
83 <a class="nav-link mr-5" th:href="@{/home/contact}">Contact</a>
84 <a class="nav-link mr-5" href="/logout" th:if="${session.user != null}">Log Out</a>
85 </div>
86 </div>
87 </div>
88 </nav>
89</header>
90<form th:action="@{'/rooms/available/reserve'}" th:method="post">
91<div class="row mt-5 bg-light" >
92 <div class="col-12 pl-5 my-5 ml-0 justify-content-center text-secondary">
93 <div class="col-md-4">
94 <div th:switch="${session.role}">
95 <h1 th:case="'default'"><a href="/api/login"><strong>Login</strong></a> and pick your room and date!</h1>
96 <h1 th:case="'user'">Pick your date and room!</h1>
97 <h1 th:case="'employee'">Pick your date and room!</h1>
98 </div>
99 </div>
100 <div class="col-12 d-flex" th:if="${session.role} != 'default'">
101 <h6>Start Date</h6> <input type="date" name="start_date" id="start_date" th:value="${start_date}"/>
102 <h6>End Date</h6> <input type="date" name="end_date" id="end_date" th:value="${end_date}"/>
103 </div>
104 </div>
105 <br> <br>
106 <div class="container-fluid">
107 <div th:each="availableRoom : ${availableRooms}" class="d-flex">
108 <table class="table table-striped table-bordered table-hover">
109 <tr>
110 <td rowspan="2" style="width: 550px">
111 <div th:switch="${availableRoom.room_type}">
112 <img th:case="'Single'" th:src="@{../single_room.jpg}" width="350px" height="200px" alt="Single Room">
113 <img th:case="'Double'" th:src="@{../double_room.jpg}" width="350px" height="200px" alt="Double Room">
114 </div>
115 <!-- <img th:src="@{../room.jpg}" width="350px" height="200px">-->
116 </td>
117 <td>
118 <h6 class="text-secondary">Room number</h6>
119 <th:block th:text="${availableRoom.room_id}"></th:block>
120 </td>
121 <td>
122 <h6 class="text-secondary">Room type</h6>
123 <th:block th:text="${availableRoom.room_type}"></th:block>
124 </td>
125 <td>
126 <h6 class="text-secondary">Price</h6>
127 <th:block th:text="${availableRoom.price}"></th:block>
128 </td>
129 </tr>
130 </table>
131
132 <div class="row mr-5">
133 <div class="col-sm-4 offset-sm-8 ml-5 mt-5" th:if="${session.role} != 'default'">
134 <input type="hidden" name="room_id" th:value="${availableRoom.room_id}"/>
135 <button type="submit" class="btn btn-info btn-ml buttons mt-2" >Reserve</button>
136 </div>
137 </div>
138 </div>
139 </div>
140</div>
141</form>
142</body>
143</html>
144
145<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
146<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.16.6/dist/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
147<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min"></script>
Note: See TracBrowser for help on using the repository browser.