2017-03-22 16:55:39 +00:00
|
|
|
<nav class="navbar navbar-toggleable-md navbar-inverse bg-primary">
|
2017-03-24 14:43:53 +00:00
|
|
|
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbar-content" aria-controls="navbar-content" aria-expanded="false" aria-label="Toggle navigation">
|
2017-03-22 16:55:39 +00:00
|
|
|
<span class="navbar-toggler-icon"></span>
|
|
|
|
</button>
|
|
|
|
<a class="navbar-brand" href="{{ route('home') }}"><i class="fa fa-fw fa-photo"></i> {{ UserConfig::get('app_name') }}</a>
|
2016-09-01 16:23:39 +01:00
|
|
|
|
2017-03-22 16:55:39 +00:00
|
|
|
<div class="collapse navbar-collapse" id="navbar-content">
|
|
|
|
<ul class="navbar-nav mr-auto">
|
|
|
|
@if (count($albums) > 0)
|
|
|
|
<li class="nav-item dropdown">
|
|
|
|
<a class="nav-link dropdown-toggle" href="{{ url('/') }}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
|
|
@lang('navigation.navbar.albums')
|
|
|
|
</a>
|
|
|
|
<div class="dropdown-menu">
|
2016-09-03 22:13:05 +01:00
|
|
|
@foreach ($albums as $album)
|
2017-03-22 16:55:39 +00:00
|
|
|
<a class="dropdown-item" href="{{ $album->url() }}">{{ $album->name }}</a>
|
2016-09-03 22:13:05 +01:00
|
|
|
@endforeach
|
2017-03-22 16:55:39 +00:00
|
|
|
</div>
|
2016-09-01 16:23:39 +01:00
|
|
|
</li>
|
2017-03-22 16:55:39 +00:00
|
|
|
@endif
|
2016-09-03 22:13:05 +01:00
|
|
|
|
2017-04-15 09:41:15 +01:00
|
|
|
@if (!Auth::guest() && (Auth::user()->can('admin:access')))
|
2017-03-22 16:55:39 +00:00
|
|
|
<li class="nav-item">
|
|
|
|
<a class="nav-link" href="{{ route('admin') }}"><i class="fa fa-fw fa-cog"></i> @lang('navigation.navbar.admin')</a>
|
|
|
|
</li>
|
|
|
|
@endif
|
|
|
|
</ul>
|
2016-09-01 16:23:39 +01:00
|
|
|
|
2017-03-22 16:55:39 +00:00
|
|
|
@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>
|
2016-09-01 16:23:39 +01:00
|
|
|
@endif
|
2017-03-22 16:55:39 +00:00
|
|
|
<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>
|
2017-04-16 09:00:57 +01:00
|
|
|
<div class="dropdown-menu dropdown-menu-right">
|
2017-04-10 21:04:10 +01:00
|
|
|
<a class="dropdown-item" href="{{ route('auth.changePassword') }}">@lang('navigation.navbar.change_password')</a>
|
2017-03-22 16:55:39 +00:00
|
|
|
<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>
|
2016-09-01 16:23:39 +01:00
|
|
|
</ul>
|
2017-03-22 16:55:39 +00:00
|
|
|
@endif
|
|
|
|
</div>
|
2016-09-01 16:23:39 +01:00
|
|
|
</nav>
|