1 | <div xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.w3.org/1999/xhtml">
|
---|
2 |
|
---|
3 | <div style="width: 70%; margin: auto">
|
---|
4 | <div th:replace="fragments/searchBarName"></div>
|
---|
5 | <div th:replace="fragments/searchBarGenre"></div>
|
---|
6 | </div>
|
---|
7 |
|
---|
8 | <div class="container mb-4">
|
---|
9 | <a sec:authorize="isAuthenticated()" th:href="@{/movies/add}">Додади нов филм</a>
|
---|
10 | </div>
|
---|
11 |
|
---|
12 | <div class="container mb-4">
|
---|
13 | <div class="row" th:each="row: ${movie_rows}" >
|
---|
14 | <div class="col-md-3" th:each="movie: ${row}" >
|
---|
15 | <div class="card-body card bg-image" th:style="'background:url(' + ${movie.getImageUrl()} + ') no-repeat center #eee;'">
|
---|
16 | <a class="card-text-center" style="color: white" th:href="@{'/movies/{id}' (id=${movie.getMovieId()})}" >
|
---|
17 | <h3 class="card-title title" th:text="${movie.getTitle()}"></h3>
|
---|
18 | </a>
|
---|
19 | <h3 class="card-text bottom" th:text="${'Rated '+movie.getImdbRating()}"></h3>
|
---|
20 | <th:block sec:authorize="isAuthenticated()">
|
---|
21 | <a class="bottom-heart btn btn-success button-add-favourite-list" th:movie-id="${movie.getMovieId()}" th:user-id="${user.getUserId()}" th:if="${!likedMovies.contains(movie)}">❤</a>
|
---|
22 | <a class="bottom-heart btn btn-danger button-remove-favourite-list" th:movie-id="${movie.getMovieId()}" th:user-id="${user.getUserId()}" th:if="${likedMovies.contains(movie)}">💔</a>
|
---|
23 | </th:block>
|
---|
24 | </div>
|
---|
25 | </div>
|
---|
26 | </div>
|
---|
27 | </div>
|
---|
28 | <!--<div class="container mb-4">
|
---|
29 | <div class="row">
|
---|
30 | <div class="col-12" th:if="${movies.size() > 0}">
|
---|
31 | <div class="table-responsive">
|
---|
32 | <table class="table table-striped">
|
---|
33 | <thead>
|
---|
34 | <tr>
|
---|
35 | <th scope="col">Наслов</th>
|
---|
36 | <th scope="col">Опис</th>
|
---|
37 | <th scope="col">Датум издавање</th>
|
---|
38 | <th scope="col">Допаѓања</th>
|
---|
39 | <th scope="col">Жанрови</th>
|
---|
40 | <th scope="col">Актери</th>
|
---|
41 | <th scope="col">Режисер</th>
|
---|
42 | <th scope="col"></th>
|
---|
43 |
|
---|
44 | <th:block sec:authorize="isAuthenticated()">
|
---|
45 | <th scope="col"></th>
|
---|
46 | <th scope="col"></th>
|
---|
47 | <th scope="col"></th>
|
---|
48 | <th scope="col"></th>
|
---|
49 | </th:block>
|
---|
50 |
|
---|
51 |
|
---|
52 |
|
---|
53 | </tr>
|
---|
54 | </thead>
|
---|
55 | <tbody>
|
---|
56 | <tr th:each="movie : ${movies}" class="elements">
|
---|
57 | <td><a th:text="${movie.getTitle()}" th:href="@{'/movies/{id}' (id=${movie.getMovieId()})}"></a></td>
|
---|
58 | <td th:text="${movie.getDescription()}"></td>
|
---|
59 | <td th:text="${movie.getAiringDate()}"></td>
|
---|
60 | <td th:text="${movie.getLikes() != null ? movie.getLikes().size() : 0}">
|
---|
61 |
|
---|
62 | </td>
|
---|
63 | <td class="genre">
|
---|
64 | <div th:each="g: ${movie.getGenres()}" th:text="${g.getGenre().genreType }"></div>
|
---|
65 | </td>
|
---|
66 | <td>
|
---|
67 | <div th:each="ac: ${movie.getActors()}">
|
---|
68 | <a th:href="@{'/persons/{id}' (id=${ac.getPerson().getPersonId()})}" th:text="${ac.getPerson().getName() + ' ' + ac.getPerson().getSurname()}"></a>
|
---|
69 | </div>
|
---|
70 | </td>
|
---|
71 | <td th:if="${movie.getDirector() != null}">
|
---|
72 | <a th:href="@{'/persons/{id}' (id=${movie.getDirector().getPersonId()})}" th:text="${movie.getDirector().getName() + ' ' + movie.getDirector().getSurname()}"></a>
|
---|
73 | </td>
|
---|
74 | <td th:if="${movie.getDirector() == null}">
|
---|
75 | Филмот нема режисер.
|
---|
76 | </td>
|
---|
77 | <td>
|
---|
78 | <a class="btn btn-primary" th:href="@{'discussions/all/{id}?type=M' (id=${movie.getMovieId()})}" >Прегледај дискусии</a>
|
---|
79 | </td>
|
---|
80 | <th:block sec:authorize="isAuthenticated()">
|
---|
81 | <td>
|
---|
82 | <a class="btn btn-success button-add-favourite-list" th:movie-id="${movie.getMovieId()}" th:user-id="${user.getUserId()}" th:if="${!likedMovies.contains(movie)}">Додади во омилена листа</a>
|
---|
83 | <a class="btn btn-warning button-remove-favourite-list" th:movie-id="${movie.getMovieId()}" th:user-id="${user.getUserId()}" th:if="${likedMovies.contains(movie)}">Избриши од омилена листа</a>
|
---|
84 | </td>
|
---|
85 | <td>
|
---|
86 | <a class="btn btn-success button-add-grade-movie" th:movie-id="${movie.getMovieId()}">Остави оценка</a>
|
---|
87 | </td>
|
---|
88 | <td>
|
---|
89 | <a class="btn btn-warning" th:href="@{'/movies/{id}/edit' (id=${movie.getMovieId()})}">Измени</a>
|
---|
90 | </td>
|
---|
91 | <td>
|
---|
92 | <a class="btn btn-danger button-delete-movie" th:movie-id="${movie.getMovieId()}">Избриши филм</a>
|
---|
93 | </td>
|
---|
94 | </th:block>
|
---|
95 | </tr>
|
---|
96 | </tbody>
|
---|
97 | </table>
|
---|
98 | </div>
|
---|
99 | </div>
|
---|
100 | </div>
|
---|
101 | </div>-->
|
---|
102 |
|
---|
103 | </div> |
---|