Upload via GUI (364 Dateien)

This commit is contained in:
2026-11-01 11:15:52 +00:00
parent aeae758b4d
commit c1a170563d
7 changed files with 781 additions and 448 deletions
+32 -32
View File
@@ -167,46 +167,46 @@ if ('serviceWorker' in navigator) {
</nav>
<div class="sidebar-footer">
<?php if ($staff): ?>
<div style="display:flex; align-items:center; gap:10px; margin-bottom:8px">
<?php
$__unreadMentions = 0;
$__unreadChat = 0;
$__ms = get_db()->prepare('SELECT COUNT(*) FROM staff_mentions WHERE mentioned_staff_id=? AND is_read=0');
$__ms->execute([$staff['id']]);
$__unreadMentions = (int)$__ms->fetchColumn();
$__cs = get_db()->prepare('SELECT COUNT(*) FROM staff_chat_messages WHERE to_staff_id=? AND is_read=0');
$__cs->execute([$staff['id']]);
$__unreadChat = (int)$__cs->fetchColumn();
$__onVacation = !empty($staff['is_on_vacation']);
?>
<div class="sf-user">
<?php if (!empty($staff['avatar_path'])): ?>
<img src="<?= e($staff['avatar_path']) ?>" alt="" style="width:32px; height:32px; border-radius:50%; object-fit:cover; flex-shrink:0; border:1px solid #2a3744">
<img class="sf-avatar" src="<?= e($staff['avatar_path']) ?>" alt="">
<?php else: ?>
<div style="width:32px; height:32px; border-radius:50%; background:rgba(15,111,106,.3); display:flex; align-items:center; justify-content:center; font-size:.85rem; font-weight:700; color:#8bc4c2; flex-shrink:0">
<?= mb_strtoupper(mb_substr($staff['name'], 0, 1)) ?>
</div>
<div class="sf-avatar sf-avatar-letter"><?= mb_strtoupper(mb_substr($staff['name'], 0, 1)) ?></div>
<?php endif; ?>
<div style="min-width:0">
<div style="font-size:.82rem; font-weight:600; color:#fff; overflow:hidden; text-overflow:ellipsis; white-space:nowrap"><?= e($staff['name']) ?></div>
<div style="font-size:.72rem; color:#4e6278"><?= $staff['role']==='admin'?'Administrator':'Mitarbeiter' ?></div>
<?php if (!empty($staff['is_on_vacation'])): ?>
<div style="font-size:.7rem; color:var(--accent)">🌴 Im Urlaub</div>
<?php endif; ?>
<div class="sf-who">
<div class="sf-name"><?= e($staff['name']) ?></div>
<div class="sf-role"><?= $staff['role']==='admin'?'Administrator':'Mitarbeiter' ?></div>
<?php if ($__onVacation): ?><span class="sf-vac">🌴 Im Urlaub</span><?php endif; ?>
</div>
</div>
<div class="lang-row" style="margin-bottom:10px"><?= i18n_switcher_html('dark') ?></div>
<div style="display:flex; gap:14px; align-items:center">
<?php
$__unreadMentions = 0;
$__unreadChat = 0;
if ($staff) {
$__ms = get_db()->prepare('SELECT COUNT(*) FROM staff_mentions WHERE mentioned_staff_id=? AND is_read=0');
$__ms->execute([$staff['id']]);
$__unreadMentions = (int)$__ms->fetchColumn();
$__cs = get_db()->prepare('SELECT COUNT(*) FROM staff_chat_messages WHERE to_staff_id=? AND is_read=0');
$__cs->execute([$staff['id']]);
$__unreadChat = (int)$__cs->fetchColumn();
}
?>
<a href="/staff/chat.php" title="Interner Chat" style="position:relative; color:#8b97a3; font-size:.78rem; text-decoration:none">
💬<?php if ($__unreadChat > 0): ?><span style="position:absolute;top:-6px;right:-8px;background:#dc2626;color:#fff;border-radius:50%;font-size:.6rem;font-weight:700;width:15px;height:15px;display:flex;align-items:center;justify-content:center;line-height:1"><?= $__unreadChat > 9 ? '9+' : $__unreadChat ?></span><?php endif; ?>
<div class="sf-actions">
<a class="sf-btn" href="/staff/chat.php" title="Interner Chat" aria-label="Interner Chat">
<svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 12a8 8 0 0 1-11.6 7.1L3 21l1.9-5.4A8 8 0 1 1 21 12z"/></svg>
<?php if ($__unreadChat > 0): ?><span class="sf-badge"><?= $__unreadChat > 9 ? '9+' : $__unreadChat ?></span><?php endif; ?>
</a>
<a href="/staff/mentions.php" title="Erwähnungen" style="position:relative; color:#8b97a3; font-size:.78rem; text-decoration:none">
🔔<?php if ($__unreadMentions > 0): ?><span style="position:absolute;top:-6px;right:-8px;background:#dc2626;color:#fff;border-radius:50%;font-size:.6rem;font-weight:700;width:15px;height:15px;display:flex;align-items:center;justify-content:center;line-height:1"><?= $__unreadMentions > 9 ? '9+' : $__unreadMentions ?></span><?php endif; ?>
<a class="sf-btn" href="/staff/mentions.php" title="Erwähnungen" aria-label="Erwähnungen">
<svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M18 8a6 6 0 0 0-12 0c0 7-3 9-3 9h18s-3-2-3-9M13.7 21a2 2 0 0 1-3.4 0"/></svg>
<?php if ($__unreadMentions > 0): ?><span class="sf-badge"><?= $__unreadMentions > 9 ? '9+' : $__unreadMentions ?></span><?php endif; ?>
</a>
<a class="sf-btn" href="/staff/profile.php" title="Profil" aria-label="Profil">
<svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 21a8 8 0 0 0-16 0M12 3a4 4 0 1 0 0 8 4 4 0 0 0 0-8z"/></svg>
</a>
<a class="sf-btn sf-btn-out" href="/staff/logout.php" title="Abmelden" aria-label="Abmelden">
<svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4M16 17l5-5-5-5M21 12H9"/></svg>
</a>
<a href="/staff/profile.php" style="color:#8b97a3; font-size:.78rem">Profil</a>
<a href="/staff/logout.php" style="color:#8b97a3; font-size:.78rem">Abmelden</a>
</div>
<div class="lang-row"><?= i18n_switcher_html('dark') ?></div>
<?php endif; ?>
</div>
</aside>