add resume
This commit is contained in:
65
backend/modules/card/views/user-card/resume.php
Normal file
65
backend/modules/card/views/user-card/resume.php
Normal file
@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
use asmoday74\ckeditor5\EditorClassic;
|
||||
use backend\modules\card\models\ResumeTemplate;
|
||||
use common\helpers\StatusHelper;
|
||||
use yii\helpers\Html;
|
||||
use yii\helpers\Url;
|
||||
use yii\widgets\ActiveForm;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model backend\modules\card\models\UserCard */
|
||||
|
||||
$this->title = 'Резюме: ' . $model->fio;
|
||||
$this->params['breadcrumbs'][] = ['label' => 'Профили', 'url' => ['index']];
|
||||
$this->params['breadcrumbs'][] = ['label' => $model->id, 'url' => ['view', 'id' => $model->id]];
|
||||
$this->params['breadcrumbs'][] = 'Резюме';
|
||||
?>
|
||||
|
||||
<div class="resume-form">
|
||||
<?php $form = ActiveForm::begin([
|
||||
'id' => 'text-by-template-form',
|
||||
'action' => Url::to(['user-card/resume-text-by-template', 'id' => $model->id]),
|
||||
'options' => ['method' => 'post']])
|
||||
?>
|
||||
<?= Html::hiddenInput('id', $model->id); ?>
|
||||
|
||||
<?= $form->field($model, 'resumeTemplateId')->dropDownList(
|
||||
ResumeTemplate::find()->where(['status' => StatusHelper::STATUS_ACTIVE])->select(['title', 'id'])->indexBy('id')->column(),
|
||||
['prompt' => 'Выберите'])
|
||||
?>
|
||||
|
||||
<div class="form-group">
|
||||
<?= Html::submitButton('Сгенерировать резюме по шаблону', ['class' => 'btn btn-primary']) ?>
|
||||
</div>
|
||||
|
||||
<?php ActiveForm::end(); ?>
|
||||
</div>
|
||||
|
||||
<div class="resume-form">
|
||||
|
||||
<?php $form = ActiveForm::begin([
|
||||
'id' => 'update-resume-text-form',
|
||||
'action' => Url::to(['user-card/update-resume-text', 'id' => $model->id]),
|
||||
'options' => ['method' => 'post']])
|
||||
?>
|
||||
<?= $form->field($model, 'resume_text')->widget(EditorClassic::className(), [
|
||||
'clientOptions' => [
|
||||
'language' => 'ru',
|
||||
]
|
||||
]); ?>
|
||||
|
||||
<div class="form-group">
|
||||
<?= Html::submitButton('Сохраниить изменения', ['class' => 'btn btn-primary']) ?>
|
||||
</div>
|
||||
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="resume-form">
|
||||
<p>
|
||||
<?= Html::a('Скачать pdf', ['download-resume-pdf', 'id' => $model->id], ['class' => 'btn btn-success']) ?>
|
||||
<?= Html::a('Скачать docx', ['download-resume-docx', 'id' => $model->id], ['class' => 'btn btn-success']) ?>
|
||||
</p>
|
||||
</div>
|
@ -24,6 +24,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
<p>
|
||||
<?= Html::a('Список', ['index'], ['class' => 'btn btn-primary']) ?>
|
||||
<?= Html::a('Редактировать', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
|
||||
<?= Html::a('Резюме', ['user-card/resume', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
|
||||
</p>
|
||||
|
||||
<?= DetailView::widget([
|
||||
@ -101,11 +102,6 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
],
|
||||
]) ?>
|
||||
|
||||
<p>
|
||||
<?= Html::a('Resume pdf', ['download-resume', 'id' => $model->id, 'pdf' => true], ['class' => 'btn btn-primary']) ?>
|
||||
<?= Html::a('Resume docx', ['download-resume', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
|
||||
</p>
|
||||
|
||||
<h2>Навыки</h2>
|
||||
<?php foreach ($skills as $skill) : ?>
|
||||
<span class="btn btn-default btn-sm"><?= $skill['skill']->name; ?></span>
|
||||
|
Reference in New Issue
Block a user