Update 404 to show only on dashboard and api

This commit is contained in:
Joseph Cohen
2014-12-31 19:10:19 -06:00
parent 78f69f38ef
commit 9501ffd1ba
3 changed files with 17 additions and 6 deletions
+3
View File
@@ -55,6 +55,9 @@ return [
'logged_incidents' => '{0} There are no incidents, good work.|You have logged one incident.|You have reported <strong>:count</strong> incidents.', 'logged_incidents' => '{0} There are no incidents, good work.|You have logged one incident.|You have reported <strong>:count</strong> incidents.',
'settings_saved' => 'Settings saved.', 'settings_saved' => 'Settings saved.',
'settings_not_saved' => 'Settings could not be saved.', 'settings_not_saved' => 'Settings could not be saved.',
'not_found' => 'Page Not Found',
'not_found_message' => 'Sorry, but the page you are looking for has not been found. Check the URL for errors and try again.',
'not_found_link' => 'Return to homepage',
], ],
// Forms // Forms
'forms' => [ 'forms' => [
+7 -3
View File
@@ -57,9 +57,13 @@ API::error(function (\Illuminate\Database\Eloquent\ModelNotFoundException $excep
}); });
App::missing(function ($exception) { App::missing(function ($exception) {
return Response::view('errors.404', [ if (Request::is('dashboard*') or Request::is('api*')) {
'pageTitle' => 'That page went missing!' return Response::view('errors.404', [
], 404); 'pageTitle' => 'That page went missing!',
], 404);
}
return Redirect::route('status-page');
}); });
/* /*
+7 -3
View File
@@ -2,13 +2,17 @@
@section('content') @section('content')
<div class="middle-box text-center"> <div class="middle-box text-center">
<div>
<img class="logo" height="65" src="{{ url('img/cachet-logo.svg') }}" alt="Cachet"/>
</div>
<h1>404</h1> <h1>404</h1>
<h3 class="font-bold">Page Not Found</h3> <h3>{{ Lang::get('cachet.dashboard.not_found') }}</h3>
<div class="error-desc"> <div class="error-desc">
<p>Sorry, but the page you are looking for has not been found. Check the URL for errors and try again.</p> <p>{{ Lang::get('cachet.dashboard.not_found_message') }}</p>
<br/>
<p> <p>
<a href='/' class='btn btn-default btn-lg'>Home</a> <a href='/' class='btn btn-default btn-lg'>{{ Lang::get('cachet.dashboard.not_found_link') }}</a>
</p> </p>
</div> </div>
</div> </div>