Ignore:
Timestamp:
02/07/22 21:26:03 (3 years ago)
Author:
GitHub <noreply@…>
Branches:
main
Children:
0226942
Parents:
7f36551 (diff), 3c0f9a9 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Mato-77 <56981531+Mato-77@…> (02/07/22 21:26:03)
git-committer:
GitHub <noreply@…> (02/07/22 21:26:03)
Message:

Merge pull request #2 from partaloski/master

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/resources/templates/genres.html

    r7f36551 rad4243e  
    1 <div class="container mb-4">
    2   <div class="row">
    3     <div class="col-12">
    4       <div class="table-responsive">
    5         <table class="table table-striped">
    6           <thead>
    7           <tr>
    8             <th scope="col">Име</th>
    9             <th scope="col">Лајкови</th>
    10           </tr>
    11           </thead>
    12           <tbody>
    13           <tr th:each="genre : ${genres}" class="elements">
    14             <td th:text="${genre.getName()}"></td>
    15             <td th:text="${genre.getLikes()}"></td>
     1<div class="container mb-4" xmlns:sec="http://www.w3.org/1999/xhtml">
    162
    17           </tr>
    18           </tbody>
    19         </table>
     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>
    2027      </div>
    21     </div>
     28
    2229  </div>
    2330</div>
Note: See TracChangeset for help on using the changeset viewer.