source: src/main/resources/templates/services.html@ 850b344

Last change on this file since 850b344 was 850b344, checked in by Tamara Simikj <tamara.simic12@…>, 2 years ago

Initial commit

  • Property mode set to 100644
File size: 4.3 KB
Line 
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="UTF-8">
5 <title>Services</title>
6 <link href="https://bootswatch.com/5/journal/bootstrap.css" rel="stylesheet">
7 <script src="https://bootswatch.com/_assets/css/custom.min.css"></script>
8 <script src="https://bootswatch.com/_vendor/prismjs/themes/prism-okaidia.css" ></script>
9 <script src="https://bootswatch.com/_vendor/font-awesome/css/font-awesome.min.css"></script>
10</head>
11<body>
12<div th:replace="layout.html :: header"></div>
13<h1 class="text-center" style="padding: 2%">List of services</h1>
14
15<div style="margin-top: 5%">
16 <div>
17 <div class="container mb-4">
18 <div class="row">
19 <div class="col-12" >
20 <div class="table-responsive">
21 <th:block th:if="${session.user!=null && session.user.vraboteni!=null}">
22 <a th:href="@{/services/add}" class="btn btn-primary">
23 Add new service
24 </a>
25 </th:block>
26 <a th:if="${session.user!=null && session.user.klienti!=null}"
27 th:href="@{/services/rate}" class="btn btn-primary">
28 Rate Service
29 </a>
30 <a th:href="@{/servicesRates}" class="btn btn-link">
31 List of rates
32 </a>
33 <table class="table table-hover table-striped">
34 <thead>
35 <tr>
36 <th>Usluga Id</th>
37 <th>Dejnost</th>
38 <th>Cena</th>
39 <th>Rating</th>
40 <th>Vraboteni</th>
41 <th></th>
42 </tr>
43 </thead>
44 <tbody>
45
46
47 <tr class="item" th:each="usluga :${uslugi}">
48 <td th:text="${usluga.id}">[usluga.id]</td>
49 <td th:text="${usluga.dejnost}" >[usluga.dejnost]</td>
50 <td th:text="${usluga.cena}">[usluga.cena]</td>
51 <td th:text="${usluga.getAvgRating().toString()}" >[usluga.getAvgRating()]</td>
52
53 <td>
54 <th:block th:each="vrabUsluga :${vrabUslugi}">
55 <th:block th:if="${vrabUsluga.getUsluga()} == ${usluga}">
56 <div class="item-rel" th:each="vraboten:${vraboteni}"
57 th:if="${vrabUsluga.getUserIdVraboten()} == ${vraboten}"
58 th:value="${vraboten.id}"
59 th:text="${vraboten.getFirstName()}"
60 >
61 [vraboten.ime]
62 </div>
63 </th:block>
64 </th:block>
65 </td>
66
67
68 <td>
69 <th:block th:if="${session.user!=null && session.user.vraboteni!=null}">
70 <a th:href="@{'/services/{id}/edit' (id = ${usluga.id})}" class="btn btn-outline-primary">Edit</a>
71
72 <form style="display: inline-flex" method="POST" th:action="@{'/services/{id}/delete' (id = ${usluga.id})}">
73 <button type="submit" class="btn btn-outline-primary" >Delete</button>
74 </form>
75 </th:block>
76 <a th:if="${session.user!=null}"
77 th:href="@{'/makeAppointment'}" class="btn btn-primary">
78 Make Appointment</a>
79 </td>
80 </tr>
81 </tbody>
82 </table>
83 </div>
84 </div>
85 </div>
86 </div>
87 </div>
88 <div>
89 <div th:replace="layout.html :: footer"></div>
90
91</body>
92</html>
Note: See TracBrowser for help on using the repository browser.