← Code-Übersicht

code-liste.php

Pfad: src/Infrastructure/Http/view/code-liste.php

Ext: php

Größe: 1314 Bytes

Geändert: 2026-07-16 10:04:29+02

<?php
declare(strict_types=1);

/**
 * Übersicht aller Code-Dateien.
 *
 * @var callable(string):string                  $e
 * @var list<\Demo\Domain\Code\CodeDatei>        $dateien
 */
?>
        <h1>Code</h1>
        <input type="search" class="tabelle-filter" data-filter="#code-tabelle" placeholder="Filtern &hellip;" aria-label="Tabelle filtern">
        <table class="tabelle" id="code-tabelle">
            <thead>
                <tr>
                    <th data-sort="text">Relativer Pfad</th>
                    <th data-sort="text">Dateiname</th>
                    <th data-sort="text">Ext</th>
                    <th data-sort="text">Geändert</th>
                </tr>
            </thead>
            <tbody>
<?php foreach ($dateien as $datei): ?>
                <tr>
                    <td><a href="/code/<?= $e((string) $datei->id) ?>"><?= $e($datei->relativerPfad) ?></a></td>
                    <td><?= $e($datei->dateiName) ?></td>
                    <td><?= $e($datei->dateiErweiterung) ?></td>
                    <td><?= $e($datei->geaendert) ?></td>
                </tr>
<?php endforeach; ?>
            </tbody>
        </table>
<?php if ($dateien === []): ?>
        <p>Noch keine Code-Dateien im Spiegel.</p>
<?php endif; ?>
        <script src="/assets/tabelle.js"></script>