Ignore:
Timestamp:
02/05/22 22:48:19 (2 years ago)
Author:
Petar Partaloski <ppartaloski@…>
Branches:
main
Children:
2efe93e
Parents:
5b447b0
Message:

Fixed and added a better front end, improved clarity

File:
1 edited

Legend:

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

    r5b447b0 rf25e8dd  
    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
     
    1618                        <tr>
    1719                            <th scope="col">Наслов</th>
    18                             <th scope="col">Опис</th>
     20                            <!--<th scope="col">Опис</th>-->
    1921                            <th scope="col">Датум издавање</th>
    2022                            <th scope="col">Допаѓања</th>
    21                             <th scope="col">Занрови</th>
     23                            <th scope="col">Жанрови</th>
    2224                            <th scope="col">Актери</th>
    2325                            <th scope="col">Режисер</th>
     
    3739                        <tbody>
    3840                        <tr th:each="movie : ${movies}" class="elements">
    39                             <td th:text="${movie.getTitle()}"></td>
    40                             <td th:text="${movie.getDescription()}"></td>
     41                            <td><a th:text="${movie.getTitle()}" th:href="@{'/movies/{id}' (id=${movie.getMovieId()})}"></a></td>
     42                            <!--<td th:text="${movie.getDescription()}"></td>-->
    4143                            <td th:text="${movie.getAiringDate()}"></td>
    4244                            <td th:text="${movie.getLikes() != null  ? movie.getLikes().size() : 0}">
     
    4749                            </td>
    4850                            <td>
    49                                 <div th:each="a: ${movie.getActors()}" th:text="${a.getPerson().getName()} "></div>
     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>
    5054                            </td>
    51                             <td th:text="${movie.getDirector() != null ? movie.getDirector()?.getName() + ' '+ movie.getDirector()?.getSurname() : 'Не е додаен директор'}"></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                                Филмот нема режисер.
     60                            </td>
    5261                            <td>
    5362                                <a class="btn btn-primary" th:href="@{'discussions/all/{id}?type=M' (id=${movie.getMovieId()})}" >Прегледај дискусии</a>
     
    5564                            <th:block sec:authorize="isAuthenticated()">
    5665                            <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>
     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>
    5968
    6069                            </td>
    6170                            <td>
    62                                 <a class="btn btn-primary button-add-grade-movie" th:movie-id="${movie.getMovieId()}">Остави оценка</a>
     71                                <a class="btn btn-success button-add-grade-movie" th:movie-id="${movie.getMovieId()}">Остави оценка</a>
    6372                            </td>
    6473                            <td>
    65                                 <a class="btn btn-primary" th:href="@{'/movies/{id}/edit' (id=${movie.getMovieId()})}">Промени</a>
     74                                <a class="btn btn-warning" th:href="@{'/movies/{id}/edit' (id=${movie.getMovieId()})}">Измени</a>
    6675                            </td>
    6776                            <td>
    68                                 <a class="btn btn-primary button-delete-movie" th:movie-id="${movie.getMovieId()}">Избриши филм</a>
     77                                <a class="btn btn-danger button-delete-movie" th:movie-id="${movie.getMovieId()}">Избриши филм</a>
    6978                            </td>
    7079                            </th:block>
Note: See TracChangeset for help on using the changeset viewer.