guild/backend/modules/knowledgelevel/views/knowledge-level/view.php
2023-04-12 13:14:37 +03:00

43 lines
1.2 KiB
PHP

<?php
use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model backend\modules\knowledgelevel\models\KnowledgeLevel */
$this->title = $model->title;
$this->params['breadcrumbs'][] = ['label' => 'Knowledge Levels', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
\yii\web\YiiAsset::register($this);
?>
<div class="knowledge-level-view">
<p>
<?= Html::a('Редактировать', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
<?= Html::a('Список', ['index'], ['class' => 'btn btn-primary']) ?>
<?= Html::a('Удалить', ['delete', 'id' => $model->id], [
'class' => 'btn btn-danger',
'data' => [
'confirm' => 'Are you sure you want to delete this item?',
'method' => 'post',
],
]) ?>
</p>
<?= DetailView::widget([
'model' => $model,
'attributes' => [
'id',
'title',
[
'attribute' => 'status',
'value' => function($model){
return \common\models\KnowledgeLevel::getStatus()[$model->status];
}
],
],
]) ?>
</div>