guild/backend/modules/questionnaire/views/questionnaire-category/view.php
2021-10-22 17:02:28 +03:00

56 lines
1.7 KiB
PHP

<?php
use yii\helpers\Html;
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;
\yii\web\YiiAsset::register($this);
?>
<div class="questionnaire-categories-view">
<!-- <h1>-->
<!-- <?//= Html::encode($this->title) ?> -->
<!-- </h1>-->
<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' => 'Are you sure you want to delete this item?',
'method' => 'post',
],
]) ?>
</p>
<?= DetailView::widget([
'model' => $model,
'attributes' => [
'id',
'title',
[
'attribute' => 'status',
'format' => 'raw',
'value' => function ($model) {
return \yii\helpers\Html::tag(
'span',
$model->status ? 'Active' : 'Not Active',
[
'class' => 'label label-' . ($model->status ? 'success' : 'danger'),
]
);
},
],
'created_at',
'updated_at',
],
]) ?>
</div>