source: Git/target/classes/templates/discussion.html@ 0226942

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

Added new core functionalities, fixed bugs and improved visual clarity

  • Property mode set to 100644
File size: 3.7 KB
Line 
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 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>
5 </div>
6 <hr>
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>
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>
17 <span th:text="${likes}" id="likes_count"></span>
18 </h4>
19 <br>
20 <h6 style="width: 60%; float:left;">
21 <span th:text="${'Поставено од: '+disc.getUser().getUsername()}"></span>
22 <span th:text="${', на датум '+ disc.getDate()}"></span>
23 <br>
24 <span>Поставено за </span>
25 <span th:text="${disc.getMovie() != null ? 'Филмот ' + disc.getMovie().getTitle() : 'Актерот ' + disc.getPerson().getName() + ' ' + disc.getPerson().getSurname()}" ></span>
26 </h6>
27 <div style="float: right" sec:authorize="isAuthenticated()">
28 <a th:if="${disc.getUser().equals(user)}" class="btn btn-warning" th:href="@{'/discussions/add/{id}' (id=${disc.getDiscussionId()})}">Промени</a>
29 <a th:if="${disc.getUser().equals(user)}" class="btn btn-danger button-delete-discussion" th:discussion-id="${disc.getDiscussionId()}">Избриши</a>
30 <a class="btn btn-success" th:href="@{'/replies/add/{discussionId}' (discussionId=${disc.getDiscussionId()})}">Реплицирај</a>
31
32 </div><br>
33 </div>
34 <table class="table table-striped" style="width: 70%; margin: auto;">
35 <thead>
36 <tr>
37 <th scope="col">Реплика</th>
38 <th scope="col">Поставена на</th>
39 <th scope="col">Поставена од</th>
40 <th:block sec:authorize="isAuthenticated()">
41 <th scope="col"></th>
42 <th scope="col"></th>
43 </th:block>
44 </tr>
45 </thead>
46 <tbody>
47 <tr th:each="reply : ${replies}" class="movie">
48 <td th:text="${reply.getText()}"></td>
49 <td th:text="${reply.getDate()}"></td>
50 <td th:text="${reply.getUser().getUsername()}"></td>
51 <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>
52 <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>
53 <th:block sec:authorize="isAuthenticated()">
54 <td th:if="${!reply.getUser().equals(user)}">
55 <a class="btn btn-success">👍 </a>
56 <a class="btn btn-danger">👎</a>
57 </td>
58 </th:block>
59 </tr>
60 </tbody>
61 </table>
62</div>
Note: See TracBrowser for help on using the repository browser.