search: ajout filtres finalité et format, boutons plus compacts et Réinitialiser en neutre

This commit is contained in:
Pontoporeia
2026-06-09 13:20:26 +02:00
parent 34739d6ae5
commit 07370b7221
4 changed files with 43 additions and 17 deletions

View File

@@ -87,6 +87,8 @@ class SearchController
$years = [];
$orientations = [];
$apPrograms = [];
$finalityTypes = [];
$formatTypes = [];
$coverMap = [];
try {
@@ -100,6 +102,8 @@ class SearchController
$years = $this->db->getAvailableYears();
$orientations = $this->db->getAllOrientations();
$apPrograms = $this->db->getAllAPPrograms();
$finalityTypes = $this->db->getAllFinalityTypes();
$formatTypes = $this->db->getAllFormatTypes();
if (!empty($results)) {
$coverMap = $this->db->getCoverPathsForTheses(array_column($results, 'id'));
}
@@ -129,6 +133,8 @@ class SearchController
'years' => $years,
'orientations' => $orientations,
'apPrograms' => $apPrograms,
'finalityTypes' => $finalityTypes,
'formatTypes' => $formatTypes,
// Page meta
'searchBarValue' => $query,
@@ -311,6 +317,12 @@ class SearchController
if (!empty($_GET['ap_program'])) {
$params['ap_program'] = (string) $_GET['ap_program'];
}
if (!empty($_GET['finality'])) {
$params['finality'] = (string) $_GET['finality'];
}
if (!empty($_GET['format'])) {
$params['format'] = (string) $_GET['format'];
}
if (!empty($_GET['keyword'])) {
$params['keyword'] = (string) $_GET['keyword'];
}