1 | <!DOCTYPE html>
|
---|
2 | <html xmlns="http://www.w3.org/1999/xhtml"
|
---|
3 | xmlns:th="http://www.thymeleaf.org">
|
---|
4 | <head>
|
---|
5 | <meta charset="UTF-8">
|
---|
6 | <title>Home page</title>
|
---|
7 | <!-- Add Bootstrap CSS link -->
|
---|
8 | <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
|
---|
9 | <style>
|
---|
10 | img{
|
---|
11 | margin: 16px;
|
---|
12 | border-style: groove;
|
---|
13 | }
|
---|
14 | textarea{
|
---|
15 | width: 70%;
|
---|
16 | }
|
---|
17 | </style>
|
---|
18 | </head>
|
---|
19 | <body>
|
---|
20 | <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
---|
21 | <a class="navbar-brand" th:href="@{/}">
|
---|
22 | CookBook
|
---|
23 | </a>
|
---|
24 | <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
---|
25 | <span class="navbar-toggler-icon"></span>
|
---|
26 | </button>
|
---|
27 | <div class="collapse navbar-collapse" id="navbarNav">
|
---|
28 | <ul class="navbar-nav ml-auto">
|
---|
29 | <li class="nav-item active">
|
---|
30 | <a class="nav-link" th:href="@{/}">Home <span class="sr-only">(current)</span></a>
|
---|
31 | </li>
|
---|
32 | <li class="nav-item">
|
---|
33 | <a class="nav-link" th:href="@{/naracki}">Naracki</a>
|
---|
34 | </li>
|
---|
35 | <li class="nav-item">
|
---|
36 | <a class="nav-link" href="#">Contact</a>
|
---|
37 | </li>
|
---|
38 | </ul>
|
---|
39 | </div>
|
---|
40 | </nav>
|
---|
41 |
|
---|
42 |
|
---|
43 |
|
---|
44 | <div class="container mt-4">
|
---|
45 | <h1 th:text="${recept.recIme}"></h1>
|
---|
46 |
|
---|
47 | <h4 th:text="${recept.srednaOcena}"></h4>
|
---|
48 |
|
---|
49 | <div class="row">
|
---|
50 | <div class="col-12">
|
---|
51 | <h6>Pictures</h6>
|
---|
52 | </div>
|
---|
53 | <div class="col-12">
|
---|
54 | <img th:each="slika : ${sliki}" th:src="${slika.pic}" class="img-fluid" alt="Recipe Image" width="200px" height="200px">
|
---|
55 | </div>
|
---|
56 | </div>
|
---|
57 |
|
---|
58 | <div>
|
---|
59 | <h5>Состојки</h5>
|
---|
60 | <div th:if="${sostojki.size() == 0}">Состојките не се додадени!</div>
|
---|
61 | <ul>
|
---|
62 | <li th:each="sostojka : ${sostojki}" th:text="${sostojka.sNaziv}"></li>
|
---|
63 | </ul>
|
---|
64 | </div>
|
---|
65 |
|
---|
66 |
|
---|
67 | <div>
|
---|
68 | <h5>Постапка</h5>
|
---|
69 | <p class="mt-4" th:text="${recept.postapka}"></p>
|
---|
70 | </div>
|
---|
71 |
|
---|
72 | <form class="p-4 border" th:method="POST" th:action="@{'/komentar/{id}' (id=${recept.recId})}">
|
---|
73 | <div class="pt-3">
|
---|
74 | <label for="kom-ocena">Внеси оцена</label>
|
---|
75 | <input id="kom-ocena" name="ocena" type="number" min="1" max="10" step="1" required>
|
---|
76 | </div>
|
---|
77 |
|
---|
78 | <div class="pt-3">
|
---|
79 | <textarea name="komentar">Внеси коментар..</textarea>
|
---|
80 | </div>
|
---|
81 | <div class="pt-3">
|
---|
82 | <label for="telefon">Избери телефон</label>
|
---|
83 | <select id="telefon" name="telefon" required>
|
---|
84 | <option selected></option>
|
---|
85 | <option th:each="posetitel : ${posetiteli}"
|
---|
86 | th:text="${posetitel.telefon}"
|
---|
87 | th:value="${posetitel.telefon}"></option>
|
---|
88 | </select>
|
---|
89 | </div>
|
---|
90 | <div class="pt-3">
|
---|
91 | <button>Submit</button>
|
---|
92 | </div>
|
---|
93 | </form>
|
---|
94 |
|
---|
95 | <div class="mt-4">
|
---|
96 | <div th:each="komentar : ${komentari}" class="border p-4">
|
---|
97 | <p th:text="${komentar.imePrezime}">Ime Prezime</p>
|
---|
98 | <p th:text="${komentar.getDataFormatirana()}">2022-12-09 18:25:58</p>
|
---|
99 | <p th:text="${komentar.ocena}">8</p>
|
---|
100 | <p th:text="${komentar.text}" class="border">text</p>
|
---|
101 | </div>
|
---|
102 | </div>
|
---|
103 | </div>
|
---|
104 |
|
---|
105 | <!-- Add Bootstrap JS and Popper.js scripts (required for Bootstrap components) -->
|
---|
106 | <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
|
---|
107 | <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
|
---|
108 | <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
|
---|
109 | </body>
|
---|
110 | </html> |
---|