source: Git/src/main/resources/templates/genres.html@ 3c0f9a9

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

Added genre liking, fixed counter, improved paging, improved searches

  • Property mode set to 100644
File size: 1.2 KB
RevLine 
[3c0f9a9]1<div class="container mb-4" xmlns:sec="http://www.w3.org/1999/xhtml">
[5b447b0]2
[3c0f9a9]3 <div class="row">
4 <div class="col-12">
5 <div class="table-responsive">
6 <table class="table table-striped">
7 <thead>
8 <tr>
9 <th scope="col">Име</th>
10 <th scope="col">Лајкови</th>
11 </tr>
12 </thead>
13 <tbody>
14 <tr th:each="genre : ${genres}" class="elements">
15 <td th:text="${genre.getName()}"></td>
16 <td th:text="${genre.getLikes()}" th:id="${genre.getGenreId()+'genre'}"></td>
17 <td>
18 <th:block sec:authorize="isAuthenticated()" th:each="g: ${allGenres}" th:if="${g.getGenreId() == genre.getGenreId()}">
19 <a class="btn btn-success button-add-genre-liked-list" th:genre-id="${g.getGenreId()}" th:user-id="${user.getUserId()}" th:if="${!likedGenres.contains(g)}">❤</a>
20 <a class="btn btn-danger button-remove-genre-liked-list" th:genre-id="${g.getGenreId()}" th:user-id="${user.getUserId()}" th:if="${likedGenres.contains(g)}">💔</a>
21 </th:block>
22 </td>
23 </tr>
24 </tbody>
25 </table>
26 </div>
[5b447b0]27 </div>
[3c0f9a9]28
[5b447b0]29 </div>
30</div>
Note: See TracBrowser for help on using the repository browser.