source: Git/Sources/target/classes/templates/moviesList.html

main
Last change on this file was 980eeda, checked in by Test <matonikolov77@…>, 2 years ago

Restructuring project

  • Property mode set to 100644
File size: 6.1 KB
RevLine 
[5b447b0]1<div xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.w3.org/1999/xhtml">
2
[f25e8dd]3 <div style="width: 70%; margin: auto">
[c02189f]4 <div th:replace="fragments/searchBarName"></div><br>
[f25e8dd]5 <div th:replace="fragments/searchBarGenre"></div>
[5b447b0]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">
[2efe93e]13 <div class="row" th:each="row: ${movie_rows}" >
[7f36551]14 <div class="col-md-3 elements" th:each="movie: ${row}" >
[2efe93e]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>
[7f36551]18 <span th:each="genre: ${movie.getGenres()}" th:text="${genre?.getGenre()?.getGenreType()}" hidden class="card-genre"></span>
19
[2efe93e]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">
[5b447b0]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>
[2efe93e]38 <th scope="col">Опис</th>
[5b447b0]39 <th scope="col">Датум издавање</th>
40 <th scope="col">Допаѓања</th>
[f25e8dd]41 <th scope="col">Жанрови</th>
[5b447b0]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">
[f25e8dd]59 <td><a th:text="${movie.getTitle()}" th:href="@{'/movies/{id}' (id=${movie.getMovieId()})}"></a></td>
[2efe93e]60 <td th:text="${movie.getDescription()}"></td>
[5b447b0]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>
[f25e8dd]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 Филмот нема режисер.
[5b447b0]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>
[f25e8dd]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>
[5b447b0]86 </td>
87 <td>
[f25e8dd]88 <a class="btn btn-success button-add-grade-movie" th:movie-id="${movie.getMovieId()}">Остави оценка</a>
[5b447b0]89 </td>
90 <td>
[f25e8dd]91 <a class="btn btn-warning" th:href="@{'/movies/{id}/edit' (id=${movie.getMovieId()})}">Измени</a>
[5b447b0]92 </td>
93 <td>
[f25e8dd]94 <a class="btn btn-danger button-delete-movie" th:movie-id="${movie.getMovieId()}">Избриши филм</a>
[5b447b0]95 </td>
96 </th:block>
97 </tr>
98 </tbody>
99 </table>
100 </div>
101 </div>
102 </div>
[2efe93e]103 </div>-->
[5b447b0]104
105</div>
Note: See TracBrowser for help on using the repository browser.