2019-11-18 13:06:54 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use yii\grid\GridView;
|
|
|
|
use yii\helpers\Html;
|
|
|
|
use yii\widgets\DetailView;
|
|
|
|
|
|
|
|
/* @var $this yii\web\View */
|
|
|
|
/* @var $skills \common\models\CardSkill */
|
|
|
|
/* @var $skill \common\models\Skill */
|
|
|
|
/* @var $modelFildValue yii\data\ActiveDataProvider */
|
|
|
|
|
2019-11-18 16:14:06 +03:00
|
|
|
$this->title = 'Профиль';
|
2019-11-18 13:06:54 +03:00
|
|
|
?>
|
|
|
|
<div class="user-card-view">
|
|
|
|
|
|
|
|
<h3>Личная информация</h3>
|
|
|
|
<?php
|
|
|
|
echo DetailView::widget([
|
|
|
|
'model' => $model,
|
|
|
|
'attributes' => [
|
|
|
|
['label' => 'ФИО', 'attribute' => 'fio',],
|
|
|
|
['label' => 'Email', 'attribute' => 'email',],
|
|
|
|
[
|
|
|
|
'attribute' => 'gender',
|
|
|
|
'value' => $model->gendersText,
|
|
|
|
],
|
|
|
|
['label' => 'Дата рождения', 'attribute' => 'dob',],
|
|
|
|
[
|
|
|
|
'attribute' => 'status',
|
|
|
|
'value' => $model->status0->name,
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'attribute' => 'position_id',
|
|
|
|
'value' => (isset($model->position->name)) ? $model->position->name : 'Без должности',
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'attribute' => 'Фото',
|
|
|
|
'format' => 'raw',
|
|
|
|
'value' => function ($model) {
|
|
|
|
return Html::tag('img', null, ['src' => $model->photo, 'width' => '100px']);
|
|
|
|
}
|
|
|
|
],
|
|
|
|
[
|
2019-11-18 13:33:08 +03:00
|
|
|
'attribute' => 'Резюме',
|
2019-11-18 13:06:54 +03:00
|
|
|
'format' => 'raw',
|
|
|
|
'value' => function ($model) {
|
|
|
|
return Html::a('Скачать', $model->resume, ['target' => '_blank']);
|
|
|
|
}
|
|
|
|
],
|
|
|
|
['label' => 'Добвлен', 'attribute' => 'created_at',],
|
|
|
|
],
|
|
|
|
]);
|
|
|
|
?>
|
|
|
|
|
|
|
|
<h2>Навыки</h2>
|
|
|
|
|
|
|
|
<?php foreach ($skills as $skill) : ?>
|
|
|
|
<span class="btn btn-default btn-sm"><?= $skill['skill']->name; ?></span>
|
|
|
|
<?php endforeach; ?>
|
2019-11-18 16:14:06 +03:00
|
|
|
|
2019-11-18 13:06:54 +03:00
|
|
|
<h2>Дополнительные сведения</h2>
|
|
|
|
|
|
|
|
<?= GridView::widget([
|
|
|
|
'dataProvider' => $modelFildValue,
|
|
|
|
'layout' => "{items}",
|
|
|
|
'columns' => [
|
|
|
|
'field.name:text:Поле',
|
|
|
|
[
|
|
|
|
'attribute' => 'value',
|
|
|
|
'format' => 'raw',
|
|
|
|
'value' => function ($model) {
|
|
|
|
if ($model->type_file == 'file') {
|
|
|
|
return $model->value . ' (' . Html::a('Скачать', $model->value, ['target' => '_blank', 'download' => 'download']) . ')';
|
|
|
|
}
|
|
|
|
return $model->value;
|
|
|
|
}
|
|
|
|
],
|
|
|
|
],
|
|
|
|
]); ?>
|
|
|
|
|
2020-01-21 17:46:03 +03:00
|
|
|
<?= Html::a('Изменить', ['/card/user-card/update', 'id' => $model->id], ['class' => 'btn btn-success']); ?>
|
|
|
|
|
2019-11-18 13:06:54 +03:00
|
|
|
</div>
|