source: Git/src/main/resources/templates/personsList.html@ c02189f

main
Last change on this file since c02189f 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.6 KB
Line 
1<div xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.w3.org/1999/xhtml">
2
3 <div>
4 <a sec:authorize="isAuthenticated()" th:href="@{'persons/add'}">Додади актер или режисер</a>
5 </div>
6 <div class="container mb-4">
7 <div class="col-12" th:if="${persons.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 scope="col">Занрови</th>-->
17 <th scope="col">Слика</th>
18
19 <th scope="col">Филмови</th>
20 <th scope="col"></th>
21 <th:block sec:authorize="isAuthenticated()">
22 <th scope="col"></th>
23 <th scope="col"></th>
24 <th scope="col"></th>
25
26 </th:block>
27
28 </tr>
29 </thead>
30 <tbody>
31 <tr th:each="person : ${persons}" class="elements">
32 <td><a th:href="@{'/persons/{id}' (id=${person.getPersonId()})}" th:text="${person.getName() + ' ' + person.getSurname()}"></a></td>
33 <!--<td th:text="${person.getSurname()}"></td>-->
34 <td th:text="${person.getDateOfBirth()}"></td>
35 <!--<td th:text="${person.getDescription()}"></td>-->
36
37<!-- <td>-->
38<!-- <div th:each="g: ${person.getGenres()}" th:text="${g.getGenre().genreType }"></div>-->
39<!-- </td>-->
40 <td><img th:src="${person.getImageUrl()}" style="width: 20%; height: 20%"/></td>
41 <td>
42 <div th:each="m: ${person.getMovieActors().size() > 0 ? person.getMovieActors() : person.getMovies()}"
43 th:text="${m.getClass().getName() == 'com.wediscussmovies.project.model.relation.MovieActors' ? m.getMovie().getTitle() : m.getTitle()} "></div>
44 </td>
45 <td> <a class="btn btn-primary" th:href="@{'discussions/all/{id}?type=P' (id=${person.getPersonId()})}" >Прегледај дискусии</a></td>
46 <th:block sec:authorize="isAuthenticated()">
47 <td>
48 <a class="btn btn-secondary button-add-grade-person" th:person-id="${person.getPersonId()}">Остави оценка</a>
49
50 </td>
51 <td>
52 <a class="btn btn-warning" th:href="@{'persons/edit/{personId}' (personId = ${person.getPersonId()})}">Промени</a>
53 </td>
54 <td>
55 <a class="btn btn-danger button-delete-actor" th:person-id="${person.getPersonId()}">Избриши</a>
56
57 </td>
58
59
60 </th:block>
61
62 </tr>
63 </tbody>
64 </table>
65 </div>
66 </div>
67 </div>
68
69</div>
Note: See TracBrowser for help on using the repository browser.