feat: student name popover preview on /repertoire via htmx

This commit is contained in:
Pontoporeia
2026-04-24 13:11:15 +02:00
parent d961f9533c
commit ede53746ba
18 changed files with 237 additions and 278 deletions

View File

@@ -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,