source: Git/src/main/resources/templates/discussion.html@ 5b447b0

main
Last change on this file since 5b447b0 was 5b447b0, checked in by Test <matonikolov77@…>, 3 years ago

Adding models and resources

  • Property mode set to 100644
File size: 2.4 KB
RevLine 
[5b447b0]1<div xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.w3.org/1999/xhtml">
2 <div th:text="${disc.getMovie() != null ? disc.getMovie().getTitle() : disc.getPerson().getName() + ' ' + disc.getPerson().getSurname()}"></div>
3 <div th:text="${disc.getTitle()}"></div>
4 <div th:text="${disc.getText()}"></div>
5 <div th:text="${disc.getDate()}"></div>
6 <div th:text="${disc.getUser().getUsername()}"></div>
7 <div th:if="${disc.getUser().equals(user)}"><a class="btn btn-primary" th:href="@{'/discussions/add/{id}' (id=${disc.getDiscussionId()})}">Промени</a> </div>
8 <div th:if="${disc.getUser().equals(user)}"><a class="btn btn-primary button-delete-discussion" th:discussion-id="${disc.getDiscussionId()}">Избриши</a> </div>
9 <table class="table table-striped">
10 <thead>
11 <tr>
12
13 <th scope="col">Опис</th>
14 <th scope="col">Датум</th>
15 <th scope="col">Корисник</th>
16 <th:block sec:authorize="isAuthenticated()">
17
18 <th scope="col"></th>
19 <th scope="col"></th>
20 </th:block>
21
22 </tr>
23 </thead>
24 <tbody>
25 <tr th:each="reply : ${replies}" class="movie">
26 <td th:text="${reply.getText()}"></td>
27 <td th:text="${reply.getDate()}"></td>
28 <td th:text="${reply.getUser().getUsername()}"></td>
29 <td th:if="${reply.getUser().equals(user)}"><a class="btn btn-primary" th:href="@{'/replies/edit/{discussionId}/{replyId}' (discussionId=${disc.getDiscussionId()},replyId=${reply.getReplyId()})}">Промени</a> </td>
30 <td th:if="${reply.getUser().equals(user)}"><a class="btn btn-primary button-delete-reply" th:reply-id="${reply.getReplyId()}" th:dicsussion-id="${disc.getDiscussionId()}">Избриши</a> </td>
31
32 <th:block sec:authorize="isAuthenticated()">
33 <td th:if="${!reply.getUser().equals(user)}"><a class="btn btn-primary" th:href="@{'/replies/add/{discussionId}' (discussionId=${disc.getDiscussionId()})}">Реплицирај</a> </td>
34 <td th:if="${!reply.getUser().equals(user)}">
35 <a class="btn btn-primary">Ми се допаѓа</a>
36 <a class="btn btn-primary">Не ми се допаѓа</a>
37 </td>
38 </th:block>
39
40
41 </tr>
42 </tbody>
43 </table>
44</div>
Note: See TracBrowser for help on using the repository browser.