diff --git a/app/Auth/Role.php b/app/Auth/Role.php index c8bb47e45..917d8aa26 100644 --- a/app/Auth/Role.php +++ b/app/Auth/Role.php @@ -1,6 +1,7 @@ belongsToMany(User::class); + return $this->belongsToMany(User::class)->orderBy('name', 'asc'); } /** @@ -30,7 +31,7 @@ class Role extends Model */ public function permissions() { - return $this->belongsToMany(Permissions\RolePermission::class, 'permission_role', 'role_id', 'permission_id'); + return $this->belongsToMany(RolePermission::class, 'permission_role', 'role_id', 'permission_id'); } /** @@ -51,18 +52,18 @@ class Role extends Model /** * Add a permission to this role. - * @param \BookStack\Auth\Permissions\RolePermission $permission + * @param RolePermission $permission */ - public function attachPermission(Permissions\RolePermission $permission) + public function attachPermission(RolePermission $permission) { $this->permissions()->attach($permission->id); } /** * Detach a single permission from this role. - * @param \BookStack\Auth\Permissions\RolePermission $permission + * @param RolePermission $permission */ - public function detachPermission(Permissions\RolePermission $permission) + public function detachPermission(RolePermission $permission) { $this->permissions()->detach($permission->id); } diff --git a/app/Http/Controllers/PermissionController.php b/app/Http/Controllers/PermissionController.php index 9be343c9a..9893d5993 100644 --- a/app/Http/Controllers/PermissionController.php +++ b/app/Http/Controllers/PermissionController.php @@ -26,7 +26,7 @@ class PermissionController extends Controller { $this->checkPermission('user-roles-manage'); $roles = $this->permissionsRepo->getAllRoles(); - return view('settings/roles/index', ['roles' => $roles]); + return view('settings.roles.index', ['roles' => $roles]); } /** @@ -36,7 +36,7 @@ class PermissionController extends Controller public function createRole() { $this->checkPermission('user-roles-manage'); - return view('settings/roles/create'); + return view('settings.roles.create'); } /** @@ -70,7 +70,7 @@ class PermissionController extends Controller if ($role->hidden) { throw new PermissionsException(trans('errors.role_cannot_be_edited')); } - return view('settings/roles/edit', ['role' => $role]); + return view('settings.roles.edit', ['role' => $role]); } /** @@ -106,7 +106,7 @@ class PermissionController extends Controller $roles = $this->permissionsRepo->getAllRolesExcept($role); $blankRole = $role->newInstance(['display_name' => trans('settings.role_delete_no_migration')]); $roles->prepend($blankRole); - return view('settings/roles/delete', ['role' => $role, 'roles' => $roles]); + return view('settings.roles.delete', ['role' => $role, 'roles' => $roles]); } /** diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php index c9b2726e8..1a3384367 100644 --- a/app/Http/Middleware/Authenticate.php +++ b/app/Http/Middleware/Authenticate.php @@ -37,7 +37,7 @@ class Authenticate } } - if ($this->auth->guest() && !setting('app-public')) { + if (!hasAppAccess()) { if ($request->ajax()) { return response('Unauthorized.', 401); } else { diff --git a/app/helpers.php b/app/helpers.php index b0886d02b..e1395d816 100644 --- a/app/helpers.php +++ b/app/helpers.php @@ -41,11 +41,19 @@ function user() * Check if current user is a signed in user. * @return bool */ -function signedInUser() +function signedInUser() : bool { return auth()->user() && !auth()->user()->isDefault(); } +/** + * Check if the current user has general access. + * @return bool + */ +function hasAppAccess() : bool { + return !auth()->guest() || setting('app-public'); +} + /** * Check if the current user has a permission. * If an ownable element is passed in the jointPermissions are checked against diff --git a/resources/assets/sass/_forms.scss b/resources/assets/sass/_forms.scss index 6634ac81b..0b69c0d5b 100644 --- a/resources/assets/sass/_forms.scss +++ b/resources/assets/sass/_forms.scss @@ -176,8 +176,13 @@ input[type=date] { opacity: 0.8; } } -.toggle-switch-list .toggle-switch { - margin: $-xs 0; +.toggle-switch-list { + .toggle-switch { + margin: $-xs 0; + } + &.compact .toggle-switch { + margin: 1px 0; + } } .form-group { @@ -201,7 +206,8 @@ input[type=date] { .setting-list-label + .grid { margin-top: $-m; } -.setting-list .grid { + +.setting-list .grid, .stretch-inputs { input[type=text], input[type=email], input[type=password], select { width: 100%; } @@ -329,13 +335,6 @@ div[editor-type="markdown"] .title-input.page-title input[type="text"] { } } -#login-form label[for="remember"] { - margin: 0; -} -#login-form label.toggle-switch { - margin-left: $-xl; -} - .image-picker img { background-color: #BBB; } diff --git a/resources/assets/sass/_grid.scss b/resources/assets/sass/_grid.scss index b3d4895a3..31ad84e1e 100644 --- a/resources/assets/sass/_grid.scss +++ b/resources/assets/sass/_grid.scss @@ -200,6 +200,9 @@ div[class^="col-"] img { &.small { max-width: 840px; } + &.very-small { + max-width: 480px; + } &.nopad { padding-left: 0; padding-right: 0; diff --git a/resources/assets/sass/_lists.scss b/resources/assets/sass/_lists.scss index 3392d831c..d12155962 100644 --- a/resources/assets/sass/_lists.scss +++ b/resources/assets/sass/_lists.scss @@ -174,6 +174,18 @@ padding: $-s $-m; } +.user-list-item { + display: inline-grid; + padding: $-s; + grid-template-columns: min-content 1fr; + grid-column-gap: $-m; + font-size: 0.9em; + align-items: center; + > div:first-child { + line-height: 0; + } +} + ul.pagination { display: inline-block; list-style: none; diff --git a/resources/assets/sass/_text.scss b/resources/assets/sass/_text.scss index 972eafddd..539ffef99 100644 --- a/resources/assets/sass/_text.scss +++ b/resources/assets/sass/_text.scss @@ -149,11 +149,8 @@ em, i, .italic { } small, p.small, span.small, .text-small { - font-size: 0.85em; + font-size: 0.75rem; color: lighten($text-dark, 10%); - small, p.small, span.small, .text-small { - font-size: 1em; - } } sup, .superscript { diff --git a/resources/lang/en/settings.php b/resources/lang/en/settings.php index eb0d8df07..44ae0c613 100755 --- a/resources/lang/en/settings.php +++ b/resources/lang/en/settings.php @@ -93,11 +93,13 @@ return [ 'users_search' => 'Search Users', 'users_details' => 'User Details', 'users_details_desc' => 'Set a display name and an email address for this user. The email address will be used for logging into the application.', + 'users_details_desc_no_email' => 'Set a display name for this user so others can recognise them.', 'users_role' => 'User Roles', 'users_role_desc' => 'Select which roles this user will be assigned to. If a user is assigned to multiple roles the permissions from those roles will stack and they will receive all abilities of the assigned roles.', 'users_password' => 'User Password', 'users_password_desc' => 'Set a password used to log-in to the application. This must be at least 5 characters long.', 'users_external_auth_id' => 'External Authentication ID', + 'users_external_auth_id_desc' => 'This is the ID used to match this user when communicating with your LDAP system.', 'users_password_warning' => 'Only fill the below if you would like to change your password.', 'users_system_public' => 'This user represents any guest users that visit your instance. It cannot be used to log in but is assigned automatically.', 'users_delete' => 'Delete User', @@ -109,8 +111,9 @@ return [ 'users_edit_profile' => 'Edit Profile', 'users_edit_success' => 'User successfully updated', 'users_avatar' => 'User Avatar', - 'users_avatar_desc' => 'This image should be approx 256px square.', + 'users_avatar_desc' => 'Select an image to represent this user. This should be approx 256px square.', 'users_preferred_language' => 'Preferred Language', + 'users_preferred_language_desc' => 'This option will change the language used for the user-interface of the application. This will not affect any user-created content.', 'users_social_accounts' => 'Social Accounts', 'users_social_accounts_info' => 'Here you can connect your other accounts for quicker and easier login. Disconnecting an account here does not previously authorized access. Revoke access from your profile settings on the connected social account.', 'users_social_connect' => 'Connect Account', diff --git a/resources/views/auth/forms/login/ldap.blade.php b/resources/views/auth/forms/login/ldap.blade.php index b52b5f13e..ecdda6520 100644 --- a/resources/views/auth/forms/login/ldap.blade.php +++ b/resources/views/auth/forms/login/ldap.blade.php @@ -1,12 +1,12 @@
- @include('form/text', ['name' => 'username', 'tabindex' => 1]) + @include('form.text', ['name' => 'username', 'tabindex' => 1])
@if(session('request-email', false) === true)
- @include('form/text', ['name' => 'email', 'tabindex' => 1]) + @include('form.text', ['name' => 'email', 'tabindex' => 1]) {{ trans('auth.ldap_email_hint') }} @@ -15,5 +15,5 @@
- @include('form/password', ['name' => 'password', 'tabindex' => 2]) + @include('form.password', ['name' => 'password', 'tabindex' => 2])
\ No newline at end of file diff --git a/resources/views/auth/forms/login/standard.blade.php b/resources/views/auth/forms/login/standard.blade.php index 4ea1f35ba..557ee8339 100644 --- a/resources/views/auth/forms/login/standard.blade.php +++ b/resources/views/auth/forms/login/standard.blade.php @@ -1,10 +1,10 @@
- @include('form/text', ['name' => 'email', 'tabindex' => 1]) + @include('form.text', ['name' => 'email', 'tabindex' => 1])
- @include('form/password', ['name' => 'password', 'tabindex' => 2]) - {{ trans('auth.forgot_password') }} + @include('form.password', ['name' => 'password', 'tabindex' => 2]) + {{ trans('auth.forgot_password') }}
\ No newline at end of file diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index f3847bb04..7ee710da5 100644 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -1,44 +1,48 @@ -@extends('public') - -@section('header-buttons') - @if(setting('registration-enabled', false)) - @icon('new-user') {{ trans('auth.sign_up') }} - @endif -@stop +@extends('simple-layout') @section('content') -
-
-

@icon('login') {{ title_case(trans('auth.log_in')) }}

+
-
-
- {!! csrf_field() !!} +
 
+
+

{{ title_case(trans('auth.log_in')) }}

+ + + {!! csrf_field() !!} + +
@include('auth/forms/login/' . $authMethod) +
-
- - - +
+
+ @include('components.custom-checkbox', [ + 'name' => 'remember', + 'checked' => false, + 'value' => 'on', + 'label' => trans('auth.remember_me'), + ])
- -
- +
+
- +
- @if(count($socialDrivers) > 0) -
- @foreach($socialDrivers as $driver => $name) + + + @if(count($socialDrivers) > 0) +
+ @foreach($socialDrivers as $driver => $name) + +
+ @endforeach + @endif
diff --git a/resources/views/auth/passwords/email.blade.php b/resources/views/auth/passwords/email.blade.php index 38f5cc07a..6746904d4 100644 --- a/resources/views/auth/passwords/email.blade.php +++ b/resources/views/auth/passwords/email.blade.php @@ -1,37 +1,25 @@ -@extends('public') - -@section('header-buttons') - @icon('login') {{ trans('auth.log_in') }} - @if(setting('registration-enabled')) - @icon('new-user') {{ trans('auth.sign_up') }} - @endif -@stop +@extends('simple-layout') @section('content') +
+
+

{{ trans('auth.reset_password') }}

+

{{ trans('auth.reset_password_send_instructions') }}

-
-
-

@icon('permission') {{ trans('auth.reset_password') }}

+
+ {!! csrf_field() !!} -
-

{{ trans('auth.reset_password_send_instructions') }}

+
+ + @include('form/text', ['name' => 'email']) +
- - {!! csrf_field() !!} - -
- - @include('form/text', ['name' => 'email']) -
- -
- -
- -
+
+ +
+
- @stop \ No newline at end of file diff --git a/resources/views/auth/passwords/reset.blade.php b/resources/views/auth/passwords/reset.blade.php index 0f66bd473..fa6ad5b9a 100644 --- a/resources/views/auth/passwords/reset.blade.php +++ b/resources/views/auth/passwords/reset.blade.php @@ -1,43 +1,34 @@ -@extends('public') - -@section('header-buttons') - @icon('login') {{ trans('auth.log_in') }} - @if(setting('registration-enabled')) - @icon('new-user') {{ trans('auth.sign_up') }} - @endif -@stop +@extends('simple-layout') @section('content') -
-
-

@icon('permission') {{ trans('auth.reset_password') }}

+
+
+

{{ trans('auth.reset_password') }}

-
-
- {!! csrf_field() !!} - + + {!! csrf_field() !!} + -
- - @include('form/text', ['name' => 'email']) -
+
+ + @include('form.text', ['name' => 'email']) +
-
- - @include('form/password', ['name' => 'password']) -
+
+ + @include('form.password', ['name' => 'password']) +
-
- - @include('form/password', ['name' => 'password_confirmation']) -
+
+ + @include('form.password', ['name' => 'password_confirmation']) +
-
- -
-
-
+
+ +
+
diff --git a/resources/views/auth/register-confirm.blade.php b/resources/views/auth/register-confirm.blade.php index 22d0f4acb..8fbf8abbb 100644 --- a/resources/views/auth/register-confirm.blade.php +++ b/resources/views/auth/register-confirm.blade.php @@ -1,19 +1,11 @@ -@extends('public') - -@section('header-buttons') - @if(!$signedIn) - @icon('login') {{ trans('auth.log_in') }} - @endif -@stop +@extends('simple-layout') @section('content') -
-
-

@icon('users') {{ trans('auth.register_thanks') }}

-
-

{{ trans('auth.register_confirm', ['appName' => setting('app-name')]) }}

-
+
+
+

{{ trans('auth.register_thanks') }}

+

{{ trans('auth.register_confirm', ['appName' => setting('app-name')]) }}

diff --git a/resources/views/auth/register.blade.php b/resources/views/auth/register.blade.php index 900b394e3..c997bcc19 100644 --- a/resources/views/auth/register.blade.php +++ b/resources/views/auth/register.blade.php @@ -1,50 +1,54 @@ -@extends('public') - -@section('header-buttons') - @icon('login') {{ trans('auth.log_in') }} -@stop +@extends('simple-layout') @section('content') +
-
-
-

@icon('new-user') {{ title_case(trans('auth.sign_up')) }}

-
-
- {!! csrf_field() !!} +
 
-
- - @include('form/text', ['name' => 'name']) +
+

{{ title_case(trans('auth.sign_up')) }}

+ + + {!! csrf_field() !!} + +
+ + @include('form/text', ['name' => 'name']) +
+ +
+ + @include('form/text', ['name' => 'email']) +
+ +
+ + @include('form/password', ['name' => 'password', 'placeholder' => trans('auth.password_hint')]) +
+ +
+ - -
- - @include('form/text', ['name' => 'email']) +
+
+
-
- - @include('form/password', ['name' => 'password', 'placeholder' => trans('auth.password_hint')]) -
-
- -
- + - @if(count($socialDrivers) > 0) -
- @foreach($socialDrivers as $driver => $name) + @if(count($socialDrivers) > 0) +
+ @foreach($socialDrivers as $driver => $name) + +
+ @endforeach + @endif
- - @stop diff --git a/resources/views/auth/user-unconfirmed.blade.php b/resources/views/auth/user-unconfirmed.blade.php index b02d45d22..536397eaf 100644 --- a/resources/views/auth/user-unconfirmed.blade.php +++ b/resources/views/auth/user-unconfirmed.blade.php @@ -1,34 +1,34 @@ -@extends('public') +@extends('simple-layout') @section('content') -
-

 

-
-

@icon('users') {{ trans('auth.email_not_confirmed') }}

-
-

{{ trans('auth.email_not_confirmed_text') }}
- {{ trans('auth.email_not_confirmed_click_link') }}
- {{ trans('auth.email_not_confirmed_resend') }} -

-
-
- {!! csrf_field() !!} -
- - @if(auth()->check()) - @include('form/text', ['name' => 'email', 'model' => auth()->user()]) - @else - @include('form/text', ['name' => 'email']) - @endif -
-
- -
-
-
-
+
+
+

{{ trans('auth.email_not_confirmed') }}

+

{{ trans('auth.email_not_confirmed_text') }}
+ {{ trans('auth.email_not_confirmed_click_link') }} +

+

+ {{ trans('auth.email_not_confirmed_resend') }} +

+ +
+ {!! csrf_field() !!} +
+ + @if(auth()->check()) + @include('form/text', ['name' => 'email', 'model' => auth()->user()]) + @else + @include('form/text', ['name' => 'email']) + @endif +
+
+ +
+
+ +
@stop diff --git a/resources/views/common/header.blade.php b/resources/views/common/header.blade.php index 67aa67599..75e4a3be0 100644 --- a/resources/views/common/header.blade.php +++ b/resources/views/common/header.blade.php @@ -1,5 +1,6 @@ \ No newline at end of file diff --git a/resources/views/common/home.blade.php b/resources/views/common/home.blade.php index 89583e97a..bc7778fe5 100644 --- a/resources/views/common/home.blade.php +++ b/resources/views/common/home.blade.php @@ -7,7 +7,7 @@ @icon('expand-text'){{ trans('common.toggle_details') }}
-
+
@if(count($draftPages) > 0)
diff --git a/resources/views/errors/503.blade.php b/resources/views/errors/503.blade.php index f58856ced..29364606b 100644 --- a/resources/views/errors/503.blade.php +++ b/resources/views/errors/503.blade.php @@ -1,13 +1,11 @@ -@extends('public') +@extends('simple-layout') @section('content') -
-
-
-

@icon('danger') {{ trans('errors.app_down', ['appName' => setting('app-name')]) }}

-

{{ trans('errors.back_soon') }}

-
+
+
+

{{ trans('errors.app_down', ['appName' => setting('app-name')]) }}

+

{{ trans('errors.back_soon') }}

diff --git a/resources/views/public.blade.php b/resources/views/public.blade.php deleted file mode 100644 index 54918b19c..000000000 --- a/resources/views/public.blade.php +++ /dev/null @@ -1,62 +0,0 @@ - - - - {{ setting('app-name') }} - - - - - - - - - - - - - @include('partials/custom-styles') - - - @if(setting('app-custom-head')) - {!! setting('app-custom-head') !!} - @endif - - - -@include('partials.notifications') - - - -
- @yield('content') -
- - - - diff --git a/resources/views/settings/roles/checkbox.blade.php b/resources/views/settings/roles/checkbox.blade.php index 4dfba1f0b..98201da8f 100644 --- a/resources/views/settings/roles/checkbox.blade.php +++ b/resources/views/settings/roles/checkbox.blade.php @@ -1,3 +1,7 @@ -hasPermission($permission)))) checked="checked" @endif - value="true"> \ No newline at end of file + +@include('components.custom-checkbox', [ + 'name' => 'permissions[' . $permission . ']', + 'value' => 'true', + 'checked' => old('permissions'.$permission, false)|| (!old('display_name', false) && (isset($role) && $role->hasPermission($permission))), + 'label' => $label +]) \ No newline at end of file diff --git a/resources/views/settings/roles/create.blade.php b/resources/views/settings/roles/create.blade.php index 0c7ec9739..80a6fc382 100644 --- a/resources/views/settings/roles/create.blade.php +++ b/resources/views/settings/roles/create.blade.php @@ -2,7 +2,7 @@ @section('body') -
+
@include('settings.navbar', ['selected' => 'roles']) diff --git a/resources/views/settings/roles/edit.blade.php b/resources/views/settings/roles/edit.blade.php index a600580f6..f45458d9b 100644 --- a/resources/views/settings/roles/edit.blade.php +++ b/resources/views/settings/roles/edit.blade.php @@ -2,7 +2,7 @@ @section('body') -
+
@include('settings.navbar', ['selected' => 'roles'])
diff --git a/resources/views/settings/roles/form.blade.php b/resources/views/settings/roles/form.blade.php index ce71a2790..5ea6d59a2 100644 --- a/resources/views/settings/roles/form.blade.php +++ b/resources/views/settings/roles/form.blade.php @@ -2,217 +2,234 @@ {{--TODO - Add select-all shortcuts--}} -
+
+

{{ $title }}

-
-

{{ $title }}

- -
- -
-
- -
-
-
- - @include('form/text', ['name' => 'display_name']) -
-
- - @include('form/text', ['name' => 'description']) -
- - @if(config('auth.method') === 'ldap') -
- - @include('form/text', ['name' => 'external_auth_id']) -
- @endif -
-
- -
-
- -
-
- - - - - -
-
+
+
- -

{{ trans('settings.role_asset_desc') }}

+ +
+
+
+ + @include('form.text', ['name' => 'display_name']) +
+
+ + @include('form.text', ['name' => 'description']) +
- @if (isset($role) && $role->system_name === 'admin') -

{{ trans('settings.role_asset_admins') }}

+ @if(config('auth.method') === 'ldap') +
+ + @include('form.text', ['name' => 'external_auth_id']) +
@endif - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{{ trans('common.create') }}{{ trans('common.view') }}{{ trans('common.edit') }}{{ trans('common.delete') }}
{{ trans('entities.shelves_long') }} - - - - - - - - - - -
{{ trans('entities.books') }} - - - - - - - - - - -
{{ trans('entities.chapters') }} - - - - - - - - - - - -
{{ trans('entities.pages') }} - - - - - - - - - - - -
{{ trans('entities.images') }}@include('settings/roles/checkbox', ['permission' => 'image-create-all']){{ trans('settings.role_controlled_by_asset') }} - - - - - -
{{ trans('entities.attachments') }}@include('settings/roles/checkbox', ['permission' => 'attachment-create-all']){{ trans('settings.role_controlled_by_asset') }} - - - - - -
{{ trans('entities.comments') }}@include('settings/roles/checkbox', ['permission' => 'comment-create-all']){{ trans('settings.role_controlled_by_asset') }} - - - - - -
-
- {{ trans('common.cancel') }} - @if (isset($role) && $role->id) - id}") }}" class="button outline">{{ trans('settings.role_delete') }} - @endif - +
+
+ +
+
+
@include('settings.roles.checkbox', ['permission' => 'users-manage', 'label' => trans('settings.role_manage_users')])
+
@include('settings.roles.checkbox', ['permission' => 'user-roles-manage', 'label' => trans('settings.role_manage_roles')])
+
@include('settings.roles.checkbox', ['permission' => 'restrictions-manage-all', 'label' => trans('settings.role_manage_entity_permissions')])
+
@include('settings.roles.checkbox', ['permission' => 'restrictions-manage-own', 'label' => trans('settings.role_manage_own_entity_permissions')])
+
@include('settings.roles.checkbox', ['permission' => 'settings-manage', 'label' => trans('settings.role_manage_settings')])
+
+
+ +

{{ trans('settings.role_asset_desc') }}

+ + @if (isset($role) && $role->system_name === 'admin') +

{{ trans('settings.role_asset_admins') }}

+ @endif + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{ trans('common.create') }}{{ trans('common.view') }}{{ trans('common.edit') }}{{ trans('common.delete') }}
{{ trans('entities.shelves_long') }} + @include('settings.roles.checkbox', ['permission' => 'bookshelf-create-all', 'label' => trans('settings.role_all')]) + + @include('settings.roles.checkbox', ['permission' => 'bookshelf-view-own', 'label' => trans('settings.role_own')]) +
+ @include('settings.roles.checkbox', ['permission' => 'bookshelf-view-all', 'label' => trans('settings.role_all')]) +
+ @include('settings.roles.checkbox', ['permission' => 'bookshelf-update-own', 'label' => trans('settings.role_own')]) +
+ @include('settings.roles.checkbox', ['permission' => 'bookshelf-update-all', 'label' => trans('settings.role_all')]) +
+ @include('settings.roles.checkbox', ['permission' => 'bookshelf-delete-own', 'label' => trans('settings.role_own')]) +
+ @include('settings.roles.checkbox', ['permission' => 'bookshelf-delete-all', 'label' => trans('settings.role_all')]) +
{{ trans('entities.books') }} + @include('settings.roles.checkbox', ['permission' => 'book-create-all', 'label' => trans('settings.role_all')]) + + @include('settings.roles.checkbox', ['permission' => 'book-view-own', 'label' => trans('settings.role_own')]) +
+ @include('settings.roles.checkbox', ['permission' => 'book-view-all', 'label' => trans('settings.role_all')]) +
+ @include('settings.roles.checkbox', ['permission' => 'book-update-own', 'label' => trans('settings.role_own')]) +
+ @include('settings.roles.checkbox', ['permission' => 'book-update-all', 'label' => trans('settings.role_all')]) +
+ @include('settings.roles.checkbox', ['permission' => 'book-delete-own', 'label' => trans('settings.role_own')]) +
+ @include('settings.roles.checkbox', ['permission' => 'book-delete-all', 'label' => trans('settings.role_all')]) +
{{ trans('entities.chapters') }} + @include('settings.roles.checkbox', ['permission' => 'chapter-create-own', 'label' => trans('settings.role_own')]) +
+ @include('settings.roles.checkbox', ['permission' => 'chapter-create-all', 'label' => trans('settings.role_all')]) +
+ @include('settings.roles.checkbox', ['permission' => 'chapter-view-own', 'label' => trans('settings.role_own')]) +
+ @include('settings.roles.checkbox', ['permission' => 'chapter-view-all', 'label' => trans('settings.role_all')]) +
+ @include('settings.roles.checkbox', ['permission' => 'chapter-update-own', 'label' => trans('settings.role_own')]) +
+ @include('settings.roles.checkbox', ['permission' => 'chapter-update-all', 'label' => trans('settings.role_all')]) +
+ @include('settings.roles.checkbox', ['permission' => 'chapter-delete-own', 'label' => trans('settings.role_own')]) +
+ @include('settings.roles.checkbox', ['permission' => 'chapter-delete-all', 'label' => trans('settings.role_all')]) +
{{ trans('entities.pages') }} + @include('settings.roles.checkbox', ['permission' => 'page-create-own', 'label' => trans('settings.role_own')]) +
+ @include('settings.roles.checkbox', ['permission' => 'page-create-all', 'label' => trans('settings.role_all')]) +
+ @include('settings.roles.checkbox', ['permission' => 'page-view-own', 'label' => trans('settings.role_own')]) +
+ @include('settings.roles.checkbox', ['permission' => 'page-view-all', 'label' => trans('settings.role_all')]) +
+ @include('settings.roles.checkbox', ['permission' => 'page-update-own', 'label' => trans('settings.role_own')]) +
+ @include('settings.roles.checkbox', ['permission' => 'page-update-all', 'label' => trans('settings.role_all')]) +
+ @include('settings.roles.checkbox', ['permission' => 'page-delete-own', 'label' => trans('settings.role_own')]) +
+ @include('settings.roles.checkbox', ['permission' => 'page-delete-all', 'label' => trans('settings.role_all')]) +
{{ trans('entities.images') }}@include('settings.roles.checkbox', ['permission' => 'image-create-all', 'label' => '']){{ trans('settings.role_controlled_by_asset') }} + @include('settings.roles.checkbox', ['permission' => 'image-update-own', 'label' => trans('settings.role_own')]) +
+ @include('settings.roles.checkbox', ['permission' => 'image-update-all', 'label' => trans('settings.role_all')]) +
+ @include('settings.roles.checkbox', ['permission' => 'image-delete-own', 'label' => trans('settings.role_own')]) +
+ @include('settings.roles.checkbox', ['permission' => 'image-delete-all', 'label' => trans('settings.role_all')]) +
{{ trans('entities.attachments') }}@include('settings.roles.checkbox', ['permission' => 'attachment-create-all', 'label' => '']){{ trans('settings.role_controlled_by_asset') }} + @include('settings.roles.checkbox', ['permission' => 'attachment-update-own', 'label' => trans('settings.role_own')]) +
+ @include('settings.roles.checkbox', ['permission' => 'attachment-update-all', 'label' => trans('settings.role_all')]) +
+ @include('settings.roles.checkbox', ['permission' => 'attachment-delete-own', 'label' => trans('settings.role_own')]) +
+ @include('settings.roles.checkbox', ['permission' => 'attachment-delete-all', 'label' => trans('settings.role_all')]) +
{{ trans('entities.comments') }}@include('settings.roles.checkbox', ['permission' => 'comment-create-all', 'label' => '']){{ trans('settings.role_controlled_by_asset') }} + @include('settings.roles.checkbox', ['permission' => 'comment-update-own', 'label' => trans('settings.role_own')]) +
+ @include('settings.roles.checkbox', ['permission' => 'comment-update-all', 'label' => trans('settings.role_all')]) +
+ @include('settings.roles.checkbox', ['permission' => 'comment-delete-own', 'label' => trans('settings.role_own')]) +
+ @include('settings.roles.checkbox', ['permission' => 'comment-delete-all', 'label' => trans('settings.role_all')]) +
+
-
-
-

{{ trans('settings.role_users') }}

- @if(isset($role) && count($role->users) > 0) - - @foreach($role->users as $user) - - - - - @endforeach -
{{ $user->name }} - @if(userCan('users-manage') || $currentUser->id == $user->id) - id}") }}"> - @endif - {{ $user->name }} - @if(userCan('users-manage') || $currentUser->id == $user->id) - +
+ {{ trans('common.cancel') }} + @if (isset($role) && $role->id) + id}") }}" class="button outline">{{ trans('settings.role_delete') }} + @endif + +
+ + + +
+

{{ trans('settings.role_users') }}

+ @if(isset($role) && count($role->users) > 0) +
+ @foreach($role->users as $user) +
+
+ {{ $user->name }} +
+
+ @if(userCan('users-manage') || $currentUser->id == $user->id) + id}") }}"> @endif -
- @else -

- {{ trans('settings.role_users_none') }} -

- @endif + {{ $user->name }} + @if(userCan('users-manage') || $currentUser->id == $user->id) + + @endif +
+
+ @endforeach
-
+ @else +

+ {{ trans('settings.role_users_none') }} +

+ @endif
\ No newline at end of file diff --git a/resources/views/users/create.blade.php b/resources/views/users/create.blade.php index 4cb29fc16..cd5d75f8f 100644 --- a/resources/views/users/create.blade.php +++ b/resources/views/users/create.blade.php @@ -15,7 +15,7 @@ {!! csrf_field() !!}
- @include('users.forms.' . $authMethod) + @include('users.form')
diff --git a/resources/views/users/edit.blade.php b/resources/views/users/edit.blade.php index d6a4563ea..42fc2beb1 100644 --- a/resources/views/users/edit.blade.php +++ b/resources/views/users/edit.blade.php @@ -14,7 +14,7 @@
- @include('users.forms.' . $authMethod, ['model' => $user]) + @include('users.form', ['model' => $user, 'authMethod' => $authMethod])
@@ -35,9 +35,12 @@
-
+
+

+ {{ trans('settings.users_preferred_language_desc') }} +