merge
This commit is contained in:
@@ -17,30 +17,28 @@
|
||||
<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}, value=${session.searchTitle != null ? session.searchTitle : ''}" 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}" th:selected="${category.id == session.searchCategory}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<!-- Achats et Ventes -->
|
||||
|
||||
</div>
|
||||
<div class="col-md-12" 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}, value=${session.searchTitle != null ? session.searchTitle : ''}" name="searchTitle">
|
||||
</div>
|
||||
<div class="mb-4">
|
||||
<select class="form-control" name="searchCategory">
|
||||
<option th:value="${categories}" th:text="#{home.search.cat}"></option>
|
||||
<option th:each="category : ${categories}" th:value="${category.id}" th:text="${category.libelle}" ></option>
|
||||
<option value="" th:text="#{home.search.cat}"></option>
|
||||
<option th:each="category : ${categories}" th:value="${category.id}" th:text="${category.libelle}" th:selected="${category.id == session.searchCategory}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<!-- Achats et Ventes -->
|
||||
|
||||
</div>
|
||||
<!-- Colonne pour le bouton de recherche -->
|
||||
<div class="col-md-6 d-flex justify-content-center align-items-center"th:if="${#authentication.principal != 'anonymousUser'}">
|
||||
@@ -50,22 +48,22 @@
|
||||
<div class="col-md-6">
|
||||
<div class="mb-3">
|
||||
<div class="form-check form-check-inline">
|
||||
<input class="form-check-input" type="radio" name="typeTransaction" id="achats" value="achats" onchange="toggleCheckbox(this.value)">
|
||||
<label class="form-check-label" for="achats" th:text="#{home.sell.title}"></label>
|
||||
<input class="form-check-input" type="radio" name="typeTransaction" id="achats" value="achats" th:checked="${SessionTypeTransaction != null and SessionTypeTransaction == 'achats'}" onchange="toggleCheckbox(this.value)">
|
||||
<label class="form-check-label" for="achats" th:text="#{home.buy.title}"></label>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Checkboxes pour Achats -->
|
||||
<div id="achatsOptions">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" name="achatOption" id="encheresOuvertes" th:value="encheresOuvertes" disabled>
|
||||
<input class="form-check-input" type="checkbox" name="achatOption" id="encheresOuvertes" th:value="encheresOuvertes" th:checked="${sessionAchatOptions != null and #lists.contains(sessionAchatOptions, 'encheresOuvertes')}" th:disabled="${sessionAchatOptions == null}">
|
||||
<label class="form-check-label" for="encheresOuvertes" th:text="#{home.buy.open}"></label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" name="achatOption" id="enchereEnCours" th:value="enchereEnCours" disabled>
|
||||
<input class="form-check-input" type="checkbox" name="achatOption" id="enchereEnCours" th:value="enchereEnCours" th:checked="${sessionAchatOptions != null and #lists.contains(sessionAchatOptions, 'enchereEnCours')}" th:disabled="${sessionAchatOptions == null}">
|
||||
<label class="form-check-label" for="enchereEnCours" th:text="#{home.buy.progress}"></label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" name="achatOption" id="enchereRemportees" th:value="enchereRemportees" disabled>
|
||||
<input class="form-check-input" type="checkbox" name="achatOption" id="enchereRemportees" th:value="enchereRemportees" th:checked="${sessionAchatOptions != null and #lists.contains(sessionAchatOptions, 'enchereRemportees')}" th:disabled="${sessionAchatOptions == null}">
|
||||
<label class="form-check-label" for="enchereRemportees" th:text="#{home.buy.success}"></label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -74,22 +72,22 @@
|
||||
<!-- Boutons radio pour Ventes -->
|
||||
<div class="mb-3">
|
||||
<div class="form-check form-check-inline">
|
||||
<input class="form-check-input" type="radio" name="typeTransaction" id="ventes" value="ventes" onchange="toggleCheckbox(this.value)">
|
||||
<input class="form-check-input" type="radio" name="typeTransaction" id="ventes" value="ventes" th:checked="${SessionTypeTransaction != null and SessionTypeTransaction == 'ventes'}" onchange="toggleCheckbox(this.value)">
|
||||
<label class="form-check-label" for="ventes" th:text="#{home.sell.title}"></label>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Checkboxes pour Ventes -->
|
||||
<div id="ventesOptions">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" th:name="venteOption" id="venteEnCours" th:value="venteEnCours" disabled>
|
||||
<input class="form-check-input" type="checkbox" th:name="venteOption" id="venteEnCours" th:value="venteEnCours" th:checked="${sessionVenteOptions != null and #lists.contains(sessionVenteOptions, 'venteEnCours')}" th:disabled="${sessionVenteOptions == null}">
|
||||
<label class="form-check-label" for="venteEnCours" th:text="#{home.sell.progress}"></label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" th:name="venteOption" id="ventesNonDebutees" th:value="ventesNonDebutees" disabled>
|
||||
<input class="form-check-input" type="checkbox" th:name="venteOption" id="ventesNonDebutees" th:value="ventesNonDebutees" th:checked="${sessionVenteOptions != null and #lists.contains(sessionVenteOptions, 'ventesNonDebutees')}" th:disabled="${sessionVenteOptions == null}">
|
||||
<label class="form-check-label" for="ventesNonDebutees" th:text="#{home.sell.nostarted}"></label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" th:name="venteOption" id="ventesTerminees" th:value="ventesTerminees" disabled>
|
||||
<input class="form-check-input" type="checkbox" th:name="venteOption" id="ventesTerminees" th:value="ventesTerminees" th:checked="${sessionVenteOptions != null and #lists.contains(sessionVenteOptions, 'ventesTerminees')}" th:disabled="${sessionVenteOptions == null}">
|
||||
<label class="form-check-label" for="ventesTerminees" th:text="#{home.sell.finish}"></label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -163,7 +161,7 @@
|
||||
<ul class="pagination justify-content-center">
|
||||
<!-- Bouton pour la première page -->
|
||||
<li class="page-item">
|
||||
<a class="page-link" th:href="@{/enchere(page=1, searchTitle=${searchTitle}, searchCategory=${searchCategory}, venteOptions=${venteOptions}, achatOptions=${achatOptions})}">
|
||||
<a class="page-link" th:href="@{/enchere(page=1)}">
|
||||
<span aria-hidden="true">«</span>
|
||||
<span th:text="#{home.button.first}"></span>
|
||||
</a>
|
||||
@@ -171,7 +169,7 @@
|
||||
|
||||
<!-- Bouton pour la page précédente -->
|
||||
<li th:if="${currentPage > 1}" class="page-item">
|
||||
<a class="page-link" th:href="@{/enchere(page=${currentPage - 1}, searchTitle=${searchTitle}, searchCategory=${searchCategory}, venteOptions=${venteOptions}, achatOptions=${achatOptions})}">
|
||||
<a class="page-link" th:href="@{/enchere(page=${currentPage - 1})}">
|
||||
<span aria-hidden="true">‹</span>
|
||||
<span th:text="#{home.button.previous}"></span>
|
||||
</a>
|
||||
@@ -180,13 +178,13 @@
|
||||
<!-- 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))}">
|
||||
<li class="page-item" th:classappend="${currentPage == page ? 'active' : ''}">
|
||||
<a class="page-link" th:href="@{/enchere(page=${page}, searchTitle=${searchTitle}, searchCategory=${searchCategory}, venteOptions=${venteOptions}, achatOptions=${achatOptions})}" th:text="${page}"></a>
|
||||
<a class="page-link" th:href="@{/enchere(page=${page})}" 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="@{/enchere(page=${currentPage + 1}, searchTitle=${searchTitle}, searchCategory=${searchCategory}, venteOptions=${venteOptions}, achatOptions=${achatOptions})}">
|
||||
<a class="page-link" th:href="@{/enchere(page=${currentPage + 1})}">
|
||||
<span aria-hidden="true">›</span>
|
||||
<span th:text="#{home.button.next}"></span>
|
||||
</a>
|
||||
@@ -194,7 +192,7 @@
|
||||
|
||||
<!-- Bouton pour la dernière page -->
|
||||
<li class="page-item">
|
||||
<a class="page-link" th:href="@{/enchere(page=${totalPages}, searchTitle=${searchTitle}, searchCategory=${searchCategory}, venteOptions=${venteOptions}, achatOptions=${achatOptions})}">
|
||||
<a class="page-link" th:href="@{/enchere(page=${totalPages})}">
|
||||
<span aria-hidden="true">»</span>
|
||||
<span th:text="#{home.button.end}"></span>
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user