title = 'Метки проектов'; $this->params['breadcrumbs'][] = $this->title; ?>
= Html::a('Добавить проекту метку', ['create'], ['class' => 'btn btn-success']) ?>
= GridView::widget([ 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [ ['class' => 'yii\grid\SerialColumn'], [ 'attribute' => 'project_id', 'value' => function($model){ return $model->project->name; }, 'filter' => kartik\select2\Select2::widget([ 'model' => $searchModel, 'attribute' => 'project_id', 'data' => Project::find()->select(['name', 'id'])->indexBy('id')->column(), 'options' => ['placeholder' => 'Начните вводить...','class' => 'form-control'], 'pluginOptions' => [ 'allowClear' => true ], ]), ], [ 'attribute' => 'mark_id', 'value' => function($model){ return $model->mark->title; }, 'filter' => kartik\select2\Select2::widget([ 'model' => $searchModel, 'attribute' => 'mark_id', 'data' => Mark::find()->select(['title', 'id'])->indexBy('id')->column(), 'options' => ['placeholder' => 'Начните вводить...','class' => 'form-control'], 'pluginOptions' => [ 'allowClear' => true ], ]), ], ['class' => 'yii\grid\ActionColumn'], ], ]); ?>