source: Git/Sources/src/main/resources/templates/moviesListPaged.html@ 980eeda

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

Restructuring project

  • Property mode set to 100644
File size: 7.7 KB
Line 
1<div xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.w3.org/1999/xhtml">
2 <div style="margin:auto; width: 60%">
3 <div style="width: 30%; margin: auto; height: 100%; margin-bottom: 10px">
4 <a class="btn btn-outline-dark" style="height: 100%; width: 100%; font-size: 125%" id="button_toggle_filters">Прикажи филтрирање</a>
5 </div>
6 <div style="width: 100%; margin: auto; transition: 200ms" id="filters_div" class="invisible-search">
7 <div th:replace="fragments/searchBarName"></div><br>
8 <div th:replace="fragments/searchBarGenre"></div>
9 </div>
10 </div>
11 <div id="paging-section">
12 <div id="inner-paging" class="input-group">
13 <!--
14 <a class="btn btn-danger" id="button-sub" style="float: left; display: block">Previous</a>
15 <a class="btn btn-success" id="button-add" style="float: left; display: block">Next</a>
16 -->
17 <div class="input-group-prepend">
18 <button class="btn btn-danger" id="button-sub" >Previous</button>
19 </div>
20 <form method="get" action="" style="float: left; display: block">
21 <input type="number" class="form-control" min="1" name="page" th:value="${page}" id="pageInput">
22 <button type="submit" id="button-submit-page" class="btn btn-primary">Check page</button>
23 </form>
24
25 <div class="input-group-append">
26 <button class="btn btn-success" id="button-add" >Next</button>
27 </div>
28 </div>
29 </div><br>
30
31 <div class="container mb-4">
32 <a sec:authorize="isAuthenticated()" th:href="@{/movies/add}" class="btn btn-secondary">Додади нов филм</a>
33 </div>
34
35 <div class="container mb-4">
36 <div class="row" th:each="row: ${movie_rows}" >
37 <div class="col-md-3 elements" th:each="movie: ${row}" >
38 <span th:each="genre: ${movie.getGenres()}" th:text="${genre?.getGenre()?.getGenreType()}" hidden class="card-genre"></span>
39 <div class="card-body card bg-image" th:style="'background:url(' + ${movie.getImageUrl()} + ') no-repeat center #eee;'">
40 <a class="card-text-center" style="color: white" th:href="@{'/movies/{id}' (id=${movie.getMovieId()})}" >
41 <h3 class="card-title title" th:text="${movie.getTitle()}"></h3>
42 <span th:each="genre: ${movie.getGenres()}" th:text="${genre?.getGenre()?.getGenreType()}" hidden class="card-genre"></span>
43 </a>
44 <span class="card-text bottom">
45 <h3 th:text="${'Оценет '+movie.getImdbRating() + '/10'}"></h3>
46 </span>
47 <th:block sec:authorize="isAuthenticated()">
48 <button 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)}">❤</button>
49 <button 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)}">💔</button>
50 </th:block>
51 </div>
52 </div>
53 </div>
54 </div>
55 <!--<div class="container mb-4">
56 <div class="row">
57 <div class="col-12" th:if="${movies.size() > 0}">
58 <div class="table-responsive">
59 <table class="table table-striped">
60 <thead>
61 <tr>
62 <th scope="col">Наслов</th>
63 <th scope="col">Опис</th>
64 <th scope="col">Датум издавање</th>
65 <th scope="col">Допаѓања</th>
66 <th scope="col">Жанрови</th>
67 <th scope="col">Актери</th>
68 <th scope="col">Режисер</th>
69 <th scope="col"></th>
70
71 <th:block sec:authorize="isAuthenticated()">
72 <th scope="col"></th>
73 <th scope="col"></th>
74 <th scope="col"></th>
75 <th scope="col"></th>
76 </th:block>
77
78
79
80 </tr>
81 </thead>
82 <tbody>
83 <tr th:each="movie : ${movies}" class="elements">
84 <td><a th:text="${movie.getTitle()}" th:href="@{'/movies/{id}' (id=${movie.getMovieId()})}"></a></td>
85 <td th:text="${movie.getDescription()}"></td>
86 <td th:text="${movie.getAiringDate()}"></td>
87 <td th:text="${movie.getLikes() != null ? movie.getLikes().size() : 0}">
88
89 </td>
90 <td class="genre">
91 <div th:each="g: ${movie.getGenres()}" th:text="${g.getGenre().genreType }"></div>
92 </td>
93 <td>
94 <div th:each="ac: ${movie.getActors()}">
95 <a th:href="@{'/persons/{id}' (id=${ac.getPerson().getPersonId()})}" th:text="${ac.getPerson().getName() + ' ' + ac.getPerson().getSurname()}"></a>
96 </div>
97 </td>
98 <td th:if="${movie.getDirector() != null}">
99 <a th:href="@{'/persons/{id}' (id=${movie.getDirector().getPersonId()})}" th:text="${movie.getDirector().getName() + ' ' + movie.getDirector().getSurname()}"></a>
100 </td>
101 <td th:if="${movie.getDirector() == null}">
102 Филмот нема режисер.
103 </td>
104 <td>
105 <a class="btn btn-primary" th:href="@{'discussions/all/{id}?type=M' (id=${movie.getMovieId()})}" >Прегледај дискусии</a>
106 </td>
107 <th:block sec:authorize="isAuthenticated()">
108 <td>
109 <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>
110 <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>
111 </td>
112 <td>
113 <a class="btn btn-success button-add-grade-movie" th:movie-id="${movie.getMovieId()}">Остави оценка</a>
114 </td>
115 <td>
116 <a class="btn btn-warning" th:href="@{'/movies/{id}/edit' (id=${movie.getMovieId()})}">Измени</a>
117 </td>
118 <td>
119 <a class="btn btn-danger button-delete-movie" th:movie-id="${movie.getMovieId()}">Избриши филм</a>
120 </td>
121 </th:block>
122 </tr>
123 </tbody>
124 </table>
125 </div>
126 </div>
127 </div>
128 </div>-->
129
130</div>
Note: See TracBrowser for help on using the repository browser.