getUserName(); $questionnaire = $model->getQuestionnaireTitle(); $this->title = $user . ": " . $questionnaire; $this->params['breadcrumbs'][] = ['label' => 'User Questionnaires', 'url' => ['index']]; $this->params['breadcrumbs'][] = $this->title; YiiAsset::register($this); ?> registerJs( // '$("document").ready(function(){ // $("#new_note").on("pjax:end", function() { // $.pjax.reload({container:"#user_responses"}); //Reload GridView // }); // });' //); ?>
= Html::a('Список', ['index'], ['class' => 'btn btn-primary']) ?> = Html::a('Изменить', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?> = Html::a('Удалить', ['delete', 'id' => $model->id], [ 'class' => 'btn btn-danger', 'data' => [ 'confirm' => 'Are you sure you want to delete this item?', 'method' => 'post', ], ]) ?>
= DetailView::widget([ 'model' => $model, 'attributes' => [ 'id', [ 'attribute' => 'questionnaires_id', 'value' => ArrayHelper::getValue($model, 'questionnaire.title'), ], [ 'attribute' => 'user_id', 'value' => ArrayHelper::getValue($model, 'user.username'), ], 'uuid', 'score', [ 'attribute' => 'percent_correct_answers', 'value' => function($model) { $percent = $model->percent_correct_answers * 100; return $percent . '%'; } ], [ 'attribute' => 'status', 'format' => 'raw', 'value' => StatusHelper::statusLabel($model->status), ], 'created_at', 'updated_at', ], ]) ?>= Html::a('Проверить ответы', ['rate-responses', 'id' => $model->id], [ 'class' => 'btn btn-primary', 'data' => [ 'confirm' => 'Проверка ответов пользователя: ' . $user . ". Категория: " . $questionnaire, // 'method' => 'post', ], ]) ?> '