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

parent 7e4613fa
...@@ -37,16 +37,10 @@ class SiteController extends Controller ...@@ -37,16 +37,10 @@ class SiteController extends Controller
]; ];
} }
/** public function actionError()
* @inheritdoc
*/
public function actions()
{ {
return [ $this->layout = "clear";
'error' => [ return $this->render('error');
'class' => 'yii\web\ErrorAction',
],
];
} }
public function actionLogin() 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 <?php
use yii\helpers\Html; use yii\helpers\Html;
use common\models\Settings;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $name string */ /* @var $name string */
/* @var $message string */ /* @var $message string */
/* @var $exception Exception */ /* @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> <!-- begin #page-container -->
<div id="page-container" class="fade">
<div class="alert alert-danger"> <!-- begin error -->
<?= nl2br(Html::encode($message)) ?> <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>
<div>
<p> <a href="/" class="btn btn-success">Вернуться на главную страницу</a>
The above error occurred while the Web server was processing your request. </div>
</p> </div>
<p> </div>
Please contact us if you think this is a server error. Thank you. <!-- end error -->
</p>
</div> </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