prepare intranet for first Dokploy deployment
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/* Zentrale Reiternavigation des Adminpanels.
|
||||
* Erwartet: $pdo (PDO) und optional $adminActiveTab.
|
||||
*/
|
||||
$adminActiveTab = $adminActiveTab ?? '';
|
||||
$adminInboxBadgeCount = 0;
|
||||
|
||||
try {
|
||||
$adminInboxBadgeCount = (int)$pdo->query("SELECT COUNT(*) FROM admin_messages WHERE status = 'pending'")->fetchColumn();
|
||||
} catch (Throwable $e) {
|
||||
// Die Navigation soll auch dann benutzbar bleiben, wenn das Postfach temporär nicht verfügbar ist.
|
||||
$adminInboxBadgeCount = 0;
|
||||
}
|
||||
|
||||
$adminTabs = [
|
||||
'users' => ['label' => 'Nutzerverwaltung', 'href' => 'admin.php'],
|
||||
'inbox' => ['label' => 'Postfach', 'href' => 'admin_inbox.php', 'badge' => $adminInboxBadgeCount],
|
||||
'kalli' => ['label' => 'Kalli', 'href' => 'admin_kalli.php'],
|
||||
'brandschutz' => ['label' => 'Brandschutz', 'href' => 'admin_brandschutz.php'],
|
||||
'notices' => ['label' => 'Meldungen', 'href' => 'admin_notices.php'],
|
||||
];
|
||||
?>
|
||||
<div class="content-tab-bar">
|
||||
<?php foreach ($adminTabs as $tabKey => $tab): ?>
|
||||
<a class="content-tab-bar__item<?= $adminActiveTab === $tabKey ? ' active' : '' ?>" href="<?= htmlspecialchars($tab['href'], ENT_QUOTES, 'UTF-8') ?>">
|
||||
<?= htmlspecialchars($tab['label'], ENT_QUOTES, 'UTF-8') ?>
|
||||
<?php if (!empty($tab['badge'])): ?>
|
||||
<span class="content-tab-bar__badge"><?= (int)$tab['badge'] ?></span>
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
Reference in New Issue
Block a user