source: Git/src/main/resources/templates/discussionsList.html@ 42d565b

main
Last change on this file since 42d565b was f25e8dd, checked in by Petar Partaloski <ppartaloski@…>, 3 years ago

Fixed and added a better front end, improved clarity

  • Property mode set to 100644
File size: 3.0 KB
Line 
1<div xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.w3.org/1999/xhtml">
2 <div class="container mb-4">
3 <a sec:authorize="isAuthenticated()" th:href="@{/discussions/add}">Додади нова дискусија</a>
4 </div>
5 <div class="container mb-4">
6 <div class="row">
7 <div class="col-12" th:if="${discussions.size() > 0}">
8 <div class="table-responsive">
9 <table class="table table-striped">
10 <thead>
11 <tr>
12 <th scope="col">Наслов</th>
13 <th scope="col">Опис</th>
14 <th scope="col">Датум</th>
15 <th scope="col">Корисник</th>
16 <th:block sec:authorize="isAuthenticated()">
17 <th:block>
18 <th scope="col"></th>
19 <th scope="col"></th>
20 </th:block>
21 <th scope="col"></th>
22 <th scope="col"></th>
23 </th:block>
24
25 </tr>
26 </thead>
27 <tbody>
28 <tr th:each="disc : ${discussions}" class="movie">
29 <td th:text="${disc.getMovie() != null ? disc.getMovie().getTitle() : disc.getPerson().getName() + ' ' + disc.getPerson().getSurname()}"></td>
30 <td>
31 <a th:text="${disc.getTitle()}" th:href="@{'/discussions/{id}' (id=${disc.getDiscussionId()})}"></a>
32 </td>
33 <td th:text="${disc.getText()}"></td>
34 <td th:text="${disc.getDate()}"></td>
35 <td th:text="${disc.getUser().getUsername()}"></td>
36 <td th:if="${disc.getUser().equals(user)}"><a class="btn btn-warning" th:href="@{'/discussions/add/{id}' (id=${disc.getDiscussionId()})}">Измени</a> </td>
37 <td th:if="${disc.getUser().equals(user)}"><a class="btn btn-danger button-delete-discussion" th:discussion-id="${disc.getDiscussionId()}">Избриши</a> </td>
38
39 <th:block sec:authorize="isAuthenticated()">
40 <td th:if="${!disc.getUser().equals(user)}"><a class="btn btn-success" th:href="@{'/replies/add/{discussionId}' (discussionId=${disc.getDiscussionId()})}">Реплицирај</a> </td>
41 <td th:if="${!disc.getUser().equals(user)}">
42 <a class="btn btn-success">👍 </a>
43 <a class="btn btn-danger">👎</a>
44 </td>
45 </th:block>
46
47
48 </tr>
49 </tbody>
50 </table>
51 </div>
52 </div>
53 </div>
54 </div>
55
56</div>
Note: See TracBrowser for help on using the repository browser.