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' => 'user_id', 'filter' => User::find()->select(['username', 'id'])->indexBy('id')->column(), 'value' => 'user.username', ], [ 'attribute' => 'question_id', 'filter' => Question::find()->select(['question_body', 'id'])->indexBy('id')->column(), 'value' => 'question.question_body', ], 'response_body', 'created_at', 'updated_at', [ 'attribute' =>'answer_flag', 'format' => 'raw', 'filter' => AnswerHelper::answerFlagsList(), 'value' => function ($model) { return AnswerHelper::answerStatusLabel($model->answer_flag); }, ], [ 'attribute' => 'user_questionnaire_uuid', 'filter' => UserQuestionnaire::find()->select(['uuid', 'id'])->indexBy('id')->column(), 'value' => 'questionnaire.title', ], ['class' => 'yii\grid\ActionColumn'], ], ]); ?>