From: Dan Brown Date: Sat, 31 Dec 2016 14:32:52 +0000 (+0000) Subject: Merge branch 'master' into translations X-Git-Tag: v0.14.0~1^2~27^2 X-Git-Url: http://source.bookstackapp.com/bookstack/commitdiff_plain/refs/pull/234/head?hp=-c Merge branch 'master' into translations --- a24f3d7d4759df6b509533daaa1c9686a074e9fe diff --combined app/Http/Controllers/Auth/RegisterController.php index 4bf4c0178,d9bb500b4..8b0ef309a --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@@ -3,7 -3,6 +3,7 @@@ namespace BookStack\Http\Controllers\Auth; use BookStack\Exceptions\ConfirmationEmailException; +use BookStack\Exceptions\SocialSignInException; use BookStack\Exceptions\UserRegistrationException; use BookStack\Repos\UserRepo; use BookStack\Services\EmailConfirmationService; @@@ -52,7 -51,7 +52,7 @@@ class RegisterController extends Contro */ public function __construct(SocialAuthService $socialAuthService, EmailConfirmationService $emailConfirmationService, UserRepo $userRepo) { - $this->middleware('guest'); + $this->middleware('guest')->except(['socialCallback', 'detachSocialAccount']); $this->socialAuthService = $socialAuthService; $this->emailConfirmationService = $emailConfirmationService; $this->userRepo = $userRepo; @@@ -83,7 -82,7 +83,7 @@@ protected function checkRegistrationAllowed() { if (!setting('registration-enabled')) { - throw new UserRegistrationException('Registrations are currently disabled.', '/login'); + throw new UserRegistrationException(trans('auth.registrations_disabled'), '/login'); } } @@@ -148,7 -147,7 +148,7 @@@ $restrictedEmailDomains = explode(',', str_replace(' ', '', setting('registration-restrict'))); $userEmailDomain = $domain = substr(strrchr($userData['email'], "@"), 1); if (!in_array($userEmailDomain, $restrictedEmailDomains)) { - throw new UserRegistrationException('That email domain does not have access to this application', '/register'); + throw new UserRegistrationException(trans('auth.registration_email_domain_invalid'), '/register'); } } @@@ -170,7 -169,7 +170,7 @@@ } auth()->login($newUser); - session()->flash('success', 'Thanks for signing up! You are now registered and signed in.'); + session()->flash('success', trans('auth.register_success')); return redirect($this->redirectPath()); } @@@ -263,7 -262,7 +263,7 @@@ return $this->socialRegisterCallback($socialDriver); } } else { - throw new SocialSignInException('No action defined', '/login'); + throw new SocialSignInException(trans('errors.social_no_action_defined'), '/login'); } return redirect()->back(); } @@@ -298,5 -297,4 +298,4 @@@ return $this->registerUser($userData, $socialAccount); } - } diff --combined resources/assets/sass/_lists.scss index d88db2ec2,e98e5bfcd..6acc47468 --- a/resources/assets/sass/_lists.scss +++ b/resources/assets/sass/_lists.scss @@@ -110,6 -110,8 +110,8 @@@ border-left: 0px solid #FFF; background-color: #FFF; &.fixed { + background-color: #FFF; + z-index: 5; position: fixed; top: 0; padding-left: $-l; @@@ -320,9 -322,6 +322,9 @@@ ul.pagination font-size: 0.75em; margin-top: $-xs; } + .text-muted p.text-muted { + margin-top: 0; + } .page.draft .text-page { color: $color-page-draft; } diff --combined resources/views/pages/show.blade.php index e54dacb42,50c6f5d2c..a734b1b95 --- a/resources/views/pages/show.blade.php +++ b/resources/views/pages/show.blade.php @@@ -6,34 -6,43 +6,34 @@@
- + @include('pages._breadcrumbs', ['page' => $page])
-
Export
+
{{ trans('entities.pages_export') }}
@if(userCan('page-update', $page)) - Edit + {{ trans('common.edit') }} @endif @if(userCan('page-update', $page) || userCan('restrictions-manage', $page) || userCan('page-delete', $page)) @@@ -55,7 -64,7 +55,7 @@@
- +
@@@ -63,7 -72,11 +63,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])
@@@ -75,33 -88,35 +75,35 @@@ @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 @if($page->chapter && $page->chapter->restricted) @if(userCan('restrictions-manage', $page->chapter)) - Chapter Permissions Active + {{ trans('entities.chapters_permissions_active') }} @else - Chapter Permissions Active + {{ trans('entities.chapters_permissions_active') }} @endif
@endif @if($page->restricted) @if(userCan('restrictions-manage', $page)) - Page Permissions Active + {{ trans('entities.pages_permissions_active') }} @else - Page Permissions Active + {{ trans('entities.pages_permissions_active') }} @endif
@endif
@endif + + @include('pages/sidebar-tree-list', ['book' => $book, 'sidebarTree' => $sidebarTree, 'pageNav' => $pageNav]) diff --combined resources/views/pages/sidebar-tree-list.blade.php index 74ce6c34d,5309cb774..87eebed49 --- a/resources/views/pages/sidebar-tree-list.blade.php +++ b/resources/views/pages/sidebar-tree-list.blade.php @@@ -1,17 -1,33 +1,33 @@@
+ @if(isset($page) && $page->tags->count() > 0) +
+
Page Tags
+ + + @foreach($page->tags as $tag) + + + @if($tag->value) @endif + + @endforeach + +
value) colspan="2" @endif>{{ $tag->name }}{{$tag->value}}
+
+ @endif + @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') }}