mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 19:19:19 +02:00
29 lines
810 B
PHP
29 lines
810 B
PHP
<?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; ?>
|