title = $model->question_body; $this->params['breadcrumbs'][] = ['label' => 'Questions', 'url' => ['index']]; $this->params['breadcrumbs'][] = $this->title; \yii\web\YiiAsset::register($this); ?>

'btn btn-primary']) ?> $model->id], ['class' => 'btn btn-primary']) ?> $model->id], [ 'class' => 'btn btn-danger', 'data' => [ 'confirm' => 'Вы уверены, что хотите удалить этот элемент?', 'method' => 'post', ], ]) ?>

$model, 'attributes' => [ 'id', [ 'attribute' => 'question_type_id', 'value' => ArrayHelper::getValue($model, 'questionType.question_type'), ], [ 'attribute' => 'questionnaire_id', 'value' => ArrayHelper::getValue($model,'questionnaire.title'), ], 'question_body', 'question_priority', 'next_question', [ 'attribute' => 'status', 'format' => 'raw', 'filter' => StatusHelper::statusList(), 'value' => StatusHelper::statusLabel($model->status), ], 'created_at', 'updated_at', [ 'attribute' => 'time_limit', 'format' => 'raw', 'value' => TimeHelper::limitTime($model->time_limit), ], 'score' ], ]) ?>

$answerDataProvider, // 'filterModel' => $answerSearchModel, 'columns' => [ ['class' => 'yii\grid\SerialColumn'], 'answer_body', [ 'attribute' => 'answer_flag', 'format' => 'raw', 'filter' => AnswerHelper::answerFlagsList(), 'value' => function ($model) { return AnswerHelper::answerFlagLabel($model->answer_flag); }, ], [ 'attribute' => 'status', 'format' => 'raw', 'filter' => StatusHelper::statusList(), 'value' => function($model){ return StatusHelper::statusLabel($model->status); } ], [ 'class' => 'yii\grid\ActionColumn', 'template' => '{view} {update} {delete}', 'controller' => 'answer', 'buttons' => [ 'update' => function ($url,$model) { return Html::a( '', ['answer/update', 'id' => $model['id'], 'question_id' => $model['question_id']]); }, 'delete' => function ($url,$model) { return Html::a( '', [ 'answer/delete', 'id' => $model['id'], 'question_id' => $model['question_id'] ], [ 'data' => ['confirm' => 'Вы уверены, что хотите удалить этот вопрос?', 'method' => 'post'] ] ); }, ], ], ], ]); ?>

$model->id], ['class' => 'btn btn-primary'] ) ?>