diff --git a/resources/views/base.blade.php b/resources/views/base.blade.php index e6d0b7761..3c144fea8 100644 --- a/resources/views/base.blade.php +++ b/resources/views/base.blade.php @@ -56,6 +56,9 @@ @icon('settings'){{ trans('settings.settings') }} @endif @if(!signedInUser()) + @if(setting('registration-enabled', false)) + @icon('new-user') {{ trans('auth.sign_up') }} + @endif @icon('login') {{ trans('auth.log_in') }} @endif diff --git a/resources/views/users/profile.blade.php b/resources/views/users/profile.blade.php index bd63ce938..4f67f1be2 100644 --- a/resources/views/users/profile.blade.php +++ b/resources/views/users/profile.blade.php @@ -37,22 +37,27 @@
{{ trans('entities.profile_created_content') }}
-
- @icon('book') {{ trans_choice('entities.x_books', $assetCounts['books']) }} -
-
- @icon('chapter') {{ trans_choice('entities.x_chapters', $assetCounts['chapters']) }} -
-
- @icon('page') {{ trans_choice('entities.x_pages', $assetCounts['pages']) }} -
+ +
+ @icon('book') {{ trans_choice('entities.x_books', $assetCounts['books']) }} +
+
+ +
+ @icon('chapter') {{ trans_choice('entities.x_chapters', $assetCounts['chapters']) }} +
+
+ +
+ @icon('page') {{ trans_choice('entities.x_pages', $assetCounts['pages']) }} +
+

- -

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

+

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

@if (count($recentlyCreated['pages']) > 0) @include('partials/entity-list', ['entities' => $recentlyCreated['pages']]) @else @@ -60,8 +65,7 @@ @endif
- -

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

+

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

@if (count($recentlyCreated['chapters']) > 0) @include('partials/entity-list', ['entities' => $recentlyCreated['chapters']]) @else @@ -69,8 +73,7 @@ @endif
- -

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

+

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

@if (count($recentlyCreated['books']) > 0) @include('partials/entity-list', ['entities' => $recentlyCreated['books']]) @else diff --git a/tests/PublicActionTest.php b/tests/PublicActionTest.php index 671b5ee42..27b4822fa 100644 --- a/tests/PublicActionTest.php +++ b/tests/PublicActionTest.php @@ -14,6 +14,24 @@ class PublicActionTest extends BrowserKitTest $this->visit($page->getUrl())->seePageIs('/login'); } + public function test_login_link_visible() + { + $this->setSettings(['app-public' => 'true']); + $this->visit('/')->see(url('/login')); + } + + public function test_register_link_visible_when_enabled() + { + $this->setSettings(['app-public' => 'true']); + + $this->visit('/')->see(url('/login')); + $this->visit('/')->dontSee(url('/register')); + + $this->setSettings(['app-public' => 'true', 'registration-enabled' => 'true']); + $this->visit('/')->see(url('/login')); + $this->visit('/')->see(url('/register')); + } + public function test_books_viewable() { $this->setSettings(['app-public' => 'true']);