diff --git a/resources/lang/en/common.php b/resources/lang/en/common.php index 8daf0a1c8..6517c8cc5 100644 --- a/resources/lang/en/common.php +++ b/resources/lang/en/common.php @@ -13,4 +13,14 @@ return [ */ 'name' => 'Name', 'description' => 'Description', + 'role' => 'Role', + + /** + * Actions + */ + 'actions' => 'Actions', + 'view' => 'View', + 'create' => 'Create', + 'update' => 'Update', + 'delete' => 'Delete', ]; \ No newline at end of file diff --git a/resources/lang/en/entities.php b/resources/lang/en/entities.php index d832720b0..bc83a4a4f 100644 --- a/resources/lang/en/entities.php +++ b/resources/lang/en/entities.php @@ -12,7 +12,6 @@ return [ 'edit' => 'Edit', 'sort' => 'Sort', 'move' => 'Move', - 'permissions' => 'Permissions', 'delete' => 'Delete', 'meta_created' => 'Created :timeLength', 'meta_created_name' => 'Created :timeLength by :user', @@ -20,6 +19,14 @@ return [ 'meta_updated_name' => 'Updated :timeLength by :user', 'x_pages' => ':count Pages', + /** + * Permissions and restrictions + */ + 'permissions' => 'Permissions', + 'permissions_intro' => 'Once enabled, These permissions will take priority over any set role permissions.', + 'permissions_enable' => 'Enable Custom Permissions', + 'permissions_save' => 'Save Permissions', + /** * Search */ @@ -53,6 +60,7 @@ return [ /** * Chapters */ + 'chapters_popular' => 'Popular Chapters', 'chapters_new' => 'New Chapter', 'chapters_create' => 'Create New Chapter', 'chapters_delete' => 'Delete Chapter', @@ -69,6 +77,7 @@ return [ /** * Pages */ + 'pages_popular' => 'Popular Pages', 'pages_new' => 'New Page', 'pages_attachments' => 'Attachments', 'pages_navigation' => 'Page Navigation', diff --git a/resources/lang/en/errors.php b/resources/lang/en/errors.php index b1a252bf3..32655c75a 100644 --- a/resources/lang/en/errors.php +++ b/resources/lang/en/errors.php @@ -6,7 +6,15 @@ return [ * Error text strings. */ - // Pages + // Permissions 'permission' => 'You do not have permission to access the requested page.', - 'permissionJson' => 'You do not have permission to perform the requested action.' + 'permissionJson' => 'You do not have permission to perform the requested action.', + + // Error pages + 'page_not_found' => 'Page Not Found', + 'sorry_page_not_found' => 'Sorry, The page you were looking for could not be found.', + 'return_home' => 'Return to home', + 'error_occurred' => 'An Error Occurred', + 'app_down' => ':appName is down right now', + 'back_soon' => 'It will be back up soon.', ]; \ No newline at end of file diff --git a/resources/views/errors/404.blade.php b/resources/views/errors/404.blade.php index 19565bccb..27c221f99 100644 --- a/resources/views/errors/404.blade.php +++ b/resources/views/errors/404.blade.php @@ -4,9 +4,28 @@
-

{{ $message or 'Page Not Found' }}

-

Sorry, The page you were looking for could not be found.

- Return To Home + + +

{{ $message or trans('errors.page_not_found') }}

+

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

+

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

+ +
+ +
+
+

{{ trans('entities.pages_popular') }}

+ @include('partials.entity-list', ['entities' => Views::getPopular(10, 0, [\BookStack\Page::class]), 'style' => 'compact']) +
+
+

{{ trans('entities.books_popular') }}

+ @include('partials.entity-list', ['entities' => Views::getPopular(10, 0, [\BookStack\Book::class]), 'style' => 'compact']) +
+
+

{{ trans('entities.chapters_popular') }}

+ @include('partials.entity-list', ['entities' => Views::getPopular(10, 0, [\BookStack\Chapter::class]), 'style' => 'compact']) +
+
@stop \ No newline at end of file diff --git a/resources/views/errors/500.blade.php b/resources/views/errors/500.blade.php index 2a58461ba..6dd96cdcc 100644 --- a/resources/views/errors/500.blade.php +++ b/resources/views/errors/500.blade.php @@ -3,7 +3,7 @@ @section('content')
-

An Error Occurred

+

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

{{ $message }}

diff --git a/resources/views/errors/503.blade.php b/resources/views/errors/503.blade.php index c79d0f68b..1ea39a7b8 100644 --- a/resources/views/errors/503.blade.php +++ b/resources/views/errors/503.blade.php @@ -3,8 +3,8 @@ @section('content')
-

{{ setting('app-name') }} is down right now

-

It will be back up soon.

+

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

+

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

@stop \ No newline at end of file diff --git a/resources/views/form/delete-button.blade.php b/resources/views/form/delete-button.blade.php index a5b1f2809..6c53effae 100644 --- a/resources/views/form/delete-button.blade.php +++ b/resources/views/form/delete-button.blade.php @@ -1,5 +1,5 @@
{{ csrf_field() }} - +
\ No newline at end of file diff --git a/resources/views/form/restriction-form.blade.php b/resources/views/form/restriction-form.blade.php index 7472fe65e..7a1605197 100644 --- a/resources/views/form/restriction-form.blade.php +++ b/resources/views/form/restriction-form.blade.php @@ -2,31 +2,31 @@ {!! csrf_field() !!} -

Once enabled, These permissions will take priority over any set role permissions.

+

{{ trans('entities.permissions_intro') }}

- @include('form/checkbox', ['name' => 'restricted', 'label' => 'Enable custom permissions']) + @include('form/checkbox', ['name' => 'restricted', 'label' => trans('entities.permissions_enable')])
- - + + @foreach($roles as $role) - + @if(!$model->isA('page')) - + @endif - - + + @endforeach
RoleisA('page')) colspan="3" @else colspan="4" @endif>Actions{{ trans('common.role') }}isA('page')) colspan="3" @else colspan="4" @endif>{{ trans('common.actions') }}
{{ $role->display_name }}@include('form/restriction-checkbox', ['name'=>'restrictions', 'label' => 'View', 'action' => 'view'])@include('form/restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.view'), 'action' => 'view'])@include('form/restriction-checkbox', ['name'=>'restrictions', 'label' => 'Create', 'action' => 'create'])@include('form/restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.create'), 'action' => 'create'])@include('form/restriction-checkbox', ['name'=>'restrictions', 'label' => 'Update', 'action' => 'update'])@include('form/restriction-checkbox', ['name'=>'restrictions', 'label' => 'Delete', 'action' => 'delete'])@include('form/restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.update'), 'action' => 'update'])@include('form/restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.delete'), 'action' => 'delete'])
- Cancel - + {{ trans('common.cancel') }} + \ No newline at end of file