feat: convert all file inputs to FilePond for standardized uploading

- Add csv_import queue type (storeAsFile, no async upload) for CSV import dialog
- Convert file-field.php partial to FilePond with field-name→queue-type mapping
- Conditionally skip server config for storeAsFile queues in buildFilePondOptions
- Skip FilePond init for inputs inside closed <dialog> elements
- Trigger FilePond init when import dialog opens
- Load FilePond CSS/JS assets on admin index page
This commit is contained in:
Pontoporeia
2026-06-08 10:28:39 +02:00
parent fad38f4e0d
commit df70fba5d4
8 changed files with 1089 additions and 41 deletions

View File

@@ -58,7 +58,7 @@ class HomeController
$year = null;
}
// Default home view: random theses from latest year (no year filter, no explicit page)
// Default home view: all published theses grouped by year (desc), shuffled within each year
$isDefaultView = $year === null && $page === 1;
$itemsToLoad = [];
@@ -80,9 +80,21 @@ class HomeController
$totalItems = $this->db->countSearchResults(['year' => $year]);
} elseif ($isDefaultView) {
$latestYear = $this->db->getLatestPublishedYear();
$itemsToLoad = $this->db->getLatestYearTheses(
self::ITEMS_PER_PAGE,
);
$allTheses = $this->db->getAllPublishedTheses();
// Group by year, shuffle randomly within each year
$byYear = [];
foreach ($allTheses as $thesis) {
$byYear[$thesis['year']][] = $thesis;
}
krsort($byYear, SORT_NUMERIC);
$itemsToLoad = [];
foreach ($byYear as $yearGroup) {
shuffle($yearGroup);
$itemsToLoad = array_merge($itemsToLoad, $yearGroup);
}
$totalItems = count($itemsToLoad); // no multi-page on default view
} else {
$itemsToLoad = $this->db->getPublishedTheses(