Ignore:
Timestamp:
02/06/22 21:38:16 (2 years ago)
Author:
GitHub <noreply@…>
Branches:
main
Children:
7f36551
Parents:
5b447b0 (diff), 2efe93e (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/06/22 21:38:16)
git-committer:
GitHub <noreply@…> (02/06/22 21:38:16)
Message:

Merge pull request #1 from partaloski/master

Fixed and added a better front end, improved clarity

File:
1 edited

Legend:

Unmodified
Added
Removed
  • target/classes/templates/moviesList.html

    r5b447b0 r42d565b  
    11<div xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.w3.org/1999/xhtml">
    2     <div th:replace="fragments/searchBarGenre">
    32
     3    <div style="width: 70%; margin: auto">
     4        <div th:replace="fragments/searchBarName"></div>
     5        <div th:replace="fragments/searchBarGenre"></div>
    46    </div>
    57
     
    911
    1012    <div class="container mb-4">
     13        <div class="row" th:each="row: ${movie_rows}" >
     14            <div class="col-md-3" th:each="movie: ${row}" >
     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>
     18                        </a>
     19                        <h3 class="card-text bottom" th:text="${'Rated '+movie.getImdbRating()}"></h3>
     20                        <th:block sec:authorize="isAuthenticated()">
     21                            <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>
     22                            <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>
     23                        </th:block>
     24                    </div>
     25            </div>
     26        </div>
     27    </div>
     28    <!--<div class="container mb-4">
    1129        <div class="row">
    1230            <div class="col-12" th:if="${movies.size() > 0}">
     
    1937                            <th scope="col">Датум издавање</th>
    2038                            <th scope="col">Допаѓања</th>
    21                             <th scope="col">Занрови</th>
     39                            <th scope="col">Жанрови</th>
    2240                            <th scope="col">Актери</th>
    2341                            <th scope="col">Режисер</th>
     
    3755                        <tbody>
    3856                        <tr th:each="movie : ${movies}" class="elements">
    39                             <td th:text="${movie.getTitle()}"></td>
     57                            <td><a th:text="${movie.getTitle()}" th:href="@{'/movies/{id}' (id=${movie.getMovieId()})}"></a></td>
    4058                            <td th:text="${movie.getDescription()}"></td>
    4159                            <td th:text="${movie.getAiringDate()}"></td>
     
    4765                            </td>
    4866                            <td>
    49                                 <div th:each="a: ${movie.getActors()}" th:text="${a.getPerson().getName()} "></div>
     67                                <div th:each="ac: ${movie.getActors()}">
     68                                    <a th:href="@{'/persons/{id}' (id=${ac.getPerson().getPersonId()})}" th:text="${ac.getPerson().getName() + ' ' + ac.getPerson().getSurname()}"></a>
     69                                </div>
    5070                            </td>
    51                             <td th:text="${movie.getDirector() != null ? movie.getDirector()?.getName() + ' '+ movie.getDirector()?.getSurname() : 'Не е додаен директор'}"></td>
     71                            <td th:if="${movie.getDirector() != null}">
     72                                <a th:href="@{'/persons/{id}' (id=${movie.getDirector().getPersonId()})}" th:text="${movie.getDirector().getName() + ' ' + movie.getDirector().getSurname()}"></a>
     73                            </td>
     74                            <td th:if="${movie.getDirector() == null}">
     75                                Филмот нема режисер.
     76                            </td>
    5277                            <td>
    5378                                <a class="btn btn-primary" th:href="@{'discussions/all/{id}?type=M' (id=${movie.getMovieId()})}" >Прегледај дискусии</a>
     
    5580                            <th:block sec:authorize="isAuthenticated()">
    5681                            <td>
    57                                 <a class="btn btn-primary button-add-favourite-list" th:movie-id="${movie.getMovieId()}" th:user-id="${user.getUserId()}" th:if="${!likedMovies.contains(movie)}">Додади во омилена листа</a>
    58                                 <a class="btn btn-primary button-remove-favourite-list" th:movie-id="${movie.getMovieId()}" th:user-id="${user.getUserId()}" th:if="${likedMovies.contains(movie)}">Избриши од омилена листа</a>
    59 
     82                                <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>
     83                                <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>
    6084                            </td>
    6185                            <td>
    62                                 <a class="btn btn-primary button-add-grade-movie" th:movie-id="${movie.getMovieId()}">Остави оценка</a>
     86                                <a class="btn btn-success button-add-grade-movie" th:movie-id="${movie.getMovieId()}">Остави оценка</a>
    6387                            </td>
    6488                            <td>
    65                                 <a class="btn btn-primary" th:href="@{'/movies/{id}/edit' (id=${movie.getMovieId()})}">Промени</a>
     89                                <a class="btn btn-warning" th:href="@{'/movies/{id}/edit' (id=${movie.getMovieId()})}">Измени</a>
    6690                            </td>
    6791                            <td>
    68                                 <a class="btn btn-primary button-delete-movie" th:movie-id="${movie.getMovieId()}">Избриши филм</a>
     92                                <a class="btn btn-danger button-delete-movie" th:movie-id="${movie.getMovieId()}">Избриши филм</a>
    6993                            </td>
    7094                            </th:block>
     
    7599            </div>
    76100        </div>
    77     </div>
     101    </div>-->
    78102
    79103</div>
Note: See TracChangeset for help on using the changeset viewer.