48 lines
1.5 KiB
PHP
48 lines
1.5 KiB
PHP
<?php
|
|
|
|
use yii\helpers\Html;
|
|
use yii\web\YiiAsset;
|
|
use yii\widgets\DetailView;
|
|
|
|
/* @var $this yii\web\View */
|
|
/* @var $model backend\modules\questionnaire\models\QuestionnaireCategory */
|
|
|
|
$this->title = $model->title;
|
|
$this->params['breadcrumbs'][] = ['label' => 'Questionnaire Categories', 'url' => ['index']];
|
|
$this->params['breadcrumbs'][] = $this->title;
|
|
YiiAsset::register($this);
|
|
?>
|
|
<div class="questionnaire-categories-view">
|
|
|
|
<p>
|
|
<?= Html::a('Список', ['index'], ['class' => 'btn btn-primary']) ?>
|
|
<?= Html::a('Изменить', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
|
|
<?= Html::a('Удалить', ['delete', 'id' => $model->id], [
|
|
'class' => 'btn btn-danger',
|
|
'data' => [
|
|
'confirm' => 'Вы уверены, что хотите удалить этот элемент?',
|
|
'method' => 'post',
|
|
],
|
|
]) ?>
|
|
</p>
|
|
|
|
<?= DetailView::widget([
|
|
'model' => $model,
|
|
'attributes' => [
|
|
'id',
|
|
'title',
|
|
[
|
|
'attribute' => 'status',
|
|
'format' => 'raw',
|
|
'filter' => \common\helpers\StatusHelper::statusList(),
|
|
'value' => function($model) {
|
|
return \common\helpers\StatusHelper::statusLabel($model->status);
|
|
},
|
|
],
|
|
'created_at',
|
|
'updated_at',
|
|
],
|
|
]) ?>
|
|
|
|
</div>
|