enchere done

This commit is contained in:
Parpaillax
2024-05-02 11:57:16 +02:00
parent 8788aecb39
commit f46848644d
18 changed files with 13477 additions and 23 deletions

View File

@@ -12,7 +12,8 @@
<h4 th:text="'Article - offre en cours'"></h4>
</div>
<div class="card-header" th:unless="${#dates.format(article.dateFinEnch, 'yyyy-MM-dd')} > ${#dates.format(#dates.createNow(), 'yyyy-MM-dd')}">
<h4 th:text="'Article - offre remporté par ' + (${#authentication.getName() == maxEncherePseudo ? 'vous' : maxEncherePseudo})"></h4>
<h4 th:if="${maxEncherePseudo} != null" th:text="'Article - offre remporté par ' + (${#authentication.getName() == maxEncherePseudo ? 'vous' : maxEncherePseudo})"></h4>
<h4 th:unless="${maxEncherePseudo} != null" th:text="'Article - Personne n\'a fait d\'offre'"></h4>
</div>
<div class="card-body">
<div class="row">
@@ -68,6 +69,10 @@
<div class="mt-5 d-flex justify-content-end align-items-center">
<a class="btn btn-secondary mr-2" href="/enchere" th:text="#{edit.article.back}"></a>
<a th:if="${#strings.equals(user.getPseudo(), article.pseudoUtilisateur)} and ${#dates.format(article.dateDebutEnch, 'yyyy-MM-dd')} > ${#dates.format(#dates.createNow(), 'yyyy-MM-dd')}" class="btn btn-primary" th:href="@{/article/edit(id=${article.id})}" th:text="#{edit.article.update}"></a>
<form th:if="${#dates.format(article.dateFinEnch, 'yyyy-MM-dd')} < ${#dates.format(#dates.createNow(), 'yyyy-MM-dd')} and ${#strings.equals(user.getPseudo(), article.pseudoUtilisateur)}" th:action="@{/enchere/enchereDone}" method="post">
<input type="hidden" id="id" name="id" th:value="${article.id}">
<button type="submit" class="btn btn-primary" th:text="#{article.details.retrait}"></button>
</form>
</div>
</div>
</div>