Created
October 27, 2017 08:38
-
-
Save ildarusmanov/7d376ada296aff91a25483672f84606d to your computer and use it in GitHub Desktop.
error.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use yii\helpers\Html; | |
/* @var $this yii\web\View */ | |
/* @var $code int */ | |
/* @var $name string */ | |
/* @var $message string */ | |
/* @var $exception Exception */ | |
$this->title = 'Нет доступа'; | |
$this->params['breadcrumbs'][] = $this->title; | |
?> | |
<div class="jumbotron"> | |
<h1>Нет доступа</h1> | |
<h3>Недостаточно прав на совершение действия</h3> | |
<p><?= Html::a('На главную', Yii::$app->homeUrl, ['class' => 'btn btn-primary']) ?></p> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use yii\helpers\Html; | |
/* @var $this yii\web\View */ | |
/* @var $code int */ | |
/* @var $name string */ | |
/* @var $message string */ | |
/* @var $exception Exception */ | |
$this->title = 'Ошибка'; | |
$this->params['breadcrumbs'][] = $this->title; | |
?> | |
<div class="jumbotron"> | |
<h1>Ошибка # <?= $code; ?></h1> | |
<h3>Упс! Что-то пошло не так.</h3> | |
<p class="text-danger"><?= $message; ?></p> | |
<p>Мы уже работаем над проблемой!<br>Повторите через несколько минут.</p> | |
<p><?= Html::a('На главную', Yii::$app->homeUrl, ['class' => 'btn btn-primary']) ?></p> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ($code == 403) { | |
$this->render('_403', ['message' => $message]); | |
} else { | |
$this->render('_default_error', ['code' => $code, 'message' => $message]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment