Merge branch 'Olivier'

This commit is contained in:
Parpaillax
2024-04-30 16:53:49 +02:00
4 changed files with 28 additions and 10 deletions

View File

@@ -7,9 +7,12 @@
<div class="container-fluid" id="container-main">
<div class="row mt-3 justify-content-center">
<div class="col-12 col-md-8 col-lg-6"> <!-- Utilisation de classes Bootstrap pour rendre la colonne responsive -->
<div class="card">
<div class="card-header">
<h4 th:text="#{article.details.heading}"></h4>
<div class="card" >
<div class="card-header" th:if="${#dates.format(article.dateFinEnch, 'yyyy-MM-dd')} > ${#dates.format(#dates.createNow(), 'yyyy-MM-dd')}">
<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>
</div>
<div class="card-body">
<div class="row">
@@ -51,15 +54,15 @@
<strong><label class="col-form-label" th:text="#{article.details.label.pickup}"></label></strong>
<span th:text="${retrait} ? ${retrait.rue} + ' ' + ${retrait.code_postale} + ' ' + ${retrait.ville} : #{article.details.address.unknown}"></span>
</div>
<form th:if="${!isArticleCurrentUser}" th:action="@{/enchere/incEnchere}" method="post" th:object="${enchere}" class="mt-2 d-flex flex-row align-items-end justify-content-between">
<form th:if="${!isArticleCurrentUser} and ${#dates.format(article.dateFinEnch, 'yyyy-MM-dd')} > ${#dates.format(#dates.createNow(), 'yyyy-MM-dd')}" th:action="@{/enchere/incEnchere}" method="post" th:object="${enchere}" class="mt-2 d-flex flex-row align-items-end justify-content-between">
<input type="hidden" id="articleId" name="articleId" th:value="${article.id}">
<label for="montantEnchere" th:text="#{article.details.label.amount}"></label>
<input type="number" th:field="*{montantEnchere}" id="montantEnchere" step="0.01" min="0">
<span style="color: red;" th:if="${#fields.hasErrors('montantEnchere')}">
<ul>
<li th:each="erreur: ${#fields.errors('montantEnchere')}" th:text="${erreur}"></li>
</ul>
</span>
<span style="color: red;" th:if="${errors != null}">
<ul>
<li th:each="erreur: ${errors[0]}" th:text="${erreur.defaultMessage}"></li>
</ul>
</span>
<button type="submit" class="btn btn-primary" th:text="#{article.details.button.bid}"></button>
</form>
<div class="mt-5 d-flex justify-content-end align-items-center">