source: src/main/resources/templates/form.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: 7.9 KB
Line 
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 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
42 <ul class="nav navbar-nav navbar-right">
43 <li style="color: white; padding-left: 5px;" class="nav-item" th:if="${session.user != null}"
44 th:text="${'Welcome, ' + session.user.getIme() + ' ' + ' ' + session.user.getPrezime()}">
45 <a class="nav-link" href="#">
46
47 </a>
48 </li>
49
50 <li class="nav-item" th:if="${session.user == null}">
51 <a class="btn btn-light btn-sm ml-3" href="/login">
52 <i class="fa fa-shopping-cart"></i> Login
53 </a>
54 </li>
55 <li class="nav-item">
56 <a class="btn btn-light btn-sm ml-3" href="/logout">
57 <i class="fa fa-shopping-cart"></i> Logout
58 </a>
59 </li>
60 </ul>
61 </div>
62 </div>
63 </nav>
64</header>
65<th:block xmlns:th="http://www.thymeleaf.org">
66 <section class="jumbotron text-center">
67 <div class="container">
68 <h1 class="jumbotron-heading">Add a new book</h1>
69 </div>
70 </section>
71
72 <div class="container">
73 <div class="row">
74 <div class="col-md-5">
75 <form method="POST" th:action="@{'/borrow/{id}' (id = ${poz?.id})}">
76 <input id="id" type="hidden" name="id" th:value="(${poz} != null ? ${poz.getId()} : '')">
77 <div class="form-group">
78 <label for="bookname">Book name</label>
79 <input type="text"
80 class="form-control"
81 id="bookname"
82 name="bookname">
83<!-- th:if="${kniga} != null"-->
84<!-- th:each="kniga : ${knigi}"-->
85<!-- th:value="${kniga.getId()}"-->
86<!-- th:text="${kniga.getNaslov()}">-->
87 </div>
88 <div class="form-group">
89 <label for="author">Author</label>
90 <input type="text"
91 class="form-control"
92 id="author"
93 name="author"
94 th:value="${avtor?.ime}">
95 </div>
96 <div class="form-group">
97 <label for="izdavac">Publisher</label>
98 <input type="text"
99 class="form-control"
100 id="izdavac"
101 name="izdavac">
102 </div>
103 <div class="form-group">
104 <label for="opis">Description</label>
105 <input type="text"
106 class="form-control"
107 id="opis"
108 name="opis">
109 </div>
110 <div class="form-group">
111 <label for="kategorija">Category</label>
112 <input type="text"
113 class="form-control"
114 id="kategorija"
115 name="kategorija">
116 </div>
117
118 <button id="submit" type="submit" class="btn btn-primary">Submit</button>
119 <a type="button" class="btn btn-primary" href="/books">Back</a>
120 </form>
121 </div>
122 </div>
123 </div>
124
125
126</th:block>
127<footer class="text-black-50 mt-xl-5" xmlns:th="http://www.thymeleaf.org">
128 <div class="container">
129 <div class="row">
130 <div class="col-md-3 col-lg-4 col-xl-3">
131 <h5>About</h5>
132 <hr class="bg-white mb-2 mt-0 d-inline-block mx-auto w-25">
133 <p class="mb-0">
134 Le Lorem Ipsum est simplement du faux texte employé dans la composition et la mise en page avant
135 impression.
136 </p>
137 </div>
138
139 <div class="col-md-2 col-lg-2 col-xl-2 mx-auto">
140 <h5>Informations</h5>
141 <hr class="bg-white mb-2 mt-0 d-inline-block mx-auto w-25">
142 <ul class="list-unstyled">
143 <li><a href="">Link 1</a></li>
144 <li><a href="">Link 2</a></li>
145 <li><a href="">Link 3</a></li>
146 <li><a href="">Link 4</a></li>
147 </ul>
148 </div>
149
150 <div class="col-md-3 col-lg-2 col-xl-2 mx-auto">
151 <h5>Others links</h5>
152 <hr class="bg-white mb-2 mt-0 d-inline-block mx-auto w-25">
153 <ul class="list-unstyled">
154 <li><a href="">Link 1</a></li>
155 <li><a href="">Link 2</a></li>
156 <li><a href="">Link 3</a></li>
157 <li><a href="">Link 4</a></li>
158 </ul>
159 </div>
160
161 <div class="col-md-4 col-lg-3 col-xl-3">
162 <h5>Contact</h5>
163 <hr class="bg-white mb-2 mt-0 d-inline-block mx-auto w-25">
164 <ul class="list-unstyled">
165 <li><i class="fa fa-home mr-2"></i> My company</li>
166 <li><i class="fa fa-envelope mr-2"></i> email@example.com</li>
167 <li><i class="fa fa-phone mr-2"></i> + 33 12 14 15 16</li>
168 <li><i class="fa fa-print mr-2"></i> + 33 12 14 15 16</li>
169 </ul>
170 </div>
171 </div>
172 </div>
173</footer>
174</body>
175</html>
176
Note: See TracBrowser for help on using the repository browser.