FEAT : ajout partage simple

This commit is contained in:
2025-12-01 22:30:22 +01:00
parent 4a35c375ec
commit 109cc8065e
14 changed files with 169 additions and 29 deletions

View File

@@ -29,6 +29,20 @@
<li><strong>Propriétaire :</strong> <span th:text="${photo.proprietaire.email}"></span></li>
</ul>
<!-- Partage de la photo -->
<h2>Partager la photo</h2>
<div th:if="${currentUser == photo.proprietaire.email}">
<form th:action="@{'/photo/' + ${photo.id} + '/share'}" method="post">
<label>Email de l'utilisateur :</label>
<input type="email" name="email" required />
<button type="submit">Partager</button>
</form>
</div>
<div th:if="${currentUser != photo.proprietaire.email}">
<em>Seul le propriétaire peut partager cette photo.</em>
</div>
<!-- Commentaires -->
<h2>Commentaires</h2>
<div th:if="${#lists.isEmpty(commentaires)}">