mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-11-09 19:20:09 +01:00
feat: student name popover preview on /repertoire via htmx
This commit is contained in:
1 parent
d961f9533c
commit
ede53746ba
18 files changed
+237
-278
No files matched your search
@@ -203,6 +203,30 @@ class SearchController
|
||||
* Render the repertoire index partial and exit (for HTMX swaps).
|
||||
* Never returns.
|
||||
*/
|
||||
/**
|
||||
* HTMX endpoint: returns a popover snippet for a student name.
|
||||
* Renders directly and exits.
|
||||
*/
|
||||
public function handleStudentPreview(): never {
|
||||
$name = trim($_GET['name'] ?? '');
|
||||
header('Content-Type: text/html; charset=UTF-8');
|
||||
|
||||
if ($name === '') {
|
||||
echo '';
|
||||
exit();
|
||||
}
|
||||
|
||||
$theses = $this->db->getThesesByAuthorName($name);
|
||||
|
||||
if (empty($theses)) {
|
||||
echo '';
|
||||
exit();
|
||||
}
|
||||
|
||||
include APP_ROOT . '/templates/partials/student-preview.php';
|
||||
exit();
|
||||
}
|
||||
|
||||
private function renderRepertoirePartial(
|
||||
array $repData,
|
||||
array $activeFilters,
|
||||
|
||||
Reference in new issue
Block a user