From c9302c8369909e0129743e41f96a39d3f3c18b85 Mon Sep 17 00:00:00 2001
From: "bojana.marojevikj" <bojana.marojevikj@finki.ukim.mk>
Date: Wed, 12 Mar 2025 11:35:17 +0100
Subject: [PATCH 1/2] 3 consultations default page size

---
 .../konsultacii/web/controllers/ConsultationsController.java  | 4 ++--
 src/main/resources/templates/fragments/irregularPaging.html   | 2 +-
 src/main/resources/templates/fragments/regularPaging.html     | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/main/java/mk/ukim/finki/konsultacii/web/controllers/ConsultationsController.java b/src/main/java/mk/ukim/finki/konsultacii/web/controllers/ConsultationsController.java
index 07fdd05..b943e17 100644
--- a/src/main/java/mk/ukim/finki/konsultacii/web/controllers/ConsultationsController.java
+++ b/src/main/java/mk/ukim/finki/konsultacii/web/controllers/ConsultationsController.java
@@ -77,9 +77,9 @@ public class ConsultationsController {
     @GetMapping(value = "/professor/{id}")
     public String getConsultationsByProfessor(@PathVariable("id") String professorId,
                                               @RequestParam(defaultValue = "1") Integer regularPageNum,
-                                              @RequestParam(defaultValue = "5") Integer regularResults,
+                                              @RequestParam(defaultValue = "3") Integer regularResults,
                                               @RequestParam(defaultValue = "1") Integer irregularPageNum,
-                                              @RequestParam(defaultValue = "5") Integer irregularResults,
+                                              @RequestParam(defaultValue = "3") Integer irregularResults,
                                               Model model) {
         String studentEmail = getStudentEmail();
         Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
diff --git a/src/main/resources/templates/fragments/irregularPaging.html b/src/main/resources/templates/fragments/irregularPaging.html
index cd56bc7..0e79ba1 100644
--- a/src/main/resources/templates/fragments/irregularPaging.html
+++ b/src/main/resources/templates/fragments/irregularPaging.html
@@ -36,12 +36,12 @@
                 <label for="results" class="mb-0">Резултати на страна: </label>
                 <select id="results" class="form-control custom-select" style="max-width: 100px;"
                         onchange="updateQueryStringParameter('irregularResults',this.value)">
+                    <option value="3" th:selected="${page.size == 3}">3</option>
                     <option value="5" th:selected="${page.size == 5}">5</option>
                     <option value="10" th:selected="${page.size == 10}">10</option>
                     <option value="20" th:selected="${page.size == 20}">20</option>
                     <option value="50" th:selected="${page.size == 50}">50</option>
                     <option value="100" th:selected="${page.size == 100}">100</option>
-                    <option value="1000" th:selected="${page.size == 1000}">1000</option>
                 </select>
                 <span class="ms-1 me-1"> / Р’РєСѓРїРЅРѕ: </span>
                 <b class="ms-1" th:text="${page.totalElements}"></b>
diff --git a/src/main/resources/templates/fragments/regularPaging.html b/src/main/resources/templates/fragments/regularPaging.html
index 2ac979f..a3157a2 100644
--- a/src/main/resources/templates/fragments/regularPaging.html
+++ b/src/main/resources/templates/fragments/regularPaging.html
@@ -36,12 +36,12 @@
                 <label for="results" class="mb-0">Резултати на страна: </label>
                 <select id="results" class="form-control custom-select" style="max-width: 100px;"
                         onchange="updateQueryStringParameter('regularResults',this.value)">
+                    <option value="3" th:selected="${page.size == 3}">3</option>
                     <option value="5" th:selected="${page.size == 5}">5</option>
                     <option value="10" th:selected="${page.size == 10}">10</option>
                     <option value="20" th:selected="${page.size == 20}">20</option>
                     <option value="50" th:selected="${page.size == 50}">50</option>
                     <option value="100" th:selected="${page.size == 100}">100</option>
-                    <option value="1000" th:selected="${page.size == 1000}">1000</option>
                 </select>
                 <span class="ms-1 me-1"> / Р’РєСѓРїРЅРѕ: </span>
                 <b class="ms-1" th:text="${page.totalElements}"></b>
-- 
GitLab


From 459946c508c60c2071ed548f83dd2c2ec61e09ea Mon Sep 17 00:00:00 2001
From: "bojana.marojevikj" <bojana.marojevikj@finki.ukim.mk>
Date: Wed, 12 Mar 2025 12:17:55 +0100
Subject: [PATCH 2/2] ui improvements

---
 .../static/css/studentsViewStyle.css          |   1 -
 .../consultationsDisplay/consultations.html   | 412 +++++++++---------
 .../templates/fragments/irregularPaging.html  |  20 +-
 .../templates/fragments/regularPaging.html    |  20 +-
 4 files changed, 226 insertions(+), 227 deletions(-)

diff --git a/src/main/resources/static/css/studentsViewStyle.css b/src/main/resources/static/css/studentsViewStyle.css
index aa256a8..a564aaa 100644
--- a/src/main/resources/static/css/studentsViewStyle.css
+++ b/src/main/resources/static/css/studentsViewStyle.css
@@ -320,7 +320,6 @@ footer {
 .consultations-type-modal {
     margin-top: 15px;
     margin-bottom: 15px;
-    font-size: 14px;
     color: #6e9cd2;
 }
 
diff --git a/src/main/resources/templates/consultationsDisplay/consultations.html b/src/main/resources/templates/consultationsDisplay/consultations.html
index b3362ba..bfd2dcc 100644
--- a/src/main/resources/templates/consultationsDisplay/consultations.html
+++ b/src/main/resources/templates/consultationsDisplay/consultations.html
@@ -28,302 +28,306 @@
         }
     </script>
 </head>
-<div class="mt-4" layout:fragment="content">
+<div class="mt-4 container" layout:fragment="content">
     <th:block xmlns:th="http://www.thymeleaf.org">
-        <div class="container lg mt-4">
+        <div class="mt-4">
             <div class="row">
                 <div class="col-12">
                     <div class="header">
-                        <h4 th:text="${professor.name}"></h4>
+                        <h3 th:text="${professor.name}"></h3>
                     </div>
                 </div>
             </div>
 
-            <div id="consultations">
-                <h6 class="consultations-type-modal">Редовни консултации</h6>
-                <div th:if="${#lists.isEmpty(regularPage.getContent())}">
-                    <p>Нема закажани консултации</p>
-                </div>
+            <div id="consultations" class="row">
+                <div class="col-12">
+                    <h5 class="consultations-type-modal">Редовни консултации</h5>
+                    <div th:if="${#lists.isEmpty(regularPage.getContent())}">
+                        <p>Нема закажани консултации</p>
+                    </div>
 
 
-                <div th:each="consultation : ${regularPage.getContent()}">
-                    <form action="/consultations/schedule" method="post"
-                          th:if="${consultationAttendanceMap[consultation.id] == null}">
-                        <input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
-                        <input type="hidden" name="professorId" th:value="${professor.id}"/>
-                        <div class="consultation-div mb-3 px-2 py-1">
-                            <div class="row">
-                                <div class="col-md-3 col-sm-12 col-12">
-                                    <div class="d-flex align-items-top">
+                    <div th:each="consultation : ${regularPage.getContent()}">
+                        <form action="/consultations/schedule" method="post"
+                              th:if="${consultationAttendanceMap[consultation.id] == null}">
+                            <input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
+                            <input type="hidden" name="professorId" th:value="${professor.id}"/>
+                            <div class="consultation-div mb-3 px-2 py-1">
+                                <div class="row">
+                                    <div class="col-md-3 col-sm-12 col-12">
+                                        <div class="d-flex align-items-top">
                                     <span><img class="consultation-logos mx-2" src="/images/consultation-logo-date.png"
                                                alt=""></span>
-                                        <p th:text="${consultation.oneTimeDate}+ ' (' + #{${consultation.getDayOfWeek().toString().toLowerCase()}} + ')'"
-                                           class="date mb-0 d-inline-block ml-2"></p>
-                                    </div>
-                                    <div class="d-flex align-items-top">
+                                            <p th:text="${consultation.oneTimeDate}+ ' (' + #{${consultation.getDayOfWeek().toString().toLowerCase()}} + ')'"
+                                               class="date mb-0 d-inline-block ml-2"></p>
+                                        </div>
+                                        <div class="d-flex align-items-top">
                                     <span><img class="consultation-logos mx-2" src="/images/consultation-logo-time.png"
                                                alt=""></span>
-                                        <p th:text="|${consultation.startTime} - ${consultation.endTime}|"
-                                           class="time mb-0 d-inline-block ml-2"></p>
-                                    </div>
-                                    <div th:unless="${consultation.online==null}" class="d-flex align-items-top">
+                                            <p th:text="|${consultation.startTime} - ${consultation.endTime}|"
+                                               class="time mb-0 d-inline-block ml-2"></p>
+                                        </div>
+                                        <div th:unless="${consultation.online==null}" class="d-flex align-items-top">
                                     <span><img class="consultation-logos mx-2"
                                                src="/images/consultation-logo-location.png" alt=""></span>
-                                        <p th:text="${consultation.room.type == 'VIRTUAL' ? 'Online' : consultation.room.name + (consultation.online ? ', Онлајн' : '')}"
-                                           class="room mb-0 d-inline-block ml-2"></p>
-                                    </div>
-                                    <div th:if="${consultation.online==null}" class="d-flex align-items-top">
+                                            <p th:text="${consultation.room.type == 'VIRTUAL' ? 'Online' : consultation.room.name + (consultation.online ? ', Онлајн' : '')}"
+                                               class="room mb-0 d-inline-block ml-2 text-break"></p>
+                                        </div>
+                                        <div th:if="${consultation.online==null}" class="d-flex align-items-top">
                                     <span><img class="consultation-logos mx-2"
                                                src="/images/consultation-logo-location.png" alt=""></span>
-                                        <p th:text="${consultation.room.type == 'VIRTUAL' ? 'Online' : consultation.room.name}"
-                                           class="room mb-0 d-inline-block ml-2"></p>
-                                    </div>
-                                    <div th:unless="${consultation.studentInstructions==null}"
-                                         class="d-flex align-items-top">
+                                            <p th:text="${consultation.room.type == 'VIRTUAL' ? 'Online' : consultation.room.name}"
+                                               class="room mb-0 d-inline-block ml-2"></p>
+                                        </div>
+                                        <div th:unless="${consultation.studentInstructions==null}"
+                                             class="d-flex align-items-top">
                                     <span><img class="consultation-logos mx-2"
                                                src="/images/consultation-logo-instructions.png" alt=""></span>
-                                        <p th:text="${consultation.studentInstructions}"
-                                           class="instructions mb-0 d-inline-block ml-2 text-break"></p>
+                                            <p th:text="${consultation.studentInstructions}"
+                                               class="instructions mb-0 d-inline-block ml-2 text-break"></p>
+                                        </div>
+                                        <div sec:authorize="hasAnyRole('ROLE_STUDENT')"
+                                             th:if="${consultationAvailability[consultation.id]}">
+                                            <button type="submit" class="custom-modal-button custom-button-text mx-2 mt-2 mb-1">
+                                                Пријави се
+                                            </button>
+                                        </div>
                                     </div>
-                                    <div sec:authorize="hasAnyRole('ROLE_STUDENT')"
-                                         th:if="${consultationAvailability[consultation.id]}">
-                                        <button type="submit" class="custom-modal-button custom-button-text mx-2 mt-2 mb-1">
-                                            Пријави се
-                                        </button>
-                                    </div>
-                                </div>
-                                <div class="col-md-9 col-sm-12 col-12">
-                                    <div>
+                                    <div class="col-md-9 col-sm-12 col-12">
+                                        <div>
                                     <textarea name="comment" class="form-control"
                                               placeholder="Коментар (максимум 1000 карактери)" maxlength="1000"
                                               rows="3"></textarea>
-                                        <p class="error-text-p"></p>
+                                            <p class="error-text-p"></p>
+                                        </div>
                                     </div>
                                 </div>
                             </div>
-                        </div>
-                        <input type="hidden" name="consultationTermId" th:value="${consultation.id}">
-                    </form>
+                            <input type="hidden" name="consultationTermId" th:value="${consultation.id}">
+                        </form>
 
 
-                    <div th:if="${consultationAttendanceMap[consultation.id] != null}">
-                        <div class="consultation-div mb-3 px-2 py-1">
-                            <div class="row">
-                                <div class="col-md-3 col-sm-12 col-12">
-                                    <div class="d-flex align-items-top">
+                        <div th:if="${consultationAttendanceMap[consultation.id] != null}">
+                            <div class="consultation-div mb-3 px-2 py-1">
+                                <div class="row">
+                                    <div class="col-md-3 col-sm-12 col-12">
+                                        <div class="d-flex align-items-top">
                                     <span><img class="consultation-logos mx-2" src="/images/consultation-logo-date.png"
                                                alt=""></span>
-                                        <p th:text="${consultation.oneTimeDate} + ' (' + #{${consultation.getDayOfWeek().toString().toLowerCase()}} + ')'"
-                                           class="date mb-0 d-inline-block ml-2"></p>
-                                    </div>
-                                    <div class="d-flex align-items-top">
+                                            <p th:text="${consultation.oneTimeDate} + ' (' + #{${consultation.getDayOfWeek().toString().toLowerCase()}} + ')'"
+                                               class="date mb-0 d-inline-block ml-2"></p>
+                                        </div>
+                                        <div class="d-flex align-items-top">
                                     <span><img class="consultation-logos mx-2" src="/images/consultation-logo-time.png"
                                                alt=""></span>
-                                        <p th:text="|${consultation.startTime} - ${consultation.endTime}|"
-                                           class="time mb-0 d-inline-block ml-2"></p>
-                                    </div>
-                                    <div th:unless="${consultation.online==null}" class="d-flex align-items-top">
+                                            <p th:text="|${consultation.startTime} - ${consultation.endTime}|"
+                                               class="time mb-0 d-inline-block ml-2"></p>
+                                        </div>
+                                        <div th:unless="${consultation.online==null}" class="d-flex align-items-top">
                                     <span><img class="consultation-logos mx-2"
                                                src="/images/consultation-logo-location.png" alt=""></span>
-                                        <p th:text="${consultation.room.type == 'VIRTUAL' ? 'Online' : consultation.room.name + (consultation.online ? ', Онлајн' : '')}"
-                                           class="room mb-0 d-inline-block ml-2"></p>
-                                    </div>
-                                    <div th:if="${consultation.online==null}" class="d-flex align-items-top">
+                                            <p th:text="${consultation.room.type == 'VIRTUAL' ? 'Online' : consultation.room.name + (consultation.online ? ', Онлајн' : '')}"
+                                               class="room mb-0 d-inline-block ml-2"></p>
+                                        </div>
+                                        <div th:if="${consultation.online==null}" class="d-flex align-items-top">
                                     <span><img class="consultation-logos mx-2"
                                                src="/images/consultation-logo-location.png" alt=""></span>
-                                        <p th:text="${consultation.room.type == 'VIRTUAL' ? 'Online' : consultation.room.name}"
-                                           class="room mb-0 d-inline-block ml-2"></p>
-                                    </div>
-                                    <div th:unless="${consultation.studentInstructions==null}"
-                                         class="d-flex align-items-top">
+                                            <p th:text="${consultation.room.type == 'VIRTUAL' ? 'Online' : consultation.room.name}"
+                                               class="room mb-0 d-inline-block ml-2"></p>
+                                        </div>
+                                        <div th:unless="${consultation.studentInstructions==null}"
+                                             class="d-flex align-items-top">
                                     <span><img class="consultation-logos mx-2"
                                                src="/images/consultation-logo-instructions.png" alt=""></span>
-                                        <p th:text="${consultation.studentInstructions}"
-                                           class="instructions mb-0 d-inline-block ml-2 text-break"></p>
+                                            <p th:text="${consultation.studentInstructions}"
+                                               class="instructions mb-0 d-inline-block ml-2 text-break"></p>
+                                        </div>
                                     </div>
-                                </div>
-                                <div class="col-md-9 col-sm-12 col-12">
-                                    <div class="d-flex align-items-center">
-                                        <p class="mb-0"><strong>Вeќе сте пријавени за овие консултации.</strong></p>
-                                        <form action="/consultations/cancel" method="post" class="ms-3" onsubmit="return confirmAction(this, 'Дали сте сигурни дека сакате да го откажете присуството?')">
-                                            <input type="hidden" th:name="${_csrf.parameterName}"
-                                                   th:value="${_csrf.token}"/>
+                                    <div class="col-md-9 col-sm-12 col-12">
+                                        <div class="d-flex align-items-center">
+                                            <p class="mb-0"><strong>Вeќе сте пријавени за овие консултации.</strong></p>
+                                            <form action="/consultations/cancel" method="post" class="ms-3" onsubmit="return confirmAction(this, 'Дали сте сигурни дека сакате да го откажете присуството?')">
+                                                <input type="hidden" th:name="${_csrf.parameterName}"
+                                                       th:value="${_csrf.token}"/>
+                                                <input type="hidden" name="attendanceId"
+                                                       th:value="${consultationAttendanceMap[consultation.id].id}"/>
+                                                <input type="hidden" name="professorId" th:value="${professor.id}"/>
+                                                <button type="submit" class="custom-cancel-button btn-sm">Откажи присуство</button>
+                                            </form>
+                                        </div>
+
+                                        <p class="mt-2">
+                                            <span th:utext="${consultationAttendanceMap[consultation.id].comment}"></span>
+                                        </p>
+
+                                        <form action="/consultations/addComment" method="post"
+                                              class="d-flex align-items-center">
+                                            <input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
                                             <input type="hidden" name="attendanceId"
                                                    th:value="${consultationAttendanceMap[consultation.id].id}"/>
+                                            <input type="hidden" name="consultationId" value=""/>
                                             <input type="hidden" name="professorId" th:value="${professor.id}"/>
-                                            <button type="submit" class="custom-cancel-button btn-sm">Откажи присуство</button>
-                                        </form>
-                                    </div>
-
-                                    <p class="mt-2">
-                                        <span th:utext="${consultationAttendanceMap[consultation.id].comment}"></span>
-                                    </p>
-
-                                    <form action="/consultations/addComment" method="post"
-                                          class="d-flex align-items-center">
-                                        <input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
-                                        <input type="hidden" name="attendanceId"
-                                               th:value="${consultationAttendanceMap[consultation.id].id}"/>
-                                        <input type="hidden" name="consultationId" value=""/>
-                                        <input type="hidden" name="professorId" th:value="${professor.id}"/>
 
-                                        <textarea name="newComment" class="form-control mt-2 me-2"
-                                                  placeholder="Коментар..." maxlength="1000" rows="3"
-                                                  style="width: 75%;"></textarea>
+                                            <textarea name="newComment" class="form-control mt-2 me-2"
+                                                      placeholder="Коментар..." maxlength="1000" rows="3"
+                                                      style="width: 75%;"></textarea>
 
-                                        <button type="submit" class="custom-comment-button mt-2 btn-sm">Додај коментар</button>
-                                    </form>
+                                            <button type="submit" class="custom-comment-button mt-2 btn-sm">Додај коментар</button>
+                                        </form>
+                                    </div>
                                 </div>
                             </div>
                         </div>
                     </div>
+                    <div th:unless="${#lists.isEmpty(regularPage.getContent())}" th:include="fragments/regularPaging :: pageSection(${regularPage})" class="mb-4"></div>
                 </div>
-                <div th:unless="${#lists.isEmpty(regularPage.getContent())}" th:include="fragments/regularPaging :: pageSection(${regularPage})" class="mb-4"></div>
 
 
-                <h6 class="consultations-type-modal" style="margin-top: 3rem">Дополнителни консултации</h6>
-                <div th:if="${#lists.isEmpty(irregularPage.getContent())}" style="padding-bottom: 3rem">
-                    <p>Нема закажани консултации</p>
-                </div>
+                <div class="col-12">
+                    <h5 class="consultations-type-modal">Дополнителни консултации</h5>
+                    <div th:if="${#lists.isEmpty(irregularPage.getContent())}" style="padding-bottom: 3rem">
+                        <p>Нема закажани консултации</p>
+                    </div>
 
 
-                <div th:each="consultation : ${irregularPage.getContent()}">
-                    <form action="/consultations/schedule" method="post"
-                          th:if="${consultationAttendanceMap[consultation.id] == null}">
-                        <input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
-                        <input type="hidden" name="professorId" th:value="${professor.id}"/>
-                        <div class="consultation-div mb-3 px-2 py-1">
-                            <div class="row">
-                                <div class="col-md-3 col-sm-12 col-12">
-                                <div class="d-flex align-items-top">
+                    <div th:each="consultation : ${irregularPage.getContent()}">
+                        <form action="/consultations/schedule" method="post"
+                              th:if="${consultationAttendanceMap[consultation.id] == null}">
+                            <input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
+                            <input type="hidden" name="professorId" th:value="${professor.id}"/>
+                            <div class="consultation-div mb-3 px-2 py-1">
+                                <div class="row">
+                                    <div class="col-md-3 col-sm-12 col-12">
+                                        <div class="d-flex align-items-top">
                                     <span><img class="consultation-logos mx-2" src="/images/consultation-logo-date.png"
                                                alt=""></span>
-                                    <p th:text="${consultation.oneTimeDate}+ ' (' + #{${consultation.getDayOfWeek().toString().toLowerCase()}} + ')'"
-                                       class="date mb-0 d-inline-block ml-2"></p>
-                                </div>
-                                <div class="d-flex align-items-top">
+                                            <p th:text="${consultation.oneTimeDate}+ ' (' + #{${consultation.getDayOfWeek().toString().toLowerCase()}} + ')'"
+                                               class="date mb-0 d-inline-block ml-2"></p>
+                                        </div>
+                                        <div class="d-flex align-items-top">
                                     <span><img class="consultation-logos mx-2" src="/images/consultation-logo-time.png"
                                                alt=""></span>
-                                    <p th:text="${consultation.startTime} + ' - ' + ${consultation.endTime}"
-                                       class="time mb-0 d-inline-block ml-2"></p>
-                                </div>
-                                <div th:unless="${consultation.online==null}" class="d-flex align-items-top">
+                                            <p th:text="${consultation.startTime} + ' - ' + ${consultation.endTime}"
+                                               class="time mb-0 d-inline-block ml-2"></p>
+                                        </div>
+                                        <div th:unless="${consultation.online==null}" class="d-flex align-items-top">
                                     <span><img class="consultation-logos mx-2"
                                                src="/images/consultation-logo-location.png" alt=""></span>
-                                    <p th:text="${consultation.room.type == 'VIRTUAL' ? 'Online' : consultation.room.name + (consultation.online ? ', Онлајн' : '')}"
-                                       class="room mb-0 d-inline-block ml-2"></p>
-                                </div>
-                                <div th:if="${consultation.online==null}" class="d-flex align-items-top">
+                                            <p th:text="${consultation.room.type == 'VIRTUAL' ? 'Online' : consultation.room.name + (consultation.online ? ', Онлајн' : '')}"
+                                               class="room mb-0 d-inline-block ml-2 text-break"></p>
+                                        </div>
+                                        <div th:if="${consultation.online==null}" class="d-flex align-items-top">
                                     <span><img class="consultation-logos mx-2"
                                                src="/images/consultation-logo-location.png" alt=""></span>
-                                    <p th:text="${consultation.room.type == 'VIRTUAL' ? 'Online' : consultation.room.name}"
-                                       class="room mb-0 d-inline-block ml-2"></p>
-                                </div>
-                                <div th:unless="${consultation.studentInstructions==null}"
-                                     class="d-flex align-items-top">
+                                            <p th:text="${consultation.room.type == 'VIRTUAL' ? 'Online' : consultation.room.name}"
+                                               class="room mb-0 d-inline-block ml-2"></p>
+                                        </div>
+                                        <div th:unless="${consultation.studentInstructions==null}"
+                                             class="d-flex align-items-top">
                                     <span><img class="consultation-logos mx-2"
                                                src="/images/consultation-logo-instructions.png" alt=""></span>
-                                    <p th:text="${consultation.studentInstructions}"
-                                       class="instructions mb-0 d-inline-block ml-2 text-break"></p>
-                                </div>
-                                <div sec:authorize="hasAnyRole('ROLE_STUDENT')"
-                                     th:if="${consultationAvailability[consultation.id]}">
-                                    <button type="submit" class="custom-modal-button custom-button-text mx-2 mt-2 mb-1">
-                                        Пријави се
-                                    </button>
-                                </div>
-                            </div>
-                                <div class="col-md-9 col-sm-12 col-12">
-                                <div>
+                                            <p th:text="${consultation.studentInstructions}"
+                                               class="instructions mb-0 d-inline-block ml-2 text-break"></p>
+                                        </div>
+                                        <div sec:authorize="hasAnyRole('ROLE_STUDENT')"
+                                             th:if="${consultationAvailability[consultation.id]}">
+                                            <button type="submit" class="custom-modal-button custom-button-text mx-2 mt-2 mb-1">
+                                                Пријави се
+                                            </button>
+                                        </div>
+                                    </div>
+                                    <div class="col-md-9 col-sm-12 col-12">
+                                        <div>
                                     <textarea name="comment" class="form-control"
                                               placeholder="Коментар (максимум 1000 карактери)" maxlength="1000"
                                               rows="3"></textarea>
-                                    <p class="error-text-p"></p>
+                                            <p class="error-text-p"></p>
+                                        </div>
+                                    </div>
                                 </div>
                             </div>
-                            </div>
-                        </div>
-                        <input type="hidden" name="consultationTermId" th:value="${consultation.id}">
-                    </form>
+                            <input type="hidden" name="consultationTermId" th:value="${consultation.id}">
+                        </form>
 
 
 
-                    <div th:if="${consultationAttendanceMap[consultation.id] != null}" style="padding-bottom: 3rem">
-                        <div class="consultation-div mb-3 px-2 py-1">
-                            <div class="row">
-                                <div class="col-md-3 col-sm-12 col-12">
-                                <div class="d-flex align-items-top">
+                        <div th:if="${consultationAttendanceMap[consultation.id] != null}" style="padding-bottom: 3rem">
+                            <div class="consultation-div mb-3 px-2 py-1">
+                                <div class="row">
+                                    <div class="col-md-3 col-sm-12 col-12">
+                                        <div class="d-flex align-items-top">
                                     <span><img class="consultation-logos mx-2" src="/images/consultation-logo-date.png"
                                                alt=""></span>
-                                    <p th:text="${consultation.oneTimeDate} + ' (' + #{${consultation.getDayOfWeek().toString().toLowerCase()}} + ')'"
-                                       class="date mb-0 d-inline-block ml-2"></p>
-                                </div>
-                                <div class="d-flex align-items-top">
+                                            <p th:text="${consultation.oneTimeDate} + ' (' + #{${consultation.getDayOfWeek().toString().toLowerCase()}} + ')'"
+                                               class="date mb-0 d-inline-block ml-2"></p>
+                                        </div>
+                                        <div class="d-flex align-items-top">
                                     <span><img class="consultation-logos mx-2" src="/images/consultation-logo-time.png"
                                                alt=""></span>
-                                    <p th:text="|${consultation.startTime} - ${consultation.endTime}|"
-                                       class="time mb-0 d-inline-block ml-2"></p>
-                                </div>
-                                <div th:unless="${consultation.online==null}" class="d-flex align-items-top">
+                                            <p th:text="|${consultation.startTime} - ${consultation.endTime}|"
+                                               class="time mb-0 d-inline-block ml-2"></p>
+                                        </div>
+                                        <div th:unless="${consultation.online==null}" class="d-flex align-items-top">
                                     <span><img class="consultation-logos mx-2"
                                                src="/images/consultation-logo-location.png" alt=""></span>
-                                    <p th:text="${consultation.room.type == 'VIRTUAL' ? 'Online' : consultation.room.name + (consultation.online ? ', Онлајн' : '')}"
-                                       class="room mb-0 d-inline-block ml-2"></p>
-                                </div>
-                                <div th:if="${consultation.online==null}" class="d-flex align-items-top">
+                                            <p th:text="${consultation.room.type == 'VIRTUAL' ? 'Online' : consultation.room.name + (consultation.online ? ', Онлајн' : '')}"
+                                               class="room mb-0 d-inline-block ml-2"></p>
+                                        </div>
+                                        <div th:if="${consultation.online==null}" class="d-flex align-items-top">
                                     <span><img class="consultation-logos mx-2"
                                                src="/images/consultation-logo-location.png" alt=""></span>
-                                    <p th:text="${consultation.room.type == 'VIRTUAL' ? 'Online' : consultation.room.name}"
-                                       class="room mb-0 d-inline-block ml-2"></p>
-                                </div>
-                                <div th:unless="${consultation.studentInstructions==null}"
-                                     class="d-flex align-items-top">
+                                            <p th:text="${consultation.room.type == 'VIRTUAL' ? 'Online' : consultation.room.name}"
+                                               class="room mb-0 d-inline-block ml-2"></p>
+                                        </div>
+                                        <div th:unless="${consultation.studentInstructions==null}"
+                                             class="d-flex align-items-top">
                                     <span><img class="consultation-logos mx-2"
                                                src="/images/consultation-logo-instructions.png" alt=""></span>
-                                    <p th:text="${consultation.studentInstructions}"
-                                       class="instructions mb-0 d-inline-block ml-2 text-break"></p>
-                                </div>
-                            </div>
-                                <div class="col-md-9 col-sm-12 col-12">
-                                <div class="d-flex align-items-center">
-                                    <p class="mb-0"><strong>Вeќе сте пријавени за овие консултации.</strong></p>
-                                    <form action="/consultations/cancel" method="post" class="ms-3" onsubmit="return confirmAction(this, 'Дали сте сигурни дека сакате да го откажете присуството?')">
-                                        <input type="hidden" th:name="${_csrf.parameterName}"
-                                               th:value="${_csrf.token}"/>
-                                        <input type="hidden" name="attendanceId"
-                                               th:value="${consultationAttendanceMap[consultation.id].id}"/>
-                                        <input type="hidden" name="professorId" th:value="${professor.id}"/>
-                                        <button type="submit" class="custom-cancel-button btn-sm">Откажи присуство</button>
-                                    </form>
-                                </div>
+                                            <p th:text="${consultation.studentInstructions}"
+                                               class="instructions mb-0 d-inline-block ml-2 text-break"></p>
+                                        </div>
+                                    </div>
+                                    <div class="col-md-9 col-sm-12 col-12">
+                                        <div class="d-flex align-items-center">
+                                            <p class="mb-0"><strong>Вeќе сте пријавени за овие консултации.</strong></p>
+                                            <form action="/consultations/cancel" method="post" class="ms-3" onsubmit="return confirmAction(this, 'Дали сте сигурни дека сакате да го откажете присуството?')">
+                                                <input type="hidden" th:name="${_csrf.parameterName}"
+                                                       th:value="${_csrf.token}"/>
+                                                <input type="hidden" name="attendanceId"
+                                                       th:value="${consultationAttendanceMap[consultation.id].id}"/>
+                                                <input type="hidden" name="professorId" th:value="${professor.id}"/>
+                                                <button type="submit" class="custom-cancel-button btn-sm">Откажи присуство</button>
+                                            </form>
+                                        </div>
 
-                                <p class="mt-2">
-                                    <span th:utext="${consultationAttendanceMap[consultation.id].comment}"></span>
-                                </p>
+                                        <p class="mt-2">
+                                            <span th:utext="${consultationAttendanceMap[consultation.id].comment}"></span>
+                                        </p>
 
-                                <form action="/consultations/addComment" method="post"
-                                      class="d-flex align-items-center">
-                                    <input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
-                                    <input type="hidden" name="attendanceId"
-                                           th:value="${consultationAttendanceMap[consultation.id].id}"/>
-                                    <input type="hidden" name="professorId" th:value="${professor.id}"/>
-                                    <input type="hidden" name="consultationId" value=""/>
+                                        <form action="/consultations/addComment" method="post"
+                                              class="d-flex align-items-center">
+                                            <input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
+                                            <input type="hidden" name="attendanceId"
+                                                   th:value="${consultationAttendanceMap[consultation.id].id}"/>
+                                            <input type="hidden" name="professorId" th:value="${professor.id}"/>
+                                            <input type="hidden" name="consultationId" value=""/>
 
-                                    <textarea name="newComment" class="form-control mt-2 me-2"
-                                              placeholder="Коментар..." maxlength="1000" rows="3"
-                                              style="width: 75%;"></textarea>
+                                            <textarea name="newComment" class="form-control mt-2 me-2"
+                                                      placeholder="Коментар..." maxlength="1000" rows="3"
+                                                      style="width: 75%;"></textarea>
 
-                                    <button type="submit" class="custom-comment-button mt-2">Додај коментар</button>
-                                </form>
-                            </div>
+                                            <button type="submit" class="custom-comment-button mt-2">Додај коментар</button>
+                                        </form>
+                                    </div>
+                                </div>
                             </div>
                         </div>
                     </div>
+
+                    <div th:unless="${#lists.isEmpty(irregularPage.getContent())}" th:include="fragments/irregularPaging :: pageSection(${irregularPage})" class="mb-4"></div>
                 </div>
 
-                <div th:unless="${#lists.isEmpty(irregularPage.getContent())}" th:include="fragments/irregularPaging :: pageSection(${irregularPage})" class="mb-4"></div>
             </div>
-            <div id="alertContainer" role="alert"></div>
         </div>
     </th:block>
 </div>
diff --git a/src/main/resources/templates/fragments/irregularPaging.html b/src/main/resources/templates/fragments/irregularPaging.html
index 0e79ba1..d50e77c 100644
--- a/src/main/resources/templates/fragments/irregularPaging.html
+++ b/src/main/resources/templates/fragments/irregularPaging.html
@@ -2,8 +2,8 @@
     <div class="row">
         <div class="col-12 col-md-8">
             <nav aria-label="Page navigation">
-                <ul class="pagination">
-                    <li class="cursor-pointer page-item" th:class="${page.isFirst()} ? 'disabled' : ''">
+                <ul class="pagination pagination-sm mb-2">
+                    <li class="page-item" th:class="${page.isFirst()} ? 'disabled' : ''">
                         <a class="page-link" href="#" onClick="updateQueryStringParameter('irregularPageNum', 1)">РџСЂРІР°</a>
                     </li>
                     <li class="page-item" th:class="${page.hasPrevious()} ? '' : 'disabled'">
@@ -11,9 +11,9 @@
                            onClick="updateQueryStringParameter('irregularPageNum', this.getAttribute('page-number'))"
                            th:page-number="${page.number}">Претходна</a>
                     </li>
-                    <li th:each="pageNum : ${#numbers.sequence(T(java.lang.Math).max(1,page.number-5), (page.totalPages == 0? 1: T(java.lang.Math).min(page.totalPages,page.number+5)))}"
+                    <li th:each="pageNum : ${#numbers.sequence(T(java.lang.Math).max(1,page.number-3), (page.totalPages == 0? 1: T(java.lang.Math).min(page.totalPages,page.number+3)))}"
                         th:class="${page.number+1 == pageNum} ? 'page-item active' : 'page-item'">
-                        <a class="page-link" href="#"
+                        <a class="page-link px-3" href="#"
                            onClick="updateQueryStringParameter('irregularPageNum', this.getAttribute('page-number'))"
                            th:page-number="${pageNum}" th:text="${pageNum}"></a>
                     </li>
@@ -32,19 +32,17 @@
         </div>
 
         <div class="col-12 col-md-4">
-            <div class="d-flex results-container align-items-center mb-3">
-                <label for="results" class="mb-0">Резултати на страна: </label>
-                <select id="results" class="form-control custom-select" style="max-width: 100px;"
+            <div class="d-flex results-container align-items-center justify-content-end mb-2">
+                <label for="results" class="mb-0 me-1 small">Резултати:</label>
+                <select id="results" class="form-control form-control-sm" style="max-width: 70px;"
                         onchange="updateQueryStringParameter('irregularResults',this.value)">
                     <option value="3" th:selected="${page.size == 3}">3</option>
                     <option value="5" th:selected="${page.size == 5}">5</option>
                     <option value="10" th:selected="${page.size == 10}">10</option>
                     <option value="20" th:selected="${page.size == 20}">20</option>
-                    <option value="50" th:selected="${page.size == 50}">50</option>
-                    <option value="100" th:selected="${page.size == 100}">100</option>
                 </select>
-                <span class="ms-1 me-1"> / Р’РєСѓРїРЅРѕ: </span>
-                <b class="ms-1" th:text="${page.totalElements}"></b>
+                <span class="mx-1 small">/ Р’РєСѓРїРЅРѕ:</span>
+                <b class="small" th:text="${page.totalElements}"></b>
             </div>
         </div>
     </div>
diff --git a/src/main/resources/templates/fragments/regularPaging.html b/src/main/resources/templates/fragments/regularPaging.html
index a3157a2..7d334cc 100644
--- a/src/main/resources/templates/fragments/regularPaging.html
+++ b/src/main/resources/templates/fragments/regularPaging.html
@@ -2,8 +2,8 @@
     <div class="row">
         <div class="col-12 col-md-8">
             <nav aria-label="Page navigation">
-                <ul class="pagination">
-                    <li class="cursor-pointer page-item" th:class="${page.isFirst()} ? 'disabled' : ''">
+                <ul class="pagination pagination-sm mb-2">
+                    <li class="page-item" th:class="${page.isFirst()} ? 'disabled' : ''">
                         <a class="page-link" href="#" onClick="updateQueryStringParameter('regularPageNum', 1)">РџСЂРІР°</a>
                     </li>
                     <li class="page-item" th:class="${page.hasPrevious()} ? '' : 'disabled'">
@@ -11,9 +11,9 @@
                            onClick="updateQueryStringParameter('regularPageNum', this.getAttribute('page-number'))"
                            th:page-number="${page.number}">Претходна</a>
                     </li>
-                    <li th:each="pageNum : ${#numbers.sequence(T(java.lang.Math).max(1,page.number-5), (page.totalPages == 0? 1: T(java.lang.Math).min(page.totalPages,page.number+5)))}"
+                    <li th:each="pageNum : ${#numbers.sequence(T(java.lang.Math).max(1,page.number-3), (page.totalPages == 0? 1: T(java.lang.Math).min(page.totalPages,page.number+3)))}"
                         th:class="${page.number+1 == pageNum} ? 'page-item active' : 'page-item'">
-                        <a class="page-link" href="#"
+                        <a class="page-link px-3" href="#"
                            onClick="updateQueryStringParameter('regularPageNum', this.getAttribute('page-number'))"
                            th:page-number="${pageNum}" th:text="${pageNum}"></a>
                     </li>
@@ -32,19 +32,17 @@
         </div>
 
         <div class="col-12 col-md-4">
-            <div class="d-flex results-container align-items-center mb-3">
-                <label for="results" class="mb-0">Резултати на страна: </label>
-                <select id="results" class="form-control custom-select" style="max-width: 100px;"
+            <div class="d-flex results-container align-items-center justify-content-end mb-2">
+                <label for="results" class="mb-0 me-1 small">Резултати:</label>
+                <select id="results" class="form-control form-control-sm" style="max-width: 70px;"
                         onchange="updateQueryStringParameter('regularResults',this.value)">
                     <option value="3" th:selected="${page.size == 3}">3</option>
                     <option value="5" th:selected="${page.size == 5}">5</option>
                     <option value="10" th:selected="${page.size == 10}">10</option>
                     <option value="20" th:selected="${page.size == 20}">20</option>
-                    <option value="50" th:selected="${page.size == 50}">50</option>
-                    <option value="100" th:selected="${page.size == 100}">100</option>
                 </select>
-                <span class="ms-1 me-1"> / Р’РєСѓРїРЅРѕ: </span>
-                <b class="ms-1" th:text="${page.totalElements}"></b>
+                <span class="mx-1 small">/ Р’РєСѓРїРЅРѕ:</span>
+                <b class="small" th:text="${page.totalElements}"></b>
             </div>
         </div>
     </div>
-- 
GitLab