[5b447b0] | 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>
|
---|
[f25e8dd] | 30 | <td>
|
---|
| 31 | <a th:text="${disc.getTitle()}" th:href="@{'/discussions/{id}' (id=${disc.getDiscussionId()})}"></a>
|
---|
| 32 | </td>
|
---|
[5b447b0] | 33 | <td th:text="${disc.getText()}"></td>
|
---|
| 34 | <td th:text="${disc.getDate()}"></td>
|
---|
| 35 | <td th:text="${disc.getUser().getUsername()}"></td>
|
---|
[f25e8dd] | 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>
|
---|
[5b447b0] | 38 |
|
---|
| 39 | <th:block sec:authorize="isAuthenticated()">
|
---|
[f25e8dd] | 40 | <td th:if="${!disc.getUser().equals(user)}"><a class="btn btn-success" th:href="@{'/replies/add/{discussionId}' (discussionId=${disc.getDiscussionId()})}">Реплицирај</a> </td>
|
---|
[5b447b0] | 41 | <td th:if="${!disc.getUser().equals(user)}">
|
---|
[f25e8dd] | 42 | <a class="btn btn-success">👍 </a>
|
---|
| 43 | <a class="btn btn-danger">👎</a>
|
---|
[5b447b0] | 44 | </td>
|
---|
| 45 | </th:block>
|
---|
| 46 |
|
---|
| 47 |
|
---|
| 48 | </tr>
|
---|
| 49 | </tbody>
|
---|
| 50 | </table>
|
---|
| 51 | </div>
|
---|
| 52 | </div>
|
---|
| 53 | </div>
|
---|
| 54 | </div>
|
---|
| 55 |
|
---|
| 56 | </div>
|
---|