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="row">
|
---|
8 | <div class="col-12" th:if="${persons.size() > 0}">
|
---|
9 | <div class="table-responsive">
|
---|
10 | <table class="table table-striped">
|
---|
11 | <thead>
|
---|
12 | <tr>
|
---|
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 | <th scope="col">Слика</th>
|
---|
19 |
|
---|
20 | <th scope="col">Филмови</th>
|
---|
21 | <th scope="col"></th>
|
---|
22 | <th:block sec:authorize="isAuthenticated()">
|
---|
23 | <th scope="col"></th>
|
---|
24 | <th scope="col"></th>
|
---|
25 | <th scope="col"></th>
|
---|
26 |
|
---|
27 | </th:block>
|
---|
28 |
|
---|
29 | </tr>
|
---|
30 | </thead>
|
---|
31 | <tbody>
|
---|
32 | <tr th:each="person : ${persons}" class="elements">
|
---|
33 | <td><a th:href="@{'/persons/{id}' (id=${person.getPersonId()})}" th:text="${person.getName() + ' ' + person.getSurname()}"></a></td>
|
---|
34 | <!--<td th:text="${person.getSurname()}"></td>-->
|
---|
35 | <td th:text="${person.getDateOfBirth()}"></td>
|
---|
36 | <!--<td th:text="${person.getDescription()}"></td>-->
|
---|
37 |
|
---|
38 | <!-- <td>-->
|
---|
39 | <!-- <div th:each="g: ${person.getGenres()}" th:text="${g.getGenre().genreType }"></div>-->
|
---|
40 | <!-- </td>-->
|
---|
41 | <td><img th:src="${person.getImageUrl()}" style="width: 20%; height: 20%"/></td>
|
---|
42 | <td>
|
---|
43 | <div th:each="m: ${person.getMovieActors().size() > 0 ? person.getMovieActors() : person.getMovies()}"
|
---|
44 | th:text="${m.getClass().getName() == 'com.wediscussmovies.project.model.relation.MovieActors' ? m.getMovie().getTitle() : m.getTitle()} "></div>
|
---|
45 | </td>
|
---|
46 | <td> <a class="btn btn-primary" th:href="@{'discussions/all/{id}?type=P' (id=${person.getPersonId()})}" >Прегледај дискусии</a></td>
|
---|
47 | <th:block sec:authorize="isAuthenticated()">
|
---|
48 | <td>
|
---|
49 | <a class="btn btn-primary button-add-grade-person" th:person-id="${person.getPersonId()}">Остави оценка</a>
|
---|
50 |
|
---|
51 | </td>
|
---|
52 | <td>
|
---|
53 | <a class="btn btn-primary" th:href="@{'persons/edit/{personId}' (personId = ${person.getPersonId()})}">Промени</a>
|
---|
54 | </td>
|
---|
55 | <td>
|
---|
56 | <a class="btn btn-primary button-delete-actor" th:person-id="${person.getPersonId()}">Избриши</a>
|
---|
57 |
|
---|
58 | </td>
|
---|
59 |
|
---|
60 | <a class="bottom-heart btn btn-success button-add-favourite-list"
|
---|
61 | th:movie-id="${person.getMovieId()}"
|
---|
62 | th:user-id="${user.getUserId()}"
|
---|
63 | th:if="${!likedPersons.contains(movie)}">❤</a>
|
---|
64 |
|
---|
65 | <a class="bottom-heart btn btn-danger button-remove-favourite-list"
|
---|
66 | th:movie-id="${person.getMovieId()}" th:user-id="${user.getUserId()}"
|
---|
67 | th:if="${likedPersons.contains(movie)}">💔</a>
|
---|
68 |
|
---|
69 |
|
---|
70 | </th:block>
|
---|
71 |
|
---|
72 | </tr>
|
---|
73 | </tbody>
|
---|
74 | </table>
|
---|
75 | </div>
|
---|
76 | </div>
|
---|
77 | </div>
|
---|
78 | </div>
|
---|
79 |
|
---|
80 | </div> |
---|