[5b447b0] | 1 | <div xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.w3.org/1999/xhtml">
|
---|
[f25e8dd] | 2 | <div style="width: 85%; text-align: justify; margin: auto; clear: both">
|
---|
[c02189f] | 3 | <div style="background-color: rgba(128,128,128, 0.2); border-radius: 20px; padding: 20px">
|
---|
| 4 | <h1 th:text="${disc.getTitle()}" style="width: 80%; display: inline; height: fit-content; clear: both"></h1>
|
---|
[f25e8dd] | 5 | </div>
|
---|
[c02189f] | 6 | <hr>
|
---|
[f25e8dd] | 7 | <div>
|
---|
| 8 | <h5 th:text="${disc.getText()}" style="width: 90%; margin: auto; background-color: lightblue; border-radius: 4px; padding: 20px"></h5>
|
---|
| 9 | </div>
|
---|
[c02189f] | 10 | <br>
|
---|
| 11 | <h4>
|
---|
| 12 | <span th:if="${!disc.getUser().equals(user)}" sec:authorize="isAuthenticated()">
|
---|
| 13 | <a class='btn btn-success button-like-discussion' th:if="${!likedDiscussions.contains(disc)}" th:discussion-id="${disc.getDiscussionId()}" th:user-id="${user.getUserId()}" >❤</a>
|
---|
| 14 | <a class='btn btn-danger button-unlike-discussion' th:if="${likedDiscussions.contains(disc)}" th:discussion-id="${disc.getDiscussionId()}" th:user-id="${user.getUserId()}" >💔</a>
|
---|
| 15 | </span>
|
---|
| 16 | <span>Број на допаѓања:</span>
|
---|
[8f1b7e9] | 17 | <span th:text="${disc.getLikes()}" id="likes_count"></span>
|
---|
[c02189f] | 18 | </h4>
|
---|
| 19 | <br>
|
---|
[f25e8dd] | 20 | <h6 style="width: 60%; float:left;">
|
---|
[3fe36de] | 21 | <a th:href="@{'/profiles/{id}' (id=${disc.getUser().getUserId()})}" >
|
---|
[f25e8dd] | 22 | <span th:text="${'Поставено од: '+disc.getUser().getUsername()}"></span>
|
---|
[3fe36de] | 23 | </a>
|
---|
[f25e8dd] | 24 | <span th:text="${', на датум '+ disc.getDate()}"></span>
|
---|
| 25 | <br>
|
---|
| 26 | <span>Поставено за </span>
|
---|
| 27 | <span th:text="${disc.getMovie() != null ? 'Филмот ' + disc.getMovie().getTitle() : 'Актерот ' + disc.getPerson().getName() + ' ' + disc.getPerson().getSurname()}" ></span>
|
---|
| 28 | </h6>
|
---|
| 29 | <div style="float: right" sec:authorize="isAuthenticated()">
|
---|
[c02189f] | 30 | <a th:if="${disc.getUser().equals(user)}" class="btn btn-warning" th:href="@{'/discussions/add/{id}' (id=${disc.getDiscussionId()})}">Промени</a>
|
---|
| 31 | <a th:if="${disc.getUser().equals(user)}" class="btn btn-danger button-delete-discussion" th:discussion-id="${disc.getDiscussionId()}">Избриши</a>
|
---|
| 32 | <a class="btn btn-success" th:href="@{'/replies/add/{discussionId}' (discussionId=${disc.getDiscussionId()})}">Реплицирај</a>
|
---|
| 33 |
|
---|
| 34 | </div><br>
|
---|
[f25e8dd] | 35 | </div>
|
---|
| 36 | <table class="table table-striped" style="width: 70%; margin: auto;">
|
---|
[5b447b0] | 37 | <thead>
|
---|
| 38 | <tr>
|
---|
[f25e8dd] | 39 | <th scope="col">Реплика</th>
|
---|
| 40 | <th scope="col">Поставена на</th>
|
---|
| 41 | <th scope="col">Поставена од</th>
|
---|
[5b447b0] | 42 | <th:block sec:authorize="isAuthenticated()">
|
---|
| 43 | <th scope="col"></th>
|
---|
| 44 | <th scope="col"></th>
|
---|
| 45 | </th:block>
|
---|
| 46 | </tr>
|
---|
| 47 | </thead>
|
---|
| 48 | <tbody>
|
---|
| 49 | <tr th:each="reply : ${replies}" class="movie">
|
---|
| 50 | <td th:text="${reply.getText()}"></td>
|
---|
| 51 | <td th:text="${reply.getDate()}"></td>
|
---|
[3fe36de] | 52 | <td >
|
---|
| 53 | <a th:href="@{'/profiles/{id}' (id=${reply.getUser().getUserId()})}" th:text="${reply.getUser().getUsername()}"></a>
|
---|
| 54 | </td>
|
---|
[f25e8dd] | 55 | <td th:if="${reply.getUser().equals(user)}"><a class="btn btn-warning" th:href="@{'/replies/edit/{discussionId}/{replyId}' (discussionId=${disc.getDiscussionId()},replyId=${reply.getReplyId()})}">Промени</a> </td>
|
---|
| 56 | <td th:if="${reply.getUser().equals(user)}"><a class="btn btn-danger button-delete-reply" th:reply-id="${reply.getReplyId()}" th:dicsussion-id="${disc.getDiscussionId()}">Избриши</a> </td>
|
---|
[5b447b0] | 57 | <th:block sec:authorize="isAuthenticated()">
|
---|
| 58 | <td th:if="${!reply.getUser().equals(user)}">
|
---|
[f25e8dd] | 59 | <a class="btn btn-success">👍 </a>
|
---|
| 60 | <a class="btn btn-danger">👎</a>
|
---|
[5b447b0] | 61 | </td>
|
---|
| 62 | </th:block>
|
---|
| 63 | </tr>
|
---|
| 64 | </tbody>
|
---|
| 65 | </table>
|
---|
| 66 | </div> |
---|