2019-04-07 06:34:40 -04:00
|
|
|
<header id="header" header-mobile-toggle class="primary-background">
|
2019-04-07 04:57:48 -04:00
|
|
|
<div class="grid mx-l">
|
2019-02-03 12:34:15 -05:00
|
|
|
|
2018-10-16 13:49:16 -04:00
|
|
|
<div>
|
|
|
|
<a href="{{ baseUrl('/') }}" class="logo">
|
|
|
|
@if(setting('app-logo', '') !== 'none')
|
|
|
|
<img class="logo-image" src="{{ setting('app-logo', '') === '' ? baseUrl('/logo.png') : baseUrl(setting('app-logo', '')) }}" alt="Logo">
|
|
|
|
@endif
|
|
|
|
@if (setting('app-name-header'))
|
|
|
|
<span class="logo-text">{{ setting('app-name') }}</span>
|
|
|
|
@endif
|
|
|
|
</a>
|
|
|
|
<div class="mobile-menu-toggle hide-over-l">@icon('more')</div>
|
|
|
|
</div>
|
2019-02-03 12:34:15 -05:00
|
|
|
|
2018-10-16 13:49:16 -04:00
|
|
|
<div class="header-search hide-under-l">
|
2019-02-03 12:34:15 -05:00
|
|
|
@if (hasAppAccess())
|
2018-10-16 13:49:16 -04:00
|
|
|
<form action="{{ baseUrl('/search') }}" method="GET" class="search-box">
|
|
|
|
<button id="header-search-box-button" type="submit">@icon('search') </button>
|
|
|
|
<input id="header-search-box-input" type="text" name="term" tabindex="2" placeholder="{{ trans('common.search') }}" value="{{ isset($searchTerm) ? $searchTerm : '' }}">
|
|
|
|
</form>
|
2019-02-03 12:34:15 -05:00
|
|
|
@endif
|
2018-10-16 13:49:16 -04:00
|
|
|
</div>
|
2019-02-03 12:34:15 -05:00
|
|
|
|
2018-10-16 13:49:16 -04:00
|
|
|
<div class="text-right">
|
|
|
|
<div class="header-links">
|
|
|
|
<div class="links text-center">
|
2019-02-03 12:34:15 -05:00
|
|
|
@if (hasAppAccess())
|
|
|
|
<a class="hide-over-l" href="{{ baseUrl('/search') }}">@icon('search'){{ trans('common.search') }}</a>
|
2019-03-10 17:40:02 -04:00
|
|
|
@if(userCanOnAny('view', \BookStack\Entities\Bookshelf::class) || userCan('bookshelf-view-all') || userCan('bookshelf-view-own'))
|
2019-02-03 12:34:15 -05:00
|
|
|
<a href="{{ baseUrl('/shelves') }}">@icon('bookshelf'){{ trans('entities.shelves') }}</a>
|
|
|
|
@endif
|
2019-02-24 10:57:35 -05:00
|
|
|
<a href="{{ baseUrl('/books') }}">@icon('books'){{ trans('entities.books') }}</a>
|
2019-02-03 12:34:15 -05:00
|
|
|
@if(signedInUser() && userCan('settings-manage'))
|
|
|
|
<a href="{{ baseUrl('/settings') }}">@icon('settings'){{ trans('settings.settings') }}</a>
|
|
|
|
@endif
|
|
|
|
@if(signedInUser() && userCan('users-manage') && !userCan('settings-manage'))
|
|
|
|
<a href="{{ baseUrl('/settings/users') }}">@icon('users'){{ trans('settings.users') }}</a>
|
|
|
|
@endif
|
2019-01-13 09:10:27 -05:00
|
|
|
@endif
|
2019-02-03 12:34:15 -05:00
|
|
|
|
2018-10-16 13:49:16 -04:00
|
|
|
@if(!signedInUser())
|
2019-01-13 09:10:27 -05:00
|
|
|
@if(setting('registration-enabled', false))
|
2019-04-16 07:18:51 -04:00
|
|
|
<a href="{{ baseUrl('/register') }}">@icon('new-user') {{ trans('auth.sign_up') }}</a>
|
2019-01-13 09:10:27 -05:00
|
|
|
@endif
|
|
|
|
<a href="{{ baseUrl('/login') }}">@icon('login') {{ trans('auth.log_in') }}</a>
|
2018-10-16 13:49:16 -04:00
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
@if(signedInUser())
|
|
|
|
<?php $currentUser = user(); ?>
|
|
|
|
<div class="dropdown-container" dropdown>
|
|
|
|
<span class="user-name hide-under-l" dropdown-toggle>
|
|
|
|
<img class="avatar" src="{{$currentUser->getAvatar(30)}}" alt="{{ $currentUser->name }}">
|
|
|
|
<span class="name">{{ $currentUser->getShortName(9) }}</span> @icon('caret-down')
|
|
|
|
</span>
|
2019-05-05 09:43:26 -04:00
|
|
|
<ul class="dropdown-menu">
|
2018-10-16 13:49:16 -04:00
|
|
|
<li>
|
2019-04-14 07:04:20 -04:00
|
|
|
<a href="{{ baseUrl("/user/{$currentUser->id}") }}">@icon('user'){{ trans('common.view_profile') }}</a>
|
2018-10-16 13:49:16 -04:00
|
|
|
</li>
|
|
|
|
<li>
|
2019-04-14 07:04:20 -04:00
|
|
|
<a href="{{ baseUrl("/settings/users/{$currentUser->id}") }}">@icon('edit'){{ trans('common.edit_profile') }}</a>
|
2018-10-16 13:49:16 -04:00
|
|
|
</li>
|
|
|
|
<li>
|
2019-04-14 07:04:20 -04:00
|
|
|
<a href="{{ baseUrl('/logout') }}">@icon('logout'){{ trans('auth.logout') }}</a>
|
2018-10-16 13:49:16 -04:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
</div>
|
2019-02-03 12:34:15 -05:00
|
|
|
|
2018-10-16 13:49:16 -04:00
|
|
|
</div>
|
|
|
|
</header>
|