-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* event page * formatter * checkstyle * sonar issues fix * small fix * issue fix * small fixes * ref code so that instead of .skip.limit we use service and repo methods. * move model attributes names + data time formatter to constants * move error messages to constants + add check for null dates * formatter + checkstyle * small fixes after code rabbit review
- Loading branch information
Showing
23 changed files
with
1,051 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
.avatar-container { | ||
display: inline-flex; | ||
} | ||
|
||
.avatar-wrapper { | ||
position: relative; | ||
width: 30px; | ||
height: 30px; | ||
margin-right: -10px; | ||
} | ||
|
||
.avatar { | ||
width: 100%; | ||
height: 100%; | ||
border: 2px solid var(--white); | ||
border-radius: 50%; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
.carousel-item img { | ||
max-height: 400px; | ||
object-fit: contain; | ||
margin: 0 auto; | ||
} | ||
|
||
.carousel-indicators li { | ||
background-color: lightgray; | ||
border-radius: 50%; | ||
width: 10px; | ||
height: 10px; | ||
aspect-ratio: 1/1 !important; | ||
border:0; | ||
margin: 0 5px; | ||
} | ||
|
||
.carousel-indicators .active { | ||
background-color: var(--green); | ||
} | ||
|
||
.carousel-inner { | ||
width: 100%; | ||
height: 400px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* dropdown.css */ | ||
.dropdown__header { | ||
display: flex; | ||
align-items: center; | ||
cursor: pointer; | ||
} | ||
|
||
.dropdown__title { | ||
margin: 0; | ||
font-size: 2rem; | ||
font-weight: 500; | ||
text-decoration: underline 1px solid var(--black-ash); | ||
color: var(--black-ash); | ||
} | ||
|
||
.dropdown__arrow { | ||
margin-left: 8px; | ||
font-size: 1.25rem; | ||
color: var(--black-ash); | ||
|
||
} | ||
|
||
.dropdown__content { | ||
position: absolute; | ||
top: 100%; | ||
left: 0; | ||
width: 100%; | ||
margin-top: 5px; | ||
padding: 15px; | ||
box-shadow: var(--black-shadow); | ||
display: none; | ||
} |
21 changes: 21 additions & 0 deletions
21
core/src/main/resources/static/management/events/carousel.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
function initializeCarousel(carouselId, imageUrls) { | ||
let numImages = imageUrls ? imageUrls.length : 0; | ||
let indicatorsHtml = ""; | ||
let innerHtml = ""; | ||
if (numImages > 0) { | ||
for (let i = 0; i < numImages; i++) { | ||
indicatorsHtml += ` | ||
<li data-target="#${carouselId}" data-slide-to="${i}"${i === 0 ? ' class="active"' : ''}></li> | ||
`; | ||
innerHtml += ` | ||
<div class="carousel-item${i === 0 ? ' active' : ''}"> | ||
<img src="${imageUrls[i]}" class="d-block w-100" alt="Image ${i + 1}"> | ||
</div> | ||
`; | ||
} | ||
$('#' + carouselId + ' .carousel-indicators').html(indicatorsHtml); | ||
$('#' + carouselId + ' .carousel-inner').html(innerHtml); | ||
} else { | ||
$('#' + carouselId).hide(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
"use strict"; | ||
|
||
function toggleDropdown(headerElement) { | ||
const dropdownContent = headerElement.nextElementSibling; | ||
const arrow = headerElement.querySelector(".dropdown__arrow"); | ||
dropdownContent.style.display = dropdownContent.style.display === "none" ? "block" : "none"; | ||
arrow.textContent = dropdownContent.style.display === "block" ? "▲" : "▼"; | ||
} |
49 changes: 49 additions & 0 deletions
49
core/src/main/resources/templates/core/fragments/attenders-table.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<!DOCTYPE html> | ||
<html xmlns:th="http://www.thymeleaf.org"> | ||
<body> | ||
<div id="attendersTable" style="display:block" th:fragment="attendersTable"> | ||
<div class="table-responsive mb-4 mt-4"> | ||
<div class="table-wrapper"> | ||
<table class="table table-bordered"> | ||
<thead> | ||
<tr> | ||
<th>ID</th> | ||
<th>Username</th> | ||
<th>Avatar</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr th:each="attender : ${attendersPage.content}"> | ||
<td class="text-align-center"> | ||
<a th:href="@{/management/users/{id}(id=${attender.getId()})}" th:text="${attender.getId()}"></a> | ||
</td> | ||
<td th:text="${attender.name}"></td> | ||
<td> | ||
<img th:if="attender.imagePath ne null or attender.imagePath ne ''" th:src="${attender.imagePath}" th:alt="'Avatar for user with id ' + ${attender.id}"> | ||
<p th:if="attender.imagePath == null or attender.imagePath == ''">No Avatar</p> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
|
||
<!-- Pagination --> | ||
<div class="clearfix" th:if="${attendersPage.content.size() > 0}"> | ||
<ul class="pagination"> | ||
<li class="page-item" th:classappend="${attendersPage.isFirst()} ? 'disabled'"> | ||
<a class="page-link" th:onclick="'loadDropdownContent(\'attenders\',' + ${attendersPage.number - 1} + ')'">Previous</a> | ||
</li> | ||
<li class="page-item" th:each="pageNumber : ${#numbers.sequence(0, attendersPage.totalPages - 1)}" | ||
th:classappend="${pageNumber == attendersPage.number} ? 'active'"> | ||
<a class="page-link" th:onclick="'loadDropdownContent(\'attenders\',' + ${pageNumber} + ')'" | ||
th:text="${pageNumber + 1}"></a> | ||
</li> | ||
<li class="page-item" th:classappend="${attendersPage.isLast()} ? 'disabled'"> | ||
<a class="page-link" th:onclick="'loadDropdownContent(\'attenders\',' + ${attendersPage.number + 1} + ')'">Next</a> | ||
</li> | ||
</ul> | ||
</div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
15 changes: 15 additions & 0 deletions
15
core/src/main/resources/templates/core/fragments/avatars.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!DOCTYPE html> | ||
<html lang="en" xmlns:th="http://www.thymeleaf.org"> | ||
<body> | ||
<span th:fragment="avatarList(images, maxImages)"> | ||
<div th:if="${images != null and not #lists.isEmpty(images)}" class="avatar-container"> | ||
<div th:each="image, iterStat : ${images}" | ||
th:if="${iterStat.index < maxImages}" | ||
class="avatar-wrapper" | ||
th:style="|z-index: ${iterStat.index + 1}|"> | ||
<img th:src="@{${image}}" class="rounded-circle avatar"> | ||
</div> | ||
</div> | ||
</span> | ||
</body> | ||
</html> |
Oops, something went wrong.