doku-liste.php
Pfad: src/Infrastructure/Http/view/doku-liste.php
Ext: php
Größe: 1415 Bytes
Geändert: 2026-07-16 01:41:58+02
<?php
declare(strict_types=1);
/**
* Uebersicht aller Dokumentationen: sortier- und filterbare Tabelle.
* Sortieren/Filtern laeuft clientseitig in /assets/doku-tabelle.js.
*
* @var callable(string):string $e
* @var list<\Demo\Domain\Dokumentation\Dokumentation> $docs
*/
?>
<h1>Dokumentation</h1>
<input type="search" class="tabelle-filter" data-filter="#doku-tabelle" placeholder="Filtern …" aria-label="Tabelle filtern">
<table class="tabelle" id="doku-tabelle">
<thead>
<tr>
<th data-sort="text">Titel</th>
<th data-sort="text">Tags</th>
<th data-sort="text">Erstellt</th>
<th data-sort="text">Geändert</th>
</tr>
</thead>
<tbody>
<?php foreach ($docs as $dok): ?>
<tr>
<td><a href="/doku/<?= $e($dok->slug) ?>"><?= $e($dok->titel) ?></a></td>
<td><?= $e(implode(', ', $dok->tags)) ?></td>
<td><?= $e(substr($dok->erstellt, 0, 16)) ?></td>
<td><?= $e(substr($dok->geaendert, 0, 16)) ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php if ($docs === []): ?>
<p>Noch keine Dokumentationen.</p>
<?php endif; ?>
<script src="/assets/tabelle.js"></script>