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