2018-10-11 11:15:09 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use yii\grid\GridView;
|
|
|
|
use yii\helpers\Html;
|
|
|
|
use yii\widgets\DetailView;
|
|
|
|
|
|
|
|
/* @var $this yii\web\View */
|
|
|
|
/* @var $model backend\modules\card\models\UserCard */
|
2019-11-14 17:21:34 +03:00
|
|
|
/* @var $userData common\models\User */
|
2018-10-12 14:52:08 +03:00
|
|
|
/* @var $skills \common\models\CardSkill */
|
2021-09-09 13:12:37 +03:00
|
|
|
/* @var $achievements \common\models\AchievementUserCard */
|
2018-10-12 14:52:08 +03:00
|
|
|
/* @var $skill \common\models\Skill */
|
2021-09-09 13:12:37 +03:00
|
|
|
/* @var $achievement \common\models\Achievement */
|
2020-08-04 10:47:53 +03:00
|
|
|
/* @var $modelFieldValue yii\data\ActiveDataProvider */
|
|
|
|
/* @var $changeDataProvider yii\data\ActiveDataProvider */
|
2018-10-11 11:15:09 +03:00
|
|
|
|
|
|
|
$this->title = $model->fio;
|
2019-12-09 10:54:39 +03:00
|
|
|
$this->params['breadcrumbs'][] = ['label' => 'Профили', 'url' => ['index']];
|
2018-10-11 11:15:09 +03:00
|
|
|
$this->params['breadcrumbs'][] = $this->title;
|
|
|
|
?>
|
|
|
|
<div class="user-card-view">
|
|
|
|
|
|
|
|
<p>
|
2019-12-09 10:54:39 +03:00
|
|
|
<?= Html::a('Список', ['index'], ['class' => 'btn btn-primary']) ?>
|
2018-10-11 11:15:09 +03:00
|
|
|
<?= Html::a('Редактировать', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<?= DetailView::widget([
|
|
|
|
'model' => $model,
|
|
|
|
'attributes' => [
|
|
|
|
'fio',
|
|
|
|
'passport',
|
|
|
|
[
|
2019-12-09 10:54:39 +03:00
|
|
|
'attribute' => 'photo',
|
2018-10-11 11:15:09 +03:00
|
|
|
'format' => 'raw',
|
2019-11-14 17:21:34 +03:00
|
|
|
'value' => function ($model) {
|
2018-10-11 11:15:09 +03:00
|
|
|
return Html::tag('img', null, ['src' => $model->photo, 'width' => '100px']);
|
|
|
|
}
|
|
|
|
],
|
2021-06-30 17:30:53 +03:00
|
|
|
[
|
|
|
|
'attribute' => 'level',
|
|
|
|
'value' => function($model){
|
|
|
|
return \common\models\UserCard::getLevelLabel($model->level);
|
|
|
|
}
|
|
|
|
],
|
2021-08-11 17:21:18 +03:00
|
|
|
[
|
|
|
|
'attribute' => 'specification',
|
|
|
|
'value' => $model->specification
|
|
|
|
],
|
2018-10-11 11:15:09 +03:00
|
|
|
[
|
2019-12-09 10:54:39 +03:00
|
|
|
'attribute' => 'resume',
|
2018-10-11 11:15:09 +03:00
|
|
|
'format' => 'raw',
|
2019-11-14 17:21:34 +03:00
|
|
|
'value' => function ($model) {
|
2018-10-11 11:15:09 +03:00
|
|
|
return Html::a('Скачать', $model->resume, ['target' => '_blank']);
|
|
|
|
}
|
|
|
|
],
|
2019-12-09 10:54:39 +03:00
|
|
|
[
|
|
|
|
'attribute' => 'city',
|
|
|
|
'value' => $model->city
|
|
|
|
],
|
2018-10-11 11:15:09 +03:00
|
|
|
[
|
2018-10-12 14:52:08 +03:00
|
|
|
'attribute' => 'gender',
|
2018-10-11 11:15:09 +03:00
|
|
|
'value' => $model->gendersText,
|
|
|
|
],
|
|
|
|
|
|
|
|
'email:email',
|
|
|
|
|
2020-08-05 15:34:23 +03:00
|
|
|
'link_vk:url',
|
|
|
|
|
|
|
|
'link_telegram:url',
|
|
|
|
|
2018-10-11 11:15:09 +03:00
|
|
|
'dob',
|
|
|
|
[
|
2018-10-12 14:52:08 +03:00
|
|
|
'attribute' => 'status',
|
2018-10-11 11:15:09 +03:00
|
|
|
'value' => $model->status0->name,
|
|
|
|
],
|
2021-08-12 13:57:00 +03:00
|
|
|
[
|
|
|
|
'attribute' => 'salary',
|
|
|
|
'visible' => Yii::$app->user->can('confidential_information')
|
|
|
|
],
|
2018-10-12 14:52:08 +03:00
|
|
|
[
|
|
|
|
'attribute' => 'position_id',
|
2018-11-06 11:44:27 +03:00
|
|
|
'value' => (isset($model->position->name)) ? $model->position->name : 'Без должности',
|
2018-10-12 14:52:08 +03:00
|
|
|
],
|
2018-10-11 11:15:09 +03:00
|
|
|
'created_at',
|
|
|
|
'updated_at',
|
2021-07-13 13:45:44 +03:00
|
|
|
'vc_text_short',
|
2021-06-25 13:24:32 +03:00
|
|
|
[
|
|
|
|
'attribute' => 'vc_text',
|
|
|
|
'format' => 'raw'
|
2022-03-07 12:32:01 +03:00
|
|
|
],
|
|
|
|
[
|
|
|
|
'attribute' => 'test_task_getting_date',
|
|
|
|
'format' => ['datetime', 'php:d.m.Y']
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'attribute' => 'test_task_complete_date',
|
|
|
|
'format' => ['datetime', 'php:d.m.Y']
|
|
|
|
],
|
2018-10-11 11:15:09 +03:00
|
|
|
],
|
|
|
|
]) ?>
|
|
|
|
|
2018-10-12 14:52:08 +03:00
|
|
|
<h2>Навыки</h2>
|
2019-11-14 17:21:34 +03:00
|
|
|
<?php foreach ($skills as $skill) : ?>
|
2018-10-12 14:52:08 +03:00
|
|
|
<span class="btn btn-default btn-sm"><?= $skill['skill']->name; ?></span>
|
|
|
|
<?php endforeach; ?>
|
2021-06-25 13:24:32 +03:00
|
|
|
|
2021-09-09 13:12:37 +03:00
|
|
|
<h2>Достижения</h2>
|
|
|
|
<?php foreach ($achievements as $achievement) : ?>
|
|
|
|
<a target="_blank"
|
2021-09-14 17:23:28 +03:00
|
|
|
href="<?php \yii\helpers\Url::to(['/achievements/achievements/view', 'id' => $achievement['achievement']->id]);?>"
|
2021-09-09 13:12:37 +03:00
|
|
|
class="btn btn-default btn-sm">
|
|
|
|
<?= Html::tag('img', null,
|
2021-09-13 13:40:52 +03:00
|
|
|
['src' => $achievement['achievement']->img, 'height' => '50px', 'width' => '50px']
|
2021-09-09 13:12:37 +03:00
|
|
|
) ?>
|
|
|
|
<?= $achievement['achievement']->title; ?>
|
|
|
|
</a>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
|
2018-10-11 11:15:09 +03:00
|
|
|
<h2>Дополнительные сведения</h2>
|
|
|
|
|
|
|
|
<?= GridView::widget([
|
2020-08-04 10:47:53 +03:00
|
|
|
'dataProvider' => $modelFieldValue,
|
2019-11-14 17:21:34 +03:00
|
|
|
'layout' => "{items}",
|
2018-10-11 11:15:09 +03:00
|
|
|
'columns' => [
|
|
|
|
'field.name:text:Поле',
|
2019-07-26 16:02:35 +03:00
|
|
|
[
|
2019-07-26 16:21:32 +03:00
|
|
|
'attribute' => 'value',
|
|
|
|
'format' => 'raw',
|
2019-11-14 17:21:34 +03:00
|
|
|
'value' => function ($model) {
|
2019-12-06 11:06:21 +03:00
|
|
|
return $model->getValue();
|
2019-07-26 16:21:32 +03:00
|
|
|
}
|
2019-07-26 16:02:35 +03:00
|
|
|
],
|
2018-10-11 11:15:09 +03:00
|
|
|
],
|
|
|
|
]); ?>
|
2019-11-14 17:21:34 +03:00
|
|
|
|
2020-08-04 10:47:53 +03:00
|
|
|
<h2>История изменений</h2>
|
|
|
|
|
|
|
|
<?= GridView::widget([
|
|
|
|
'dataProvider' => $changeDataProvider,
|
|
|
|
'columns' => [
|
|
|
|
'label',
|
|
|
|
'old_value',
|
|
|
|
'new_value',
|
|
|
|
'created_at',
|
|
|
|
],
|
|
|
|
]); ?>
|
|
|
|
|
2019-11-14 17:21:34 +03:00
|
|
|
</div>
|