1 | <!DOCTYPE html>
|
---|
2 | <html lang="en">
|
---|
3 | <head>
|
---|
4 | <meta charset="UTF-8">
|
---|
5 | <title>Events</title>
|
---|
6 |
|
---|
7 | <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"></script>
|
---|
8 | <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
---|
9 |
|
---|
10 | </head>
|
---|
11 | <style>
|
---|
12 | .nv{
|
---|
13 | background-color: rgba(240, 248, 255, .5);
|
---|
14 | margin-top: 20px;
|
---|
15 | }
|
---|
16 | tbody{
|
---|
17 | background-color: aliceblue;
|
---|
18 | }
|
---|
19 | .photo{
|
---|
20 | width:300px;
|
---|
21 | height:60px;
|
---|
22 | }
|
---|
23 | body {
|
---|
24 | background-color: #a0a5e9;
|
---|
25 | }
|
---|
26 | .btn0{
|
---|
27 | background-color: blueviolet;
|
---|
28 | border-radius: 8px;
|
---|
29 | border-style: none;
|
---|
30 | box-sizing: border-box;
|
---|
31 | color: #FFFFFF;
|
---|
32 | cursor: pointer;
|
---|
33 | display: inline-block;
|
---|
34 | font-family: Montserrat;
|
---|
35 | font-size: 14px;
|
---|
36 | font-weight: bold;
|
---|
37 | height: 40px;
|
---|
38 | line-height: 20px;
|
---|
39 | list-style: none;
|
---|
40 | margin: 0;
|
---|
41 | outline: none;
|
---|
42 | padding: 10px 16px;
|
---|
43 | position: relative;
|
---|
44 | text-align: center;
|
---|
45 | text-decoration: none;
|
---|
46 | transition: color 100ms;
|
---|
47 | vertical-align: baseline;
|
---|
48 | user-select: none;
|
---|
49 | -webkit-user-select: none;
|
---|
50 | touch-action: manipulation;
|
---|
51 | }
|
---|
52 |
|
---|
53 | .btn0:hover,
|
---|
54 | .btn0:focus {
|
---|
55 | background-color: cornflowerblue;
|
---|
56 | }
|
---|
57 |
|
---|
58 | .btn1{
|
---|
59 | border-radius: 8px;
|
---|
60 | border-style: none;
|
---|
61 | box-sizing: border-box;
|
---|
62 | color: #FFFFFF;
|
---|
63 | cursor: pointer;
|
---|
64 | display: inline-block;
|
---|
65 | font-family: Montserrat;
|
---|
66 | font-size: 14px;
|
---|
67 | font-weight: bold;
|
---|
68 | height: 40px;
|
---|
69 | line-height: 20px;
|
---|
70 | list-style: none;
|
---|
71 | margin: 0;
|
---|
72 | outline: none;
|
---|
73 | padding: 10px 16px;
|
---|
74 | position: relative;
|
---|
75 | text-align: center;
|
---|
76 | text-decoration: none;
|
---|
77 | transition: color 100ms;
|
---|
78 | vertical-align: baseline;
|
---|
79 | user-select: none;
|
---|
80 | -webkit-user-select: none;
|
---|
81 | touch-action: manipulation;
|
---|
82 | }
|
---|
83 |
|
---|
84 | .btn1:hover,
|
---|
85 | .btn1:focus {
|
---|
86 | background-color: darkslateblue;
|
---|
87 | }
|
---|
88 | .search{
|
---|
89 | padding-right: 20px;
|
---|
90 | border-radius: 8px;
|
---|
91 | border-style: none;
|
---|
92 | box-sizing: border-box;
|
---|
93 | color: #FFFFFF;
|
---|
94 | cursor: pointer;
|
---|
95 | display: inline-block;
|
---|
96 | font-family: Montserrat;
|
---|
97 | font-weight: bold;
|
---|
98 | }
|
---|
99 | a {
|
---|
100 | text-decoration: none;
|
---|
101 | }
|
---|
102 | </style>
|
---|
103 | <body>
|
---|
104 | <nav class="navbar navbar-expand-lg nv">
|
---|
105 | <div class="container">
|
---|
106 | <a class="navbar-brand" href="#"><img src="../../images/logo.png" class="photo" alt="logo"></a>
|
---|
107 | <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
---|
108 | <span class="navbar-toggler-icon"><i class="fa-solid fa-bars"></i></span>
|
---|
109 | </button>
|
---|
110 | <div class="collapse navbar-collapse" id="navbarSupportedContent">
|
---|
111 |
|
---|
112 |
|
---|
113 | <ul class="navbar-nav m-auto mb-2 mb-lg-0">
|
---|
114 | <li class="nav-item">
|
---|
115 | <a class="nav-link" href="/home"><b>Home</b></a>
|
---|
116 | </li>
|
---|
117 | <li class="nav-item">
|
---|
118 | <a class="nav-link" href="/events"><b>Events</b></a>
|
---|
119 | </li>
|
---|
120 | <li class="nav-item">
|
---|
121 | <a class="nav-link" href="/about"><b>About</b></a>
|
---|
122 | </li>
|
---|
123 | </ul>
|
---|
124 | <form class="search" action="/search" method="get">
|
---|
125 | <input type="text" id="search" name="q" style="border-radius: 4px; border-style: none">
|
---|
126 | <button type="submit" style="border-radius: 4px; border-style: none;
|
---|
127 | font-weight: normal; font-family: Montserrat; font-size: medium">Search</button>
|
---|
128 | </form>
|
---|
129 | <form class="d-flex">
|
---|
130 | <th:block th:if="${session.user == null}">
|
---|
131 | <button class="btn0" >
|
---|
132 | <a type="button" href="/registerUser" style="color: black">Register</a>
|
---|
133 | </button>
|
---|
134 | </th:block>
|
---|
135 | <th:block th:if="${session.user == null}">
|
---|
136 | <button class="btn1" >
|
---|
137 | <a type="button" href="/userLogin" style="color: darkblue">Login</a>
|
---|
138 | </button>
|
---|
139 | </th:block>
|
---|
140 | <th:block th:if="${session.user != null}">
|
---|
141 | <button class="btn1" >
|
---|
142 | <a type="button" href="/userLogout" style="color: darkblue">Logout</a>
|
---|
143 | </button>
|
---|
144 | </th:block>
|
---|
145 | <th:block th:if="${session.user != null}">
|
---|
146 | <button class="btn0" href="#">
|
---|
147 | <th:block th:if="${session.user != null}"
|
---|
148 | th:text="${session.user.getUsername()}"></th:block>
|
---|
149 | </button>
|
---|
150 | </th:block>
|
---|
151 |
|
---|
152 | </form>
|
---|
153 | </div>
|
---|
154 | </div>
|
---|
155 | </nav>
|
---|
156 | <img style="padding-top: 20px; height: 200px; padding-left: 110px; padding-right: 110px;" class="col-12 " src="../../images/event-i.jpg">
|
---|
157 | <div class="container mb-4" style="font-family: Montserrat">
|
---|
158 | <div class="row">
|
---|
159 | <div class="col-12">
|
---|
160 | <div class="table-responsive">
|
---|
161 | <table class="table table-striped">
|
---|
162 | <thead>
|
---|
163 | <tr>
|
---|
164 | <th scope="col">#</th>
|
---|
165 | <th scope="col">Event name</th>
|
---|
166 | <th scope="col">City</th>
|
---|
167 | <th scope="col">Date</th>
|
---|
168 | <th scope="col">Artist</th>
|
---|
169 | <!-- <th scope="col">Organizer</th>-->
|
---|
170 | <th scope="col">Price</th>
|
---|
171 | </tr>
|
---|
172 | </thead>
|
---|
173 | <tbody>
|
---|
174 | <tr th:each="event : ${events}" class="product">
|
---|
175 | <td th:text="${event.getId()}">
|
---|
176 | <td th:text="${event.getName()}"></td>
|
---|
177 | <td th:text="${event.getCity()}"></td>
|
---|
178 | <td th:text="${event.getDate()}"></td>
|
---|
179 | <td>
|
---|
180 | <th:block th:if="${session.user != null }">
|
---|
181 | <a th:if="${session.user.userType() ==3 }" th:href="@{'/artists/{id}/addRating' (id=${event.getArtist().getId()})}" th:text="${event.getArtist().getFullName()}">
|
---|
182 |
|
---|
183 | </a>
|
---|
184 | </th:block>
|
---|
185 | <th:block th:if="${session.user == null or session.user.userType()!=3}" th:text="${event.getArtist().getFullName()}" ></th:block>
|
---|
186 | </td>
|
---|
187 | <!-- <td th:text="${event.getOranizer().getFullName()}"></td>-->
|
---|
188 | <td th:text="${event.getPrice()}"></td>
|
---|
189 | <td>
|
---|
190 | <form th:if="${session.user != null}" th:method="get" th:action="@{'/events/{id}' (id=${event.getId()}) }">
|
---|
191 | <button class="btn0" th:if="${session.user.userType() == 3}" > Резервирај билет </button>
|
---|
192 | </form>
|
---|
193 | </td>
|
---|
194 | <td>
|
---|
195 | <form th:if="${session.user != null}" th:method="post" th:action="@{'/events/{id}/delete' (id=${event.getId()}) }">
|
---|
196 | <button class="btn0" th:if="${session.user.userType() == 1}" > Избриши настан </button>
|
---|
197 | </form>
|
---|
198 | </td>
|
---|
199 | </tr>
|
---|
200 | </tbody>
|
---|
201 | </table>
|
---|
202 |
|
---|
203 | <div th:if="${session.user != null}">
|
---|
204 | <a th:if="${session.user.userType() == 1 or session.user.userType() == 4}" th:href="@{'events/add'}">Додади настан</a>
|
---|
205 | </div>
|
---|
206 | </div>
|
---|
207 | </div>
|
---|
208 | </div>
|
---|
209 | </div>
|
---|
210 | </body>
|
---|
211 | </html> |
---|