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

@@ -0,0 +1,28 @@
<?php
/**
* Partial: student popover preview.
*
* Expected variables:
* $theses array rows of [id => int, title => string]
* $name string student name
*/
?>
<?php if (count($theses) === 1): ?>
<iframe
src="/tfe?id=<?= (int)$theses[0]['id'] ?>"
class="student-preview__iframe"
loading="lazy"
title="Aperçu — <?= htmlspecialchars($name) ?>"
></iframe>
<?php else: ?>
<p class="student-preview__name"><?= htmlspecialchars($name) ?></p>
<ul class="student-preview__list">
<?php foreach ($theses as $t): ?>
<li>
<a href="/tfe?id=<?= (int)$t['id'] ?>" class="student-preview__link">
<?= htmlspecialchars($t['title']) ?>
</a>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>