source: src/main/resources/templates/add-borrow.html@ bc39b15

Last change on this file since bc39b15 was ed20c2c, checked in by HumaSejdini <humasejdini12@…>, 2 years ago

Initial commit

  • Property mode set to 100644
File size: 11.9 KB
RevLine 
[ed20c2c]1<!DOCTYPE html>
2<html lang="en" xmlns:sec="http://www.w3.org/1999/xhtml">
3<head>
4 <meta charset="UTF-8">
5 <title>Add a new borrowed book</title>
6 <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
7 <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
8 <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
9 <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
10
11</head>
12<body>
13<header xmlns:th="http://www.thymeleaf.org">
14 <nav class="navbar navbar-expand-md navbar-dark bg-dark">
15 <div class="container">
16 <a class="navbar-brand" href="/">TheBookSpot</a>
17 <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault"
18 aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
19 <span class="navbar-toggler-icon"></span>
20 </button>
21
22 <div class="collapse navbar-collapse justify-content-end" id="navbarsExampleDefault">
23 <ul class="navbar-nav m-auto">
24 <li class="nav-item m-auto">
25 <a class="nav-link active" href="/home">Home</a>
26 </li>
27 <li class="nav-item m-auto" sec:authorize="hasRole('ROLE_ADMIN')">
28 <a class="nav-link active" href="/books">Books</a>
29 </li>
30 <li class="nav-item m-auto" >
31 <a class="nav-link active" href="/members">View Memebers</a>
32 </li>
33 <li class="nav-item m-auto" >
34 <li class="nav-item m-auto" sec:authorize="hasRole('ROLE_ADMIN')">
35 <a class="nav-link active" href="/borrow">Borrowed books</a>
36 </li>
37
38 </ul>
39
40
41 <ul class="nav navbar-nav navbar-right">
42 <li style="color: white; padding-left: 5px;" class="nav-item" th:if="${session.user != null}"
43 th:text="${'Welcome, ' + session.user.getIme() + ' ' + ' ' + session.user.getPrezime()}">
44 <a class="nav-link" href="#">
45
46 </a>
47 </li>
48
49 <li class="nav-item" th:if="${session.user == null}">
50 <a class="btn btn-light btn-sm ml-3" href="/login">
51 <i class="fa fa-shopping-cart"></i> Login
52 </a>
53 </li>
54 <li class="nav-item">
55 <a class="btn btn-light btn-sm ml-3" href="/logout">
56 <i class="fa fa-shopping-cart"></i> Logout
57 </a>
58 </li>
59 </ul>
60 </div>
61 </div>
62 </nav>
63</header>
64<th:block xmlns:th="http://www.thymeleaf.org">
65 <section class="jumbotron text-center">
66 <div class="container">
67 <h1 class="jumbotron-heading">Register a new borrowed book</h1>
68 </div>
69 </section>
70
71 <div class="container">
72 <div class="row">
73 <div class="col-md-5">
74 <form th:action="${'/borrow/add'}" th:method="POST">
75 <input id="id" type="hidden" name="id" th:value="(${poz} != null ? ${poz.getId()} : '')">
76 <div class="form-group">
77 <label for="reciept">Date of reciept</label>
78 <input type="date"
79 class="form-control"
80 id="reciept"
81 name="reciept"
82 th:value="(${poz} != null ? ${poz.getDatumNaVrakjanje()} : '')"
83 required
84 placeholder="Enter date of reciept">
85 </div>
86 <div class="form-group">
87 <label for="return">Return date</label>
88 <input type="date"
89 class="form-control"
90 id="return"
91 name="return"
92 th:value="(${poz} != null ? ${poz.getDatumNaVrakjanje()} : '')"
93 required
94 placeholder="Enter return date">
95 </div>
96 <div class="form-group">
97 <label>Status</label>
98 <select nameQ="status">
99 <!-- <option th:each="poz: ${pozajmici}"-->
100 <!-- th:text="${poz.getStatus()}"-->
101 <!-- th:value="${poz}"-->
102 <!-- th:selected="${poz.getStatus()}">-->
103
104 <!-- </option>-->
105 <option th:value="true">true</option>
106 <option th:value="false">false</option>
107 </select>
108 </div>
109 <div class="form-group">
110 <label>Member</label>
111 <select name="member" class="form-control">
112 <option th:if="${poz} != null"
113 th:each="mem : ${chlen}"
114 th:value="${mem.getId()}"
115 th:text="${mem.getBroj()}">
116 </option>
117 <option th:if="${poz} == null"
118 th:each="mem : ${chlen}"
119 th:value="${mem.getId()}"
120 th:text="${mem.getBroj()}">
121 </option>
122 </select>
123 </div>
124 <div class="form-group">
125 <label>Librarian</label>
126 <select name="librarian" class="form-control">
127 <option th:if="${poz} != null"
128 th:each="lib : ${bibliotekar}"
129 th:value="${lib.id}"
130 th:text="${lib.getChovek().getIme()}">
131 </option>
132 <option th:if="${poz} == null"
133 th:each="lib : ${bibliotekar}"
134 th:value="${lib.getId()}"
135 th:text="${lib.getChovek().getIme()}">
136 </option>
137 </select>
138 </div>
139 <div class="form-group">
140 <label>Book name</label>
141 <select name="bname" class="form-control">
142 <!-- <option th:if="${poz} != null"-->
143 <!-- th:selected="${poz.getInstancaOdKniga().getIdNaKniga() != null && poz.getInstancaOdKniga().getIdNaKniga().getNaslov() == isbn.getId()}"-->
144 <!-- th:each="is : ${isbn}"-->
145 <!-- th:value="${is.getId()}"-->
146 <!-- th:text="${is.getIdNaKniga().getNaslov()}">-->
147 <!-- </option>-->
148 <!-- <option th:if="${poz} == null"-->
149 <!-- th:each="is : ${isbn}"-->
150 <!-- th:value="${is.getId()}"-->
151 <!-- th:text="${is.getIdNaKniga().getNaslov()}">-->
152 <!-- </option>-->
153 <option th:if="${kniga} != null"
154 th:each="kniga : ${knigi}"
155 th:value="${kniga.getId()}"
156 th:text="${kniga.getNaslov()}">
157 </option>
158 </select>
159 </div>
160 <div class="form-group">
161 <label>Book ISBN</label>
162 <select name="uniqueid" class="form-control">
163 <option th:if="${poz} != null"
164
165 th:each="is : ${isbn}"
166 th:value="${is.getId()}"
167 th:text="${is.getId().getUniqueId()}">
168 </option>
169 <option th:if="${poz} == null"
170 th:each="is : ${isbn}"
171 th:value="${is.getId()}"
172 th:text="${is.getId().getUniqueId()}">
173 </option>
174 </select>
175 </div>
176 <button id="submit" type="submit" class="btn btn-primary">Submit</button>
177 <a type="button" class="btn btn-primary" href="/borrow">Back</a>
178 </form>
179 </div>
180 </div>
181 </div>
182
183
184</th:block>
185<footer class="text-black-50 mt-xl-5" xmlns:th="http://www.thymeleaf.org">
186 <div class="container">
187 <div class="row">
188 <div class="col-md-3 col-lg-4 col-xl-3">
189 <h5>About</h5>
190 <hr class="bg-white mb-2 mt-0 d-inline-block mx-auto w-25">
191 <p class="mb-0">
192 Le Lorem Ipsum est simplement du faux texte employé dans la composition et la mise en page avant
193 impression.
194 </p>
195 </div>
196
197 <div class="col-md-2 col-lg-2 col-xl-2 mx-auto">
198 <h5>Informations</h5>
199 <hr class="bg-white mb-2 mt-0 d-inline-block mx-auto w-25">
200 <ul class="list-unstyled">
201 <li><a href="">Link 1</a></li>
202 <li><a href="">Link 2</a></li>
203 <li><a href="">Link 3</a></li>
204 <li><a href="">Link 4</a></li>
205 </ul>
206 </div>
207
208 <div class="col-md-3 col-lg-2 col-xl-2 mx-auto">
209 <h5>Others links</h5>
210 <hr class="bg-white mb-2 mt-0 d-inline-block mx-auto w-25">
211 <ul class="list-unstyled">
212 <li><a href="">Link 1</a></li>
213 <li><a href="">Link 2</a></li>
214 <li><a href="">Link 3</a></li>
215 <li><a href="">Link 4</a></li>
216 </ul>
217 </div>
218
219 <div class="col-md-4 col-lg-3 col-xl-3">
220 <h5>Contact</h5>
221 <hr class="bg-white mb-2 mt-0 d-inline-block mx-auto w-25">
222 <ul class="list-unstyled">
223 <li><i class="fa fa-home mr-2"></i> My company</li>
224 <li><i class="fa fa-envelope mr-2"></i> email@example.com</li>
225 <li><i class="fa fa-phone mr-2"></i> + 33 12 14 15 16</li>
226 <li><i class="fa fa-print mr-2"></i> + 33 12 14 15 16</li>
227 </ul>
228 </div>
229 </div>
230 </div>
231</footer>
232</body>
233</html>
234
Note: See TracBrowser for help on using the repository browser.