add footer to resume

This commit is contained in:
iIronside
2022-11-21 13:54:58 +03:00
parent 816b39fc74
commit 18dd5a5d36
8 changed files with 136 additions and 34 deletions

View File

@ -18,6 +18,8 @@ use yii\helpers\ArrayHelper;
* @property string $template_body
* @property string $header_text
* @property string $header_image
* @property string $footer_text
* @property string $footer_image
*/
class ResumeTemplate extends \yii\db\ActiveRecord
{
@ -91,7 +93,7 @@ class ResumeTemplate extends \yii\db\ActiveRecord
[['created_at', 'updated_at'], 'safe'],
[['status'], 'integer'],
[['template_body'], 'string'],
[['title', 'header_text', 'header_image'], 'string', 'max' => 255],
[['title', 'header_text', 'header_image', 'footer_text', 'footer_image'], 'string', 'max' => 255],
];
}
@ -109,6 +111,8 @@ class ResumeTemplate extends \yii\db\ActiveRecord
'template_body' => 'Тело шаблона',
'header_text' => 'Текст в верхнем контикуле',
'header_image' => 'Картинка в верхнем контикуле',
'footer_text' => 'Текст в нижнем контикуле',
'footer_image' => 'Картинка в нижнем контикуле',
];
}
}

View File

@ -61,6 +61,7 @@ class UserCard extends \yii\db\ActiveRecord
const SCENARIO_GENERATE_RESUME_TEXT = 'generate_resume_text';
const SCENARIO_UPDATE_RESUME_TEXT = 'update_resume_text';
const SCENARIO_DOWNLOAD_RESUME = 'download_resume_text';
// public $resumeTemplateId;
@ -123,7 +124,7 @@ class UserCard extends \yii\db\ActiveRecord
['resume_template_id', 'required', 'on' => self::SCENARIO_GENERATE_RESUME_TEXT],
['resume_template_id', 'integer', 'on' => self::SCENARIO_GENERATE_RESUME_TEXT],
['resume_text', 'required', 'on' => self::SCENARIO_UPDATE_RESUME_TEXT],
// [['resume_template_id'], 'exist', 'skipOnError' => true, 'targetClass' => ResumeTemplate::className(), 'targetAttribute' => ['resume_template_id' => 'id'], 'on' => self::SCENARIO_GENERATE_RESUME_TEXT],
['resume_template_id', 'required', 'on' => self::SCENARIO_DOWNLOAD_RESUME],
];
}