FEAT : Ajout du mécanisme d'album avec partage et visibilité
This commit is contained in:
70
target/classes/templates/mes-albums.html
Normal file
70
target/classes/templates/mes-albums.html
Normal file
@@ -0,0 +1,70 @@
|
||||
<!doctype html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<title>Mes albums</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>Mes albums</h1>
|
||||
|
||||
<!-- FORMULAIRE AJOUT ALBUM -->
|
||||
<h3>Créer un album</h3>
|
||||
<form th:action="@{/albums/create}" method="post">
|
||||
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}" />
|
||||
<label>Nom :</label>
|
||||
<input type="text" name="nom" required><br/>
|
||||
<label>Description :</label>
|
||||
<input type="text" name="description"><br/>
|
||||
<label>Visibilité :</label>
|
||||
<select name="visibilite">
|
||||
<option value="PRIVATE">Privé</option>
|
||||
<option value="SHARED">Partagé</option>
|
||||
<option value="PUBLIC">Public</option>
|
||||
</select>
|
||||
<button type="submit">Créer</button>
|
||||
</form>
|
||||
<hr/>
|
||||
|
||||
<!-- LISTE ALBUMS -->
|
||||
<h2>Liste de mes albums</h2>
|
||||
<div th:each="album : ${albums.content}" style="margin:10px 0;">
|
||||
<a th:href="@{'/album/' + ${album.id}}">
|
||||
<b th:text="${album.nom}"></b>
|
||||
</a>
|
||||
<span th:text="'(' + ${album.visibilite} + ')'"></span>
|
||||
<p th:text="${album.description}"></p>
|
||||
</div>
|
||||
|
||||
<!-- PAGINATION -->
|
||||
<div>
|
||||
<a th:if="${albums.hasPrevious()}"
|
||||
th:href="@{/mes-albums(page=${currentPage - 1})}">⬅</a>
|
||||
<span th:text="${currentPage + 1}"></span>
|
||||
<a th:if="${albums.hasNext()}"
|
||||
th:href="@{/mes-albums(page=${currentPage + 1})}">➡</a>
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h2>Albums partagés avec moi</h2>
|
||||
<div th:if="${sharedAlbums.isEmpty()}">
|
||||
<p>Aucun album ne vous a été partagé.</p>
|
||||
</div>
|
||||
<div th:unless="${sharedAlbums.isEmpty()}">
|
||||
<div class="album-list">
|
||||
<div th:each="album : ${sharedAlbums}" class="album-item">
|
||||
<a th:href="@{'/album/' + ${album.id}}">
|
||||
<strong th:text="${album.nom}"></strong>
|
||||
</a>
|
||||
<p>
|
||||
Partagé par :
|
||||
<span th:text="${album.proprietaire.email}"></span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user