source: src/main/resources/templates/fragments/header.html@ 1bd8d1e

main
Last change on this file since 1bd8d1e was 1bd8d1e, checked in by andrejtodorovski <82031894+andrejtodorovski@…>, 23 months ago

Added views and functionalities for deliveryman, warehouseman and admin

  • Property mode set to 100644
File size: 3.1 KB
Line 
1<header xmlns:sec="http://www.w3.org/1999/xhtml" >
2 <nav class="navbar navbar-expand-md navbar-dark bg-dark">
3 <div class="container">
4 <a class="navbar-brand" href="/">AutoPartz</a>
5 <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault"
6 aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
7 <span class="navbar-toggler-icon"></span>
8 </button>
9
10 <div class="collapse navbar-collapse justify-content-end" id="navbarsExampleDefault">
11 <ul class="navbar-nav m-auto">
12 <li class="nav-item m-auto">
13 <a class="nav-link active" href="/products">Продукти</a>
14 </li>
15 <li class="nav-item m-auto">
16 <a class="nav-link active" href="/services">Сервиси</a>
17 </li>
18 <th:block sec:authorize="hasAuthority('ROLE_CLIENT')">
19 <li class="nav-item m-auto">
20 <a class="nav-link active" href="/currentOrder">Моја нарачка</a>
21 </li>
22 </th:block>
23 <th:block sec:authorize="hasAuthority('ROLE_WAREHOUSEMAN')">
24 <li class="nav-item m-auto">
25 <a class="nav-link active" href="/myWarehouse">Мој магацин</a>
26 </li>
27 </th:block>
28 <th:block sec:authorize="hasAuthority('ROLE_DELIVERYMAN')">
29 <li class="nav-item m-auto">
30 <a class="nav-link active" href="/myDeliveries">Мои достави</a>
31 </li>
32 </th:block>
33 <th:block sec:authorize="hasAuthority('ROLE_ADMIN')">
34 <li class="nav-item m-auto">
35 <a class="nav-link active" href="/viewUsers">Корисници</a>
36 </li>
37 </th:block>
38 </ul>
39
40 <ul class="nav navbar-nav navbar-right">
41 <th:block th:if="${#request.getRemoteUser() != null}">
42 <li class="nav-item">
43 <a class="btn btn-success btn-sm ml-3" href="/register">
44 <th:block th:text="${#request.getRemoteUser()}"></th:block>
45 </a>
46 </li>
47 </th:block>
48 <th:block th:if="${#request.getRemoteUser() == null}">
49 <li class="nav-item">
50 <a class="btn btn-success btn-sm ml-3" href="/register">
51 <i class="fa fa-shopping-cart"></i> Регистрирај се
52 </a>
53 </li>
54 </th:block>
55 <th:block th:if="${#request.getRemoteUser() != null}">
56 <li class="nav-item" sec:authorize="isAuthenticated()">
57 <a class="btn btn-light btn-sm ml-3" href="/logout">
58 <i class="fa fa-shopping-cart"></i>
59 Одјави се
60 </a>
61 </li>
62 </th:block>
63 <th:block th:if="${#request.getRemoteUser() == null}">
64 <li class="nav-item">
65 <a class="btn btn-light btn-sm ml-3" href="/login">
66 <i class="fa fa-shopping-cart"></i> Најави се
67 </a>
68 </li>
69 </th:block>
70 </ul>
71 </div>
72 </div>
73 </nav>
74</header>
Note: See TracBrowser for help on using the repository browser.