Changeset 42d565b in Git for src/main/resources
- Timestamp:
- 02/06/22 21:38:16 (3 years ago)
- 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)
- Location:
- src/main/resources
- Files:
-
- 3 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/resources/static/css/shared.css
r5b447b0 r42d565b 2 2 max-width: 5vw; 3 3 } 4 5 .row{ 6 height: 300px; 7 margin-bottom: 15px; 8 } 9 10 .row div{ 11 height: 100%; 12 } 13 14 .row div div{ 15 height: 100%; 16 } 17 18 .card{ 19 background-size: 100vh auto; 20 float:left; 21 margin: 7px; 22 border-radius: 10px; 23 padding: 20px; 24 color: white; 25 -webkit-text-stroke-width: 1px !important; 26 -webkit-text-stroke-color: black !important; 27 width: 90%; 28 height: 90%; 29 box-shadow: 4px 4px 4px rgba(128,128,128,1); 30 } 31 32 .card a h3{ 33 -webkit-text-stroke-width: 1px; 34 -webkit-text-stroke-color: black; 35 color:white; 36 transition: 100ms; 37 } 38 39 .card:hover a h3{ 40 transition: 400ms; 41 color:black; 42 -webkit-text-stroke-color: white; 43 } 44 45 .title{ 46 text-align: center; 47 background-color: rgba(0,0,0,0.25); 48 border-radius: 10px 10px 0px 0px; 49 padding: 10px; 50 } 51 52 .bottom{ 53 position: absolute; 54 top: 80%; 55 margin:auto; 56 width: 100%; 57 left: 0%; 58 border-radius: 0px; 59 text-align: center; 60 background-color: rgba(0,0,0,0.25); 61 } 62 63 64 .bottom-heart{ 65 top: 60%; 66 left: auto; 67 position: absolute; 68 margin: auto; 69 width: 20%; 70 text-align: center; 71 } -
src/main/resources/static/js/sharedScript.js
r5b447b0 r42d565b 4 4 var elements = $(".elements") 5 5 var elementGrade; 6 6 7 7 8 $("#dialog-rating").dialog({ … … 145 146 let movieId=$(button).attr("movie-id") 146 147 if (type==='like') { 147 $(button).parent().append("<a class='b tn btn-primary button-remove-favourite-list' movie-id=" + movieId + " user-id=" + userId + ">Избриши од омилена листа</a>")148 $(button).parent().append("<a class='bottom-heart btn btn-danger button-remove-favourite-list' movie-id=" + movieId + " user-id=" + userId + ">💔</a>") 148 149 console.log("da") 149 150 } 150 151 else{ 151 $(button).parent().append("<a class='b tn btn-primary button-add-favourite-list' movie-id=" + movieId + " user-id=" + userId + ">Додади во омилена листа</a>")152 $(button).parent().append("<a class='bottom-heart btn btn-success button-add-favourite-list' movie-id=" + movieId + " user-id=" + userId + ">❤</a>") 152 153 153 154 } -
src/main/resources/templates/discussion.html
r5b447b0 r42d565b 1 1 <div xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.w3.org/1999/xhtml"> 2 <div th:text="${disc.getMovie() != null ? disc.getMovie().getTitle() : disc.getPerson().getName() + ' ' + disc.getPerson().getSurname()}"></div> 3 <div th:text="${disc.getTitle()}"></div> 4 <div th:text="${disc.getText()}"></div> 5 <div th:text="${disc.getDate()}"></div> 6 <div th:text="${disc.getUser().getUsername()}"></div> 7 <div th:if="${disc.getUser().equals(user)}"><a class="btn btn-primary" th:href="@{'/discussions/add/{id}' (id=${disc.getDiscussionId()})}">Промени</a> </div> 8 <div th:if="${disc.getUser().equals(user)}"><a class="btn btn-primary button-delete-discussion" th:discussion-id="${disc.getDiscussionId()}">Избриши</a> </div> 9 <table class="table table-striped"> 2 <div style="width: 85%; text-align: justify; margin: auto; clear: both"> 3 <div> 4 <h1 th:text="${disc.getTitle()}" style="width: 80%; float: left"></h1> 5 </div> 6 <hr><br><br> 7 <div> 8 <h5 th:text="${disc.getText()}" style="width: 90%; margin: auto; background-color: lightblue; border-radius: 4px; padding: 20px"></h5> 9 </div> 10 <br><br><br> 11 <h6 style="width: 60%; float:left;"> 12 <span th:text="${'Поставено од: '+disc.getUser().getUsername()}"></span> 13 <span th:text="${', на датум '+ disc.getDate()}"></span> 14 <br> 15 <span>Поставено за </span> 16 <span th:text="${disc.getMovie() != null ? 'Филмот ' + disc.getMovie().getTitle() : 'Актерот ' + disc.getPerson().getName() + ' ' + disc.getPerson().getSurname()}" ></span> 17 </h6> 18 <div style="float: right" sec:authorize="isAuthenticated()"> 19 <a th:if="${disc.getUser().equals(user)}" class="btn btn-warning" th:href="@{'/discussions/add/{id}' (id=${disc.getDiscussionId()})}">Промени</a> 20 <a th:if="${disc.getUser().equals(user)}" class="btn btn-danger button-delete-discussion" th:discussion-id="${disc.getDiscussionId()}">Избриши</a> 21 <a class="btn btn-success" th:href="@{'/replies/add/{discussionId}' (discussionId=${disc.getDiscussionId()})}">Реплицирај</a> 22 </div> 23 </div> 24 <table class="table table-striped" style="width: 70%; margin: auto;"> 10 25 <thead> 11 26 <tr> 12 13 <th scope="col">Опис</th> 14 <th scope="col">Датум</th> 15 <th scope="col">Корисник</th> 27 <th scope="col">Реплика</th> 28 <th scope="col">Поставена на</th> 29 <th scope="col">Поставена од</th> 16 30 <th:block sec:authorize="isAuthenticated()"> 17 18 31 <th scope="col"></th> 19 32 <th scope="col"></th> 20 33 </th:block> 21 22 34 </tr> 23 35 </thead> … … 27 39 <td th:text="${reply.getDate()}"></td> 28 40 <td th:text="${reply.getUser().getUsername()}"></td> 29 <td th:if="${reply.getUser().equals(user)}"><a class="btn btn-primary" th:href="@{'/replies/edit/{discussionId}/{replyId}' (discussionId=${disc.getDiscussionId()},replyId=${reply.getReplyId()})}">Промени</a> </td> 30 <td th:if="${reply.getUser().equals(user)}"><a class="btn btn-primary button-delete-reply" th:reply-id="${reply.getReplyId()}" th:dicsussion-id="${disc.getDiscussionId()}">Избриши</a> </td> 31 41 <td th:if="${reply.getUser().equals(user)}"><a class="btn btn-warning" th:href="@{'/replies/edit/{discussionId}/{replyId}' (discussionId=${disc.getDiscussionId()},replyId=${reply.getReplyId()})}">Промени</a> </td> 42 <td th:if="${reply.getUser().equals(user)}"><a class="btn btn-danger button-delete-reply" th:reply-id="${reply.getReplyId()}" th:dicsussion-id="${disc.getDiscussionId()}">Избриши</a> </td> 32 43 <th:block sec:authorize="isAuthenticated()"> 33 <td th:if="${!reply.getUser().equals(user)}"><a class="btn btn-primary" th:href="@{'/replies/add/{discussionId}' (discussionId=${disc.getDiscussionId()})}">Реплицирај</a> </td>34 44 <td th:if="${!reply.getUser().equals(user)}"> 35 <a class="btn btn- primary">Ми се допаѓа</a>36 <a class="btn btn- primary">Не ми се допаѓа</a>45 <a class="btn btn-success">👍 </a> 46 <a class="btn btn-danger">👎</a> 37 47 </td> 38 48 </th:block> 39 40 41 49 </tr> 42 50 </tbody> -
src/main/resources/templates/discussionForType.html
r5b447b0 r42d565b 8 8 <thead> 9 9 <tr> 10 <th scope="col">Наменета</th>11 10 <th scope="col">Наслов</th> 12 11 <th scope="col">Опис</th> … … 26 25 <tbody> 27 26 <tr th:each="disc : ${discussions}" class="movie"> 28 <td th:text="${disc.getMovie() != null ? disc.getMovie().getTitle() : disc.getPerson().getName() + ' ' + disc.getPerson().getSurname()}"></td> 29 <td th:text="${disc.getTitle()}"></td> 27 <td> 28 <a th:text="${disc.getTitle()}" th:href="@{'/discussions/{id}' (id=${disc.getDiscussionId()})}"></a> 29 </td> 30 30 <td th:text="${disc.getText()}"></td> 31 31 <td th:text="${disc.getDate()}"></td> 32 32 <td th:text="${disc.getUser().getUsername()}"></td> 33 <td th:if="${disc.getUser().equals(user)}"><a class="btn btn- primary" th:href="@{'/discussions/add/{id}' (id=${disc.getDiscussionId()})}">Промени</a> </td>34 <td th:if="${disc.getUser().equals(user)}"><a class="btn btn- primarybutton-delete-discussion" th:discussion-id="${disc.getDiscussionId()}">Избриши</a> </td>33 <td th:if="${disc.getUser().equals(user)}"><a class="btn btn-warning" th:href="@{'/discussions/add/{id}' (id=${disc.getDiscussionId()})}">Измени</a> </td> 34 <td th:if="${disc.getUser().equals(user)}"><a class="btn btn-danger button-delete-discussion" th:discussion-id="${disc.getDiscussionId()}">Избриши</a> </td> 35 35 36 36 <th:block sec:authorize="isAuthenticated()"> 37 <td th:if="${!disc.getUser().equals(user)}"><a class="btn btn- primary" th:href="@{'/replies/add/{discussionId}' (discussionId=${disc.getDiscussionId()})}">Реплицирај</a> </td>37 <td th:if="${!disc.getUser().equals(user)}"><a class="btn btn-success" th:href="@{'/replies/add/{discussionId}' (discussionId=${disc.getDiscussionId()})}">Реплицирај</a> </td> 38 38 <td th:if="${!disc.getUser().equals(user)}"> 39 <a class="btn btn- primary">Ми се допаѓа</a>40 <a class="btn btn- primary">Не ми се допаѓа</a>39 <a class="btn btn-success">👍 </a> 40 <a class="btn btn-danger">👎</a> 41 41 </td> 42 42 </th:block> -
src/main/resources/templates/discussionsList.html
r5b447b0 r42d565b 10 10 <thead> 11 11 <tr> 12 <th scope="col">Наменета</th>13 12 <th scope="col">Наслов</th> 14 13 <th scope="col">Опис</th> … … 29 28 <tr th:each="disc : ${discussions}" class="movie"> 30 29 <td th:text="${disc.getMovie() != null ? disc.getMovie().getTitle() : disc.getPerson().getName() + ' ' + disc.getPerson().getSurname()}"></td> 31 <td th:text="${disc.getTitle()}"></td> 30 <td> 31 <a th:text="${disc.getTitle()}" th:href="@{'/discussions/{id}' (id=${disc.getDiscussionId()})}"></a> 32 </td> 32 33 <td th:text="${disc.getText()}"></td> 33 34 <td th:text="${disc.getDate()}"></td> 34 35 <td th:text="${disc.getUser().getUsername()}"></td> 35 <td th:if="${disc.getUser().equals(user)}"><a class="btn btn- primary" th:href="@{'/discussions/add/{id}' (id=${disc.getDiscussionId()})}">Промени</a> </td>36 <td th:if="${disc.getUser().equals(user)}"><a class="btn btn- primarybutton-delete-discussion" th:discussion-id="${disc.getDiscussionId()}">Избриши</a> </td>36 <td th:if="${disc.getUser().equals(user)}"><a class="btn btn-warning" th:href="@{'/discussions/add/{id}' (id=${disc.getDiscussionId()})}">Измени</a> </td> 37 <td th:if="${disc.getUser().equals(user)}"><a class="btn btn-danger button-delete-discussion" th:discussion-id="${disc.getDiscussionId()}">Избриши</a> </td> 37 38 38 39 <th:block sec:authorize="isAuthenticated()"> 39 <td th:if="${!disc.getUser().equals(user)}"><a class="btn btn- primary" th:href="@{'/replies/add/{discussionId}' (discussionId=${disc.getDiscussionId()})}">Реплицирај</a> </td>40 <td th:if="${!disc.getUser().equals(user)}"><a class="btn btn-success" th:href="@{'/replies/add/{discussionId}' (discussionId=${disc.getDiscussionId()})}">Реплицирај</a> </td> 40 41 <td th:if="${!disc.getUser().equals(user)}"> 41 <a class="btn btn- primary">Ми се допаѓа</a>42 <a class="btn btn- primary">Не ми се допаѓа</a>42 <a class="btn btn-success">👍 </a> 43 <a class="btn btn-danger">👎</a> 43 44 </td> 44 45 </th:block> -
src/main/resources/templates/favoriteList.html
r5b447b0 r42d565b 1 <div class="container mb-4"> 2 <div class="row"> 1 <div class="container mb-4" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.w3.org/1999/xhtml"> 2 <div class="row" th:each="row: ${movie_rows}" > 3 <div class="col-md-3" th:each="movie: ${row}" > 4 <a class="card-text-center" th:href="@{'/movies/{id}' (id=${movie.getMovieId()})}" > 5 <div class="card-body card bg-image" th:style="'background:url(' + ${movie.getImageUrl()} + ') no-repeat center #eee;'"> 6 <h3 class="card-title title" th:text="${movie.getTitle()}"></h3> 7 <h3 class="card-text bottom" th:text="${'Rated '+movie.getImdbRating()}"></h3> 8 </div> 9 </a> 10 </div> 11 </div> 12 13 <!--<div class="row"> 3 14 <div class="col-12" th:if="${movies.size() > 0}"> 4 15 <div class="table-responsive"> … … 39 50 </div> 40 51 </div> 41 </div> 52 </div>--> 42 53 </div> -
src/main/resources/templates/fragments/header.html
r5b447b0 r42d565b 2 2 <nav class="navbar navbar-expand-md navbar-dark bg-dark"> 3 3 <div class="container"> 4 <a class="navbar-brand" href="/ ">Форум за филмови</a>4 <a class="navbar-brand" href="/movies">Форум за филмови</a> 5 5 <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" 6 6 aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation"> … … 16 16 </li> 17 17 <li class="nav-item m-auto"> 18 <a class="nav-link active" href="/directors"> Директори</a>18 <a class="nav-link active" href="/directors">Режисери</a> 19 19 </li> 20 20 <li class="nav-item m-auto"> -
src/main/resources/templates/fragments/searchBarGenre.html
r5b447b0 r42d565b 1 1 <div> 2 <label for="searchGenre" >жанр</label>2 <label for="searchGenre" style="width: 150px;">Пребарај по жанр</label> 3 3 <input id="searchGenre" type="text" placeholder="жанр"> 4 4 <button class="search-button">Пребарај</button> -
src/main/resources/templates/fragments/searchBarName.html
r5b447b0 r42d565b 1 1 <div> 2 <label for="searchTitle" >Прабарај по име</label>2 <label for="searchTitle" style="width: 150px;">Прабарај по име</label> 3 3 <input id="searchTitle" type="text" placeholder="име"> 4 4 <button class="search-button-title">Пребарај</button> -
src/main/resources/templates/moviesList.html
r5b447b0 r42d565b 1 1 <div xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.w3.org/1999/xhtml"> 2 <div th:replace="fragments/searchBarGenre">3 2 3 <div style="width: 70%; margin: auto"> 4 <div th:replace="fragments/searchBarName"></div> 5 <div th:replace="fragments/searchBarGenre"></div> 4 6 </div> 5 7 … … 9 11 10 12 <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"> 11 29 <div class="row"> 12 30 <div class="col-12" th:if="${movies.size() > 0}"> … … 19 37 <th scope="col">Датум издавање</th> 20 38 <th scope="col">Допаѓања</th> 21 <th scope="col"> Занрови</th>39 <th scope="col">Жанрови</th> 22 40 <th scope="col">Актери</th> 23 41 <th scope="col">Режисер</th> … … 37 55 <tbody> 38 56 <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> 40 58 <td th:text="${movie.getDescription()}"></td> 41 59 <td th:text="${movie.getAiringDate()}"></td> … … 47 65 </td> 48 66 <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> 50 70 </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> 52 77 <td> 53 78 <a class="btn btn-primary" th:href="@{'discussions/all/{id}?type=M' (id=${movie.getMovieId()})}" >Прегледај дискусии</a> … … 55 80 <th:block sec:authorize="isAuthenticated()"> 56 81 <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> 60 84 </td> 61 85 <td> 62 <a class="btn btn- primarybutton-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> 63 87 </td> 64 88 <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> 66 90 </td> 67 91 <td> 68 <a class="btn btn- primarybutton-delete-movie" th:movie-id="${movie.getMovieId()}">Избриши филм</a>92 <a class="btn btn-danger button-delete-movie" th:movie-id="${movie.getMovieId()}">Избриши филм</a> 69 93 </td> 70 94 </th:block> … … 75 99 </div> 76 100 </div> 77 </div> 101 </div>--> 78 102 79 103 </div> -
src/main/resources/templates/personsList.html
r5b447b0 r42d565b 12 12 <tr> 13 13 <th scope="col">Име</th> 14 < th scope="col">Презиме</th>14 <!--<th scope="col">Презиме</th>--> 15 15 <th scope="col">Датум рагање</th> 16 < th scope="col">Опис</th>16 <!--<th scope="col">Опис</th>--> 17 17 <!-- <th scope="col">Занрови</th>--> 18 18 <th scope="col">Слика</th> … … 31 31 <tbody> 32 32 <tr th:each="person : ${persons}" class="elements"> 33 <td th:text="${person.getName()}"></td>34 < td th:text="${person.getSurname()}"></td>33 <td><a th:href="@{'/persons/{id}' (id=${person.getPersonId()})}" th:text="${person.getName() + ' ' + person.getSurname()}"></a></td> 34 <!--<td th:text="${person.getSurname()}"></td>--> 35 35 <td th:text="${person.getDateOfBirth()}"></td> 36 < td th:text="${person.getDescription()}"></td>36 <!--<td th:text="${person.getDescription()}"></td>--> 37 37 38 38 <!-- <td>--> -
src/main/resources/templates/template.html
r5b447b0 r42d565b 3 3 <head> 4 4 <meta charset="UTF-8"/> 5 <title> Products</title>5 <title>weDiscussMovies</title> 6 6 <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> 7 7 <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script> … … 18 18 <section class="jumbotron text-center"> 19 19 <div class="container"> 20 < h1 class="jumbotron-heading">WEB PROGRAMMING SHOP</h1>21 <h 3 class="jumbotron-heading">All products</h3>20 <!--<img th:src="@{/img/logo.png}" style="opacity: 0.3; z-index: 5; position: absolute; margin: auto; height: 225px; width: auto; left: 42%; top: 2%">--> 21 <h1 class="jumbotron-heading" style="z-index: -1">weDiscussMovies</h1> 22 22 </div> 23 23 </section> … … 27 27 <h1 class="danger" th:text="${error?.toString()}"></h1> 28 28 </div> 29 <div th:replace="fragments/searchBarName"></div>30 29 <section th:include="${contentTemplate}"></section> 31 30 <div id="dialog-rating" style="display: none">
Note:
See TracChangeset
for help on using the changeset viewer.