← Code-Übersicht

prozess-liste.php

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

Ext: php

Größe: 1348 Bytes

Geändert: 2026-07-16 01:42:02+02

<?php
declare(strict_types=1);

/**
 * Uebersicht aller Prozesse: sortier- und filterbare Tabelle (wie Dokumentation).
 *
 * @var callable(string):string                 $e
 * @var list<\Demo\Domain\Prozess\Prozess>       $prozesse
 */
?>
        <h1>Prozesse</h1>
        <input type="search" class="tabelle-filter" data-filter="#prozess-tabelle" placeholder="Filtern &hellip;" aria-label="Tabelle filtern">
        <table class="tabelle" id="prozess-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 ($prozesse as $p): ?>
                <tr>
                    <td><a href="/prozesse/<?= $e($p->slug) ?>"><?= $e($p->titel) ?></a></td>
                    <td><?= $e(implode(', ', $p->tags)) ?></td>
                    <td><?= $e(substr($p->erstellt, 0, 16)) ?></td>
                    <td><?= $e(substr($p->geaendert, 0, 16)) ?></td>
                </tr>
<?php endforeach; ?>
            </tbody>
        </table>
<?php if ($prozesse === []): ?>
        <p>Noch keine Prozesse.</p>
<?php endif; ?>
        <script src="/assets/tabelle.js"></script>