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 scope="col">Корисник</th>
|
---|
17 | <th:block sec:authorize="isAuthenticated()">
|
---|
18 | <th:block>
|
---|
19 | <th scope="col"></th>
|
---|
20 | <th scope="col"></th>
|
---|
21 | </th:block>
|
---|
22 | <th scope="col"></th>
|
---|
23 | <th scope="col"></th>
|
---|
24 | </th:block>
|
---|
25 |
|
---|
26 | </tr>
|
---|
27 | </thead>
|
---|
28 | <tbody>
|
---|
29 | <tr th:each="disc : ${discussions}" class="movie">
|
---|
30 | <td th:text="${disc.getMovie() != null ? disc.getMovie().getTitle() : disc.getPerson().getName() + ' ' + disc.getPerson().getSurname()}"></td>
|
---|
31 | <td th:text="${disc.getTitle()}"></td>
|
---|
32 | <td th:text="${disc.getText()}"></td>
|
---|
33 | <td th:text="${disc.getDate()}"></td>
|
---|
34 | <td th:text="${disc.getUser().getUsername()}"></td>
|
---|
35 | <td th:if="${disc.getUser().equals(user)}"><a class="btn btn-primary" th:href="@{'/discussions/add/{id}' (id=${disc.getDiscussionId()})}">Промени</a> </td>
|
---|
36 | <td th:if="${disc.getUser().equals(user)}"><a class="btn btn-primary button-delete-discussion" th:discussion-id="${disc.getDiscussionId()}">Избриши</a> </td>
|
---|
37 |
|
---|
38 | <th:block sec:authorize="isAuthenticated()">
|
---|
39 | <td th:if="${!disc.getUser().equals(user)}"><a class="btn btn-primary" th:href="@{'/replies/add/{discussionId}' (discussionId=${disc.getDiscussionId()})}">Реплицирај</a> </td>
|
---|
40 | <td th:if="${!disc.getUser().equals(user)}">
|
---|
41 | <a class="btn btn-primary">Ми се допаѓа</a>
|
---|
42 | <a class="btn btn-primary">Не ми се допаѓа</a>
|
---|
43 | </td>
|
---|
44 | </th:block>
|
---|
45 |
|
---|
46 |
|
---|
47 | </tr>
|
---|
48 | </tbody>
|
---|
49 | </table>
|
---|
50 | </div>
|
---|
51 | </div>
|
---|
52 | </div>
|
---|
53 | </div>
|
---|
54 |
|
---|
55 | </div>
|
---|