getUserName(); $questionnaire = $model->getQuestionnaireTitle(); $this->title = $user . ": " . $questionnaire; $this->params['breadcrumbs'][] = ['label' => 'User Questionnaires', 'url' => ['index']]; $this->params['breadcrumbs'][] = $this->title; YiiAsset::register($this); ?>
= 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' => $questionnaire, ], [ 'attribute' => 'user_id', 'value' => $user, ], 'uuid', 'score', [ 'attribute' => 'percent_correct_answers', 'value' => function($model) { $percent = $model->percent_correct_answers * 100; return $percent . '%'; } ], [ 'attribute' => 'status', 'format' => 'raw', 'value' => function($model) { return Html::tag( 'span', $model->status ? 'Active' : 'Not Active', [ 'class' => 'label label-' . ($model->status ? 'success' : 'danger'), ] ); }, ], 'created_at', 'updated_at', ], ]) ?>= Html::a('Проверить ответы', ['rate-responses', 'id' => $model->id], [ 'class' => 'btn btn-primary', 'data' => [ 'confirm' => 'Проверка ответов пользователя: ' . $user . ". Категория: " . $questionnaire, // 'method' => 'post', ], ]) ?> '