some fixes in resume

This commit is contained in:
iIronside 2022-11-08 14:15:31 +03:00
parent 16df34d391
commit 28d33761ca
5 changed files with 61 additions and 42 deletions

View File

@ -296,7 +296,8 @@ class UserCardController extends Controller
// (B) ADD HTML CONTENT // (B) ADD HTML CONTENT
$section = $pw->addSection(); $section = $pw->addSection();
\PhpOffice\PhpWord\Shared\Html::addHtml($section, $model->resume_text, false, false); $resumeText = str_replace(array('<br/>', '<br>', '</br>'), ' ', $model->resume_text);
\PhpOffice\PhpWord\Shared\Html::addHtml($section, $resumeText, false, false);
// (C) SAVE TO DOCX ON SERVER // (C) SAVE TO DOCX ON SERVER
// $pw->save("convert.docx", "Word2007"); // $pw->save("convert.docx", "Word2007");

View File

@ -50,95 +50,110 @@ use yii\widgets\ActiveForm;
</thead> </thead>
<tbody> <tbody>
<tr class="info"> <tr class="info">
<td>ФИО</td> <td class="table-cell">ФИО</td>
<td class="table-cell">${fio}</td> <td class="table-cell">${fio}</td>
</tr> </tr>
<tr class="info"> <tr class="info">
<td>Паспорт</td> <td class="table-cell">Паспорт</td>
<td class="table-cell">${passport}</td> <td class="table-cell">${passport}</td>
</tr> </tr>
<tr class="info"> <tr class="info">
<td>Электронная почта</td> <td class="table-cell">Электронная почта</td>
<td class="table-cell">${email}</td> <td class="table-cell">${email}</td>
</tr> </tr>
<tr class="info"> <tr class="info">
<td>Пол</td> <td class="table-cell">Пол</td>
<td class="table-cell">${gender}</td> <td class="table-cell">${gender}</td>
</tr> </tr>
<tr class="info"> <tr class="info">
<td>Резюме</td> <td class="table-cell">Резюме</td>
<td class="table-cell">${resume}</td> <td class="table-cell">${resume}</td>
</tr> </tr>
<tr class="info"> <tr class="info">
<td>Зароботная плата</td> <td class="table-cell">Зароботная плата</td>
<td class="table-cell">${salary}</td> <td class="table-cell">${salary}</td>
</tr> </tr>
<tr class="info"> <tr class="info">
<td>Позиция</td> <td class="table-cell">Позиция</td>
<td class="table-cell">${position_id}</td> <td class="table-cell">${position_id}</td>
</tr> </tr>
<tr class="info"> <tr class="info">
<td>Город</td> <td class="table-cell">Город</td>
<td class="table-cell">${city}</td> <td class="table-cell">${city}</td>
</tr> </tr>
<tr class="info"> <tr class="info">
<td>Ссылка ВК</td> <td class="table-cell">Ссылка ВК</td>
<td class="table-cell">${link_vk}</td> <td class="table-cell">${link_vk}</td>
</tr> </tr>
<tr class="info"> <tr class="info">
<td>Ссылка Телграм</td> <td class="table-cell">Ссылка Телграм</td>
<td class="table-cell">${link_telegram}</td> <td class="table-cell">${link_telegram}</td>
</tr> </tr>
<tr class="info"> <tr class="info">
<td>Резюме текст</td> <td class="table-cell">Резюме текст</td>
<td class="table-cell">${vc_text}</td> <td class="table-cell">${vc_text}</td>
</tr> </tr>
<tr class="info"> <tr class="info">
<td>Уровень</td> <td class="table-cell">Уровень</td>
<td class="table-cell">${level}</td> <td class="table-cell">${level}</td>
</tr> </tr>
<tr class="info"> <tr class="info">
<td>Резюме текст</td> <td class="table-cell">Резюме текст</td>
<td class="table-cell">${vc_text}</td> <td class="table-cell">${vc_text}</td>
</tr> </tr>
<tr class="info"> <tr class="info">
<td>Резюме короткий текст</td> <td class="table-cell">Резюме короткий текст</td>
<td class="table-cell">${vc_text_short}</td> <td class="table-cell">${vc_text_short}</td>
</tr> </tr>
<tr class="info"> <tr class="info">
<td>Лет опыта</td> <td class="table-cell">Лет опыта</td>
<td class="table-cell">${years_of_exp}</td> <td class="table-cell">${years_of_exp}</td>
</tr> </tr>
<tr class="info"> <tr class="info">
<td>Спецификация</td> <td class="table-cell">Спецификация</td>
<td class="table-cell">${specification}</td> <td class="table-cell">${specification}</td>
</tr> </tr>
<tr class="info"> <tr class="info">
<td>Навыки</td> <td class="table-cell">Навыки</td>
<td class="table-cell">${skills}</td> <td class="table-cell">${skills}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>
<div>
<p>
Нажмите на ячейку чтобы скопировать содержимое
</p>
</div>
</div> </div>
</div> </div>
<!--<script>--> <script>
<!-- document.querySelectorAll(".table-cell").forEach(function(elm){--> const popup = document.createElement('h4')
<!-- elm.addEventListener("mouseover", function(e){--> popup.textContent = 'Скопировано'
<!-- e.target.style.backgroundColor = '#76d7c4';--> popup.style.cssText = `
<!-- var copyText = e.target.textContent;--> background: #a6caf0;
<!-- const el = document.createElement('textarea');--> position: absolute;
<!-- el.value = copyText;--> right: 0;
<!-- document.body.appendChild(el);--> top: 0;
<!-- el.select();--> `
<!-- document.execCommand('copy');--> document.querySelectorAll('.table-cell').forEach(function (elm) {
<!-- document.body.removeChild(el);--> elm.style.position = 'relative'
<!----> elm.addEventListener('click', function (e) {
<!-- /* Alert the copied text */--> e.target.style.backgroundColor = '#76d7c4'
<!-- alert("Copied the text: " + el.value);--> var copyText = e.target.textContent
<!-- });--> const el = document.createElement('textarea')
<!-- })--> el.value = copyText
<!--</script>--> document.body.appendChild(el)
el.select()
document.execCommand('copy')
document.body.removeChild(el)
elm.appendChild(popup)
setTimeout(() => {
elm.removeChild(popup)
}, 1000)
})
})
</script>

View File

@ -26,7 +26,7 @@ use yii\widgets\ActiveForm;
</div> </div>
</div> </div>
<div class="row" style="padding-bottom: 15px">add_a_test_task_completion_date_to_ucer_card <div class="row" style="padding-bottom: 15px">
<div class="imgUpload col-xs-6"> <div class="imgUpload col-xs-6">
<div class="media__upload_img"><img src="<?= $model->photo; ?>" width="100px"/></div> <div class="media__upload_img"><img src="<?= $model->photo; ?>" width="100px"/></div>
<?php <?php
@ -47,7 +47,6 @@ use yii\widgets\ActiveForm;
?> ?>
</div> </div>
<div class="col-xs-6"> <div class="col-xs-6">
<!--<div class="media__upload_img"><img src="<? /*= $model->photo; */ ?>" width="100px"/></div>-->
<?php <?php
echo InputFile::widget([ echo InputFile::widget([
'language' => 'ru', 'language' => 'ru',

View File

@ -16,6 +16,10 @@ $this->params['breadcrumbs'][] = ['label' => $model->id, 'url' => ['view', 'id'
$this->params['breadcrumbs'][] = 'Резюме'; $this->params['breadcrumbs'][] = 'Резюме';
?> ?>
<div class="form-group">
<?= Html::a('Редактировать профиль', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
</div>
<div class="resume-form"> <div class="resume-form">
<?php $form = ActiveForm::begin([ <?php $form = ActiveForm::begin([
'id' => 'text-by-template-form', 'id' => 'text-by-template-form',

View File

@ -7,7 +7,6 @@
foreach ($userStatuses as $key => $status) { foreach ($userStatuses as $key => $status) {
$menuItems[] = ['label' => $status, 'icon' => 'id-card', 'url' => ['/card/user-card?UserCardSearch[status]=' . $key], 'active' => \Yii::$app->controller->id == 'user-card',]; $menuItems[] = ['label' => $status, 'icon' => 'id-card', 'url' => ['/card/user-card?UserCardSearch[status]=' . $key], 'active' => \Yii::$app->controller->id == 'user-card',];
} }
$menuItems[] = ['label' => 'Шаблоны резюме', 'icon' => 'file', 'url' => ['/card/resume-template'], 'active' => \Yii::$app->controller->id == 'resume-template'];
$projectStatuses = \common\models\Status::getStatusesArray(\common\models\UseStatus::USE_PROJECT); $projectStatuses = \common\models\Status::getStatusesArray(\common\models\UseStatus::USE_PROJECT);
$projectItems = [['label' => 'Все', 'icon' => 'cubes', 'url' => ['/project/project'], 'active' => \Yii::$app->controller->id == 'project']]; $projectItems = [['label' => 'Все', 'icon' => 'cubes', 'url' => ['/project/project'], 'active' => \Yii::$app->controller->id == 'project']];
@ -28,13 +27,14 @@
['label' => 'Доп. поля', 'icon' => 'file-text-o', 'url' => ['/settings/additional-fields'], 'active' => \Yii::$app->controller->id == 'additional-fields'], ['label' => 'Доп. поля', 'icon' => 'file-text-o', 'url' => ['/settings/additional-fields'], 'active' => \Yii::$app->controller->id == 'additional-fields'],
['label' => 'Должность', 'icon' => 'spotify', 'url' => ['/settings/position'], 'active' => \Yii::$app->controller->id == 'position'], ['label' => 'Должность', 'icon' => 'spotify', 'url' => ['/settings/position'], 'active' => \Yii::$app->controller->id == 'position'],
['label' => 'Навыки', 'icon' => 'flask', 'url' => ['/settings/skill'], 'active' => \Yii::$app->controller->id == 'skill'], ['label' => 'Навыки', 'icon' => 'flask', 'url' => ['/settings/skill'], 'active' => \Yii::$app->controller->id == 'skill'],
['label' => 'Шаблоны резюме', 'icon' => 'file', 'url' => ['/card/resume-template'], 'active' => \Yii::$app->controller->id == 'resume-template']
], ],
//'visible' => Yii::$app->user->can('confidential_information') 'visible' => Yii::$app->user->can('confidential_information')
], ],
[ [
'label' => 'Профили', 'icon' => 'address-book-o', 'url' => '#', //'active' => \Yii::$app->controller->id == 'user-card', 'label' => 'Профили', 'icon' => 'address-book-o', 'url' => '#',
'items' => $menuItems, 'items' => $menuItems,
//'visible' => Yii::$app->user->can('confidential_information') 'visible' => Yii::$app->user->can('confidential_information')
], ],
[ [
'label' => 'Сотрудники', 'icon' => 'users', 'url' => '#', 'label' => 'Сотрудники', 'icon' => 'users', 'url' => '#',
@ -62,7 +62,7 @@
'visible' => Yii::$app->user->can('confidential_information') 'visible' => Yii::$app->user->can('confidential_information')
], ],
[ [
'label' => 'Проекты', 'icon' => 'cubes', 'url' => ['#'], //'active' => \Yii::$app->controller->id == 'project', 'label' => 'Проекты', 'icon' => 'cubes', 'url' => ['#'],
'items' => $projectItems, 'items' => $projectItems,
'visible' => Yii::$app->user->can('confidential_information') 'visible' => Yii::$app->user->can('confidential_information')
], ],