source: Git/target/classes/templates/moviesList.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: 4.1 KB
RevLine 
[5b447b0]1<div xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.w3.org/1999/xhtml">
2 <div th:replace="fragments/searchBarGenre">
3
4 </div>
5
6 <div class="container mb-4">
7 <a sec:authorize="isAuthenticated()" th:href="@{/movies/add}">Додади нов филм</a>
8 </div>
9
10 <div class="container mb-4">
11 <div class="row">
12 <div class="col-12" th:if="${movies.size() > 0}">
13 <div class="table-responsive">
14 <table class="table table-striped">
15 <thead>
16 <tr>
17 <th scope="col">Наслов</th>
18 <th scope="col">Опис</th>
19 <th scope="col">Датум издавање</th>
20 <th scope="col">Допаѓања</th>
21 <th scope="col">Занрови</th>
22 <th scope="col">Актери</th>
23 <th scope="col">Режисер</th>
24 <th scope="col"></th>
25
26 <th:block sec:authorize="isAuthenticated()">
27 <th scope="col"></th>
28 <th scope="col"></th>
29 <th scope="col"></th>
30 <th scope="col"></th>
31 </th:block>
32
33
34
35 </tr>
36 </thead>
37 <tbody>
38 <tr th:each="movie : ${movies}" class="elements">
39 <td th:text="${movie.getTitle()}"></td>
40 <td th:text="${movie.getDescription()}"></td>
41 <td th:text="${movie.getAiringDate()}"></td>
42 <td th:text="${movie.getLikes() != null ? movie.getLikes().size() : 0}">
43
44 </td>
45 <td class="genre">
46 <div th:each="g: ${movie.getGenres()}" th:text="${g.getGenre().genreType }"></div>
47 </td>
48 <td>
49 <div th:each="a: ${movie.getActors()}" th:text="${a.getPerson().getName()} "></div>
50 </td>
51 <td th:text="${movie.getDirector() != null ? movie.getDirector()?.getName() + ' '+ movie.getDirector()?.getSurname() : 'Не е додаен директор'}"></td>
52 <td>
53 <a class="btn btn-primary" th:href="@{'discussions/all/{id}?type=M' (id=${movie.getMovieId()})}" >Прегледај дискусии</a>
54 </td>
55 <th:block sec:authorize="isAuthenticated()">
56 <td>
57 <a class="btn btn-primary button-add-favourite-list" th:movie-id="${movie.getMovieId()}" th:user-id="${user.getUserId()}" th:if="${!likedMovies.contains(movie)}">Додади во омилена листа</a>
58 <a class="btn btn-primary button-remove-favourite-list" th:movie-id="${movie.getMovieId()}" th:user-id="${user.getUserId()}" th:if="${likedMovies.contains(movie)}">Избриши од омилена листа</a>
59
60 </td>
61 <td>
62 <a class="btn btn-primary button-add-grade-movie" th:movie-id="${movie.getMovieId()}">Остави оценка</a>
63 </td>
64 <td>
65 <a class="btn btn-primary" th:href="@{'/movies/{id}/edit' (id=${movie.getMovieId()})}">Промени</a>
66 </td>
67 <td>
68 <a class="btn btn-primary button-delete-movie" th:movie-id="${movie.getMovieId()}">Избриши филм</a>
69 </td>
70 </th:block>
71 </tr>
72 </tbody>
73 </table>
74 </div>
75 </div>
76 </div>
77 </div>
78
79</div>
Note: See TracBrowser for help on using the repository browser.