source: src/main/resources/templates/cart.html@ d14176d

main
Last change on this file since d14176d was d14176d, checked in by HristijanMitic00 <hristijan.mitic.01@…>, 12 months ago

First commit

  • Property mode set to 100644
File size: 2.2 KB
Line 
1<th:block xmlns:th="http://www.thymeleaf.org">
2 <section class="jumbotron text-center">
3 <div class="container">
4 <h3 class="jumbotron-heading">Shopping cart for
5 <th:block th:if="${#request.getRemoteUser() != null}" th:text="${#request.getRemoteUser()}"></th:block>
6 </h3>
7 </div>
8 </section>
9
10 <div th:if="${hasError}">
11 <h5 class="text-center text-danger" th:text="${error}"></h5>
12 </div>
13
14 <div class="container mb-4">
15 <div class="row">
16 <div class="col-12" th:if="${products.size() > 0}">
17 <div class="table-responsive">
18 <table class="table table-striped">
19 <thead>
20 <tr>
21 <th scope="col">Product</th>
22 <th scope="col">Total Price for product</th>
23 <th scope="col">Quantity</th>
24 </tr>
25 </thead>
26 <tbody>
27 <span th:each="p:${po}">
28 <tr th:each="product : ${products}" th:if="${product.getIdProdukt()} == ${p.getIdProdukt()}" class="cart-item">
29 <td th:text="${product.getIme()}"></td>
30 <td th:text="${p.getCena()}">Cena</td>
31 <td th:text="${p.getKolicina()}"></td>
32 </tr>
33 </span>
34 </tbody>
35 </table>
36
37 <div>
38 <label>Total price </label>
39 <span th:text="${order.getVkupnoSuma()}"></span></div>
40
41 <form th:action="@{'/order/{id}/success' (id=${order.getIdNaracka()})}" th:method="POST">
42 <label>Adresa za dostava</label>
43 <input type="text" name="address" id="address" placeholder="/">
44 <button type="submit"
45 class="btn btn-sm btn-primary cart-product">
46 <i class="fa fa-trash">Order</i>
47 </button>
48 </form>
49 </div>
50 </div>
51 </div>
52 </div>
53</th:block>
54
Note: See TracBrowser for help on using the repository browser.