Index: src/main/resources/templates/discussion.html
===================================================================
--- src/main/resources/templates/discussion.html	(revision 5b447b0d2e718cbed66c944e78e18dd0a5d8bbe3)
+++ src/main/resources/templates/discussion.html	(revision 5b447b0d2e718cbed66c944e78e18dd0a5d8bbe3)
@@ -0,0 +1,44 @@
+<div xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.w3.org/1999/xhtml">
+    <div th:text="${disc.getMovie() != null ? disc.getMovie().getTitle() : disc.getPerson().getName() + ' ' + disc.getPerson().getSurname()}"></div>
+    <div th:text="${disc.getTitle()}"></div>
+    <div th:text="${disc.getText()}"></div>
+    <div th:text="${disc.getDate()}"></div>
+    <div th:text="${disc.getUser().getUsername()}"></div>
+    <div th:if="${disc.getUser().equals(user)}"><a class="btn btn-primary" th:href="@{'/discussions/add/{id}' (id=${disc.getDiscussionId()})}">Промени</a> </div>
+    <div th:if="${disc.getUser().equals(user)}"><a class="btn btn-primary button-delete-discussion" th:discussion-id="${disc.getDiscussionId()}">Избриши</a> </div>
+    <table class="table table-striped">
+        <thead>
+        <tr>
+
+            <th scope="col">Опис</th>
+            <th scope="col">Датум</th>
+            <th scope="col">Корисник</th>
+            <th:block  sec:authorize="isAuthenticated()">
+
+                <th scope="col"></th>
+                <th scope="col"></th>
+            </th:block>
+
+        </tr>
+        </thead>
+        <tbody>
+        <tr th:each="reply : ${replies}" class="movie">
+            <td th:text="${reply.getText()}"></td>
+            <td th:text="${reply.getDate()}"></td>
+            <td th:text="${reply.getUser().getUsername()}"></td>
+            <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>
+            <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>
+
+            <th:block sec:authorize="isAuthenticated()">
+                <td th:if="${!reply.getUser().equals(user)}"><a class="btn btn-primary" th:href="@{'/replies/add/{discussionId}' (discussionId=${disc.getDiscussionId()})}">Реплицирај</a> </td>
+                <td th:if="${!reply.getUser().equals(user)}">
+                    <a class="btn btn-primary">Ми се допаѓа</a>
+                    <a class="btn btn-primary">Не ми се допаѓа</a>
+                </td>
+            </th:block>
+
+
+        </tr>
+        </tbody>
+    </table>
+</div>
Index: src/main/resources/templates/discussionForType.html
===================================================================
--- src/main/resources/templates/discussionForType.html	(revision 5b447b0d2e718cbed66c944e78e18dd0a5d8bbe3)
+++ src/main/resources/templates/discussionForType.html	(revision 5b447b0d2e718cbed66c944e78e18dd0a5d8bbe3)
@@ -0,0 +1,53 @@
+<div xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.w3.org/1999/xhtml">
+
+    <div class="container mb-4">
+        <div class="row">
+            <div class="col-12" th:if="${discussions.size() > 0}">
+                <div class="table-responsive">
+                    <table class="table table-striped">
+                        <thead>
+                        <tr>
+                            <th scope="col">Наменета</th>
+                            <th scope="col">Наслов</th>
+                            <th scope="col">Опис</th>
+                            <th scope="col">Датум</th>
+                            <th scope="col">Корисник</th>
+                            <th:block  sec:authorize="isAuthenticated()">
+                                <th:block>
+                                    <th scope="col"></th>
+                                    <th scope="col"></th>
+                                </th:block>
+                                <th scope="col"></th>
+                                <th scope="col"></th>
+                            </th:block>
+
+                        </tr>
+                        </thead>
+                        <tbody>
+                        <tr th:each="disc : ${discussions}" class="movie">
+                            <td th:text="${disc.getMovie() != null ? disc.getMovie().getTitle() : disc.getPerson().getName() + ' ' + disc.getPerson().getSurname()}"></td>
+                            <td th:text="${disc.getTitle()}"></td>
+                            <td th:text="${disc.getText()}"></td>
+                            <td th:text="${disc.getDate()}"></td>
+                            <td th:text="${disc.getUser().getUsername()}"></td>
+                            <td th:if="${disc.getUser().equals(user)}"><a class="btn btn-primary" th:href="@{'/discussions/add/{id}' (id=${disc.getDiscussionId()})}">Промени</a> </td>
+                            <td th:if="${disc.getUser().equals(user)}"><a class="btn btn-primary button-delete-discussion" th:discussion-id="${disc.getDiscussionId()}">Избриши</a> </td>
+
+                            <th:block sec:authorize="isAuthenticated()">
+                                <td th:if="${!disc.getUser().equals(user)}"><a class="btn btn-primary" th:href="@{'/replies/add/{discussionId}' (discussionId=${disc.getDiscussionId()})}">Реплицирај</a> </td>
+                                <td th:if="${!disc.getUser().equals(user)}">
+                                    <a class="btn btn-primary">Ми се допаѓа</a>
+                                    <a class="btn btn-primary">Не ми се допаѓа</a>
+                                </td>
+                            </th:block>
+
+
+                        </tr>
+                        </tbody>
+                    </table>
+                </div>
+            </div>
+        </div>
+    </div>
+
+</div>
Index: src/main/resources/templates/discussionsAdd.html
===================================================================
--- src/main/resources/templates/discussionsAdd.html	(revision 5b447b0d2e718cbed66c944e78e18dd0a5d8bbe3)
+++ src/main/resources/templates/discussionsAdd.html	(revision 5b447b0d2e718cbed66c944e78e18dd0a5d8bbe3)
@@ -0,0 +1,72 @@
+<main xmlns:th="http://www.thymeleaf.org">
+
+    <div class="container">
+        <div class="row">
+            <div class="col-md-5">
+                <form th:action="@{'/discussions/save/{discussionId}' (discussionId = ${discussion?.getDiscussionId()})}" method="POST">
+                    <div class="form-group">
+
+                        <label for="title">Наслов</label>
+                        <input type="text"
+                               class="form-control"
+                               id="title"
+                               name="title"
+                               th:value="${discussion?.getTitle()}"
+                               required
+                               placeholder="Наслов">
+                    </div>
+                    <div class="form-group">
+                        <label for="text">Опис</label>
+                        <input type="text"
+                               class="form-control"
+                               id="text"
+                               name="text"
+                               th:value="${discussion?.getText()}"
+                               multiple
+                               placeholder="Опис">
+                    </div>
+
+                    <div>
+                        <input type="radio"
+                               class="form-control discussion-type"
+                               name="type"
+                               th:value="M"
+                               th:text="Филм"
+                               th:checked="${discussion?.getType() != null && discussion.getType().toString().equals('M')}"
+
+                        >
+                        <input type="radio"
+                               class="form-control discussion-type"
+                               name="type"
+                               th:value="P"
+                               th:text="Личност"
+                               th:checked="${discussion?.getType() != null && discussion.getType().toString().equals('P')}">
+                    </div>
+
+
+
+
+                    <div class="form-group">
+                        <select name="idDiscussed" class="selected-discussion">
+                            <option></option>
+                            <option class="movies-discussion" th:each="movie:${movies}" th:value="${movie.getMovieId()}"
+                                    th:text="${movie.getTitle()}"
+                                    th:selected="${discussion?.getMovie()?.equals(movie)}"></option>
+
+                            <option class="persons-discussion" th:each="person:${persons}" th:value="${person.getPersonId()}"
+                                    th:text="${person.getName() + ' ' + person.getSurname()}"
+                                    th:selected="${discussion?.getPerson()?.equals(person)}"></option>
+
+                        </select>
+                    </div>
+
+
+                    <button id="submit" type="submit" class="btn btn-primary">Submit</button>
+                    <a type="button" class="btn btn-primary" th:href="@{/discussions}">Back</a>
+                </form>
+            </div>
+        </div>
+    </div>
+
+
+</main>
Index: src/main/resources/templates/discussionsList.html
===================================================================
--- src/main/resources/templates/discussionsList.html	(revision 5b447b0d2e718cbed66c944e78e18dd0a5d8bbe3)
+++ src/main/resources/templates/discussionsList.html	(revision 5b447b0d2e718cbed66c944e78e18dd0a5d8bbe3)
@@ -0,0 +1,55 @@
+<div xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.w3.org/1999/xhtml">
+    <div class="container mb-4">
+        <a sec:authorize="isAuthenticated()" th:href="@{/discussions/add}">Додади нова дискусија</a>
+    </div>
+    <div class="container mb-4">
+        <div class="row">
+            <div class="col-12" th:if="${discussions.size() > 0}">
+                <div class="table-responsive">
+                    <table class="table table-striped">
+                        <thead>
+                        <tr>
+                            <th scope="col">Наменета</th>
+                            <th scope="col">Наслов</th>
+                            <th scope="col">Опис</th>
+                            <th scope="col">Датум</th>
+                            <th scope="col">Корисник</th>
+                            <th:block  sec:authorize="isAuthenticated()">
+                                <th:block>
+                                    <th scope="col"></th>
+                                    <th scope="col"></th>
+                                </th:block>
+                            <th scope="col"></th>
+                            <th scope="col"></th>
+                            </th:block>
+
+                        </tr>
+                        </thead>
+                        <tbody>
+                        <tr th:each="disc : ${discussions}" class="movie">
+                            <td th:text="${disc.getMovie() != null ? disc.getMovie().getTitle() : disc.getPerson().getName() + ' ' + disc.getPerson().getSurname()}"></td>
+                            <td th:text="${disc.getTitle()}"></td>
+                            <td th:text="${disc.getText()}"></td>
+                            <td th:text="${disc.getDate()}"></td>
+                            <td th:text="${disc.getUser().getUsername()}"></td>
+                            <td th:if="${disc.getUser().equals(user)}"><a class="btn btn-primary" th:href="@{'/discussions/add/{id}' (id=${disc.getDiscussionId()})}">Промени</a> </td>
+                            <td th:if="${disc.getUser().equals(user)}"><a class="btn btn-primary button-delete-discussion" th:discussion-id="${disc.getDiscussionId()}">Избриши</a> </td>
+
+                            <th:block sec:authorize="isAuthenticated()">
+                            <td th:if="${!disc.getUser().equals(user)}"><a class="btn btn-primary" th:href="@{'/replies/add/{discussionId}' (discussionId=${disc.getDiscussionId()})}">Реплицирај</a> </td>
+                            <td th:if="${!disc.getUser().equals(user)}">
+                                <a class="btn btn-primary">Ми се допаѓа</a>
+                                <a class="btn btn-primary">Не ми се допаѓа</a>
+                            </td>
+                            </th:block>
+
+
+                        </tr>
+                        </tbody>
+                    </table>
+                </div>
+            </div>
+        </div>
+    </div>
+
+</div>
Index: src/main/resources/templates/favoriteList.html
===================================================================
--- src/main/resources/templates/favoriteList.html	(revision 5b447b0d2e718cbed66c944e78e18dd0a5d8bbe3)
+++ src/main/resources/templates/favoriteList.html	(revision 5b447b0d2e718cbed66c944e78e18dd0a5d8bbe3)
@@ -0,0 +1,42 @@
+<div class="container mb-4">
+    <div class="row">
+        <div class="col-12" th:if="${movies.size() > 0}">
+            <div class="table-responsive">
+                <table class="table table-striped">
+                    <thead>
+                    <tr>
+                        <th scope="col">Наслов</th>
+                        <th scope="col">Опис</th>
+                        <th scope="col">Датум издавање</th>
+                        <th scope="col">Допаѓања</th>
+                        <th scope="col">Занрови</th>
+                        <th scope="col">Актери</th>
+                        <th scope="col">Режисер</th>
+
+
+
+                    </tr>
+                    </thead>
+                    <tbody>
+                    <tr th:each="movie : ${movies}" class="elements">
+                        <td th:text="${movie.getTitle()}"></td>
+                        <td th:text="${movie.getDescription()}"></td>
+                        <td th:text="${movie.getAiringDate()}"></td>
+                        <td th:text="${movie.getLikes() != null  ? movie.getLikes().size() : 0}">
+
+                        </td>
+                        <td class="genre">
+                            <div th:each="g: ${movie.getGenres()}" th:text="${g.getGenre().genreType }"></div>
+                        </td>
+                        <td>
+                            <div th:each="a: ${movie.getActors()}" th:text="${a.getPerson().getName()} "></div>
+                        </td>
+                        <td th:text="${movie.getDirector() != null ? movie.getDirector()?.getName() + ' '+ movie.getDirector()?.getSurname() : 'Не е додаен директор'}"></td>
+
+                    </tr>
+                    </tbody>
+                </table>
+            </div>
+        </div>
+    </div>
+</div>
Index: src/main/resources/templates/fragments/header.html
===================================================================
--- src/main/resources/templates/fragments/header.html	(revision 5b447b0d2e718cbed66c944e78e18dd0a5d8bbe3)
+++ src/main/resources/templates/fragments/header.html	(revision 5b447b0d2e718cbed66c944e78e18dd0a5d8bbe3)
@@ -0,0 +1,64 @@
+<header xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.w3.org/1999/xhtml">
+    <nav class="navbar navbar-expand-md navbar-dark bg-dark">
+        <div class="container">
+            <a class="navbar-brand" href="/">Форум за филмови</a>
+            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault"
+                    aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
+                <span class="navbar-toggler-icon"></span>
+            </button>
+            <div class="collapse navbar-collapse justify-content-end" id="navbarsExampleDefault">
+                <ul class="navbar-nav m-auto">
+                    <li class="nav-item m-auto">
+                        <a class="nav-link active" href="/movies">Филмови</a>
+                    </li>
+                    <li class="nav-item m-auto">
+                        <a class="nav-link active" href="/actors">Актери</a>
+                    </li>
+                    <li class="nav-item m-auto">
+                        <a class="nav-link active" href="/directors">Директори</a>
+                    </li>
+                    <li class="nav-item m-auto">
+                        <a class="nav-link active" href="/discussions">Дискусии</a>
+                    </li>
+                    <li class="nav-item m-auto">
+                        <a class="nav-link active" href="/genres">Жанрови</a>
+                    </li>
+                    <li class="nav-item m-auto" sec:authorize="isAuthenticated()">
+                        <a class="nav-link active" href="/favoriteList">Омилена листа</a>
+                    </li>
+                </ul>
+                <form class="form-inline my-2 my-lg-0">
+                    <div class="input-group input-group-sm">
+                        <input type="text" class="form-control" aria-label="Small"
+                               aria-describedby="inputGroup-sizing-sm"
+                               placeholder="Search...">
+                        <div class="input-group-append">
+                            <button type="button" class="btn btn-secondary btn-number">
+                                <i class="fa fa-search"></i>
+                            </button>
+                        </div>
+                    </div>
+                </form>
+                <ul class="nav navbar-nav navbar-right">
+                    <li class="nav-item" sec:authorize="isAuthenticated()">
+                        <a class="nav-link" href="#">
+                            <th:block th:if="${#request.getRemoteUser() != null}"
+                                      th:text="${#request.getRemoteUser()}"></th:block>
+                        </a>
+                    </li>
+
+                    <li class="nav-item" sec:authorize="isAuthenticated()">
+                        <a class="btn btn-light btn-sm ml-3" href="/logout">
+                            <i class="fa fa-shopping-cart"></i> Одјави се
+                        </a>
+                    </li>
+                    <li class="nav-item" sec:authorize="!isAuthenticated()">
+                        <a class="btn btn-light btn-sm ml-3" href="/login">
+                            <i class="fa fa-shopping-cart"></i> Најави се
+                        </a>
+                    </li>
+                </ul>
+            </div>
+        </div>
+    </nav>
+</header>
Index: src/main/resources/templates/fragments/searchBarGenre.html
===================================================================
--- src/main/resources/templates/fragments/searchBarGenre.html	(revision 5b447b0d2e718cbed66c944e78e18dd0a5d8bbe3)
+++ src/main/resources/templates/fragments/searchBarGenre.html	(revision 5b447b0d2e718cbed66c944e78e18dd0a5d8bbe3)
@@ -0,0 +1,5 @@
+<div>
+      <label for="searchGenre">жанр</label>
+        <input id="searchGenre" type="text" placeholder="жанр">
+        <button class="search-button">Пребарај</button>
+</div>
Index: src/main/resources/templates/fragments/searchBarName.html
===================================================================
--- src/main/resources/templates/fragments/searchBarName.html	(revision 5b447b0d2e718cbed66c944e78e18dd0a5d8bbe3)
+++ src/main/resources/templates/fragments/searchBarName.html	(revision 5b447b0d2e718cbed66c944e78e18dd0a5d8bbe3)
@@ -0,0 +1,5 @@
+<div>
+    <label for="searchTitle">Прабарај по име</label>
+    <input id="searchTitle" type="text" placeholder="име">
+    <button class="search-button-title">Пребарај</button>
+</div>
Index: src/main/resources/templates/genres.html
===================================================================
--- src/main/resources/templates/genres.html	(revision 5b447b0d2e718cbed66c944e78e18dd0a5d8bbe3)
+++ src/main/resources/templates/genres.html	(revision 5b447b0d2e718cbed66c944e78e18dd0a5d8bbe3)
@@ -0,0 +1,23 @@
+<div class="container mb-4">
+  <div class="row">
+    <div class="col-12">
+      <div class="table-responsive">
+        <table class="table table-striped">
+          <thead>
+          <tr>
+            <th scope="col">Име</th>
+            <th scope="col">Лајкови</th>
+          </tr>
+          </thead>
+          <tbody>
+          <tr th:each="genre : ${genres}" class="elements">
+            <td th:text="${genre.getName()}"></td>
+            <td th:text="${genre.getLikes()}"></td>
+
+          </tr>
+          </tbody>
+        </table>
+      </div>
+    </div>
+  </div>
+</div>
Index: src/main/resources/templates/login.html
===================================================================
--- src/main/resources/templates/login.html	(revision 5b447b0d2e718cbed66c944e78e18dd0a5d8bbe3)
+++ src/main/resources/templates/login.html	(revision 5b447b0d2e718cbed66c944e78e18dd0a5d8bbe3)
@@ -0,0 +1,20 @@
+<div class="container" xmlns:th="http://www.thymeleaf.org">
+    <form class="form-signin mt-xl-5" method="post" action="/login">
+        <h2 class="form-signin-heading">Sign in</h2>
+        <p>
+            <label for="username" class="sr-only">Username</label>
+            <input type="text" id="username" name="username" class="form-control" placeholder="Username" required=""
+                   autofocus="">
+        </p>
+        <p>
+            <label for="password" class="sr-only">Password</label>
+            <input type="password" id="password" name="password" class="form-control" placeholder="Password"
+                   required="">
+        </p>
+
+        <div th:text="${param.error}" class="text-danger"></div>
+
+        <button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
+    </form>
+    <a th:href="@{/register}" class="btn btn-block btn-light">Register here</a>
+</div>
Index: src/main/resources/templates/moviesAdd.html
===================================================================
--- src/main/resources/templates/moviesAdd.html	(revision 5b447b0d2e718cbed66c944e78e18dd0a5d8bbe3)
+++ src/main/resources/templates/moviesAdd.html	(revision 5b447b0d2e718cbed66c944e78e18dd0a5d8bbe3)
@@ -0,0 +1,90 @@
+<main xmlns:th="http://www.thymeleaf.org">
+
+    <div class="container">
+        <div class="row">
+            <div class="col-md-5">
+                <form th:action="@{'/movies/save/{movieId}' (movieId = ${movie?.getMovieId()})}" method="POST">
+                    <div class="form-group">
+                        <label for="title">Наслов</label>
+                        <input type="text"
+                               class="form-control"
+                               id="title"
+                               name="title"
+                               th:value="${movie?.getTitle()}"
+                               required
+                               placeholder="Наслов">
+                    </div>
+                    <div class="form-group">
+                        <label for="description">Опис</label>
+                        <input type="text"
+                               multiple
+                               class="form-control"
+                               id="description"
+                               name="description"
+                               th:value="${movie?.getDescription()}"
+                               placeholder="Опис">
+                    </div>
+                    <div class="form-group">
+                        <label for="imageUrl">Слика</label>
+                        <input type="text"
+                               class="form-control"
+                               id="imageUrl"
+                               name="imageUrl"
+                               th:value="${movie?.getImageUrl()}"
+                               placeholder="Слика">
+                    </div>
+                    <div class="form-group">
+                        <label for="airingDate">Датум на издавање</label>
+                        <input type="date"
+                               class="form-control"
+                               id="airingDate"
+                               name="airingDate"
+                               th:value="${movie?.getAiringDate()}"
+                               placeholder="Датум на издавање">
+                    </div>
+                    <div class="form-group">
+                        <label for="rating">Рејтинг</label>
+                        <input type="number"
+                               step="0.01"
+                               class="form-control"
+                               id="rating"
+                               name="rating"
+                               th:value="${movie?.getImdbRating()}"
+                               placeholder="Рејтинг">
+                    </div>
+                    <div class="form-group">
+                        <select name="directorId">
+                            <option></option>
+                            <option th:each="dir:${directors}" th:value="${dir.getPersonId()}" th:text="${dir.getName() + ' ' + dir.getSurname()}"
+                            th:selected="${director?.equals(dir)}"></option>
+
+                        </select>
+                    </div>
+                    <div class="form-group">
+                        <select name="actors" multiple>
+                            <option></option>
+                            <option th:each="act:${actors}" th:value="${act.getPersonId()}"
+                                    th:text="${act.getName() + ' ' + act.getSurname()}"
+                                    th:selected="${movieActors?.contains(act)}"></option>
+
+                        </select>
+                    </div>
+                    <div class="form-group">
+                        <select name="genres" multiple>
+                            <option></option>
+                            <option th:each="genr:${genres}" th:value="${genr.getGenreId()}"
+                                    th:text="${genr.getGenreType()}"
+                                    th:selected="${movieGenres?.contains(genr)}"></option>
+
+                        </select>
+                    </div>
+
+                    <button id="submit" type="submit" class="btn btn-primary">Submit</button>
+                    <a type="button" class="btn btn-primary" href="/products">Back</a>
+                </form>
+            </div>
+        </div>
+    </div>
+
+
+</main>
Index: src/main/resources/templates/moviesList.html
===================================================================
--- src/main/resources/templates/moviesList.html	(revision 5b447b0d2e718cbed66c944e78e18dd0a5d8bbe3)
+++ src/main/resources/templates/moviesList.html	(revision 5b447b0d2e718cbed66c944e78e18dd0a5d8bbe3)
@@ -0,0 +1,79 @@
+<div xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.w3.org/1999/xhtml">
+    <div th:replace="fragments/searchBarGenre">
+
+    </div>
+
+    <div class="container mb-4">
+        <a  sec:authorize="isAuthenticated()" th:href="@{/movies/add}">Додади нов филм</a>
+    </div>
+
+    <div class="container mb-4">
+        <div class="row">
+            <div class="col-12" th:if="${movies.size() > 0}">
+                <div class="table-responsive">
+                    <table class="table table-striped">
+                        <thead>
+                        <tr>
+                            <th scope="col">Наслов</th>
+                            <th scope="col">Опис</th>
+                            <th scope="col">Датум издавање</th>
+                            <th scope="col">Допаѓања</th>
+                            <th scope="col">Занрови</th>
+                            <th scope="col">Актери</th>
+                            <th scope="col">Режисер</th>
+                            <th  scope="col"></th>
+
+                            <th:block sec:authorize="isAuthenticated()">
+                            <th scope="col"></th>
+                            <th scope="col"></th>
+                            <th scope="col"></th>
+                            <th scope="col"></th>
+                            </th:block>
+
+
+
+                        </tr>
+                        </thead>
+                        <tbody>
+                        <tr th:each="movie : ${movies}" class="elements">
+                            <td th:text="${movie.getTitle()}"></td>
+                            <td th:text="${movie.getDescription()}"></td>
+                            <td th:text="${movie.getAiringDate()}"></td>
+                            <td th:text="${movie.getLikes() != null  ? movie.getLikes().size() : 0}">
+
+                            </td>
+                            <td class="genre">
+                                <div th:each="g: ${movie.getGenres()}" th:text="${g.getGenre().genreType }"></div>
+                            </td>
+                            <td>
+                                <div th:each="a: ${movie.getActors()}" th:text="${a.getPerson().getName()} "></div>
+                            </td>
+                            <td th:text="${movie.getDirector() != null ? movie.getDirector()?.getName() + ' '+ movie.getDirector()?.getSurname() : 'Не е додаен директор'}"></td>
+                            <td>
+                                <a class="btn btn-primary" th:href="@{'discussions/all/{id}?type=M' (id=${movie.getMovieId()})}" >Прегледај дискусии</a>
+                            </td>
+                            <th:block sec:authorize="isAuthenticated()">
+                            <td>
+                                <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>
+                                <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>
+
+                            </td>
+                            <td>
+                                <a class="btn btn-primary button-add-grade-movie" th:movie-id="${movie.getMovieId()}">Остави оценка</a>
+                            </td>
+                            <td>
+                                <a class="btn btn-primary" th:href="@{'/movies/{id}/edit' (id=${movie.getMovieId()})}">Промени</a>
+                            </td>
+                            <td>
+                                <a class="btn btn-primary button-delete-movie" th:movie-id="${movie.getMovieId()}">Избриши филм</a>
+                            </td>
+                            </th:block>
+                        </tr>
+                        </tbody>
+                    </table>
+                </div>
+            </div>
+        </div>
+    </div>
+
+</div>
Index: src/main/resources/templates/personsAdd.html
===================================================================
--- src/main/resources/templates/personsAdd.html	(revision 5b447b0d2e718cbed66c944e78e18dd0a5d8bbe3)
+++ src/main/resources/templates/personsAdd.html	(revision 5b447b0d2e718cbed66c944e78e18dd0a5d8bbe3)
@@ -0,0 +1,99 @@
+<main xmlns:th="http://www.thymeleaf.org">
+
+    <div class="container">
+        <div class="row">
+            <div class="col-md-5">
+                <form th:action="@{'/persons/save/{personId}' (personId = ${person?.getPersonId()})}" method="POST">
+                    <div class="form-group">
+
+                        <label for="name">Име</label>
+                        <input type="text"
+                               class="form-control"
+                               id="name"
+                               name="name"
+                               th:value="${person?.getName()}"
+                               required
+                               placeholder="Име">
+                    </div>
+                    <div class="form-group">
+                        <label for="surname">Презиме</label>
+                        <input type="text"
+                               class="form-control"
+                               id="surname"
+                               name="surname"
+                               th:value="${person?.getSurname()}"
+                               placeholder="Презиме">
+                    </div>
+                    <div class="form-group">
+                        <label for="description">Опис</label>
+                        <input type="text"
+                               class="form-control"
+                               id="description"
+                               name="description"
+                               th:value="${person?.getDescription()}"
+                               placeholder="Опис">
+                    </div>
+                    <div>
+                        <input type="radio"
+                               class="form-control person-movies"
+                               name="type"
+                               th:value="A"
+                               th:text="Актер"
+                               th:checked="${person?.getType() != null && person.getType().toString().equals('A')}"
+
+                        >
+                        <input type="radio"
+                               class="form-control person-movies"
+                               name="type"
+                               th:value="D"
+                               th:text="Режисер"
+                               th:checked="${person?.getType() != null && person.getType().toString().equals('D') }">
+                    </div>
+                    <div class="form-group">
+                        <label for="imageUrl">Слика</label>
+                        <input type="text"
+                               class="form-control"
+                               id="imageUrl"
+                               name="imageUrl"
+                               th:value="${person?.getImageUrl()}"
+                               placeholder="Слика">
+                    </div>
+                    <div class="form-group">
+                        <label for="birthDate">Датум на раѓање</label>
+                        <input type="date"
+                               class="form-control"
+                               id="birthDate"
+                               name="birthDate"
+                               th:value="${person?.getDateOfBirth()}"
+                               placeholder="Датум на раѓање">
+                    </div>
+
+
+                    <div class="form-group">
+                        <select name="movieIds" multiple>
+                            <option></option>
+                            <option th:each="movie:${moviesActors}" th:value="${movie.getMovieId()}"
+                                    th:text="${movie.getTitle()}"
+                                    th:selected="${movieActors?.contains(movie)}"
+                                    th:hidden="${person != null && person.getType().toString()=='D'}"
+                            class="movies-actors"></option>
+
+                            <option th:each="movie:${moviesDirectors}" th:value="${movie.getMovieId()}"
+                                    th:text="${movie.getTitle()}"
+                                    th:selected="${movieActors?.contains(movie)}"
+                                    th:hidden="${person != null && person.getType().toString()=='A'}"
+                            class="movie-directors"></option>
+
+                        </select>
+                    </div>
+
+
+                    <button id="submit" type="submit" class="btn btn-primary">Submit</button>
+                    <a type="button" class="btn btn-primary" th:href="@{/actors}">Back</a>
+                </form>
+            </div>
+        </div>
+    </div>
+
+
+</main>
Index: src/main/resources/templates/personsList.html
===================================================================
--- src/main/resources/templates/personsList.html	(revision 5b447b0d2e718cbed66c944e78e18dd0a5d8bbe3)
+++ src/main/resources/templates/personsList.html	(revision 5b447b0d2e718cbed66c944e78e18dd0a5d8bbe3)
@@ -0,0 +1,69 @@
+<div xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.w3.org/1999/xhtml">
+
+    <div>
+        <a sec:authorize="isAuthenticated()" th:href="@{'persons/add'}">Додади актер или режисер</a>
+    </div>
+    <div class="container mb-4">
+        <div class="row">
+            <div class="col-12" th:if="${persons.size() > 0}">
+                <div class="table-responsive">
+                    <table class="table table-striped">
+                        <thead>
+                        <tr>
+                            <th scope="col">Име</th>
+                            <th scope="col">Презиме</th>
+                            <th scope="col">Датум рагање</th>
+                            <th scope="col">Опис</th>
+<!--                            <th scope="col">Занрови</th>-->
+                            <th scope="col">Слика</th>
+
+                            <th scope="col">Филмови</th>
+                            <th scope="col"></th>
+                            <th:block sec:authorize="isAuthenticated()">
+                            <th scope="col"></th>
+                            <th scope="col"></th>
+                                <th scope="col"></th>
+
+                            </th:block>
+
+                        </tr>
+                        </thead>
+                        <tbody>
+                        <tr th:each="person : ${persons}" class="elements">
+                            <td th:text="${person.getName()}"></td>
+                            <td th:text="${person.getSurname()}"></td>
+                            <td th:text="${person.getDateOfBirth()}"></td>
+                            <td th:text="${person.getDescription()}"></td>
+
+<!--                            <td>-->
+<!--                                <div th:each="g: ${person.getGenres()}" th:text="${g.getGenre().genreType }"></div>-->
+<!--                            </td>-->
+                            <td><img th:src="${person.getImageUrl()}" style="width: 20%; height: 20%"/></td>
+                            <td>
+                                <div th:each="m: ${person.getMovieActors().size() > 0 ? person.getMovieActors() : person.getMovies()}"
+                                     th:text="${m.getClass().getName() == 'com.wediscussmovies.project.model.relation.MovieActors'  ? m.getMovie().getTitle() : m.getTitle()} "></div>
+                            </td>
+                            <td> <a class="btn btn-primary" th:href="@{'discussions/all/{id}?type=P' (id=${person.getPersonId()})}" >Прегледај дискусии</a></td>
+                            <th:block sec:authorize="isAuthenticated()">
+                                <td>
+                                    <a class="btn btn-primary button-add-grade-person" th:person-id="${person.getPersonId()}">Остави оценка</a>
+
+                                </td>
+                            <td>
+                                <a class="btn btn-primary" th:href="@{'persons/edit/{personId}' (personId = ${person.getPersonId()})}">Промени</a>
+                            </td>
+                            <td>
+                                <a class="btn btn-primary button-delete-actor" th:person-id="${person.getPersonId()}">Избриши</a>
+
+                            </td>
+                            </th:block>
+
+                        </tr>
+                        </tbody>
+                    </table>
+                </div>
+            </div>
+        </div>
+    </div>
+
+</div>
Index: src/main/resources/templates/register.html
===================================================================
--- src/main/resources/templates/register.html	(revision 5b447b0d2e718cbed66c944e78e18dd0a5d8bbe3)
+++ src/main/resources/templates/register.html	(revision 5b447b0d2e718cbed66c944e78e18dd0a5d8bbe3)
@@ -0,0 +1,40 @@
+<div class="container">
+    <h1 th:text="${error?.toString()}"></h1>
+</div>
+<div class="container">
+    <form class="form-signin mt-xl-5" method="post" action="/register">
+        <h2 class="form-signin-heading">Register</h2>
+        <p>
+            <label for="email" class="sr-only">Емаил</label>
+            <input type="text" id="email" name="email" class="form-control" placeholder="Емаил" required=""
+                   autofocus="">
+        </p>
+        <p>
+            <label for="username" class="sr-only">Корисничко име</label>
+            <input type="text" id="username" name="username" class="form-control" placeholder="Корисничко име" required=""
+                   autofocus="">
+        </p>
+        <p>
+            <label for="password" class="sr-only">Лозинка</label>
+            <input type="password" id="password" name="password" class="form-control" placeholder="Лозинка"
+                   required="">
+        </p>
+        <p>
+            <label for="repeatedPassword" class="sr-only">Потврди лозинка</label>
+            <input type="password" id="repeatedPassword" name="repeatedPassword" class="form-control"
+                   placeholder="Потврди лозинка" required="">
+        </p>
+        <p>
+            <label for="name" class="sr-only">Име</label>
+            <input type="text" id="name" name="name" class="form-control" placeholder="Име" required="" autofocus="">
+        </p>
+        <p>
+            <label for="surname" class="sr-only">Презиме</label>
+            <input type="text" id="surname" name="surname" class="form-control" placeholder="Презиме" required=""
+                   autofocus="">
+        </p>
+
+        <button class="btn btn-lg btn-primary btn-block" type="submit">Регистрирај се</button>
+    </form>
+    <a href="/login" class="btn btn-block btn-light">Најави се</a>
+</div>
Index: src/main/resources/templates/repliesAdd.html
===================================================================
--- src/main/resources/templates/repliesAdd.html	(revision 5b447b0d2e718cbed66c944e78e18dd0a5d8bbe3)
+++ src/main/resources/templates/repliesAdd.html	(revision 5b447b0d2e718cbed66c944e78e18dd0a5d8bbe3)
@@ -0,0 +1,38 @@
+<main xmlns:th="http://www.thymeleaf.org">
+
+    <div class="container">
+        <div class="row">
+            <div class="col-md-5">
+                <form th:action="@{'/replies/save/{replyId}' (replyId = ${reply?.getReplyId()})}" method="POST">
+
+                    <div class="form-group">
+                        <label for="text">Опис</label>
+                        <input type="text"
+                               class="form-control"
+                               id="text"
+                               name="text"
+                               th:value="${reply?.getText()}"
+                               multiple
+                               placeholder="Опис">
+                    </div>
+                    <input type="hidden"
+                            id="discussionId"
+                           name="discussionId"
+                           th:value="${reply != null ? reply.getDiscussionId() : discussionId}"
+                    >
+
+
+
+
+
+
+
+                    <button id="submit" type="submit" class="btn btn-primary">Submit</button>
+                    <a type="button" class="btn btn-primary" th:href="@{/discussions}">Back</a>
+                </form>
+            </div>
+        </div>
+    </div>
+
+
+</main>
Index: src/main/resources/templates/template.html
===================================================================
--- src/main/resources/templates/template.html	(revision 5b447b0d2e718cbed66c944e78e18dd0a5d8bbe3)
+++ src/main/resources/templates/template.html	(revision 5b447b0d2e718cbed66c944e78e18dd0a5d8bbe3)
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
+<head>
+    <meta charset="UTF-8"/>
+    <title>Products</title>
+    <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">
+    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
+    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
+    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
+    <script type="text/javascript" th:src="@{/js/sharedScript.js}" src=""></script>
+    <script src="https://code.jquery.com/jquery-3.6.0.js"></script>
+    <script src="https://code.jquery.com/ui/1.13.0/jquery-ui.js"></script>
+    <link rel="stylesheet" href="//code.jquery.com/ui/1.13.0/themes/base/jquery-ui.css">
+
+    <link rel="stylesheet" th:href="@{/css/shared.css}" >
+</head>
+<body>
+<section class="jumbotron text-center">
+    <div class="container">
+        <h1 class="jumbotron-heading">WEB PROGRAMMING SHOP</h1>
+        <h3 class="jumbotron-heading">All products</h3>
+    </div>
+</section>
+
+<header th:replace="fragments/header"></header>
+<div class="container md-4">
+    <h1 class="danger" th:text="${error?.toString()}"></h1>
+</div>
+<div th:replace="fragments/searchBarName"></div>
+<section th:include="${contentTemplate}"></section>
+<div id="dialog-rating" style="display: none">
+    <label for="reason">Причина</label><textarea id="reason"></textarea>
+    <label for="grade">Рејтинг</label><input type="number" id="grade" max="10" min="5">
+</div>
+</body>
+</html>
+
+
