2016-09-02 10:56:07 +01:00
|
|
|
<nav class="navbar {{ $theme_navbar_class }}">
|
2016-09-01 16:23:39 +01:00
|
|
|
<div class="container">
|
|
|
|
<!-- Brand and toggle get grouped for better mobile display -->
|
|
|
|
<div class="navbar-header">
|
|
|
|
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
|
|
|
|
<span class="sr-only">Toggle navigation</span>
|
|
|
|
<span class="icon-bar"></span>
|
|
|
|
<span class="icon-bar"></span>
|
|
|
|
<span class="icon-bar"></span>
|
|
|
|
</button>
|
2016-09-05 15:28:56 +01:00
|
|
|
<a class="navbar-brand" href="{{ route('home') }}">{{ UserConfig::get('app_name') }}</a>
|
2016-09-01 16:23:39 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Collect the nav links, forms, and other content for toggling -->
|
|
|
|
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
|
|
|
<ul class="nav navbar-nav">
|
2016-09-09 15:06:34 +01:00
|
|
|
@if (count($albums) > 0)
|
2016-09-01 16:23:39 +01:00
|
|
|
<li class="dropdown">
|
2016-09-09 15:06:34 +01:00
|
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">@lang('navigation.navbar.albums') <span class="caret"></span></a>
|
2016-09-01 16:23:39 +01:00
|
|
|
<ul class="dropdown-menu">
|
2016-09-03 22:13:05 +01:00
|
|
|
@foreach ($albums as $album)
|
|
|
|
<li><a href="{{ $album->url() }}">{{ $album->name }}</a></li>
|
|
|
|
@endforeach
|
2016-09-01 16:23:39 +01:00
|
|
|
</ul>
|
|
|
|
</li>
|
2016-09-09 15:06:34 +01:00
|
|
|
@endif
|
2016-09-01 16:23:39 +01:00
|
|
|
|
|
|
|
@can('admin-access')
|
|
|
|
<li class="dropdown">
|
2016-09-09 15:06:34 +01:00
|
|
|
<li><a href="{{ route('admin') }}"><i class="fa fa-fw fa-cog"></i> @lang('navigation.navbar.admin')</a></li>
|
2016-09-01 16:23:39 +01:00
|
|
|
</li>
|
|
|
|
@endcan
|
|
|
|
</ul>
|
2016-09-03 22:13:05 +01:00
|
|
|
|
2016-09-01 16:23:39 +01:00
|
|
|
<ul class="nav navbar-nav navbar-right">
|
|
|
|
{{-- Authentication Links --}}
|
|
|
|
@if (Auth::guest())
|
2016-09-09 15:06:34 +01:00
|
|
|
<li><a href="{{ url('/login') }}">@lang('navigation.navbar.login')</a></li>
|
2016-09-05 21:43:58 +01:00
|
|
|
|
|
|
|
@if (UserConfig::get('allow_self_registration') == 1)
|
2016-09-09 15:06:34 +01:00
|
|
|
<li><a href="{{ url('/register') }}">@lang('navigation.navbar.register')</a></li>
|
2016-09-05 21:43:58 +01:00
|
|
|
@endif
|
2016-09-01 16:23:39 +01:00
|
|
|
@else
|
|
|
|
<li class="dropdown">
|
2016-09-05 12:01:30 +01:00
|
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false" style="padding-top: 4px; padding-bottom: 4px;">
|
|
|
|
{{ Auth::user()->name }}
|
|
|
|
<img class="avatar" src="{{ \App\Helpers\MiscHelper::gravatarUrl(Auth::user()->email, 42) }}" alt="{{ Auth::user()->name }}" title="{{ Auth::user()->name }}" />
|
|
|
|
<span class="caret"></span>
|
2016-09-01 16:23:39 +01:00
|
|
|
</a>
|
|
|
|
|
|
|
|
<ul class="dropdown-menu" role="menu">
|
|
|
|
<li>
|
2016-09-09 15:06:34 +01:00
|
|
|
<a href="{{ url('/logout') }}" onclick="event.preventDefault(); document.getElementById('logout-form').submit();">@lang('navigation.navbar.logout')</a>
|
2016-09-01 16:23:39 +01:00
|
|
|
|
|
|
|
<form id="logout-form" action="{{ url('/logout') }}" method="POST" style="display: none;">
|
|
|
|
{{ csrf_field() }}
|
|
|
|
</form>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
@endif
|
|
|
|
</ul>
|
|
|
|
</div><!-- /.navbar-collapse -->
|
|
|
|
</div><!-- /.container-fluid -->
|
|
|
|
</nav>
|