1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Merge branch 'master' into 129-page-templates

This commit is contained in:
Dan Brown
2019-08-04 16:26:38 +01:00
107 changed files with 1465 additions and 500 deletions

View File

@ -7,6 +7,6 @@
<label for="password">{{ trans('auth.password') }}</label>
@include('form.password', ['name' => 'password', 'tabindex' => 1])
<span class="block small mt-s">
<a href="{{ baseUrl('/password/email') }}">{{ trans('auth.forgot_password') }}</a>
<a href="{{ url('/password/email') }}">{{ trans('auth.forgot_password') }}</a>
</span>
</div>

View File

@ -9,7 +9,7 @@
<div class="card content-wrap auto-height">
<h1 class="list-heading">{{ title_case(trans('auth.log_in')) }}</h1>
<form action="{{ baseUrl('/login') }}" method="POST" id="login-form" class="mt-l">
<form action="{{ url('/login') }}" method="POST" id="login-form" class="mt-l">
{!! csrf_field() !!}
<div class="stretch-inputs">
@ -38,7 +38,7 @@
<hr class="my-l">
@foreach($socialDrivers as $driver => $name)
<div>
<a id="social-login-{{$driver}}" class="button outline block svg" href="{{ baseUrl("/login/service/" . $driver) }}">
<a id="social-login-{{$driver}}" class="button outline block svg" href="{{ url("/login/service/" . $driver) }}">
@icon('auth/' . $driver)
{{ trans('auth.log_in_with', ['socialDriver' => $name]) }}
</a>
@ -49,7 +49,7 @@
@if(setting('registration-enabled', false))
<div class="text-center pb-s">
<hr class="my-l">
<a href="{{ baseUrl('/register') }}">{{ trans('auth.dont_have_account') }}</a>
<a href="{{ url('/register') }}">{{ trans('auth.dont_have_account') }}</a>
</div>
@endif
</div>

View File

@ -7,7 +7,7 @@
<p class="text-muted small">{{ trans('auth.reset_password_send_instructions') }}</p>
<form action="{{ baseUrl("/password/email") }}" method="POST" class="stretch-inputs">
<form action="{{ url("/password/email") }}" method="POST" class="stretch-inputs">
{!! csrf_field() !!}
<div class="form-group">

View File

@ -6,7 +6,7 @@
<div class="card content-wrap auto-height">
<h1 class="list-heading">{{ trans('auth.reset_password') }}</h1>
<form action="{{ baseUrl("/password/reset") }}" method="POST" class="stretch-inputs">
<form action="{{ url("/password/reset") }}" method="POST" class="stretch-inputs">
{!! csrf_field() !!}
<input type="hidden" name="token" value="{{ $token }}">

View File

@ -8,7 +8,7 @@
<div class="card content-wrap auto-height">
<h1 class="list-heading">{{ title_case(trans('auth.sign_up')) }}</h1>
<form action="{{ baseUrl("/register") }}" method="POST" class="mt-l stretch-inputs">
<form action="{{ url("/register") }}" method="POST" class="mt-l stretch-inputs">
{!! csrf_field() !!}
<div class="form-group">
@ -28,7 +28,7 @@
<div class="grid half collapse-xs gap-xl v-center mt-m">
<div class="text-small">
<a href="{{ baseUrl('/login') }}">{{ trans('auth.already_have_account') }}</a>
<a href="{{ url('/login') }}">{{ trans('auth.already_have_account') }}</a>
</div>
<div class="from-group text-right">
<button class="button primary">{{ trans('auth.create_account') }}</button>
@ -42,7 +42,7 @@
<hr class="my-l">
@foreach($socialDrivers as $driver => $name)
<div>
<a id="social-register-{{$driver}}" class="button block outline svg" href="{{ baseUrl("/register/service/" . $driver) }}">
<a id="social-register-{{$driver}}" class="button block outline svg" href="{{ url("/register/service/" . $driver) }}">
@icon('auth/' . $driver)
{{ trans('auth.sign_up_with', ['socialDriver' => $name]) }}
</a>

View File

@ -13,7 +13,7 @@
{{ trans('auth.email_not_confirmed_resend') }}
</p>
<form action="{{ baseUrl("/register/confirm/resend") }}" method="POST" class="stretch-inputs">
<form action="{{ url("/register/confirm/resend") }}" method="POST" class="stretch-inputs">
{!! csrf_field() !!}
<div class="form-group">
<label for="email">{{ trans('auth.email') }}</label>

View File

@ -6,7 +6,7 @@
<!-- Meta -->
<meta name="viewport" content="width=device-width">
<meta name="token" content="{{ csrf_token() }}">
<meta name="base-url" content="{{ baseUrl('/') }}">
<meta name="base-url" content="{{ url('/') }}">
<meta charset="utf-8">
<!-- Styles and Fonts -->

View File

@ -27,7 +27,7 @@
<div class="content-wrap card">
<h1 class="list-heading">{{ trans('entities.books_create') }}</h1>
<form action="{{ isset($bookshelf) ? $bookshelf->getUrl('/create-book') : baseUrl('/books') }}" method="POST" enctype="multipart/form-data">
<form action="{{ isset($bookshelf) ? $bookshelf->getUrl('/create-book') : url('/books') }}" method="POST" enctype="multipart/form-data">
@include('books.form')
</form>
</div>

View File

@ -18,8 +18,8 @@
<p class="small">{{ trans('common.cover_image_description') }}</p>
@include('components.image-picker', [
'defaultImage' => baseUrl('/book_default_cover.png'),
'currentImage' => (isset($model) && $model->cover) ? $model->getBookCover() : baseUrl('/book_default_cover.png') ,
'defaultImage' => url('/book_default_cover.png'),
'currentImage' => (isset($model) && $model->cover) ? $model->getBookCover() : url('/book_default_cover.png') ,
'name' => 'image',
'imageClass' => 'cover'
])
@ -36,6 +36,6 @@
</div>
<div class="form-group text-right">
<a href="{{ isset($book) ? $book->getUrl() : baseUrl('/books') }}" class="button outline">{{ trans('common.cancel') }}</a>
<a href="{{ isset($book) ? $book->getUrl() : url('/books') }}" class="button outline">{{ trans('common.cancel') }}</a>
<button type="submit" class="button primary">{{ trans('entities.books_save') }}</button>
</div>

View File

@ -37,7 +37,7 @@
<h5>{{ trans('common.actions') }}</h5>
<div class="icon-list text-primary">
@if($currentUser->can('book-create-all'))
<a href="{{ baseUrl("/create-book") }}" class="icon-list-item">
<a href="{{ url("/create-book") }}" class="icon-list-item">
<span>@icon('add')</span>
<span>{{ trans('entities.books_create') }}</span>
</a>

View File

@ -28,7 +28,7 @@
@else
<p class="text-muted">{{ trans('entities.books_empty') }}</p>
@if(userCan('books-create-all'))
<a href="{{ baseUrl("/create-book") }}" class="text-pos">@icon('edit'){{ trans('entities.create_now') }}</a>
<a href="{{ url("/create-book") }}" class="text-pos">@icon('edit'){{ trans('entities.create_now') }}</a>
@endif
@endif
</div>

View File

@ -2,9 +2,9 @@
<div class="grid mx-l">
<div>
<a href="{{ baseUrl('/') }}" class="logo">
<a href="{{ url('/') }}" class="logo">
@if(setting('app-logo', '') !== 'none')
<img class="logo-image" src="{{ setting('app-logo', '') === '' ? baseUrl('/logo.png') : baseUrl(setting('app-logo', '')) }}" alt="Logo">
<img class="logo-image" src="{{ setting('app-logo', '') === '' ? url('/logo.png') : url(setting('app-logo', '')) }}" alt="Logo">
@endif
@if (setting('app-name-header'))
<span class="logo-text">{{ setting('app-name') }}</span>
@ -15,7 +15,7 @@
<div class="header-search hide-under-l">
@if (hasAppAccess())
<form action="{{ baseUrl('/search') }}" method="GET" class="search-box">
<form action="{{ url('/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>
@ -26,24 +26,24 @@
<div class="header-links">
<div class="links text-center">
@if (hasAppAccess())
<a class="hide-over-l" href="{{ baseUrl('/search') }}">@icon('search'){{ trans('common.search') }}</a>
<a class="hide-over-l" href="{{ url('/search') }}">@icon('search'){{ trans('common.search') }}</a>
@if(userCanOnAny('view', \BookStack\Entities\Bookshelf::class) || userCan('bookshelf-view-all') || userCan('bookshelf-view-own'))
<a href="{{ baseUrl('/shelves') }}">@icon('bookshelf'){{ trans('entities.shelves') }}</a>
<a href="{{ url('/shelves') }}">@icon('bookshelf'){{ trans('entities.shelves') }}</a>
@endif
<a href="{{ baseUrl('/books') }}">@icon('books'){{ trans('entities.books') }}</a>
<a href="{{ url('/books') }}">@icon('books'){{ trans('entities.books') }}</a>
@if(signedInUser() && userCan('settings-manage'))
<a href="{{ baseUrl('/settings') }}">@icon('settings'){{ trans('settings.settings') }}</a>
<a href="{{ url('/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>
<a href="{{ url('/settings/users') }}">@icon('users'){{ trans('settings.users') }}</a>
@endif
@endif
@if(!signedInUser())
@if(setting('registration-enabled', false))
<a href="{{ baseUrl('/register') }}">@icon('new-user') {{ trans('auth.sign_up') }}</a>
<a href="{{ url('/register') }}">@icon('new-user') {{ trans('auth.sign_up') }}</a>
@endif
<a href="{{ baseUrl('/login') }}">@icon('login') {{ trans('auth.log_in') }}</a>
<a href="{{ url('/login') }}">@icon('login') {{ trans('auth.log_in') }}</a>
@endif
</div>
@if(signedInUser())
@ -55,13 +55,13 @@
</span>
<ul class="dropdown-menu">
<li>
<a href="{{ baseUrl("/user/{$currentUser->id}") }}">@icon('user'){{ trans('common.view_profile') }}</a>
<a href="{{ url("/user/{$currentUser->id}") }}">@icon('user'){{ trans('common.view_profile') }}</a>
</li>
<li>
<a href="{{ baseUrl("/settings/users/{$currentUser->id}") }}">@icon('edit'){{ trans('common.edit_profile') }}</a>
<a href="{{ url("/settings/users/{$currentUser->id}") }}">@icon('edit'){{ trans('common.edit_profile') }}</a>
</li>
<li>
<a href="{{ baseUrl('/logout') }}">@icon('logout'){{ trans('auth.logout') }}</a>
<a href="{{ url('/logout') }}">@icon('logout'){{ trans('auth.logout') }}</a>
</li>
</ul>
</div>

View File

@ -15,7 +15,7 @@
</div>
<div class="mb-xl">
<h5><a class="no-color" href="{{ baseUrl("/pages/recently-updated") }}">{{ trans('entities.recently_updated_pages') }}</a></h5>
<h5><a class="no-color" href="{{ url("/pages/recently-updated") }}">{{ trans('entities.recently_updated_pages') }}</a></h5>
<div id="recently-updated-pages">
@include('partials.entity-list', [
'entities' => $recentlyUpdatedPages,

View File

@ -34,7 +34,7 @@
<div>
<div id="recent-pages" class="card mb-xl">
<h3 class="card-title"><a class="no-color" href="{{ baseUrl("/pages/recently-updated") }}">{{ trans('entities.recently_updated_pages') }}</a></h3>
<h3 class="card-title"><a class="no-color" href="{{ url("/pages/recently-updated") }}">{{ trans('entities.recently_updated_pages') }}</a></h3>
<div id="recently-updated-pages" class="px-m">
@include('partials.entity-list', [
'entities' => $recentlyUpdatedPages,

View File

@ -4,7 +4,7 @@ $key - Unique key for checking existing stored state.
--}}
<?php $isOpen = setting()->getForCurrentUser('section_expansion#'. $key); ?>
<a expand-toggle="{{ $target }}"
expand-toggle-update-endpoint="{{ baseUrl('/settings/users/'. $currentUser->id .'/update-expansion-preference/' . $key) }}"
expand-toggle-update-endpoint="{{ url('/settings/users/'. $currentUser->id .'/update-expansion-preference/' . $key) }}"
expand-toggle-is-open="{{ $isOpen ? 'yes' : 'no' }}"
class="text-muted icon-list-item text-primary">
<span>@icon('expand-text')</span>

View File

@ -3,7 +3,7 @@
<div page-picker>
<div class="input-base">
<span @if($value) style="display: none" @endif page-picker-default class="text-muted italic">{{ $placeholder }}</span>
<a @if(!$value) style="display: none" @endif href="{{ baseUrl('/link/' . $value) }}" target="_blank" class="text-page" page-picker-display>#{{$value}}, {{$value ? \BookStack\Entities\Page::find($value)->name : '' }}</a>
<a @if(!$value) style="display: none" @endif href="{{ url('/link/' . $value) }}" target="_blank" class="text-page" page-picker-display>#{{$value}}, {{$value ? \BookStack\Entities\Page::find($value)->name : '' }}</a>
</div>
<br>
<input type="hidden" value="{{$value}}" name="{{$name}}" id="{{$name}}">

View File

@ -1,6 +1,6 @@
@foreach($entity->tags as $tag)
<div class="tag-item primary-background-light">
<div class="tag-name"><a href="{{ baseUrl('/search?term=%5B' . urlencode($tag->name) .'%5D') }}">@icon('tag'){{ $tag->name }}</a></div>
@if($tag->value) <div class="tag-value"><a href="{{ baseUrl('/search?term=%5B' . urlencode($tag->name) .'%3D' . urlencode($tag->value) . '%5D') }}">{{$tag->value}}</a></div> @endif
<div class="tag-name"><a href="{{ url('/search?term=%5B' . urlencode($tag->name) .'%5D') }}">@icon('tag'){{ $tag->name }}</a></div>
@if($tag->value) <div class="tag-value"><a href="{{ url('/search?term=%5B' . urlencode($tag->name) .'%3D' . urlencode($tag->value) . '%5D') }}">{{$tag->value}}</a></div> @endif
</div>
@endforeach

View File

@ -7,11 +7,11 @@
<div v-for="(tag, i) in tags" :key="tag.key" class="card drag-card">
<div class="handle" >@icon('grip')</div>
<div>
<autosuggest url="{{ baseUrl('/ajax/tags/suggest/names') }}" type="name" class="outline" :name="getTagFieldName(i, 'name')"
<autosuggest url="{{ url('/ajax/tags/suggest/names') }}" type="name" class="outline" :name="getTagFieldName(i, 'name')"
v-model="tag.name" @input="tagChange(tag)" @blur="tagBlur(tag)" placeholder="{{ trans('entities.tag') }}"/>
</div>
<div>
<autosuggest url="{{ baseUrl('/ajax/tags/suggest/values') }}" type="value" class="outline" :name="getTagFieldName(i, 'value')"
<autosuggest url="{{ url('/ajax/tags/suggest/values') }}" type="value" class="outline" :name="getTagFieldName(i, 'value')"
v-model="tag.value" @change="tagChange(tag)" @blur="tagBlur(tag)" placeholder="{{ trans('entities.tag_value') }}"/>
</div>
<div v-show="tags.length !== 1" class="text-center drag-card-action text-neg" @click="removeTag(tag)">@icon('close')</div>

View File

@ -10,7 +10,7 @@
<h5>{{ trans('errors.sorry_page_not_found') }}</h5>
</div>
<div class="text-right">
<a href="{{ baseUrl('/') }}" class="button outline">{{ trans('errors.return_home') }}</a>
<a href="{{ url('/') }}" class="button outline">{{ trans('errors.return_home') }}</a>
</div>
</div>

View File

@ -7,7 +7,7 @@
<h3 class="text-muted">{{ trans('errors.error_occurred') }}</h3>
<div class="body">
<h5>{{ $message ?? 'An unknown error occurred' }}</h5>
<p><a href="{{ baseUrl('/') }}" class="button outline">{{ trans('errors.return_home') }}</a></p>
<p><a href="{{ url('/') }}" class="button outline">{{ trans('errors.return_home') }}</a></p>
</div>
</div>
</div>

View File

@ -1,7 +1,7 @@
@extends('base')
@section('head')
<script src="{{ baseUrl('/libs/tinymce/tinymce.min.js?ver=4.9.4') }}"></script>
<script src="{{ url('/libs/tinymce/tinymce.min.js?ver=4.9.4') }}"></script>
@stop
@section('body-class', 'flexbox')

View File

@ -3,7 +3,7 @@
{{-- Show top level books item --}}
@if (count($crumbs) > 0 && array_first($crumbs) instanceof \BookStack\Entities\Book)
<a href="{{ baseUrl('/books') }}" class="text-book icon-list-item outline-hover">
<a href="{{ url('/books') }}" class="text-book icon-list-item outline-hover">
<span>@icon('books')</span>
<span>{{ trans('entities.books') }}</span>
</a>
@ -12,7 +12,7 @@
{{-- Show top level shelves item --}}
@if (count($crumbs) > 0 && array_first($crumbs) instanceof \BookStack\Entities\Bookshelf)
<a href="{{ baseUrl('/shelves') }}" class="text-bookshelf icon-list-item outline-hover">
<a href="{{ url('/shelves') }}" class="text-bookshelf icon-list-item outline-hover">
<span>@icon('bookshelf')</span>
<span>{{ trans('entities.shelves') }}</span>
</a>
@ -30,11 +30,11 @@
@endif
@if (is_string($crumb))
<a href="{{ baseUrl($key) }}">
<a href="{{ url($key) }}">
{{ $crumb }}
</a>
@elseif (is_array($crumb))
<a href="{{ baseUrl($key) }}" class="icon-list-item outline-hover">
<a href="{{ url($key) }}" class="icon-list-item outline-hover">
<span>@icon($crumb['icon'])</span>
<span>{{ $crumb['text'] }}</span>
</a>

View File

@ -4,7 +4,7 @@
?>
<div class="list-sort-container" list-sort-control>
<div class="list-sort-label">{{ trans('common.sort') }}</div>
<form action="{{ baseUrl("/settings/users/{$currentUser->id}/change-sort/{$type}") }}" method="post">
<form action="{{ url("/settings/users/{$currentUser->id}/change-sort/{$type}") }}" method="post">
{!! csrf_field() !!}
{!! method_field('PATCH') !!}

View File

@ -1,5 +1,5 @@
<div>
<form action="{{ baseUrl("/settings/users/{$currentUser->id}/switch-${type}-view") }}" method="POST" class="inline">
<form action="{{ url("/settings/users/{$currentUser->id}/switch-${type}-view") }}" method="POST" class="inline">
{!! csrf_field() !!}
{!! method_field('PATCH') !!}
<input type="hidden" value="{{ $view === 'list'? 'grid' : 'list' }}" name="view_type">

View File

@ -190,7 +190,7 @@
<div>
<div v-pre class="card content-wrap">
<h1 class="list-heading">{{ trans('entities.search_results') }}</h1>
<form action="{{ baseUrl('/search') }}" method="GET" class="search-box flexible hide-over-l">
<form action="{{ url('/search') }}" method="GET" class="search-box flexible hide-over-l">
<input value="{{$searchTerm}}" type="text" name="term" placeholder="{{ trans('common.search') }}">
<button type="submit">@icon('search')</button>
<button v-if="searching" v-cloak class="search-box-cancel text-neg" v-on:click="clearSearch" type="button">@icon('close')</button>

View File

@ -15,7 +15,7 @@
<div class="card content-wrap auto-height">
<h2 class="list-heading">{{ trans('settings.app_features_security') }}</h2>
<form action="{{ baseUrl("/settings") }}" method="POST">
<form action="{{ url("/settings") }}" method="POST">
{!! csrf_field() !!}
<div class="setting-list">
@ -27,7 +27,7 @@
<p class="small">{!! trans('settings.app_public_access_desc') !!}</p>
@if(userCan('users-manage'))
<p class="small mb-none">
<a href="{{ baseUrl($guestUser->getEditUrl()) }}">{!! trans('settings.app_public_access_desc_guest') !!}</a>
<a href="{{ url($guestUser->getEditUrl()) }}">{!! trans('settings.app_public_access_desc_guest') !!}</a>
</p>
@endif
</div>
@ -79,7 +79,7 @@
<div class="card content-wrap auto-height">
<h2 class="list-heading">{{ trans('settings.app_customization') }}</h2>
<form action="{{ baseUrl("/settings") }}" method="POST" enctype="multipart/form-data">
<form action="{{ url("/settings") }}" method="POST" enctype="multipart/form-data">
{!! csrf_field() !!}
<div class="setting-list">
@ -121,7 +121,7 @@
@include('components.image-picker', [
'removeName' => 'setting-app-logo',
'removeValue' => 'none',
'defaultImage' => baseUrl('/logo.png'),
'defaultImage' => url('/logo.png'),
'currentImage' => setting('app-logo'),
'name' => 'app_logo',
'imageClass' => 'logo-image',
@ -180,7 +180,7 @@
<div class="card content-wrap auto-height">
<h2 class="list-heading">{{ trans('settings.reg_settings') }}</h2>
<form action="{{ baseUrl("/settings") }}" method="POST">
<form action="{{ url("/settings") }}" method="POST">
{!! csrf_field() !!}
<div class="setting-list">

View File

@ -21,7 +21,7 @@
<p class="small text-muted">{{ trans('settings.maint_image_cleanup_desc') }}</p>
</div>
<div>
<form method="POST" action="{{ baseUrl('/settings/maintenance/cleanup-images') }}">
<form method="POST" action="{{ url('/settings/maintenance/cleanup-images') }}">
{!! csrf_field() !!}
<input type="hidden" name="_method" value="DELETE">
<div>

View File

@ -1,13 +1,13 @@
<div class="active-link-list">
@if($currentUser->can('settings-manage'))
<a href="{{ baseUrl('/settings') }}" @if($selected == 'settings') class="active" @endif>@icon('settings'){{ trans('settings.settings') }}</a>
<a href="{{ baseUrl('/settings/maintenance') }}" @if($selected == 'maintenance') class="active" @endif>@icon('spanner'){{ trans('settings.maint') }}</a>
<a href="{{ url('/settings') }}" @if($selected == 'settings') class="active" @endif>@icon('settings'){{ trans('settings.settings') }}</a>
<a href="{{ url('/settings/maintenance') }}" @if($selected == 'maintenance') class="active" @endif>@icon('spanner'){{ trans('settings.maint') }}</a>
@endif
@if($currentUser->can('users-manage'))
<a href="{{ baseUrl('/settings/users') }}" @if($selected == 'users') class="active" @endif>@icon('users'){{ trans('settings.users') }}</a>
<a href="{{ url('/settings/users') }}" @if($selected == 'users') class="active" @endif>@icon('users'){{ trans('settings.users') }}</a>
@endif
@if($currentUser->can('user-roles-manage'))
<a href="{{ baseUrl('/settings/roles') }}" @if($selected == 'roles') class="active" @endif>@icon('lock-open'){{ trans('settings.roles') }}</a>
<a href="{{ url('/settings/roles') }}" @if($selected == 'roles') class="active" @endif>@icon('lock-open'){{ trans('settings.roles') }}</a>
@endif
</div>

View File

@ -8,7 +8,7 @@
@include('settings.navbar', ['selected' => 'roles'])
</div>
<form action="{{ baseUrl("/settings/roles/new") }}" method="POST">
<form action="{{ url("/settings/roles/new") }}" method="POST">
@include('settings.roles.form', ['title' => trans('settings.role_create')])
</form>
</div>

View File

@ -12,7 +12,7 @@
<p>{{ trans('settings.role_delete_confirm', ['roleName' => $role->display_name]) }}</p>
<form action="{{ baseUrl("/settings/roles/delete/{$role->id}") }}" method="POST">
<form action="{{ url("/settings/roles/delete/{$role->id}") }}" method="POST">
{!! csrf_field() !!}
<input type="hidden" name="_method" value="DELETE">
@ -31,7 +31,7 @@
</div>
<div>
<div class="form-group text-right">
<a href="{{ baseUrl("/settings/roles/{$role->id}") }}" class="button outline">{{ trans('common.cancel') }}</a>
<a href="{{ url("/settings/roles/{$role->id}") }}" class="button outline">{{ trans('common.cancel') }}</a>
<button type="submit" class="button primary">{{ trans('common.confirm') }}</button>
</div>
</div>

View File

@ -7,7 +7,7 @@
@include('settings.navbar', ['selected' => 'roles'])
</div>
<form action="{{ baseUrl("/settings/roles/{$role->id}") }}" method="POST">
<form action="{{ url("/settings/roles/{$role->id}") }}" method="POST">
<input type="hidden" name="_method" value="PUT">
@include('settings.roles.form', ['model' => $role, 'title' => trans('settings.role_edit'), 'icon' => 'edit'])
</form>

View File

@ -220,9 +220,9 @@
</div>
<div class="form-group text-right">
<a href="{{ baseUrl("/settings/roles") }}" class="button outline">{{ trans('common.cancel') }}</a>
<a href="{{ url("/settings/roles") }}" class="button outline">{{ trans('common.cancel') }}</a>
@if (isset($role) && $role->id)
<a href="{{ baseUrl("/settings/roles/delete/{$role->id}") }}" class="button outline">{{ trans('settings.role_delete') }}</a>
<a href="{{ url("/settings/roles/delete/{$role->id}") }}" class="button outline">{{ trans('settings.role_delete') }}</a>
@endif
<button type="submit" class="button primary">{{ trans('settings.role_save') }}</button>
</div>
@ -240,7 +240,7 @@
</div>
<div>
@if(userCan('users-manage') || $currentUser->id == $user->id)
<a href="{{ baseUrl("/settings/users/{$user->id}") }}">
<a href="{{ url("/settings/users/{$user->id}") }}">
@endif
{{ $user->name }}
@if(userCan('users-manage') || $currentUser->id == $user->id)

View File

@ -14,7 +14,7 @@
<h1 class="list-heading">{{ trans('settings.role_user_roles') }}</h1>
<div class="text-right">
<a href="{{ baseUrl("/settings/roles/new") }}" class="button outline">{{ trans('settings.role_create') }}</a>
<a href="{{ url("/settings/roles/new") }}" class="button outline">{{ trans('settings.role_create') }}</a>
</div>
</div>
@ -26,7 +26,7 @@
</tr>
@foreach($roles as $role)
<tr>
<td><a href="{{ baseUrl("/settings/roles/{$role->id}") }}">{{ $role->display_name }}</a></td>
<td><a href="{{ url("/settings/roles/{$role->id}") }}">{{ $role->display_name }}</a></td>
<td>{{ $role->description }}</td>
<td class="text-center">{{ $role->users->count() }}</td>
</tr>

View File

@ -19,7 +19,7 @@
<div class="card content-wrap">
<h1 class="list-heading">{{ trans('entities.shelves_create') }}</h1>
<form action="{{ baseUrl("/shelves") }}" method="POST" enctype="multipart/form-data">
<form action="{{ url("/shelves") }}" method="POST" enctype="multipart/form-data">
@include('shelves.form', ['shelf' => null, 'books' => $books])
</form>
</div>

View File

@ -47,8 +47,8 @@
<p class="small">{{ trans('common.cover_image_description') }}</p>
@include('components.image-picker', [
'defaultImage' => baseUrl('/book_default_cover.png'),
'currentImage' => (isset($shelf) && $shelf->cover) ? $shelf->getBookCover() : baseUrl('/book_default_cover.png') ,
'defaultImage' => url('/book_default_cover.png'),
'currentImage' => (isset($shelf) && $shelf->cover) ? $shelf->getBookCover() : url('/book_default_cover.png') ,
'name' => 'image',
'imageClass' => 'cover'
])
@ -65,6 +65,6 @@
</div>
<div class="form-group text-right">
<a href="{{ isset($shelf) ? $shelf->getUrl() : baseUrl('/shelves') }}" class="button outline">{{ trans('common.cancel') }}</a>
<a href="{{ isset($shelf) ? $shelf->getUrl() : url('/shelves') }}" class="button outline">{{ trans('common.cancel') }}</a>
<button type="submit" class="button primary">{{ trans('entities.shelves_save') }}</button>
</div>

View File

@ -10,7 +10,7 @@
<h5>{{ trans('common.actions') }}</h5>
<div class="icon-list text-primary">
@if($currentUser->can('bookshelf-create-all'))
<a href="{{ baseUrl("/create-shelf") }}" class="icon-list-item">
<a href="{{ url("/create-shelf") }}" class="icon-list-item">
<span>@icon('add')</span>
<span>{{ trans('entities.shelves_new_action') }}</span>
</a>

View File

@ -31,7 +31,7 @@
@else
<p class="text-muted">{{ trans('entities.shelves_empty') }}</p>
@if(userCan('bookshelf-create-all'))
<a href="{{ baseUrl("/create-shelf") }}" class="button outline">@icon('edit'){{ trans('entities.create_now') }}</a>
<a href="{{ url("/create-shelf") }}" class="button outline">@icon('edit'){{ trans('entities.create_now') }}</a>
@endif
@endif

View File

@ -11,7 +11,7 @@
<div class="card content-wrap">
<h1 class="list-heading">{{ trans('settings.users_add_new') }}</h1>
<form action="{{ baseUrl("/settings/users/create") }}" method="post">
<form action="{{ url("/settings/users/create") }}" method="post">
{!! csrf_field() !!}
<div class="setting-list">
@ -19,7 +19,7 @@
</div>
<div class="form-group text-right">
<a href="{{ baseUrl($currentUser->can('users-manage') ? "/settings/users" : "/") }}" class="button outline">{{ trans('common.cancel') }}</a>
<a href="{{ url($currentUser->can('users-manage') ? "/settings/users" : "/") }}" class="button outline">{{ trans('common.cancel') }}</a>
<button class="button primary" type="submit">{{ trans('common.save') }}</button>
</div>

View File

@ -15,11 +15,11 @@
<div class="grid half">
<p class="text-neg"><strong>{{ trans('settings.users_delete_confirm') }}</strong></p>
<div>
<form action="{{ baseUrl("/settings/users/{$user->id}") }}" method="POST" class="text-right">
<form action="{{ url("/settings/users/{$user->id}") }}" method="POST" class="text-right">
{!! csrf_field() !!}
<input type="hidden" name="_method" value="DELETE">
<a href="{{ baseUrl("/settings/users/{$user->id}") }}" class="button outline">{{ trans('common.cancel') }}</a>
<a href="{{ url("/settings/users/{$user->id}") }}" class="button outline">{{ trans('common.cancel') }}</a>
<button type="submit" class="button primary">{{ trans('common.confirm') }}</button>
</form>
</div>

View File

@ -9,7 +9,7 @@
<div class="card content-wrap">
<h1 class="list-heading">{{ $user->id === $currentUser->id ? trans('settings.users_edit_profile') : trans('settings.users_edit') }}</h1>
<form action="{{ baseUrl("/settings/users/{$user->id}") }}" method="post" enctype="multipart/form-data">
<form action="{{ url("/settings/users/{$user->id}") }}" method="post" enctype="multipart/form-data">
{!! csrf_field() !!}
<input type="hidden" name="_method" value="PUT">
@ -26,7 +26,7 @@
'resizeHeight' => '512',
'resizeWidth' => '512',
'showRemove' => false,
'defaultImage' => baseUrl('/user_avatar.png'),
'defaultImage' => url('/user_avatar.png'),
'currentImage' => $user->getAvatar(80),
'currentId' => $user->image_id,
'name' => 'profile_image',
@ -54,9 +54,9 @@
</div>
<div class="text-right">
<a href="{{ baseUrl($currentUser->can('users-manage') ? "/settings/users" : "/") }}" class="button outline">{{ trans('common.cancel') }}</a>
<a href="{{ url($currentUser->can('users-manage') ? "/settings/users" : "/") }}" class="button outline">{{ trans('common.cancel') }}</a>
@if($authMethod !== 'system')
<a href="{{ baseUrl("/settings/users/{$user->id}/delete") }}" class="button outline">{{ trans('settings.users_delete') }}</a>
<a href="{{ url("/settings/users/{$user->id}/delete") }}" class="button outline">{{ trans('settings.users_delete') }}</a>
@endif
<button class="button primary" type="submit">{{ trans('common.save') }}</button>
</div>
@ -74,9 +74,9 @@
<div>@icon('auth/'. $driver, ['style' => 'width: 56px;height: 56px;'])</div>
<div>
@if($user->hasSocialAccount($driver))
<a href="{{ baseUrl("/login/service/{$driver}/detach") }}" class="button small outline">{{ trans('settings.users_social_disconnect') }}</a>
<a href="{{ url("/login/service/{$driver}/detach") }}" class="button small outline">{{ trans('settings.users_social_disconnect') }}</a>
@else
<a href="{{ baseUrl("/login/service/{$driver}") }}" class="button small outline">{{ trans('settings.users_social_connect') }}</a>
<a href="{{ url("/login/service/{$driver}") }}" class="button small outline">{{ trans('settings.users_social_connect') }}</a>
@endif
</div>
</div>

View File

@ -14,7 +14,7 @@
<div class="text-right">
<div class="block inline mr-s">
<form method="get" action="{{ baseUrl("/settings/users") }}">
<form method="get" action="{{ url("/settings/users") }}">
@foreach(collect($listDetails)->except('search') as $name => $val)
<input type="hidden" name="{{ $name }}" value="{{ $val }}">
@endforeach
@ -22,7 +22,7 @@
</form>
</div>
@if(userCan('users-manage'))
<a href="{{ baseUrl("/settings/users/create") }}" style="margin-top: 0;" class="outline button">{{ trans('settings.users_add_new') }}</a>
<a href="{{ url("/settings/users/create") }}" style="margin-top: 0;" class="outline button">{{ trans('settings.users_add_new') }}</a>
@endif
</div>
</div>
@ -43,7 +43,7 @@
<td class="text-center" style="line-height: 0;"><img class="avatar med" src="{{ $user->getAvatar(40)}}" alt="{{ $user->name }}"></td>
<td>
@if(userCan('users-manage') || $currentUser->id == $user->id)
<a href="{{ baseUrl("/settings/users/{$user->id}") }}">
<a href="{{ url("/settings/users/{$user->id}") }}">
@endif
{{ $user->name }} <br> <span class="text-muted">{{ $user->email }}</span>
@if(userCan('users-manage') || $currentUser->id == $user->id)
@ -52,7 +52,7 @@
</td>
<td>
@foreach($user->roles as $index => $role)
<small><a href="{{ baseUrl("/settings/roles/{$role->id}") }}">{{$role->display_name}}</a>@if($index !== count($user->roles) -1),@endif</small>
<small><a href="{{ url("/settings/roles/{$role->id}") }}">{{$role->display_name}}</a>@if($index !== count($user->roles) -1),@endif</small>
@endforeach
</td>
</tr>

View File

@ -60,7 +60,7 @@
<h2 id="recent-pages" class="list-heading">
{{ trans('entities.recently_created_pages') }}
@if (count($recentlyCreated['pages']) > 0)
<a href="{{ baseUrl('/search?term=' . urlencode('{created_by:'.$user->id.'} {type:page}') ) }}" class="text-small ml-s">{{ trans('common.view_all') }}</a>
<a href="{{ url('/search?term=' . urlencode('{created_by:'.$user->id.'} {type:page}') ) }}" class="text-small ml-s">{{ trans('common.view_all') }}</a>
@endif
</h2>
@if (count($recentlyCreated['pages']) > 0)
@ -74,7 +74,7 @@
<h2 id="recent-chapters" class="list-heading">
{{ trans('entities.recently_created_chapters') }}
@if (count($recentlyCreated['chapters']) > 0)
<a href="{{ baseUrl('/search?term=' . urlencode('{created_by:'.$user->id.'} {type:chapter}') ) }}" class="text-small ml-s">{{ trans('common.view_all') }}</a>
<a href="{{ url('/search?term=' . urlencode('{created_by:'.$user->id.'} {type:chapter}') ) }}" class="text-small ml-s">{{ trans('common.view_all') }}</a>
@endif
</h2>
@if (count($recentlyCreated['chapters']) > 0)
@ -88,7 +88,7 @@
<h2 id="recent-books" class="list-heading">
{{ trans('entities.recently_created_books') }}
@if (count($recentlyCreated['books']) > 0)
<a href="{{ baseUrl('/search?term=' . urlencode('{created_by:'.$user->id.'} {type:book}') ) }}" class="text-small ml-s">{{ trans('common.view_all') }}</a>
<a href="{{ url('/search?term=' . urlencode('{created_by:'.$user->id.'} {type:book}') ) }}" class="text-small ml-s">{{ trans('common.view_all') }}</a>
@endif
</h2>
@if (count($recentlyCreated['books']) > 0)
@ -102,7 +102,7 @@
<h2 id="recent-shelves" class="list-heading">
{{ trans('entities.recently_created_shelves') }}
@if (count($recentlyCreated['shelves']) > 0)
<a href="{{ baseUrl('/search?term=' . urlencode('{created_by:'.$user->id.'} {type:bookshelf}') ) }}" class="text-small ml-s">{{ trans('common.view_all') }}</a>
<a href="{{ url('/search?term=' . urlencode('{created_by:'.$user->id.'} {type:bookshelf}') ) }}" class="text-small ml-s">{{ trans('common.view_all') }}</a>
@endif
</h2>
@if (count($recentlyCreated['shelves']) > 0)

View File

@ -83,7 +83,7 @@ $style = [
<!-- Logo -->
<tr>
<td style="{{ $style['email-masthead'] }}">
<a style="{{ $fontFamily }} {{ $style['email-masthead_name'] }}" href="{{ baseUrl('/') }}" target="_blank">
<a style="{{ $fontFamily }} {{ $style['email-masthead_name'] }}" href="{{ url('/') }}" target="_blank">
{{ setting('app-name') }}
</a>
</td>
@ -186,7 +186,7 @@ $style = [
<td style="{{ $fontFamily }} {{ $style['email-footer_cell'] }}">
<p style="{{ $style['paragraph-sub'] }}">
&copy; {{ date('Y') }}
<a style="{{ $style['anchor'] }}" href="{{ baseUrl('/') }}" target="_blank">{{ setting('app-name') }}</a>.
<a style="{{ $style['anchor'] }}" href="{{ url('/') }}" target="_blank">{{ setting('app-name') }}</a>.
{{ trans('common.email_rights') }}
</p>
</td>