mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-12-17 00:34:00 +08:00
d5a3bdb7aa
- Moved "common" template partials, that are only used in layouts, to layouts/parts folder. - Simplified HTML structure of header template. - Extracted logo and links from header template to simplify. - Added header-links-start template for easier extension/customization without needing to override full list of links. - Added test to cover usage of this. For #4564
25 lines
1.3 KiB
PHP
25 lines
1.3 KiB
PHP
@include('layouts.parts.header-links-start')
|
|
|
|
@if (user()->hasAppAccess())
|
|
<a class="hide-over-l" href="{{ url('/search') }}">@icon('search'){{ trans('common.search') }}</a>
|
|
@if(userCanOnAny('view', \BookStack\Entities\Models\Bookshelf::class) || userCan('bookshelf-view-all') || userCan('bookshelf-view-own'))
|
|
<a href="{{ url('/shelves') }}"
|
|
data-shortcut="shelves_view">@icon('bookshelf'){{ trans('entities.shelves') }}</a>
|
|
@endif
|
|
<a href="{{ url('/books') }}" data-shortcut="books_view">@icon('books'){{ trans('entities.books') }}</a>
|
|
@if(!user()->isGuest() && userCan('settings-manage'))
|
|
<a href="{{ url('/settings') }}"
|
|
data-shortcut="settings_view">@icon('settings'){{ trans('settings.settings') }}</a>
|
|
@endif
|
|
@if(!user()->isGuest() && userCan('users-manage') && !userCan('settings-manage'))
|
|
<a href="{{ url('/settings/users') }}"
|
|
data-shortcut="settings_view">@icon('users'){{ trans('settings.users') }}</a>
|
|
@endif
|
|
@endif
|
|
|
|
@if(user()->isGuest())
|
|
@if(setting('registration-enabled') && config('auth.method') === 'standard')
|
|
<a href="{{ url('/register') }}">@icon('new-user'){{ trans('auth.sign_up') }}</a>
|
|
@endif
|
|
<a href="{{ url('/login') }}">@icon('login'){{ trans('auth.log_in') }}</a>
|
|
@endif |