source: Git/target/classes/templates/moviesList.html@ c02189f

main
Last change on this file since c02189f was c02189f, checked in by Petar Partaloski <ppartaloski@…>, 2 years ago

Added new core functionalities, fixed bugs and improved visual clarity

  • Property mode set to 100644
File size: 6.1 KB
Line 
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><br>
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 elements" 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 <span th:each="genre: ${movie.getGenres()}" th:text="${genre?.getGenre()?.getGenreType()}" hidden class="card-genre"></span>
19
20 </a>
21 <h3 class="card-text bottom" th:text="${'Rated '+movie.getImdbRating()}"></h3>
22 <th:block sec:authorize="isAuthenticated()">
23 <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>
24 <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>
25 </th:block>
26 </div>
27 </div>
28 </div>
29 </div>
30 <!--<div class="container mb-4">
31 <div class="row">
32 <div class="col-12" th:if="${movies.size() > 0}">
33 <div class="table-responsive">
34 <table class="table table-striped">
35 <thead>
36 <tr>
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 <th scope="col">Режисер</th>
44 <th scope="col"></th>
45
46 <th:block sec:authorize="isAuthenticated()">
47 <th scope="col"></th>
48 <th scope="col"></th>
49 <th scope="col"></th>
50 <th scope="col"></th>
51 </th:block>
52
53
54
55 </tr>
56 </thead>
57 <tbody>
58 <tr th:each="movie : ${movies}" class="elements">
59 <td><a th:text="${movie.getTitle()}" th:href="@{'/movies/{id}' (id=${movie.getMovieId()})}"></a></td>
60 <td th:text="${movie.getDescription()}"></td>
61 <td th:text="${movie.getAiringDate()}"></td>
62 <td th:text="${movie.getLikes() != null ? movie.getLikes().size() : 0}">
63
64 </td>
65 <td class="genre">
66 <div th:each="g: ${movie.getGenres()}" th:text="${g.getGenre().genreType }"></div>
67 </td>
68 <td>
69 <div th:each="ac: ${movie.getActors()}">
70 <a th:href="@{'/persons/{id}' (id=${ac.getPerson().getPersonId()})}" th:text="${ac.getPerson().getName() + ' ' + ac.getPerson().getSurname()}"></a>
71 </div>
72 </td>
73 <td th:if="${movie.getDirector() != null}">
74 <a th:href="@{'/persons/{id}' (id=${movie.getDirector().getPersonId()})}" th:text="${movie.getDirector().getName() + ' ' + movie.getDirector().getSurname()}"></a>
75 </td>
76 <td th:if="${movie.getDirector() == null}">
77 Филмот нема режисер.
78 </td>
79 <td>
80 <a class="btn btn-primary" th:href="@{'discussions/all/{id}?type=M' (id=${movie.getMovieId()})}" >Прегледај дискусии</a>
81 </td>
82 <th:block sec:authorize="isAuthenticated()">
83 <td>
84 <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>
85 <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>
86 </td>
87 <td>
88 <a class="btn btn-success button-add-grade-movie" th:movie-id="${movie.getMovieId()}">Остави оценка</a>
89 </td>
90 <td>
91 <a class="btn btn-warning" th:href="@{'/movies/{id}/edit' (id=${movie.getMovieId()})}">Измени</a>
92 </td>
93 <td>
94 <a class="btn btn-danger button-delete-movie" th:movie-id="${movie.getMovieId()}">Избриши филм</a>
95 </td>
96 </th:block>
97 </tr>
98 </tbody>
99 </table>
100 </div>
101 </div>
102 </div>
103 </div>-->
104
105</div>
Note: See TracBrowser for help on using the repository browser.