- New profile.php (display name, password, Discord link/unlink),
reachable from the sidebar; removed the duplicate Discord section
from the dashboard.
- Corrected class names/icon mapping to match the actual bot config
(Beschwörer, Kantor) instead of the guessed German terms used
earlier.
- raids.php now understands the bot's full group model: group 0 is
the bench ("Ersatzbank"), -1 is a decline ("Abgemeldet"), and class
"Ausstehend" marks a pending premade invite (now shown with an
hourglass instead of being silently dropped or mis-rendered). The
"X / max" counter matches the bot's own active-count logic (pending
invites don't count). Signup form also lets a member choose the
bench explicitly.
- A few more inline icons (profile, list) for general visual polish.
Verified grouping/active-count/icon logic with synthetic bench/
declined/pending signups, and the real raids.php flow (profile
update, sidebar nav) against a local DB plus the live raids API.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
65 lines
2.3 KiB
PHP
65 lines
2.3 KiB
PHP
<?php
|
|
require_once __DIR__ . '/includes/bootstrap.php';
|
|
require_permission('dashboard.view');
|
|
|
|
$user = current_user();
|
|
$canViewUsers = user_has_permission('users.view');
|
|
$canManageRoles = user_has_permission('roles.manage');
|
|
$canViewRaids = user_has_permission('raids.view');
|
|
|
|
$pageTitle = 'Dashboard';
|
|
include __DIR__ . '/includes/header.php';
|
|
?>
|
|
<div class="panel">
|
|
<h1>Willkommen, <?= e($user['display_name'] !== '' ? $user['display_name'] : $user['username']) ?>!</h1>
|
|
<p class="text-muted">Dies ist dein Mitgliederbereich. Die eigentliche Gilden-Homepage folgt hier später.</p>
|
|
</div>
|
|
|
|
<div class="panel">
|
|
<div class="card-grid">
|
|
<div class="panel stat-card">
|
|
<div class="icon-badge"><?= icon('profile') ?></div>
|
|
<div>
|
|
<h3>Mein Profil</h3>
|
|
<p class="text-muted"><a href="/profile.php">Anzeigename, Passwort & Discord verwalten</a></p>
|
|
</div>
|
|
</div>
|
|
<?php if ($canViewRaids): ?>
|
|
<div class="panel stat-card">
|
|
<div class="icon-badge"><?= icon('calendar') ?></div>
|
|
<div>
|
|
<h3>Raids</h3>
|
|
<p class="text-muted"><a href="/raids.php">Anstehende Raid-Termine ansehen</a></p>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
|
|
<?php if ($canViewUsers || $canManageRoles): ?>
|
|
<div class="panel">
|
|
<h2>Administration</h2>
|
|
<div class="card-grid">
|
|
<?php if ($canViewUsers): ?>
|
|
<div class="panel stat-card">
|
|
<div class="icon-badge"><?= icon('users') ?></div>
|
|
<div>
|
|
<h3>Benutzerverwaltung</h3>
|
|
<p class="text-muted"><a href="/admin/users.php">Mitglieder anlegen, bearbeiten, deaktivieren</a></p>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
<?php if ($canManageRoles): ?>
|
|
<div class="panel stat-card">
|
|
<div class="icon-badge"><?= icon('shield') ?></div>
|
|
<div>
|
|
<h3>Berechtigungsgruppen</h3>
|
|
<p class="text-muted"><a href="/admin/roles.php">Rollen und Berechtigungen verwalten</a></p>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<?php include __DIR__ . '/includes/footer.php'; ?>
|