Quelltext des aktuellen Standes
<?php $this->layout('layouts/admin', [
'page_title' => $page_title,
'current_admin_page' => 'vault-teams',
'page_actions' => '<a class="btn btn-primary btn-sm" href="/admin/vault/teams/create"><i class="fas fa-plus"></i> Neues Team</a>',
]); ?>
<?php if (empty($teams)): ?>
<div class="empty-state">
<i class="fas fa-user-lock"></i>
<p><?= $this->te('Noch keine Team-Tresore angelegt.') ?></p>
</div>
<?php else: ?>
<div class="table-wrapper">
<table class="data-table">
<thead>
<tr>
<th scope="col"><?= $this->te('Team-Name') ?></th>
<th scope="col"><?= $this->te('Beschreibung') ?></th>
<th scope="col"><?= $this->te('Mitglieder') ?></th>
<th scope="col"><?= $this->te('Erstellt') ?></th>
<th scope="col"><?= $this->te('Aktionen') ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($teams as $team): ?>
<tr>
<td><strong><?= $this->e($team['name']) ?></strong></td>
<td><?= $this->e($team['description'] ?: '—') ?></td>
<td><?= (int)$team['member_count'] ?></td>
<td><?= substr($team['created_at'], 0, 10) ?></td>
<td>
<a href="/admin/vault/teams/<?= $team['id'] ?>/members" class="btn btn-secondary btn-sm">
<i class="fas fa-users"></i> <?= $this->te('Mitglieder') ?>
</a>
<a href="/admin/vault/teams/<?= $team['id'] ?>/export" class="btn btn-secondary btn-sm" title="<?= $this->te('Passwörter als CSV exportieren (inkl. TOTP)') ?>">
<i class="fas fa-file-csv"></i> CSV
</a>
<a href="/admin/vault/teams/<?= $team['id'] ?>/edit" class="btn btn-secondary btn-sm">
<i class="fas fa-pen"></i> <?= $this->te('Bearbeiten') ?>
</a>
<form method="POST" action="/admin/vault/teams/<?= $team['id'] ?>/delete"
onsubmit="return confirm('Team \"<?= $this->e(addslashes($team['name'])) ?>\" wirklich löschen? Alle Einträge gehen verloren!')"
style="display:inline;margin:0;">
<input type="hidden" name="_csrf" value="<?= $this->csrf() ?>">
<button aria-label="<?= $this->te('Löschen') ?>" type="submit" class="btn btn-danger btn-sm"><i class="fas fa-trash"></i></button>
</form>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<?php endif; ?>