FEAT : Pagination des commentaires / photos

This commit is contained in:
2025-12-02 19:43:29 +01:00
parent 6cb141293c
commit ce5ed0cbe3
115 changed files with 240 additions and 121 deletions

View File

@@ -53,16 +53,20 @@
<!-- Commentaires -->
<h2>Commentaires</h2>
<div th:if="${#lists.isEmpty(commentaires)}">
<p>Aucun commentaire pour l'instant.</p>
</div>
<ul th:if="${!#lists.isEmpty(commentaires)}">
<li th:each="c : ${commentaires}">
<strong th:text="${c.auteur.email}">Auteur</strong> :
<div th:each="c : ${commentairesPage.content}">
<p>
<b th:text="${c.auteur.email}"></b>
<span th:text="${c.contenu}"></span>
<em>(<span th:text="${c.dateCommentaire}"></span>)</em>
</li>
</ul>
</p>
</div>
<div>
<a th:if="${commentairesPage.hasPrevious()}"
th:href="@{/photo/{id}(id=${photo.id}, page=${currentPage - 1})}"></a>
<span th:text="'Page ' + (${currentPage}+1)"></span>
<a th:if="${commentairesPage.hasNext()}"
th:href="@{/photo/{id}(id=${photo.id}, page=${currentPage + 1})}"></a>
</div>
<!-- Formulaire d'ajout de commentaire -->
<div th:if="${currentUser}">
<h3>Ajouter un commentaire</h3>