1 | <div xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.w3.org/1999/xhtml">
|
---|
2 | <div style="width: 85%; text-align: justify; margin: auto; clear: both">
|
---|
3 | <div>
|
---|
4 | <h1 th:text="${disc.getTitle()}" style="width: 80%; float: left"></h1>
|
---|
5 | </div>
|
---|
6 | <hr><br><br>
|
---|
7 | <div>
|
---|
8 | <h5 th:text="${disc.getText()}" style="width: 90%; margin: auto; background-color: lightblue; border-radius: 4px; padding: 20px"></h5>
|
---|
9 | </div>
|
---|
10 | <br><br><br>
|
---|
11 | <h6 style="width: 60%; float:left;">
|
---|
12 | <span th:text="${'Поставено од: '+disc.getUser().getUsername()}"></span>
|
---|
13 | <span th:text="${', на датум '+ disc.getDate()}"></span>
|
---|
14 | <br>
|
---|
15 | <span>Поставено за </span>
|
---|
16 | <span th:text="${disc.getMovie() != null ? 'Филмот ' + disc.getMovie().getTitle() : 'Актерот ' + disc.getPerson().getName() + ' ' + disc.getPerson().getSurname()}" ></span>
|
---|
17 | </h6>
|
---|
18 | <div style="float: right" sec:authorize="isAuthenticated()">
|
---|
19 | <a th:if="${disc.getUser().equals(user)}" class="btn btn-warning" th:href="@{'/discussions/add/{id}' (id=${disc.getDiscussionId()})}">Промени</a>
|
---|
20 | <a th:if="${disc.getUser().equals(user)}" class="btn btn-danger button-delete-discussion" th:discussion-id="${disc.getDiscussionId()}">Избриши</a>
|
---|
21 | <a class="btn btn-success" th:href="@{'/replies/add/{discussionId}' (discussionId=${disc.getDiscussionId()})}">Реплицирај</a>
|
---|
22 | </div>
|
---|
23 | </div>
|
---|
24 | <table class="table table-striped" style="width: 70%; margin: auto;">
|
---|
25 | <thead>
|
---|
26 | <tr>
|
---|
27 | <th scope="col">Реплика</th>
|
---|
28 | <th scope="col">Поставена на</th>
|
---|
29 | <th scope="col">Поставена од</th>
|
---|
30 | <th:block sec:authorize="isAuthenticated()">
|
---|
31 | <th scope="col"></th>
|
---|
32 | <th scope="col"></th>
|
---|
33 | </th:block>
|
---|
34 | </tr>
|
---|
35 | </thead>
|
---|
36 | <tbody>
|
---|
37 | <tr th:each="reply : ${replies}" class="movie">
|
---|
38 | <td th:text="${reply.getText()}"></td>
|
---|
39 | <td th:text="${reply.getDate()}"></td>
|
---|
40 | <td th:text="${reply.getUser().getUsername()}"></td>
|
---|
41 | <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>
|
---|
42 | <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>
|
---|
43 | <th:block sec:authorize="isAuthenticated()">
|
---|
44 | <td th:if="${!reply.getUser().equals(user)}">
|
---|
45 | <a class="btn btn-success">👍 </a>
|
---|
46 | <a class="btn btn-danger">👎</a>
|
---|
47 | </td>
|
---|
48 | </th:block>
|
---|
49 | </tr>
|
---|
50 | </tbody>
|
---|
51 | </table>
|
---|
52 | </div> |
---|