FEAT : Pagination des commentaires / photos
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user