add_skill_column_inuser_index

This commit is contained in:
SoHardKI
2019-07-03 13:55:32 +03:00
parent 9affc6b402
commit def33f55c2
6 changed files with 47 additions and 3 deletions

View File

@ -0,0 +1 @@
<?= $model->skill->name; ?>

View File

@ -3,6 +3,7 @@
use yii\helpers\Html;
use yii\grid\GridView;
use yii\helpers\Url;
use yii\widgets\ListView;
/* @var $this yii\web\View */
/* @var $searchModel backend\modules\card\models\UserCardSearch */
@ -56,6 +57,29 @@ $this->params['breadcrumbs'][] = $this->title;
],
//'created_at',
//'updated_at',
[
'label' => 'Навыки',
'format' => 'raw',
'value' => function($model){
$dataProvider = new \yii\data\ActiveDataProvider([
'query' => $model->getSkillValues(),
]);
return ListView::widget([
'dataProvider' => $dataProvider,
'itemView' => '_additional',
'layout' => "{items}",
]);
},
'filter' => kartik\select2\Select2::widget([
'attribute' => 'skill_name',
'model' => $searchModel,
'data' => \common\models\UserCard::getNameSkills(),
'options' => ['placeholder' => 'Выбрать параметр','class' => 'form-control'],
'pluginOptions' => [
'allowClear' => true
],
]),
],
['class' => 'yii\grid\ActionColumn'],
],