85 lines
4.7 KiB
PHP
85 lines
4.7 KiB
PHP
<nav class="navbar navbar-expand-lg navbar-dark">
|
|
<a class="navbar-brand" href="{{ route('home') }}"><i class="fa fa-fw fa-photo"></i> {{ UserConfig::get('app_name') }}</a>
|
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar-content" aria-controls="navbar-content" aria-expanded="false" aria-label="Toggle navigation">
|
|
<i class="fa fa-fw fa-bars"></i>
|
|
</button>
|
|
|
|
<div class="collapse navbar-collapse" id="navbar-content">
|
|
<ul class="navbar-nav mr-auto">
|
|
@can('photo.quick_upload')
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="#" data-toggle="modal" data-target="#quick-upload-modal">
|
|
<i class="fa fa-plus"></i> @lang('navigation.navbar.quick_post')
|
|
</a>
|
|
</li>
|
|
@endcan
|
|
|
|
@if (count($albums) > 0)
|
|
<li class="nav-item dropdown ml-2">
|
|
<a class="nav-link dropdown-toggle" href="{{ url('/') }}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
<i class="fa fa-book"></i> @lang('navigation.navbar.albums')
|
|
</a>
|
|
<div class="dropdown-menu">
|
|
@foreach ($albums as $album)
|
|
<a class="dropdown-item" href="{{ $album->url() }}">{{ $album->name }}</a>
|
|
@endforeach
|
|
</div>
|
|
</li>
|
|
@endif
|
|
|
|
@if (count($g_labels) > 0)
|
|
<li class="nav-item dropdown ml-2">
|
|
<a class="nav-link dropdown-toggle" href="{{ url('/') }}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
<i class="fa fa-tags"></i> @lang('navigation.navbar.labels')
|
|
</a>
|
|
<div class="dropdown-menu">
|
|
@foreach ($g_labels as $label)
|
|
<a class="dropdown-item" href="{{ $label->url() }}">{{ $label->name }} ({{ number_format($label->photos_count, 0) }})</a>
|
|
@endforeach
|
|
|
|
@if ($g_more_labels > 0)
|
|
<a class="dropdown-item" href="{{ route('labels') }}">{{ trans_choice('gallery.show_more_labels', $g_more_labels) }}</a>
|
|
@endif
|
|
</div>
|
|
</li>
|
|
@endif
|
|
|
|
@if (count($albums) > 0 && \App\User::currentOrAnonymous()->can('statistics.public-access'))
|
|
<li class="nav-item ml-2">
|
|
<a class="nav-link" href="{{ route('statistics.index') }}"><i class="fa fa-bar-chart"></i> @lang('navigation.navbar.statistics')</a>
|
|
</li>
|
|
@endif
|
|
|
|
@if (!Auth::guest() && (Auth::user()->can('admin:access')))
|
|
<li class="nav-item ml-2">
|
|
<a class="nav-link" href="{{ route('admin') }}"><i class="fa fa-fw fa-cog"></i> @lang('navigation.navbar.admin')</a>
|
|
</li>
|
|
@endif
|
|
</ul>
|
|
|
|
@if (Auth::guest())
|
|
<form class="form-inline my-2 my-lg-0">
|
|
@if (UserConfig::get('allow_self_registration') == 1)
|
|
<a class="btn btn-info" href="{{ url('/register') }}" style="margin-right: 10px;">@lang('navigation.navbar.register')</a>
|
|
@endif
|
|
<a class="btn {{ UserConfig::get('allow_self_registration') == 1 ? 'btn-outline-info' : 'btn-info' }}" href="{{ url('/login') }}">@lang('navigation.navbar.login')</a>
|
|
</form>
|
|
@else
|
|
<ul class="navbar-nav right">
|
|
<li class="nav-item dropdown">
|
|
<a class="nav-link dropdown-toggle" href="{{ url('/') }}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
{{ Auth::user()->name }}
|
|
{{--<img class="avatar" src="{{ Theme::gravatarUrl(Auth::user()->email, 42) }}" alt="{{ Auth::user()->name }}" title="{{ Auth::user()->name }}" />--}}
|
|
</a>
|
|
<div class="dropdown-menu dropdown-menu-right">
|
|
<a class="dropdown-item" href="{{ route('auth.changePassword') }}">@lang('navigation.navbar.change_password')</a>
|
|
<a class="dropdown-item" href="{{ url('/logout') }}" onclick="event.preventDefault(); document.getElementById('logout-form').submit();">@lang('navigation.navbar.logout')</a>
|
|
<form id="logout-form" action="{{ url('/logout') }}" method="POST" style="display: none;">
|
|
{{ csrf_field() }}
|
|
</form>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
@endif
|
|
</div>
|
|
</nav> |