@php /* Auto-breadcrumb from the sidebar menu config (sections are skipped). */ $autoCrumbs = []; foreach (config('menu', []) as $item) { if (isset($item['section'])) continue; if (! empty($item['route']) && \Route::has($item['route']) && request()->routeIs($item['route'])) { $autoCrumbs[] = ['label' => $item['title'], 'url' => route($item['route'])]; break; } } @endphp
{{-- Mobile sidebar toggle --}} {{-- Breadcrumbs --}}
@foreach ($autoCrumbs as $crumb) / {{ $crumb['label'] }} @endforeach
{{-- Download Desktop App --}} {{-- Viewing preferences: display timezone + day boundary --}} @include('layouts.partials.view-preferences') {{-- Active-company switcher --}} @include('layouts.partials.company-switcher') {{-- Actions --}}
@php /* The links used to be hardcoded here, which meant a code deploy every time a build moved. They now live in `settings` and are pasted by the Super Admin in the form at the bottom of this modal. A missing link greys its card out rather than linking nowhere. */ $downloadMacUrl = \App\Models\Setting::get(\App\Models\Setting::DOWNLOAD_MAC_URL); $downloadMacIntelUrl = \App\Models\Setting::get(\App\Models\Setting::DOWNLOAD_MAC_INTEL_URL); $downloadWinUrl = \App\Models\Setting::get(\App\Models\Setting::DOWNLOAD_WIN_URL); /* Not shown in this modal — they render as players on the public download page. Read here only so the Super Admin form below can edit them. */ $tutorialMacUrl = \App\Models\Setting::get(\App\Models\Setting::TUTORIAL_MAC_URL); $tutorialWinUrl = \App\Models\Setting::get(\App\Models\Setting::TUTORIAL_WIN_URL); $canEditDownloads = auth()->user()?->isSuperAdmin() ?? false; @endphp {{-- Download Desktop App modal --}} {{-- Theme toggle (#foa-theme-toggle) is wired in layouts/partials/scripts.blade.php --}}