guild/backend/modules/card/views/user-card/resume.php

70 lines
2.4 KiB
PHP
Raw Normal View History

2022-11-03 17:46:36 +03:00
<?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'][] = 'Резюме';
?>
2022-11-08 14:15:31 +03:00
<div class="form-group">
<?= Html::a('Редактировать профиль', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
2022-11-08 15:41:30 +03:00
<?= Html::a('Просмотр профиля', ['view', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
2022-11-08 14:15:31 +03:00
</div>
2022-11-03 17:46:36 +03:00
<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); ?>
2022-11-14 13:48:31 +03:00
<?= $form->field($model, 'resume_template_id')->dropDownList(
2022-11-03 17:46:36 +03:00
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>
2022-11-10 16:00:43 +03:00
<div>
2022-11-03 17:46:36 +03:00
<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>