Admin: edit and delete as icons in the user and group tables

"Bearbeiten" and "Löschen" become the same pencil/trash icon buttons the
events page already uses, with the text kept as tooltip and aria-label.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Maaxxs 2026-09-21 08:02:18 +02:00
parent 0eb8816ef8
commit f5c7a6f776
3 changed files with 10 additions and 4 deletions

View file

@ -78,12 +78,12 @@ include __DIR__ . '/../includes/header.php';
<td><?= (int) $r['permission_count'] ?></td>
<td>
<div class="actions">
<a href="/admin/role_form.php?id=<?= (int) $r['id'] ?>">Bearbeiten</a>
<a class="icon-button" href="/admin/role_form.php?id=<?= (int) $r['id'] ?>" title="Bearbeiten" aria-label="Bearbeiten"><?= icon('edit') ?></a>
<?php if (!$r['is_system']): ?>
<form class="inline-form" method="post" action="/admin/role_delete.php" onsubmit="return confirm('Diese Berechtigungsgruppe wirklich löschen?');">
<?= csrf_field() ?>
<input type="hidden" name="id" value="<?= (int) $r['id'] ?>">
<button type="submit" class="text-button">Löschen</button>
<button type="submit" class="icon-button icon-button-danger" title="Löschen" aria-label="Löschen"><?= icon('trash') ?></button>
</form>
<?php endif; ?>
</div>

View file

@ -103,13 +103,13 @@ include __DIR__ . '/../includes/header.php';
</form>
<?php endif; ?>
<?php if ($canEdit): ?>
<a href="/admin/user_form.php?id=<?= (int) $u['id'] ?>">Bearbeiten</a>
<a class="icon-button" href="/admin/user_form.php?id=<?= (int) $u['id'] ?>" title="Bearbeiten" aria-label="Bearbeiten"><?= icon('edit') ?></a>
<?php endif; ?>
<?php if ($canDelete && (int) $u['id'] !== (int) $currentUser['id']): ?>
<form class="inline-form" method="post" action="/admin/user_delete.php" onsubmit="return confirm('Diesen Benutzer wirklich löschen?');">
<?= csrf_field() ?>
<input type="hidden" name="id" value="<?= (int) $u['id'] ?>">
<button type="submit" class="text-button">Löschen</button>
<button type="submit" class="icon-button icon-button-danger" title="Löschen" aria-label="Löschen"><?= icon('trash') ?></button>
</form>
<?php endif; ?>
</div>

View file

@ -2023,3 +2023,9 @@ input.role-weight-input {
.table-actions tr:hover td:last-child { background: var(--bg-panel-alt); }
.table-actions .row-pending td:last-child { background: #2e2a1c; }
/* Icon-Links (Bearbeiten) sollen beim Ueberfahren nicht unterstrichen werden. */
a.icon-button:hover { text-decoration: none; }
/* Aktionen-Spalte der Verwaltung: Icons und Freischalten-Knopf auf einer Linie. */
.table-actions td:last-child .actions { align-items: center; flex-wrap: nowrap; }