'', 'visible' => $hasOrganization, 'items' => [ [ 'label' => t('Tenants'), 'path' => 'admin/tenants', 'active' => navActive('admin/tenants', true), 'visible' => $canViewTenants, 'withTenant' => false, ], [ 'label' => t('Departments'), 'path' => 'admin/departments', 'active' => navActive('admin/departments', true), 'visible' => $canViewDepartments, 'withTenant' => true, ], [ 'label' => t('Users'), 'path' => 'admin/users', 'active' => navActive('admin/users', true), 'visible' => $canViewUsers, 'withTenant' => true, ], ], ], [ 'label' => t('Roles & permissions'), 'visible' => $hasUsersSection, 'items' => [ [ 'label' => t('Roles'), 'path' => 'admin/roles', 'active' => navActive('admin/roles', true), 'visible' => $canViewRoles, 'withTenant' => false, ], [ 'label' => t('Permissions'), 'path' => 'admin/permissions', 'active' => navActive('admin/permissions', true), 'visible' => $canViewPermissions, 'withTenant' => false, ], ], ], [ 'label' => t('System'), 'visible' => $hasSystemSection, 'items' => [ [ 'label' => t('Statistics'), 'path' => 'admin/stats', 'active' => navActive('admin/stats', true), 'visible' => $canViewStats, 'withTenant' => false, ], [ 'label' => t('Mail logs'), 'path' => 'admin/mail-log', 'active' => navActive('admin/mail-log', true), 'visible' => $canViewMailLog, 'withTenant' => false, ], [ 'label' => t('Settings'), 'path' => 'admin/settings', 'active' => navActive('admin/settings', true), 'visible' => $canViewSettings, 'withTenant' => false, ], ], ], ]; // Render helper for admin sections $renderNavSection = static function (array $section, string $tenantQueryParam): void { if (empty($section['visible'])) { return; } $items = $section['items'] ?? []; $items = array_values(array_filter($items, static fn ($item) => !empty($item['visible']))); if (!$items) { return; } ?> '', 'aria' => '']; ?>
  • >
  • 1 && !empty($currentTenant['uuid'])) { $tenantQueryParam = '?tenant=' . urlencode($currentTenant['uuid']); } // Tenant logo display (without switcher - switcher is now in topbar) $tenantUuid = $currentTenant['uuid'] ?? ''; $tenantName = $currentTenant['description'] ?? ''; $hasTenantAvatar = $tenantUuid && TenantAvatarService::hasAvatar($tenantUuid); $addressBookUrl = lurl('address-book'); $activeAddressTenants = array_filter(array_map('trim', explode(',', (string) ($_GET['tenants'] ?? '')))); $activeAddressDepartments = array_filter(array_map('intval', explode(',', (string) ($_GET['departments'] ?? '')))); $peopleGroups = $_SESSION['available_departments_by_tenant'] ?? []; ?>