diff --git a/TODO.md b/TODO.md
index f5d493f..56b9719 100644
--- a/TODO.md
+++ b/TODO.md
@@ -10,4 +10,6 @@
- [x] Fix #7: Options de licence non persistées en edit — HTMX load trigger perdait les valeurs
- [x] Fix #3 (v2): findOrCreateAuthor avec cascade ID → nom → email, setThesisAuthors passe les IDs existants
- [x] Migration 038: corriger les identifiers theses qui ne matchent pas leur année
+- [x] Filtres finalité + format dans la page de recherche (search.php)
+- [x] Styliser boutons Filtrer/Réinitialiser : plus compacts, Réinitialiser en neutre
- [ ] Commit + jj new
diff --git a/app/public/assets/css/repertoire.css b/app/public/assets/css/repertoire.css
index e5d70ed..e16e32f 100644
--- a/app/public/assets/css/repertoire.css
+++ b/app/public/assets/css/repertoire.css
@@ -250,7 +250,7 @@
display: flex;
align-items: center;
gap: var(--space-s);
- padding: var(--space-3xs) var(--space-m);
+ padding: var(--space-xs) var(--space-m);
border-bottom: 1px solid var(--border-secondary);
flex-shrink: 0;
flex-wrap: wrap;
@@ -278,21 +278,9 @@
border: 2px solid var(--accent-primary);
}
-.search-apply-btn {
- /* deprecated alias for .btn--primary; kept for backward-compat */
-}
-
+.search-apply-btn,
.search-reset-link {
- font-size: var(--step--1);
- color: var(--text-secondary);
- text-decoration: none;
- font-weight: 400;
- cursor: pointer;
- transition: color 0.15s;
-}
-
-.search-reset-link:hover {
- color: var(--accent-primary);
+ /* btn--sm classes handle styling; space kept for potential overrides */
}
/* Search results pagination */
diff --git a/app/src/Controllers/SearchController.php b/app/src/Controllers/SearchController.php
index 8f957cc..084193d 100644
--- a/app/src/Controllers/SearchController.php
+++ b/app/src/Controllers/SearchController.php
@@ -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'];
}
diff --git a/app/templates/public/search.php b/app/templates/public/search.php
index 06c52ad..610ee3d 100644
--- a/app/templates/public/search.php
+++ b/app/templates/public/search.php
@@ -41,8 +41,32 @@
-
- Réinitialiser
+
+
+
+
+
+ Réinitialiser