Un peu de tout
This commit is contained in:
@@ -14,16 +14,15 @@
|
||||
<!-- Formulaire de recherche avec sélection de catégorie -->
|
||||
<form th:action="@{/enchere}" method="post" class="mb-3">
|
||||
<div class="row">
|
||||
<!-- Colonne pour la zone de recherche et Achats/Ventes -->
|
||||
<div class="col-md-6" th:if="${#authentication.principal != 'anonymousUser'}">
|
||||
<!-- Zone de recherche -->
|
||||
<div class="mb-3">
|
||||
<input type="text" class="form-control" th:attr="placeholder=#{home.search.title}" name="searchTitle">
|
||||
<input type="text" class="form-control" th:attr="placeholder=#{home.search.title}" name="searchTitle" >
|
||||
</div>
|
||||
<div class="mb-4">
|
||||
<select class="form-control" name="searchCategory">
|
||||
<option value="" th:text="#{home.search.cat}"></option>
|
||||
<option th:each="category : ${categories}" th:value="${category.id}" th:text="${category.libelle}"></option>
|
||||
<option th:each="category : ${categories}" th:value="${category.id}" th:text="${category.libelle} "></option>
|
||||
</select>
|
||||
</div>
|
||||
<!-- Achats et Ventes -->
|
||||
@@ -36,8 +35,8 @@
|
||||
</div>
|
||||
<div class="mb-4">
|
||||
<select class="form-control" name="searchCategory">
|
||||
<option value="" th:text="#{home.search.cat}"></option>
|
||||
<option th:each="category : ${categories}" th:value="${category.id}" th:text="${category.libelle}"></option>
|
||||
<option th:value="${categories}" th:text="#{home.search.cat}"></option>
|
||||
<option th:each="category : ${categories}" th:value="${category.id}" th:text="${category.libelle}" ></option>
|
||||
</select>
|
||||
</div>
|
||||
<!-- Achats et Ventes -->
|
||||
@@ -163,7 +162,7 @@
|
||||
<ul class="pagination justify-content-center">
|
||||
<!-- Bouton pour la première page -->
|
||||
<li class="page-item">
|
||||
<a class="page-link" th:href="@{/(page=1)}">
|
||||
<a class="page-link" th:href="@{/enchere(page=1, searchTitle=${searchTitle}, searchCategory=${searchCategory}, venteOptions=${venteOptions}, achatOptions=${achatOptions})}">
|
||||
<span aria-hidden="true">«</span>
|
||||
<span th:text="#{home.button.first}"></span>
|
||||
</a>
|
||||
@@ -171,22 +170,22 @@
|
||||
|
||||
<!-- Bouton pour la page précédente -->
|
||||
<li th:if="${currentPage > 1}" class="page-item">
|
||||
<a class="page-link" th:href="@{/(page=${currentPage - 1})}">
|
||||
<a class="page-link" th:href="@{/enchere(page=${currentPage - 1}, searchTitle=${searchTitle}, searchCategory=${searchCategory}, venteOptions=${venteOptions}, achatOptions=${achatOptions})}">
|
||||
<span aria-hidden="true">‹</span>
|
||||
<span th:text="#{home.button.previous}"></span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<!-- Afficher les deux dernières pages, la page en cours et les deux suivantes -->
|
||||
<th:block th:each="page,iter : ${#numbers.sequence((currentPage - 2 > 0 ? currentPage - 2 : 1), (currentPage + 2 < totalPages ? currentPage + 2 : totalPages))}">
|
||||
<th:block th:each="page, iter : ${#numbers.sequence((currentPage - 2 > 0 ? currentPage - 2 : 1), (currentPage + 2 < totalPages ? currentPage + 2 : totalPages))}">
|
||||
<li class="page-item" th:classappend="${currentPage == page ? 'active' : ''}">
|
||||
<a class="page-link" th:href="@{/(page=${page})}" th:text="${page}"></a>
|
||||
<a class="page-link" th:href="@{/enchere(page=${page}, searchTitle=${searchTitle}, searchCategory=${searchCategory}, venteOptions=${venteOptions}, achatOptions=${achatOptions})}" th:text="${page}"></a>
|
||||
</li>
|
||||
</th:block>
|
||||
|
||||
<!-- Bouton pour la page suivante -->
|
||||
<li th:if="${currentPage < totalPages}" class="page-item">
|
||||
<a class="page-link" th:href="@{/(page=${currentPage + 1})}">
|
||||
<a class="page-link" th:href="@{/enchere(page=${currentPage + 1}, searchTitle=${searchTitle}, searchCategory=${searchCategory}, venteOptions=${venteOptions}, achatOptions=${achatOptions})}">
|
||||
<span aria-hidden="true">›</span>
|
||||
<span th:text="#{home.button.next}"></span>
|
||||
</a>
|
||||
@@ -194,7 +193,7 @@
|
||||
|
||||
<!-- Bouton pour la dernière page -->
|
||||
<li class="page-item">
|
||||
<a class="page-link" th:href="@{/(page=${totalPages})}">
|
||||
<a class="page-link" th:href="@{/enchere(page=${totalPages}, searchTitle=${searchTitle}, searchCategory=${searchCategory}, venteOptions=${venteOptions}, achatOptions=${achatOptions})}">
|
||||
<span aria-hidden="true">»</span>
|
||||
<span th:text="#{home.button.end}"></span>
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user