113 lines
4.0 KiB
HTML
113 lines
4.0 KiB
HTML
<!doctype html>
|
|
<html xmlns:th="http://www.thymeleaf.org">
|
|
<head>
|
|
<meta charset="utf-8"/>
|
|
<title>Mes photos</title>
|
|
</head>
|
|
<header>
|
|
<p>
|
|
<a th:href="@{/}">Accueil</a> |
|
|
<a th:href="@{/upload}">Uploader une photo</a> |
|
|
<a th:href="@{/mes-photos}">Mes photos</a> |
|
|
<a th:href="@{/mes-albums}">Mes albums</a> |
|
|
<a th:href="@{/galerie}">Galerie publique</a>
|
|
</p>
|
|
<hr/>
|
|
</header>
|
|
<body>
|
|
<h1>Mes photos</h1>
|
|
<h2>Mes photos privées</h2>
|
|
<div>
|
|
<a th:each="p : ${photosPrivees.content}" th:if="${p != null}"
|
|
th:href="@{'/photo/' + ${p.id}}">
|
|
<img th:src="@{'/photo/' + ${p.id} + '/thumb'}" width="120"/>
|
|
</a>
|
|
</div>
|
|
<div>
|
|
<a th:if="${photosPrivees.hasPrevious()}"
|
|
th:href="@{/mes-photos(pagePrivees=${pagePrivees - 1}, pagePubliques=${pagePubliques}, pagePartagees=${pagePartagees})}">⬅</a>
|
|
<span th:text="'Page ' + (${pagePrivees}+1)"></span>
|
|
<a th:if="${photosPrivees.hasNext()}"
|
|
th:href="@{/mes-photos(pagePrivees=${pagePrivees + 1}, pagePubliques=${pagePubliques}, pagePartagees=${pagePartagees})}">➡</a>
|
|
</div>
|
|
|
|
|
|
<h2>Mes photos publiques</h2>
|
|
<div>
|
|
<a th:each="p : ${photosPubliques.content}" th:if="${p != null}"
|
|
th:href="@{'/photo/' + ${p.id}}">
|
|
<img th:src="@{'/photo/' + ${p.id} + '/thumb'}" width="120"/>
|
|
</a>
|
|
</div>
|
|
<div>
|
|
<a th:if="${photosPubliques.hasPrevious()}"
|
|
th:href="@{/mes-photos(pagePrivees=${pagePrivees}, pagePubliques=${pagePubliques - 1}, pagePartagees=${pagePartagees})}">⬅</a>
|
|
<span th:text="'Page ' + (${pagePubliques}+1)"></span>
|
|
<a th:if="${photosPubliques.hasNext()}"
|
|
th:href="@{/mes-photos(pagePrivees=${pagePrivees}, pagePubliques=${pagePubliques + 1}, pagePartagees=${pagePartagees})}">➡</a>
|
|
|
|
</div>
|
|
|
|
<h2>Mes photos partagées</h2>
|
|
<div style="display:flex; gap:20px; flex-wrap:wrap;">
|
|
<div th:each="p : ${mesPhotosPartagees.content}" th:if="${p != null}">
|
|
<a th:href="@{'/photo/' + ${p.id}}">
|
|
<img th:src="@{'/photo/' + ${p.id} + '/thumb'}" width="120"
|
|
style="display:block; border:1px solid #ccc;"/>
|
|
</a>
|
|
<!--compteur de partages -->
|
|
<div style="font-size:0.9em; color:#555; margin-top:4px;">
|
|
<span th:text="${shareCounts[p.id]} + ' partage(s)'"></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<a th:if="${mesPhotosPartagees.hasPrevious()}"
|
|
th:href="@{/mes-photos(
|
|
pagePrivees=${pagePrivees},
|
|
pagePubliques=${pagePubliques},
|
|
pagePartagees=${pagePartagees},
|
|
pageMesPartagees=${pageMesPartagees - 1}
|
|
)}">⬅</a>
|
|
<span th:text="'Page ' + (${pageMesPartagees}+1)"></span>
|
|
<a th:if="${mesPhotosPartagees.hasNext()}"
|
|
th:href="@{/mes-photos(
|
|
pagePrivees=${pagePrivees},
|
|
pagePubliques=${pagePubliques},
|
|
pagePartagees=${pagePartagees},
|
|
pageMesPartagees=${pageMesPartagees + 1}
|
|
)}">➡</a>
|
|
|
|
</div>
|
|
|
|
|
|
<h2>Photos partagées avec moi</h2>
|
|
<div>
|
|
<a th:each="p : ${photosPartagees.content}"
|
|
th:if="${p != null}"
|
|
th:href="@{'/photo/' + ${p.id}}">
|
|
<img th:src="@{'/photo/' + ${p.id} + '/thumb'}" width="120"/>
|
|
</a>
|
|
</div>
|
|
<div>
|
|
<a th:if="${photosPartagees.hasPrevious()}"
|
|
th:href="@{/mes-photos(pagePrivees=${pagePrivees}, pagePubliques=${pagePubliques}, pagePartagees=${pagePartagees - 1})}">⬅</a>
|
|
<span th:text="'Page ' + (${pagePartagees}+1)"></span>
|
|
<a th:if="${photosPartagees.hasNext()}"
|
|
th:href="@{/mes-photos(pagePrivees=${pagePrivees}, pagePubliques=${pagePubliques}, pagePartagees=${pagePartagees + 1})}">➡</a>
|
|
</div>
|
|
|
|
|
|
<p><a th:href="@{/galerie}">Galerie publique</a></p>
|
|
</body>
|
|
<footer>
|
|
<hr/>
|
|
<form th:action="@{/logout}" method="post" style="display: inline;">
|
|
<button type="submit"
|
|
style="background: none; border: none; color: blue; text-decoration: underline; cursor: pointer;">
|
|
Se déconnecter
|
|
</button>
|
|
</form>
|
|
</footer>
|
|
</html>
|