<?php use yii\helpers\Html; use yii\grid\GridView; /* @var $this yii\web\View */ /* @var $searchModel backend\modules\questionnaire\models\QuestionnaireCategorySearch */ /* @var $dataProvider yii\data\ActiveDataProvider */ $this->title = 'Категории анкет'; $this->params['breadcrumbs'][] = $this->title; ?> <div class="questionnaire-category-index"> <?php // echo $this->render('_search', ['model' => $searchModel]); ?> <p> <?= Html::a('Создать новую категорию анкет', ['create'], ['class' => 'btn btn-success']) ?> </p> <?= GridView::widget([ 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [ ['class' => 'yii\grid\SerialColumn'], 'title', [ 'attribute' => 'status', 'format' => 'raw', 'filter' => \common\helpers\StatusHelper::statusList(), 'value' => function($model) { return \common\helpers\StatusHelper::statusLabel($model->status); }, ], ['class' => 'yii\grid\ActionColumn'], ], ]); ?> </div>