Admin: search by thesis identifiant (id) in backoffice list

This commit is contained in:
Pontoporeia
2026-09-18 16:26:36 +02:00
parent 61b105da27
commit 116dca5d75
2 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -867,11 +867,12 @@ class Database
$params = [];
if (!empty($filters['search'])) {
$sql .= ' AND (t.title LIKE ? OR t.subtitle LIKE ? OR a.name LIKE ?)';
$sql .= ' AND (t.title LIKE ? OR t.subtitle LIKE ? OR t.identifier LIKE ? OR a.name LIKE ?)';
$searchParam = '%' . $filters['search'] . '%';
$params[] = $searchParam;
$params[] = $searchParam;
$params[] = $searchParam;
$params[] = $searchParam;
}
if (!empty($filters['year'])) {
@@ -915,11 +916,12 @@ class Database
$params = [];
if (!empty($filters['search'])) {
$sql .= ' AND (t.title LIKE ? OR t.subtitle LIKE ? OR a.name LIKE ?)';
$sql .= ' AND (t.title LIKE ? OR t.subtitle LIKE ? OR t.identifier LIKE ? OR a.name LIKE ?)';
$searchParam = '%' . $filters['search'] . '%';
$params[] = $searchParam;
$params[] = $searchParam;
$params[] = $searchParam;
$params[] = $searchParam;
}
if (!empty($filters['year'])) {
+1 -1
View File
@@ -30,7 +30,7 @@
hx-include="#admin-filter-form, #admin-table-wrap input[name=sort], #admin-table-wrap input[name=dir]"
hx-push-url="true"
hx-sync="#admin-filter-form:replace">
<input type="text" name="search" placeholder="Titre, auteur..."
<input type="text" name="search" placeholder="Titre, ID, auteur..."
value="<?= htmlspecialchars($searchQuery) ?>">
<select name="year">
<option value="">Année</option>