source: src/main/resources/templates/obroci.html@ b3f2adb

Last change on this file since b3f2adb was b3f2adb, checked in by Aleksandar Siljanoski <acewow3@…>, 14 months ago

Adding project to repo

  • Property mode set to 100644
File size: 6.8 KB
Line 
1<!DOCTYPE html>
2<html lang="en" xmlns:th="http://www.thymeleaf.org">
3<head>
4 <title>Eaty's</title>
5 <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
6 <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
7
8 <style>
9 #prpl {
10 background-color: #be2ed6;
11 color: white;
12 }
13
14 #bttn {
15 background-color: #00FFFF;
16 }
17
18 .width-adjuster{
19 width: 20%!important;
20 }
21
22 .formche {
23 margin-top: 15px;
24 }
25
26 body {
27 background-color: rgb(24, 25, 26);
28 color: white;
29 min-height: 100vh;
30 display: flex;
31 flex-direction: column;
32 }
33
34 a {
35 text-decoration: none;
36 }
37
38 #divche {
39 padding: 0 50px;
40 }
41
42 footer {
43 margin-top: auto;
44 padding: 15px 0;
45 color: white;
46 background: #262626;
47 }
48
49 footer li {
50 float: left;
51 padding: 0 10px;
52 list-style: none;
53 }
54
55 footer a {
56 color: white;
57 }
58
59 footer p {
60 float: right;
61 }
62
63 .linkovi {
64 text-decoration: none;
65 color: white;
66 padding: 0 10px;
67 }
68
69 .lists {
70 list-style-type: none;
71 }
72
73 .accountnamestyle{
74 list-style-type: none;
75 text-decoration: none;
76 color: orangered;
77 padding: 0 10px;
78 margin-right: 5px;
79 }
80 .usericonstyle{
81 margin-left: 10px;
82 }
83 </style>
84
85</head>
86<body>
87
88<nav class="navbar navbar-expand-sm navbar-dark bg-dark">
89 <div class="container-fluid">
90 <a class="navbar-brand" href="/">Eaty's</a>
91 <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#mynavbar">
92 <span class="navbar-toggler-icon"></span>
93 </button>
94 <div class="collapse navbar-collapse" id="mynavbar">
95 <ul class="navbar-nav me-auto">
96 <li class="nav-item">
97 <a class="nav-link" href="/menija">Менија</a>
98 </li>
99 <li class="nav-item">
100 <a class="nav-link" href="/obroci">Оброци</a>
101 </li>
102 <li class="nav-item">
103 <a class="nav-link" href="/rezervacii">Резервации</a>
104 </li>
105 </ul>
106 <form class="d-flex">
107 <li class="lists"><a class="linkovi" href="/shopping-cart"><i class="fa fa-shopping-cart fa-2x" aria-hidden="true"></i></a></li>
108 <li class="lists"><a class="linkovi" href="/register">Регистрација</a></li>
109 <li class="lists"><a class="linkovi" sec:authorize="!isAuthenticated()" href="/login">Логин</a></li>
110 <li class="lists"><a class="linkovi" sec:authorize="isAuthenticated()" href="/logout">Одјава</a></li>
111 <li class="lists">
112 <i class="fa fa-user-o usericonstyle" sec:authorize="isAuthenticated()" aria-hidden="true">
113 <span class="accountnamestyle" sec:authentication="name"></span>
114 </i>
115 </li>
116 </form>
117 </div>
118 </div>
119</nav>
120
121<div id="divche">
122 <div>
123 <br>
124 <!-- ForumUsersController.showAdd (Only ADMIN can see this element)-->
125 <a href="/obroci/add" class="btn btn-info" th:if="${korisnik?.ime == 'Ace'}" >
126 Додади нов оброк
127 </a>
128 <a href="/ceni" class="btn" id="prpl" th:if="${korisnik?.ime == 'Ace'}" >
129 Едитирај цена на оброк
130 </a>
131 <h2 class="text-center">Оброци</h2>
132 <br>
133 </div>
134
135 <table class="table table-striped table-dark">
136 <thead>
137 <tr>
138 <th scope="col">Оброк</th>
139 <th scope="col">Опис</th>
140 <th scope="col">Цена</th>
141 <th scope="col">Важи Од</th>
142 <th scope="col">Важи До</th>
143 <th scope="col"></th>
144 <th scope="col"></th>
145 <th scope="col"></th>
146 </tr>
147 </thead>
148 <tbody>
149 <!-- For each user you should have one <tr> like below -->
150 <tr class="item" th:each="cena: ${ceni}">
151 <td class="align-middle" th:text="${cena.obrok.ime}">[obrok.ime]</td>
152 <td class="align-middle" th:text="${cena.obrok.opis}">[obrok.opis]</td>
153 <td class="align-middle" th:text="${cena.CenaIznos}">[cena.CenaIznos]</td>
154 <td class="align-middle" th:text="${cena.CenaVaziOd}">[cena.VaziOd]</td>
155 <td class="align-middle" th:text="${cena.CenaVaziDo}">[cena.VaziOd]</td>
156 <td class="align-middle"><a th:href="@{'/obroci/{id}/edit' (id=${cena.obrok.id})}" class="btn btn-warning btn-sm pr-5" th:if="${korisnik?.ime == 'Ace'}" >Едитирај</a></td>
157 <td class="align-middle">
158 <form method="POST" th:action="@{'/obroci/{id}/delete' (id=${cena.obrok.id})}" >
159 <button type="submit" class="btn btn-danger btn-sm mb-3 formche" th:if="${korisnik?.ime == 'Ace'}">Избриши</button>
160 </form>
161 </td>
162 <td class="align-middle">
163 <!-- ForumUsersController.delete (Only ADMIN can see this element)-->
164
165 <!-- ForumUsersController.showEdit (Only ADMIN can see this element)-->
166 <form class="custom-inline" th:action="@{'/se-sostoi-od/add-obrok/{id}' (id=${cena.obrok.id})}"
167 th:method="POST">
168 <label for="f3">Количина:</label>
169 <input type="number" class="form-control form-control-sm width-adjuster"
170 id="f3"
171 name="kolicina">
172 <br>
173 <button type="submit" id="bttn" class="btn btn-sm mb-3">Додади во кошничка
174 </button>
175 </form>
176 </td>
177
178 </tr>
179 </tbody>
180 </table>
181</div>
182
183<footer>
184 <div class="container">
185 <div class="row">
186 <div class="col-md-12">
187 <ul>
188 <li><a href="/">За Нас</a></li>
189 <li><a href="/">ЧПП</a></li>
190 <li><a href="/">Контакт</a></li>
191 <li><a href="/"></a></li>
192 <p>&copy; Сите права задржани. <a href="/">Eaty's Скопје</a></p>
193 </ul>
194 </div>
195 </div>
196 </div>
197</footer>
198
199</body>
200</html>
Note: See TracBrowser for help on using the repository browser.