title = 'Сотрудники на проектах'; $this->params['breadcrumbs'][] = $this->title; ?>
= Html::a('Назначить сотрудника на проект', ['create'], ['class' => 'btn btn-success']) ?> = Html::a('Установить значения поля "Сотрудник"', ['set-user-fields'], ['class' => 'btn btn-secondary']) ?> = Html::a('Установить значения поля "Карточка"', ['set-card-fields'], ['class' => 'btn btn-secondary']) ?>
= GridView::widget([ 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [ ['class' => 'yii\grid\SerialColumn'], [ 'attribute' => 'project_id', 'filter' => Project::find()->select(['name', 'id'])->indexBy('id')->column(), 'value' => 'project.name' ], [ 'attribute' => 'user_id', 'filter' => User::find()->select(['username', 'id'])->indexBy('id')->column(), 'value' => 'user.username' ], [ 'attribute' => 'card_id', 'filter' => UserCard::find()->select(['fio', 'id'])->indexBy('id')->column(), 'value' => 'card.fio' ], ['class' => 'yii\grid\ActionColumn'], ], ]); ?>