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">
|
|
|
|
<li class="dropdown">
|
2016-09-03 22:13:05 +01:00
|
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">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>
|
|
|
|
|
|
|
|
@can('admin-access')
|
|
|
|
<li class="dropdown">
|
|
|
|
<a href="{{ route('admin') }}" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">@lang('global.nav_admin') <span class="caret"></span></a>
|
|
|
|
<ul class="dropdown-menu">
|
|
|
|
<li><a href="{{ route('admin') }}">@lang('global.nav_admin_control')</a></li>
|
|
|
|
<li role="separator" class="divider"></li>
|
2016-09-01 17:17:55 +01:00
|
|
|
<li><a href="{{ route('albums.index') }}">@lang('global.nav_admin_albums')</a></li>
|
2016-09-01 16:23:39 +01:00
|
|
|
</ul>
|
|
|
|
</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())
|
|
|
|
<li><a href="{{ url('/login') }}">Login</a></li>
|
2016-09-05 21:43:58 +01:00
|
|
|
|
|
|
|
@if (UserConfig::get('allow_self_registration') == 1)
|
|
|
|
<li><a href="{{ url('/register') }}">Register</a></li>
|
|
|
|
@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-03 22:13:05 +01:00
|
|
|
<a href="{{ url('/logout') }}" onclick="event.preventDefault(); document.getElementById('logout-form').submit();">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>
|