1 | <div xmlns:th="http://www.thymeleaf.org">
|
---|
2 | <section class="jumbotron text-center">
|
---|
3 | <div class="container">
|
---|
4 | <h1 class="jumbotron-heading">WEB PROGRAMMING SHOP</h1>
|
---|
5 | <h3 class="jumbotron-heading">All products</h3>
|
---|
6 | </div>
|
---|
7 | </section>
|
---|
8 |
|
---|
9 | <div class="container mb-4">
|
---|
10 | <div class="row">
|
---|
11 | <div class="col-12" >
|
---|
12 | <div class="table-responsive">
|
---|
13 | <table class="table table-striped">
|
---|
14 | <thead>
|
---|
15 | <tr>
|
---|
16 | <th scope="col">#</th>
|
---|
17 | <th scope="col">Status</th>
|
---|
18 | <th scope="col">Korisnik Ime</th>
|
---|
19 | <th scope="col">Bilet Id</th>
|
---|
20 | <th scope="col">Tip Bilet</th>
|
---|
21 | <th scope="col"></th>
|
---|
22 | <th scope="col"></th>
|
---|
23 | <th scope="col"></th>
|
---|
24 | </tr>
|
---|
25 | </thead>
|
---|
26 | <tbody>
|
---|
27 | <tr th:each="vozenje : ${vozenja}" class="product">
|
---|
28 | <td th:text="${vozenje.vozenjeId}"></td>
|
---|
29 | <td th:text="${vozenje.vozenjeStatus.name()}"></td>
|
---|
30 | <td th:text="${vozenje.korisnikByPatnikKId.kIme}"></td>
|
---|
31 | <td th:text="${vozenje.biletByBId.bId}"></td>
|
---|
32 | <td th:text="${vozenje.biletByBId.tipbiletByTbId.tbIme}"></td>
|
---|
33 |
|
---|
34 | <td class="text-right">
|
---|
35 | <th:block sec:authorize="hasRole('ROLE_ADMIN')">
|
---|
36 | <form th:action="@{'/products/delete/{id}' (id=${vozenje.vozenjeId})}"
|
---|
37 | th:method="DELETE">
|
---|
38 | <button type="submit"
|
---|
39 | class="btn btn-sm btn-danger delete-product">
|
---|
40 | <i class="fas fa-trash-alt"></i> Delete
|
---|
41 | </button>
|
---|
42 | </form>
|
---|
43 | </th:block>
|
---|
44 | </td>
|
---|
45 | <td>
|
---|
46 | <th:block sec:authorize="hasRole('ROLE_ADMIN')">
|
---|
47 | <a th:href="@{'/products/edit-form/{id}' (id=${vozenje.vozenjeId})}"
|
---|
48 | class="btn btn-sm btn-info edit-product">
|
---|
49 | <i class="fas fa-edit"></i> Edit
|
---|
50 | </a>
|
---|
51 | </th:block>
|
---|
52 | </td>
|
---|
53 | <td>
|
---|
54 | <form th:action="@{'/vozenje/{vozenjeId}/end'(vozenjeId=${vozenje.vozenjeId})}"
|
---|
55 | th:method="GET">
|
---|
56 | <button type="submit" class="btn btn-sm btn-success add-to-cart">
|
---|
57 | <i class="fas fa-shopping-cart"></i> End vozenje
|
---|
58 | </button>
|
---|
59 | </form>
|
---|
60 | </td>
|
---|
61 | </tr>
|
---|
62 | </tbody>
|
---|
63 | </table>
|
---|
64 | </div>
|
---|
65 | </div>
|
---|
66 | <div class="col mb-3">
|
---|
67 | <div class="row">
|
---|
68 | <div class="col-sm-12 col-md-12">
|
---|
69 | <a href="/vozenje/start" class="btn btn-block btn-dark add-product-btn">
|
---|
70 | Start vozenje
|
---|
71 | </a>
|
---|
72 | </div>
|
---|
73 | </div>
|
---|
74 | </div>
|
---|
75 | </div>
|
---|
76 | </div>
|
---|
77 | </div>
|
---|
78 |
|
---|
79 |
|
---|