#1069 - Оформление страницы 404 в ПУ

parent 7e4613fa
......@@ -37,16 +37,10 @@ class SiteController extends Controller
];
}
/**
* @inheritdoc
*/
public function actions()
public function actionError()
{
return [
'error' => [
'class' => 'yii\web\ErrorAction',
],
];
$this->layout = "clear";
return $this->render('error');
}
public function actionLogin()
......
<?php
use yii\helpers\Html;
use backend\assets\AppAsset;
AppAsset::register($this);
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->
<!--[if !IE]><!-->
<html lang="ru">
<!--<![endif]-->
<head>
<meta charset="utf-8" />
<title>Произошла какая-то ошибка</title>
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport" />
<?= Html::csrfMetaTags() ?>
<?php $this->head() ?>
<?php echo $this->render('head')?>
</head>
<body>
<?php $this->beginBody() ?>
<?=$content?>
<?php $this->endBody() ?>
<?php echo $this->render('foot')?>
</body>
</html>
<?php $this->endPage() ?>
\ No newline at end of file
<?php
use yii\helpers\Html;
use common\models\Settings;
/* @var $this yii\web\View */
/* @var $name string */
/* @var $message string */
/* @var $exception Exception */
$this->title = $name;
?>
<div class="site-error">
<!-- begin #page-loader -->
<div id="page-loader" class="fade in"><span class="spinner"></span></div>
<!-- end #page-loader -->
<h1><?= Html::encode($this->title) ?></h1>
<div class="alert alert-danger">
<?= nl2br(Html::encode($message)) ?>
<!-- begin #page-container -->
<div id="page-container" class="fade">
<!-- begin error -->
<div class="error">
<div class="error-code m-b-10">404 <i class="fa fa-warning"></i></div>
<div class="error-content">
<div class="error-message">Произошла какая-то ошибка</div>
<div class="error-desc m-b-20">
Страница не существует или у вас нет прав для ее просмотра.<br />
Проверьте введенный URL-адрес страницы или обратитесь в Службу технической поддержки для решения данного вопроса
<?=Html::a(Settings::getValue('content-support-email'), 'mailto:'.Settings::getValue('content-support-email'))?>
</div>
<div>
<a href="/" class="btn btn-success">Вернуться на главную страницу</a>
</div>
</div>
</div>
<p>
The above error occurred while the Web server was processing your request.
</p>
<p>
Please contact us if you think this is a server error. Thank you.
</p>
<!-- end error -->
</div>
<!-- end page container -->
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment