@auth
@if (getActiveProfile() && method_exists(getActiveProfile(), 'accounts') && getActiveProfile()->accounts()->notRemoved()->count() > 0) @if (getActiveProfile()->accounts()->active()->count() > 0) @if (canActiveProfileCreatePayments()) {{ __('Pay') }} @else {{ __('Pay') }} @endif @endif {{ __('Transactions') }} {{ __('Reports') }} {{ __('Contacts') }} {{ __('Calls') }} @endif @usercan('manage posts') @profile('admin') {{ __('Posts') }} @endprofile @endusercan @usercan('manage categories') @profile('admin') {{ __('Categories') }} @endprofile @endusercan @usercan('manage tags') @profile('admin') {{ __('Tags') }} @endprofile @endusercan @usercan('manage profiles') @profile('admin') {{ __('Profiles') }} @endprofile @endusercan @profile('admin') {{ __('Calls') }} @endprofile @usercan('manage mailings') @profile('admin') {{ __('Mailings') }} @endprofile @endusercan {{-- @usercan('manage permissions') @profile('admin') {{ __('Permissions') }} @endprofile @endusercan --}} {{-- @usercan('manage roles') @profile('admin') {{ __('Roles') }} @endprofile @endusercan --}} @livewire('main-search-bar')
{{-- @endif --}} @php $languages = Illuminate\Support\Facades\DB::table('languages')->orderBy('lang_code', 'asc')->get(); $supportedLocales = LaravelLocalization::getSupportedLocales(); // Sort the supported locales alphabetically by the language name uasort($supportedLocales, function ($a, $b) { return strcmp($a['native'], $b['native']); }); @endphp
@foreach ($supportedLocales as $localeCode => $properties) @php $language = $languages->firstWhere('lang_code', strtolower($localeCode)); @endphp @if ($language) @php $isActive = strtolower($localeCode) === strtolower(app()->getLocale()); @endphp {{ $language->flag }} {{ Lang::get($language->name, [], $localeCode) }} @endif @endforeach
@if (Laravel\Jetstream\Jetstream::managesProfilePhotos()) @else @endif @if (session('activeProfileType') !== 'App\Models\Admin') {{ __('Account info') }}
@endif @if (auth()->guard('web')->user()?->hasOtherProfiles()) @endif @if (session('activeProfileType') !== 'App\Models\Admin') {{ __('Edit profile') }} {{ __('Show profile') }} @else {{-- Disabled link --}}
{{ __('Edit profile') }}
{{-- Disabled link --}}
{{ __('Show profile') }}
@endif {{ __('Settings') }} @if (Laravel\Jetstream\Jetstream::hasApiFeatures()) {{ __('API Tokens') }} @endif
@csrf {{ __('Log out') }}
{{ __('Main page') }} @if (getActiveProfile() && method_exists(getActiveProfile(), 'accounts') && getActiveProfile()->accounts()->notRemoved()->count() > 0) @if (getActiveProfile()->accounts()->active()->count() > 0) @if (canActiveProfileCreatePayments()) {{ __('Pay') }} @else {{ __('Pay') }} @endif @endif {{ __('Transactions') }} {{ __('Reports') }} {{ __('Contacts') }} {{ __('Calls') }} @endif @usercan('manage posts') @profile('admin') {{ __('Posts') }} @endprofile @endusercan @usercan('manage categories') @profile('admin') {{ __('Categories') }} @endprofile @endusercan @usercan('manage tags') @profile('admin') {{ __('Tags') }} @endprofile @endusercan @usercan('manage profiles') @profile('admin') {{ __('Profiles') }} @endprofile @endusercan @profile('admin') {{ __('Calls') }} @endprofile @usercan('manage mailings') @profile('admin') {{ __('Mailings') }} @endprofile @endusercan {{ __('Messenger') }}
@livewire('main-search-bar')
@if (Laravel\Jetstream\Jetstream::managesProfilePhotos())
@endif
@if (auth()->guard('web')->user()?->hasOtherProfiles()) @else
{{ Auth::user()->name }}
@endif
@foreach ($supportedLocales as $localeCode => $properties) @php $language = $languages->firstWhere('lang_code', strtolower($localeCode)); @endphp @if ($language) @php $isActive = strtolower($localeCode) === strtolower(app()->getLocale()); @endphp {{ $language->flag }} {{ Lang::get($language->name, [], $localeCode) }} @endif @endforeach
@if (session('activeProfileType') !== 'App\Models\Admin')
{{ __('Account info') }}
@endif @if (session('activeProfileType') !== 'App\Models\Admin') {{ __('Edit profile') }} {{ __('Show profile') }} @else
{{ __('Edit profile') }}
{{-- Disabled link --}}
{{ __('Show profile') }}
@endif {{ __('Settings') }} @if (Laravel\Jetstream\Jetstream::hasApiFeatures()) {{ __('API Tokens') }} @endif
@csrf {{ __('Log out') }}
{{-- --}} @endauth