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

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

Fixed and added a better front end, improved clarity

  • Property mode set to 100644
File size: 4.7 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">
4 <div th:replace="fragments/searchBarName"></div>
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">
13 <div class="row">
14 <div class="col-12" th:if="${movies.size() > 0}">
15 <div class="table-responsive">
16 <table class="table table-striped">
17 <thead>
18 <tr>
19 <th scope="col">Наслов</th>
[f25e8dd]20 <!--<th scope="col">Опис</th>-->
[5b447b0]21 <th scope="col">Датум издавање</th>
22 <th scope="col">Допаѓања</th>
[f25e8dd]23 <th scope="col">Жанрови</th>
[5b447b0]24 <th scope="col">Актери</th>
25 <th scope="col">Режисер</th>
26 <th scope="col"></th>
27
28 <th:block sec:authorize="isAuthenticated()">
29 <th scope="col"></th>
30 <th scope="col"></th>
31 <th scope="col"></th>
32 <th scope="col"></th>
33 </th:block>
34
35
36
37 </tr>
38 </thead>
39 <tbody>
40 <tr th:each="movie : ${movies}" class="elements">
[f25e8dd]41 <td><a th:text="${movie.getTitle()}" th:href="@{'/movies/{id}' (id=${movie.getMovieId()})}"></a></td>
42 <!--<td th:text="${movie.getDescription()}"></td>-->
[5b447b0]43 <td th:text="${movie.getAiringDate()}"></td>
44 <td th:text="${movie.getLikes() != null ? movie.getLikes().size() : 0}">
45
46 </td>
47 <td class="genre">
48 <div th:each="g: ${movie.getGenres()}" th:text="${g.getGenre().genreType }"></div>
49 </td>
50 <td>
[f25e8dd]51 <div th:each="ac: ${movie.getActors()}">
52 <a th:href="@{'/persons/{id}' (id=${ac.getPerson().getPersonId()})}" th:text="${ac.getPerson().getName() + ' ' + ac.getPerson().getSurname()}"></a>
53 </div>
54 </td>
55 <td th:if="${movie.getDirector() != null}">
56 <a th:href="@{'/persons/{id}' (id=${movie.getDirector().getPersonId()})}" th:text="${movie.getDirector().getName() + ' ' + movie.getDirector().getSurname()}"></a>
57 </td>
58 <td th:if="${movie.getDirector() == null}">
59 Филмот нема режисер.
[5b447b0]60 </td>
61 <td>
62 <a class="btn btn-primary" th:href="@{'discussions/all/{id}?type=M' (id=${movie.getMovieId()})}" >Прегледај дискусии</a>
63 </td>
64 <th:block sec:authorize="isAuthenticated()">
65 <td>
[f25e8dd]66 <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>
67 <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]68
69 </td>
70 <td>
[f25e8dd]71 <a class="btn btn-success button-add-grade-movie" th:movie-id="${movie.getMovieId()}">Остави оценка</a>
[5b447b0]72 </td>
73 <td>
[f25e8dd]74 <a class="btn btn-warning" th:href="@{'/movies/{id}/edit' (id=${movie.getMovieId()})}">Измени</a>
[5b447b0]75 </td>
76 <td>
[f25e8dd]77 <a class="btn btn-danger button-delete-movie" th:movie-id="${movie.getMovieId()}">Избриши филм</a>
[5b447b0]78 </td>
79 </th:block>
80 </tr>
81 </tbody>
82 </table>
83 </div>
84 </div>
85 </div>
86 </div>
87
88</div>
Note: See TracBrowser for help on using the repository browser.