2019-11-18 13:06:54 +03:00
|
|
|
<?php
|
|
|
|
|
2021-11-25 14:04:14 +03:00
|
|
|
use asmoday74\ckeditor5\EditorClassic;
|
2019-11-18 13:06:54 +03:00
|
|
|
use yii\grid\GridView;
|
|
|
|
use yii\helpers\Html;
|
2021-11-25 14:04:14 +03:00
|
|
|
use yii\widgets\ActiveForm;
|
2019-11-18 13:06:54 +03:00
|
|
|
use yii\widgets\DetailView;
|
|
|
|
|
|
|
|
/* @var $this yii\web\View */
|
|
|
|
/* @var $skills \common\models\CardSkill */
|
|
|
|
/* @var $skill \common\models\Skill */
|
2021-09-13 13:37:59 +03:00
|
|
|
/* @var $achievements \common\models\Achievement */
|
2019-11-18 13:06:54 +03:00
|
|
|
/* @var $modelFildValue yii\data\ActiveDataProvider */
|
2020-09-09 16:37:35 +03:00
|
|
|
/* @var $model */
|
2019-11-18 13:06:54 +03:00
|
|
|
|
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
|
2020-09-09 16:37:35 +03:00
|
|
|
echo Html::a('Изменить профиль', ['/card/user-card/update'], ['class' => 'btn btn-success'])
|
|
|
|
. ' ' . Html::a('Изменить пароль', ['/card/user-card/password'], ['class' => 'btn btn-success']) . '<br><br>';
|
|
|
|
|
2020-01-22 12:18:03 +03:00
|
|
|
echo DetailView::widget([
|
2019-11-18 13:06:54 +03:00
|
|
|
'model' => $model,
|
|
|
|
'attributes' => [
|
|
|
|
['label' => 'ФИО', 'attribute' => 'fio',],
|
|
|
|
['label' => 'Email', 'attribute' => 'email',],
|
|
|
|
['label' => 'Дата рождения', 'attribute' => 'dob',],
|
|
|
|
[
|
|
|
|
'attribute' => 'position_id',
|
|
|
|
'value' => (isset($model->position->name)) ? $model->position->name : 'Без должности',
|
|
|
|
],
|
|
|
|
],
|
|
|
|
]);
|
|
|
|
?>
|
|
|
|
<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
|
|
|
|
2021-09-13 13:37:59 +03:00
|
|
|
<h2>Достижения</h2>
|
|
|
|
<?php foreach ($achievements as $achievement) : ?>
|
2021-09-14 13:52:13 +03:00
|
|
|
<div class="btn btn-default btn-sm">
|
2021-09-13 13:37:59 +03:00
|
|
|
<?= Html::tag('img', null,
|
2021-09-13 13:40:52 +03:00
|
|
|
['src' => $achievement['achievement']->img, 'height' => '50px','width' => '50px']
|
2021-09-13 13:37:59 +03:00
|
|
|
) ?>
|
|
|
|
<?= $achievement['achievement']->title; ?>
|
2021-09-14 13:52:13 +03:00
|
|
|
</div>
|
2021-09-13 13:37:59 +03:00
|
|
|
<?php endforeach; ?>
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
],
|
|
|
|
],
|
|
|
|
]); ?>
|
2021-11-25 14:04:14 +03:00
|
|
|
|
|
|
|
<?php $form = ActiveForm::begin(); ?>
|
|
|
|
<?= $form->field($model, 'vc_text')->widget(EditorClassic::className(), [
|
|
|
|
'clientOptions' => [
|
|
|
|
'language' => 'ru',
|
|
|
|
]
|
|
|
|
]); ?>
|
|
|
|
<div class="form-group">
|
|
|
|
<?= Html::submitButton('Save', ['class' => 'btn btn-success']) ?>
|
|
|
|
</div>
|
|
|
|
<?php $form = ActiveForm::end(); ?>
|
2019-11-18 13:06:54 +03:00
|
|
|
</div>
|