mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-25 16:19:19 +02:00
search: ajout filtres finalité et format, boutons plus compacts et Réinitialiser en neutre
This commit is contained in:
@@ -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'];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user