NOW MANAGED ON CODEBERG
Improved 404 page and updated tests for empty search
Dan Brownf60a0c3b7606
diff --git a/app/Services/ActivityService.php b/app/Services/ActivityService.phpindex 4da928fad..2ef5f9cfe 100644--- a/app/Services/ActivityService.php+++ b/app/Services/ActivityService.php@@ -107,7 +107,7 @@ class ActivityService}/**- * Filters out similar acitivity.+ * Filters out similar activity.* @param Activity[] $activity* @return array*/diff --git a/resources/views/base.blade.php b/resources/views/base.blade.phpindex 25559bd40..a2979f858 100644--- a/resources/views/base.blade.php+++ b/resources/views/base.blade.php@@ -43,14 +43,14 @@<div class="float right"><div class="links text-center"><a href="/books"><i class="zmdi zmdi-book"></i>Books</a>- @if($currentUser->can('settings-update'))+ @if(isset($currentUser) && $currentUser->can('settings-update'))<a href="/settings"><i class="zmdi zmdi-settings"></i>Settings</a>@endif- @if(!$signedIn)+ @if(!isset($signedIn) || !$signedIn)<a href="/login"><i class="zmdi zmdi-sign-in"></i>Sign In</a>@endif</div>- @if($signedIn)+ @if(isset($signedIn) && $signedIn)<div class="dropdown-container" dropdown><span class="user-name" dropdown-toggle><img class="avatar" src="{{$currentUser->getAvatar(30)}}" alt="{{ $currentUser->name }}">diff --git a/resources/views/errors/404.blade.php b/resources/views/errors/404.blade.phpindex 0062bb258..191cf758f 100644--- a/resources/views/errors/404.blade.php+++ b/resources/views/errors/404.blade.php@@ -4,8 +4,9 @@<div class="container">- <h1>Page Not Found</h1>- <p>The page you were looking for could not be found.</p>+ <h1 class="text-muted">Page Not Found</h1>+ <p>Sorry, The page you were looking for could not be found.</p>+ <a href="/" class="button">Return To Home</a></div>@stop\ No newline at end of filediff --git a/tests/EntityTest.php b/tests/EntityTest.phpindex b883e8543..4c4195fd9 100644--- a/tests/EntityTest.php+++ b/tests/EntityTest.php@@ -180,6 +180,14 @@ class EntityTest extends TestCase->seeStatusCode(200);}+ public function testEmptySearchRedirectsBack()+ {+ $this->asAdmin()+ ->visit('/')+ ->visit('/search/all')+ ->seePageIs('/');+ }+public function testEntitiesViewableAfterCreatorDeletion(){