From 694a9459c1f3d58c7f55b1e2c53121ca08ca963d Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Sun, 13 Nov 2016 16:34:28 +0000 Subject: [PATCH 01/10] Moved text from auth views into lang files --- app/Notifications/ResetPassword.php | 7 ++-- resources/lang/en/auth.php | 42 ++++++++++++++++++- .../views/auth/forms/login/ldap.blade.php | 8 ++-- .../views/auth/forms/login/standard.blade.php | 6 +-- resources/views/auth/login.blade.php | 10 ++--- .../views/auth/passwords/email.blade.php | 12 +++--- .../views/auth/passwords/reset.blade.php | 16 +++---- .../views/auth/register-confirm.blade.php | 7 ++-- resources/views/auth/register.blade.php | 18 ++++---- .../views/auth/user-unconfirmed.blade.php | 12 +++--- .../notifications/email-plain.blade.php | 2 +- 11 files changed, 90 insertions(+), 50 deletions(-) diff --git a/app/Notifications/ResetPassword.php b/app/Notifications/ResetPassword.php index 646030a10..affd8f076 100644 --- a/app/Notifications/ResetPassword.php +++ b/app/Notifications/ResetPassword.php @@ -43,8 +43,9 @@ class ResetPassword extends Notification public function toMail() { return (new MailMessage) - ->line('You are receiving this email because we received a password reset request for your account.') - ->action('Reset Password', baseUrl('password/reset/' . $this->token)) - ->line('If you did not request a password reset, no further action is required.'); + ->subject(trans('auth.email_reset_subject', ['appName' => setting('app-name')])) + ->line(trans('auth.email_reset_text')) + ->action(trans('auth.reset_password'), baseUrl('password/reset/' . $this->token)) + ->line(trans('auth.email_reset_not_requested')); } } diff --git a/resources/lang/en/auth.php b/resources/lang/en/auth.php index ffdb1cf45..5e364799d 100644 --- a/resources/lang/en/auth.php +++ b/resources/lang/en/auth.php @@ -14,7 +14,41 @@ return [ 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', /** - * Email Confirmation Text + * Login & Register + */ + 'sign_up' => 'Sign up', + 'log_in' => 'Log in', + + 'name' => 'Name', + 'username' => 'Username', + 'email' => 'Email', + 'password' => 'Password', + 'password_confirm' => 'Confirm Password', + 'password_hint' => 'Must be over 5 characters', + 'forgot_password' => 'Forgot Password?', + 'remember_me' => 'Remember Me', + 'ldap_email_hint' => 'Please enter an email to use for this account.', + 'create_account' => 'Create Account', + 'social_login' => 'Social Login', + 'social_registration' => 'Social Registration', + 'social_registration_text' => 'Register and sign in using another service.', + + 'register_thanks' => 'Thanks for registering!', + 'register_confirm' => 'Please check your email and click the confirmation button to access :appName.', + + /** + * Password Reset + */ + 'reset_password' => 'Reset Password', + 'reset_password_send_instructions' => 'Enter your email below and you will be sent an email with a password reset link.', + 'reset_password_send_button' => 'Send Reset Link', + + 'email_reset_subject' => 'Reset your :appName password', + 'email_reset_text' => 'You are receiving this email because we received a password reset request for your account.', + 'email_reset_not_requested' => 'If you did not request a password reset, no further action is required.', + + /** + * Email Confirmation */ 'email_confirm_subject' => 'Confirm your email on :appName', 'email_confirm_greeting' => 'Thanks for joining :appName!', @@ -23,4 +57,10 @@ return [ 'email_confirm_send_error' => 'Email confirmation required but the system could not send the email. Contact the admin to ensure email is set up correctly.', 'email_confirm_success' => 'Your email has been confirmed!', 'email_confirm_resent' => 'Confirmation email resent, Please check your inbox.', + + 'email_not_confirmed' => 'Email Address Not Confirmed', + 'email_not_confirmed_text' => 'Your email address has not yet been confirmed.', + 'email_not_confirmed_click_link' => 'Please click the link in the email that was sent shortly after you registered.', + 'email_not_confirmed_resend' => 'If you cannot find the email you can re-send the confirmation email by submitting the form below.', + 'email_not_confirmed_resend_button' => 'Resend Confirmation Email', ]; \ No newline at end of file diff --git a/resources/views/auth/forms/login/ldap.blade.php b/resources/views/auth/forms/login/ldap.blade.php index 5230d43ca..b52b5f13e 100644 --- a/resources/views/auth/forms/login/ldap.blade.php +++ b/resources/views/auth/forms/login/ldap.blade.php @@ -1,19 +1,19 @@
- + @include('form/text', ['name' => 'username', 'tabindex' => 1])
@if(session('request-email', false) === true)
- + @include('form/text', ['name' => 'email', 'tabindex' => 1]) - Please enter an email to use for this account. + {{ trans('auth.ldap_email_hint') }}
@endif
- + @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 abefd21a1..4ea1f35ba 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/password', ['name' => 'password', 'tabindex' => 2]) - Forgot Password? + {{ 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 4fa97c1d5..295d1a801 100644 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -2,7 +2,7 @@ @section('header-buttons') @if(setting('registration-enabled', false)) - Sign up + {{ trans('auth.sign_up') }} @endif @stop @@ -10,7 +10,7 @@
-

Log In

+

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

{!! csrf_field() !!} @@ -19,20 +19,20 @@ @include('auth/forms/login/' . $authMethod)
- +
- +
@if(count($socialDrivers) > 0)
-

Social Login

+

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

@if(isset($socialDrivers['google'])) @endif diff --git a/resources/views/auth/passwords/email.blade.php b/resources/views/auth/passwords/email.blade.php index 115785ab2..07bd2c383 100644 --- a/resources/views/auth/passwords/email.blade.php +++ b/resources/views/auth/passwords/email.blade.php @@ -1,9 +1,9 @@ @extends('public') @section('header-buttons') - Sign in + {{ trans('auth.log_in') }} @if(setting('registration-enabled')) - Sign up + {{ trans('auth.sign_up') }} @endif @stop @@ -12,20 +12,20 @@
-

Reset Password

+

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

-

Enter your email below and you will be sent an email with a password reset link.

+

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

{!! csrf_field() !!}
- + @include('form/text', ['name' => 'email'])
- +
diff --git a/resources/views/auth/passwords/reset.blade.php b/resources/views/auth/passwords/reset.blade.php index 612b50ff8..fef9ad476 100644 --- a/resources/views/auth/passwords/reset.blade.php +++ b/resources/views/auth/passwords/reset.blade.php @@ -1,9 +1,9 @@ -@extends('public') +1@extends('public') @section('header-buttons') - Sign in + {{ trans('auth.log_in') }} @if(setting('registration-enabled')) - Sign up + {{ trans('auth.sign_up') }} @endif @stop @@ -14,29 +14,29 @@
-

Reset Password

+

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

{!! csrf_field() !!}
- + @include('form/text', ['name' => 'email'])
- + @include('form/password', ['name' => 'password'])
- + @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 97fd65ab5..364df9266 100644 --- a/resources/views/auth/register-confirm.blade.php +++ b/resources/views/auth/register-confirm.blade.php @@ -2,7 +2,7 @@ @section('header-buttons') @if(!$signedIn) - Sign in + {{ trans('auth.log_in') }} @endif @stop @@ -10,10 +10,9 @@
-

Thanks for registering!

-

Please check your email and click the confirmation button to access {{ setting('app-name', 'BookStack') }}.

+

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

+

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

- @stop diff --git a/resources/views/auth/register.blade.php b/resources/views/auth/register.blade.php index 8ae5fcf50..7a119ddba 100644 --- a/resources/views/auth/register.blade.php +++ b/resources/views/auth/register.blade.php @@ -1,42 +1,42 @@ @extends('public') @section('header-buttons') - Sign in + {{ trans('auth.log_in') }} @stop @section('content')
-

Sign Up

+

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

{!! csrf_field() !!}
- + @include('form/text', ['name' => 'name'])
- + @include('form/text', ['name' => 'email'])
- - @include('form/password', ['name' => 'password', 'placeholder' => 'Must be over 5 characters']) + + @include('form/password', ['name' => 'password', 'placeholder' => trans('auth.password_hint')])
- +
@if(count($socialDrivers) > 0)
-

Social Registration

-

Register and sign in using another service.

+

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

+

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

@if(isset($socialDrivers['google'])) @endif diff --git a/resources/views/auth/user-unconfirmed.blade.php b/resources/views/auth/user-unconfirmed.blade.php index 08178e891..13567b412 100644 --- a/resources/views/auth/user-unconfirmed.blade.php +++ b/resources/views/auth/user-unconfirmed.blade.php @@ -4,16 +4,16 @@
-

Email Address not confirmed

-

Your email address has not yet been confirmed.
- Please click the link in the email that was sent shortly after you registered.
- If you cannot find the email you can re-send the confirmation email by submitting the form below. +

{{ 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 @@ -21,7 +21,7 @@ @endif
- +
diff --git a/resources/views/vendor/notifications/email-plain.blade.php b/resources/views/vendor/notifications/email-plain.blade.php index acefa6523..79634b611 100644 --- a/resources/views/vendor/notifications/email-plain.blade.php +++ b/resources/views/vendor/notifications/email-plain.blade.php @@ -19,4 +19,4 @@ if (! empty($outroLines)) { } echo 'Regards,', "\n"; -echo config('app.name'), "\n"; +echo setting('app-name'), "\n"; From 57dc53ceff99e65c726f59c8b14a599878adba59 Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Thu, 17 Nov 2016 13:33:07 +0000 Subject: [PATCH 02/10] Extracted text from book & chapter views --- phpunit.xml | 1 + resources/lang/en/common.php | 16 ++++ resources/lang/en/entities.php | 75 +++++++++++++++++++ .../views/auth/passwords/reset.blade.php | 2 +- resources/views/books/create.blade.php | 2 +- resources/views/books/delete.blade.php | 10 +-- resources/views/books/edit.blade.php | 2 +- resources/views/books/form.blade.php | 8 +- resources/views/books/index.blade.php | 16 ++-- resources/views/books/restrictions.blade.php | 2 +- resources/views/books/show.blade.php | 36 ++++----- resources/views/chapters/create.blade.php | 2 +- resources/views/chapters/delete.blade.php | 11 ++- resources/views/chapters/edit.blade.php | 2 +- resources/views/chapters/form.blade.php | 8 +- resources/views/chapters/list-item.blade.php | 2 +- resources/views/chapters/move.blade.php | 6 +- .../views/chapters/restrictions.blade.php | 2 +- resources/views/chapters/show.blade.php | 41 +++++----- resources/views/pages/show.blade.php | 6 +- .../views/pages/sidebar-tree-list.blade.php | 10 +-- .../views/partials/entity-meta.blade.php | 13 ++++ tests/Auth/AuthTest.php | 4 +- tests/Auth/LdapTest.php | 8 +- tests/Entity/EntityTest.php | 2 +- tests/Permissions/RolesTest.php | 2 +- 26 files changed, 191 insertions(+), 98 deletions(-) create mode 100644 resources/lang/en/common.php create mode 100644 resources/lang/en/entities.php create mode 100644 resources/views/partials/entity-meta.blade.php diff --git a/phpunit.xml b/phpunit.xml index 72e06a3fc..2e07cdbf8 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -22,6 +22,7 @@ + diff --git a/resources/lang/en/common.php b/resources/lang/en/common.php new file mode 100644 index 000000000..8daf0a1c8 --- /dev/null +++ b/resources/lang/en/common.php @@ -0,0 +1,16 @@ + 'Cancel', + 'confirm' => 'Confirm', + + + /** + * Form Labels + */ + 'name' => 'Name', + 'description' => 'Description', +]; \ No newline at end of file diff --git a/resources/lang/en/entities.php b/resources/lang/en/entities.php new file mode 100644 index 000000000..d832720b0 --- /dev/null +++ b/resources/lang/en/entities.php @@ -0,0 +1,75 @@ + 'Recently Created', + 'recently_update' => 'Recently Updated', + 'recently_viewed' => 'Recently Viewed', + 'recent_activity' => 'Recent Activity', + 'create_now' => 'Create one now', + 'edit' => 'Edit', + 'sort' => 'Sort', + 'move' => 'Move', + 'permissions' => 'Permissions', + 'delete' => 'Delete', + 'meta_created' => 'Created :timeLength', + 'meta_created_name' => 'Created :timeLength by :user', + 'meta_updated' => 'Updated :timeLength', + 'meta_updated_name' => 'Updated :timeLength by :user', + 'x_pages' => ':count Pages', + + /** + * Search + */ + 'search_results' => 'Search Results', + 'search_clear' => 'Clear Search', + + /** + * Books + */ + 'books' => 'Books', + 'books_empty' => 'No books have been created', + 'books_popular' => 'Popular Books', + 'books_popular_empty' => 'The most popular books will appear here.', + 'books_create' => 'Create New Book', + 'books_delete' => 'Delete Book', + 'books_delete_explain' => 'This will delete the book with the name \':bookName\', All pages and chapters will be removed.', + 'books_delete_confirmation' => 'Are you sure you want to delete this book?', + 'books_edit' => 'Edit Book', + 'books_form_book_name' => 'Book Name', + 'books_save' => 'Save Book', + 'books_permissions' => 'Book Permissions', + 'books_empty_contents' => 'No pages or chapters have been created for this book.', + 'books_empty_create_page' => 'Create a new page', + 'books_empty_or' => 'or', + 'books_empty_sort_current_book' => 'Sort the current book', + 'books_empty_add_chapter' => 'Add a chapter', + 'books_permissions_active' => 'Book Permissions Active', + 'books_search_this' => 'Search this book', + 'books_navigation' => 'Book Navigation', + + /** + * Chapters + */ + 'chapters_new' => 'New Chapter', + 'chapters_create' => 'Create New Chapter', + 'chapters_delete' => 'Delete Chapter', + 'chapters_delete_explain' => 'This will delete the chapter with the name \':chapterName\', All pages will be removed + and added directly to the parent book.', + 'chapters_delete_confirm' => 'Are you sure you want to delete this chapter?', + 'chapters_edit' => 'Edit Chapter', + 'chapters_save' => 'Save Chapter', + 'chapters_move' => 'Move Chapter', + 'chapters_permissions' => 'Chapter Permissions', + 'chapters_empty' => 'No pages are currently in this chapter.', + 'chapters_permissions_active' => 'Chapter Permissions Active', + + /** + * Pages + */ + 'pages_new' => 'New Page', + 'pages_attachments' => 'Attachments', + 'pages_navigation' => 'Page Navigation', +]; \ 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 fef9ad476..a463eef45 100644 --- a/resources/views/auth/passwords/reset.blade.php +++ b/resources/views/auth/passwords/reset.blade.php @@ -1,4 +1,4 @@ -1@extends('public') +@extends('public') @section('header-buttons') {{ trans('auth.log_in') }} diff --git a/resources/views/books/create.blade.php b/resources/views/books/create.blade.php index 60f4f65bd..2c629e699 100644 --- a/resources/views/books/create.blade.php +++ b/resources/views/books/create.blade.php @@ -3,7 +3,7 @@ @section('content')
-

Create New Book

+

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

@include('books/form')
diff --git a/resources/views/books/delete.blade.php b/resources/views/books/delete.blade.php index 68f755131..b47cae2cc 100644 --- a/resources/views/books/delete.blade.php +++ b/resources/views/books/delete.blade.php @@ -3,15 +3,15 @@ @section('content')
-

Delete Book

-

This will delete the book with the name '{{$book->name}}', All pages and chapters will be removed.

-

Are you sure you want to delete this book?

+

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

+

{{ trans('entities.books_delete_explain', ['bookName' => $book->name]) }}

+

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

{!! csrf_field() !!} - Cancel - + {{ trans('common.cancel') }} +
diff --git a/resources/views/books/edit.blade.php b/resources/views/books/edit.blade.php index e67e6f459..2b9e376e7 100644 --- a/resources/views/books/edit.blade.php +++ b/resources/views/books/edit.blade.php @@ -3,7 +3,7 @@ @section('content')
-

Edit Book

+

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

@include('books/form', ['model' => $book]) diff --git a/resources/views/books/form.blade.php b/resources/views/books/form.blade.php index dc0fd0a3f..514abf42c 100644 --- a/resources/views/books/form.blade.php +++ b/resources/views/books/form.blade.php @@ -1,16 +1,16 @@ {{ csrf_field() }}
- + @include('form/text', ['name' => 'name'])
- + @include('form/textarea', ['name' => 'description'])
- Cancel - + {{ trans('common.cancel') }} +
\ No newline at end of file diff --git a/resources/views/books/index.blade.php b/resources/views/books/index.blade.php index 91906e7b8..c090a127e 100644 --- a/resources/views/books/index.blade.php +++ b/resources/views/books/index.blade.php @@ -9,7 +9,7 @@
@if($currentUser->can('book-create-all')) - Add new book + {{ trans('entities.books_create') }} @endif
@@ -21,7 +21,7 @@
-

Books

+

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

@if(count($books) > 0) @foreach($books as $book) @include('books/list-item', ['book' => $book]) @@ -29,27 +29,27 @@ @endforeach {!! $books->render() !!} @else -

No books have been created.

+

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

@if(userCan('books-create-all')) - Create one now + {{ trans('entities.create_one_now') }} @endif @endif
@if($recents) -
 
-

Recently Viewed

+
 
+

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

@include('partials/entity-list', ['entities' => $recents]) @endif
 
diff --git a/resources/views/books/restrictions.blade.php b/resources/views/books/restrictions.blade.php index 7fdd3abef..f14042933 100644 --- a/resources/views/books/restrictions.blade.php +++ b/resources/views/books/restrictions.blade.php @@ -16,7 +16,7 @@
-

Book Permissions

+

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

@include('form/restriction-form', ['model' => $book])
diff --git a/resources/views/books/show.blade.php b/resources/views/books/show.blade.php index 129851d5e..6ae126c63 100644 --- a/resources/views/books/show.blade.php +++ b/resources/views/books/show.blade.php @@ -8,26 +8,26 @@
@if(userCan('page-create', $book)) - New Page + {{ trans('entities.pages_new') }} @endif @if(userCan('chapter-create', $book)) - New Chapter + {{ trans('entities.chapters_new') }} @endif @if(userCan('book-update', $book)) - Edit + {{ trans('entities.edit') }} @endif @if(userCan('book-update', $book) || userCan('restrictions-manage', $book) || userCan('book-delete', $book)) @@ -59,23 +59,19 @@
@endforeach @else -

No pages or chapters have been created for this book.

+

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

- Create a new page -   -or-    - Add a chapter + {{ trans('entities.books_empty_create_page') }} +   -{{ trans('entities.books_empty_or') }}-    + {{ trans('entities.books_empty_add_chapter') }}


@endif -

- Created {{$book->created_at->diffForHumans()}} @if($book->createdBy) by {{$book->createdBy->name}} @endif -
- Last Updated {{$book->updated_at->diffForHumans()}} @if($book->updatedBy) by {{$book->updatedBy->name}} @endif -

+ @include('partials.entity-meta', ['entity' => $book])
-

Search Results Clear Search

+

{{ trans('entities.search_results') }} {{ trans('entities.search_clear') }}

@include('partials/loading-icon')
@@ -90,21 +86,21 @@ @if($book->restricted)

@if(userCan('restrictions-manage', $book)) - Book Permissions Active + {{ trans('entities.books_permissions_active') }} @else - Book Permissions Active + {{ trans('entities.books_permissions_active') }} @endif

@endif
-

Recent Activity

+

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

@include('partials/activity-list', ['activity' => Activity::entityActivity($book, 20, 0)])
diff --git a/resources/views/chapters/create.blade.php b/resources/views/chapters/create.blade.php index b81cb15d7..afdbfa99d 100644 --- a/resources/views/chapters/create.blade.php +++ b/resources/views/chapters/create.blade.php @@ -3,7 +3,7 @@ @section('content')
-

Create New Chapter

+

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

@include('chapters/form')
diff --git a/resources/views/chapters/delete.blade.php b/resources/views/chapters/delete.blade.php index e9573f228..7005312c8 100644 --- a/resources/views/chapters/delete.blade.php +++ b/resources/views/chapters/delete.blade.php @@ -3,16 +3,15 @@ @section('content')
-

Delete Chapter

-

This will delete the chapter with the name '{{$chapter->name}}', All pages will be removed - and added directly to the book.

-

Are you sure you want to delete this chapter?

+

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

+

{{ trans('entities.chapters_delete_explain', ['chapterName' => $chapter->name]) }}

+

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

{!! csrf_field() !!} - Cancel - + {{ trans('common.cancel') }} +
diff --git a/resources/views/chapters/edit.blade.php b/resources/views/chapters/edit.blade.php index 0363da96d..272543e67 100644 --- a/resources/views/chapters/edit.blade.php +++ b/resources/views/chapters/edit.blade.php @@ -3,7 +3,7 @@ @section('content')
-

Edit Chapter

+

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

@include('chapters/form', ['model' => $chapter]) diff --git a/resources/views/chapters/form.blade.php b/resources/views/chapters/form.blade.php index 70df4737a..54722a58a 100644 --- a/resources/views/chapters/form.blade.php +++ b/resources/views/chapters/form.blade.php @@ -2,16 +2,16 @@ {!! csrf_field() !!}
- + @include('form/text', ['name' => 'name'])
- + @include('form/textarea', ['name' => 'description'])
- Cancel - + {{ trans('common.cancel') }} +
diff --git a/resources/views/chapters/list-item.blade.php b/resources/views/chapters/list-item.blade.php index f70e59244..8487a63a3 100644 --- a/resources/views/chapters/list-item.blade.php +++ b/resources/views/chapters/list-item.blade.php @@ -17,7 +17,7 @@ @endif @if(!isset($hidePages) && count($chapter->pages) > 0) -

{{ count($chapter->pages) }} Pages

+

{{ trans('entities.x_pages', ['count' => $chapter->pages->count()]) }}

@foreach($chapter->pages as $page)
{{$page->name}}
diff --git a/resources/views/chapters/move.blade.php b/resources/views/chapters/move.blade.php index 37d56d30d..291ab5015 100644 --- a/resources/views/chapters/move.blade.php +++ b/resources/views/chapters/move.blade.php @@ -17,7 +17,7 @@
-

Move Chapter {{$chapter->name}}

+

{{ trans('entities.chapters_move') }} {{$chapter->name}}

{!! csrf_field() !!} @@ -25,8 +25,8 @@ @include('partials/entity-selector', ['name' => 'entity_selection', 'selectorSize' => 'large', 'entityTypes' => 'book']) - Cancel - + {{ trans('common.cancel') }} +
diff --git a/resources/views/chapters/restrictions.blade.php b/resources/views/chapters/restrictions.blade.php index 771665037..7a38fa104 100644 --- a/resources/views/chapters/restrictions.blade.php +++ b/resources/views/chapters/restrictions.blade.php @@ -17,7 +17,7 @@
-

Chapter Permissions

+

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

@include('form/restriction-form', ['model' => $chapter])
diff --git a/resources/views/chapters/show.blade.php b/resources/views/chapters/show.blade.php index 70b09e9ce..d929d61cc 100644 --- a/resources/views/chapters/show.blade.php +++ b/resources/views/chapters/show.blade.php @@ -13,23 +13,23 @@
@if(userCan('page-create', $chapter)) - New Page + {{ trans('entities.pages_new') }} @endif @if(userCan('chapter-update', $chapter)) - Edit + {{ trans('entities.edit') }} @endif @if(userCan('chapter-update', $chapter) || userCan('restrictions-manage', $chapter) || userCan('chapter-delete', $chapter)) @@ -57,26 +57,22 @@
@else
-

No pages are currently in this chapter.

+

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

@if(userCan('page-create', $chapter)) - Create a new page + {{ trans('entities.books_empty_create_page') }} @endif @if(userCan('page-create', $chapter) && userCan('book-update', $book)) -   -or-    +   -{{ trans('entities.books_empty_or') }}-    @endif @if(userCan('book-update', $book)) - Sort the current book + {{ trans('entities.books_empty_sort_current_book') }} @endif


@endif -

- Created {{ $chapter->created_at->diffForHumans() }} @if($chapter->createdBy) by {{ $chapter->createdBy->name}} @endif -
- Last Updated {{ $chapter->updated_at->diffForHumans() }} @if($chapter->updatedBy) by {{ $chapter->updatedBy->name}} @endif -

+ @include('partials.entity-meta', ['entity' => $chapter])
@@ -84,19 +80,20 @@
@if($book->restricted) - @if(userCan('restrictions-manage', $book)) - Book Permissions Active - @else - Book Permissions Active - @endif -
+

+ @if(userCan('restrictions-manage', $book)) + {{ trans('entities.books_permissions_active') }} + @else + {{ trans('entities.books_permissions_active') }} + @endif +

@endif @if($chapter->restricted) @if(userCan('restrictions-manage', $chapter)) - Chapter Permissions Active + {{ trans('entities.chapters_permissions_active') }} @else - Chapter Permissions Active + {{ trans('entities.chapters_permissions_active') }} @endif @endif
diff --git a/resources/views/pages/show.blade.php b/resources/views/pages/show.blade.php index af85075a2..0a96afdab 100644 --- a/resources/views/pages/show.blade.php +++ b/resources/views/pages/show.blade.php @@ -72,11 +72,7 @@
-

- Created {{ $page->created_at->diffForHumans() }} @if($page->createdBy) by {{$page->createdBy->name}} @endif -
- Last Updated {{ $page->updated_at->diffForHumans() }} @if($page->updatedBy) by {{$page->updatedBy->name}} @endif -

+ @include('partials.entity-meta', ['entity' => $page])
diff --git a/resources/views/pages/sidebar-tree-list.blade.php b/resources/views/pages/sidebar-tree-list.blade.php index 09d9b77f9..74ce6c34d 100644 --- a/resources/views/pages/sidebar-tree-list.blade.php +++ b/resources/views/pages/sidebar-tree-list.blade.php @@ -2,16 +2,16 @@
@if (isset($page) && $page->attachments->count() > 0) -
Attachments
+
{{ trans('entities.pages_attachments') }}
@foreach($page->attachments as $attachment) @endforeach @endif @if (isset($pageNav) && $pageNav) -
Page Navigation
+
{{ trans('entities.pages_navigation') }}
@endif -
Book Navigation
+
{{ trans('entities.books_navigation') }}