mirror of
https://github.com/danielbrendel/hortusfox-web.git
synced 2026-02-21 13:58:39 -06:00
Proper error 404 page
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
/**
|
||||
* Class Error404Controller
|
||||
*
|
||||
* Serve error 404 information
|
||||
* Serve error 404 page
|
||||
*/
|
||||
class Error404Controller extends BaseController {
|
||||
/**
|
||||
@@ -14,14 +14,13 @@ class Error404Controller extends BaseController {
|
||||
*/
|
||||
public function index($request)
|
||||
{
|
||||
//Add a log line
|
||||
addLog(ASATRU_LOG_INFO, "Error 404");
|
||||
|
||||
//Generate the 404 view
|
||||
$v = new Asatru\View\ViewHandler();
|
||||
$v->setLayout('layout') //The layout file. Will be \app\views\layout.php
|
||||
->setYield('yield', 'error/404'); //The index yield. Will be \app\views\error\404.php
|
||||
$v->setLayout('layout')
|
||||
->setYield('content', 'error/404')
|
||||
->setVars([
|
||||
'user' => UserModel::getAuthUser()
|
||||
]);
|
||||
|
||||
return $v; //Pass the object to the engine
|
||||
return $v;
|
||||
}
|
||||
}
|
||||
@@ -1,17 +1,5 @@
|
||||
<!-- Error 404 yield file -->
|
||||
<h1>Error 404</h1>
|
||||
|
||||
<div class="outer">
|
||||
<div class="inner">
|
||||
<div class="title">
|
||||
<h1>Error 404</h1>
|
||||
</div>
|
||||
<h2 class="smaller-headline">The requested resource <b>{{ $_SERVER['REQUEST_URI'] }}</b> was not found on the server.</h2>
|
||||
|
||||
<div class="text">
|
||||
<p>The requested resource {{ $_SERVER['REQUEST_URI'] }} was not found on the server.</p>
|
||||
</div>
|
||||
|
||||
<div class="links">
|
||||
<button type="button" class="button btn-col-contact" onclick="location.href = '{{ url('/') }}';">Go home</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a class="button is-link" href="{{ url('/') }}">Go to dashboard</a>
|
||||
Reference in New Issue
Block a user