This commit is contained in:
2018-12-03 12:10:39 +03:00
parent c730e2547e
commit 45173d3b66
7 changed files with 111 additions and 13 deletions

View File

@ -1,5 +1,6 @@
<?php
use common\models\Project;
use yii\helpers\Html;
use yii\grid\GridView;
@ -13,7 +14,7 @@ $this->params['breadcrumbs'][] = $this->title;
<div class="project-index">
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<?php ?>
<p>
<?= Html::a('Создать', ['create'], ['class' => 'btn btn-success']) ?>
</p>
@ -24,11 +25,29 @@ $this->params['breadcrumbs'][] = $this->title;
'columns' => [
['class' => 'yii\grid\SerialColumn'],
'id',
'name',
//'id',
[
'attribute' => 'name',
'filter' => kartik\select2\Select2::widget([
'model' => $searchModel,
'attribute' => 'name',
'data' => \common\models\Project::getListName(),
'options' => ['placeholder' => 'Начните вводить...','class' => 'form-control'],
'pluginOptions' => [
'allowClear' => true
],
]),
],
'budget',
'description:ntext',
'created_at',
'updated_at',
[
'label' => 'Исполнители',
'value' => function($model){
return implode(', ', $model->getUsersNameList());
}
],
//'created_at',
//'updated_at',
['class' => 'yii\grid\ActionColumn'],
],