1 | <div xmlns:sec="http://www.thymeleaf.org/extras/spring-security"
|
---|
2 | >
|
---|
3 | <header>
|
---|
4 | <th:block sec:authorize="hasAuthority('ROLE_CLIENT')">
|
---|
5 | <a th:href="${'/orders'}">Мои нарачки</a>
|
---|
6 | <a th:href="${'/repairs'}">Мои поправки</a>
|
---|
7 | <a th:href="${'/reviews'}">Мои критики</a>
|
---|
8 | </th:block>
|
---|
9 | </header>
|
---|
10 | <main>
|
---|
11 | <h1 class="mt-3 mb-3">Сите производи</h1>
|
---|
12 | <form th:action="@{/filtered}">
|
---|
13 | <label for="cartype"></label><select id="cartype" class="form-control w-25 d-inline mr-3" required name="cartype">
|
---|
14 | <option th:each="car : ${cars}"
|
---|
15 | th:text="${car.getCartype()}"
|
---|
16 | th:value="${car.getCartype()}">
|
---|
17 | </option>
|
---|
18 | </select>
|
---|
19 | <label for="category"></label><select id="category" class="form-control w-25 d-inline mr-3" required name="category">
|
---|
20 | <option th:each="cat : ${categories}"
|
---|
21 | th:text="${cat.getCname()}"
|
---|
22 | th:value="${cat.getCname()}">
|
---|
23 | </option>
|
---|
24 | </select>
|
---|
25 | <button class="btn btn-lg btn-block btn-primary w-25 d-inline" type="submit">Филтрирај</button>
|
---|
26 | </form>
|
---|
27 | <table class="table table-bordered mt-4">
|
---|
28 | <thead class="thead-dark">
|
---|
29 | <tr>
|
---|
30 | <th scope="col">Име</th>
|
---|
31 | <th scope="col">Производител</th>
|
---|
32 | <th scope="col">Детали</th>
|
---|
33 | </tr>
|
---|
34 | </thead>
|
---|
35 | <tbody>
|
---|
36 | <tr th:each="part : ${parts}">
|
---|
37 | <td th:text="${part.getName()}"></td>
|
---|
38 | <td th:text="${part.getManufacturer().getName()}"></td>
|
---|
39 | <td>
|
---|
40 | <form th:action="@{'/part/{id}' (id=${part.getId()}) }">
|
---|
41 | <button class="btn btn-primary btn-block btn-lg w-50" type="submit">Детали</button>
|
---|
42 | </form>
|
---|
43 | </td>
|
---|
44 | </tr>
|
---|
45 | </tbody>
|
---|
46 | </table>
|
---|
47 | </main>
|
---|
48 | </div> |
---|