forked from admin/miem_workers
55 lines
4.3 KiB
HTML
55 lines
4.3 KiB
HTML
{% set review = employee.dpo_review %}
|
|
{% set kinds = {'training':'Повышение квалификации', 'retraining':'Профессиональная переподготовка', 'other':'Другое ДПО'} %}
|
|
{% macro row(course) %}
|
|
<fieldset class="dpo-review__row">
|
|
<legend>Курс ДПО</legend>
|
|
<label>Название <input name="title" required maxlength="8000" value="{{ course.title }}"></label>
|
|
<label>Вид <select name="kind">{% for key, label in kinds.items() %}<option value="{{ key }}" {% if course.kind == key %}selected{% endif %}>{{ label }}</option>{% endfor %}</select></label>
|
|
<label>Год <input type="number" name="year" min="1900" max="2100" value="{{ course.year or '' }}"></label>
|
|
<label>Основание <input name="evidence" maxlength="4000" value="{{ course.evidence }}" placeholder="Документ или ссылка"></label>
|
|
<button type="button" class="button button--ghost" data-remove>Исключить из списка</button>
|
|
</fieldset>
|
|
{% endmacro %}
|
|
<section class="panel" id="unresolved-dpo" tabindex="-1">
|
|
<h2 class="panel__title">Дополнительное профессиональное образование</h2>
|
|
{% if employee_view.dpo_courses %}
|
|
<ul class="employee-card__list">
|
|
{% for course in employee_view.dpo_courses %}
|
|
<li class="employee-card__list-item">{{ course.title }}{% if review %} · {{ kinds[course.kind] }}{% if course.year %} · {{ course.year }}{% endif %}{% if course.evidence %} · {{ course.evidence }}{% endif %}{% endif %}</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% elif review %}<p>Курсов ДПО нет.</p>
|
|
{% elif employee_view.dpo_uncertain %}<p>Отдельные курсы ДПО не распознаны.</p>
|
|
{% else %}<p>Сведения о курсах ДПО отсутствуют.</p>{% endif %}
|
|
{% if employee_view.dpo_uncertain %}
|
|
<h3>Количество ДПО требует проверки</h3>
|
|
{% if review %}<p>Сведения о ДПО изменились. В справочнике учтён последний подтверждённый список.</p>{% endif %}
|
|
{% endif %}
|
|
<details><summary>Редактировать список ДПО</summary>
|
|
{% if employee_view.dpo_uncertain %}
|
|
{% for section in employee_view.sections if section.type == 'additional_education' %}
|
|
<h4>{{ section.title }} · сведения профиля</h4>
|
|
{% if not section.list_items %}<p>В разделе ДПО не удалось выделить отдельные записи.</p>{% endif %}
|
|
{% for item in section.list_items %}<p>{{ item }}</p>{% endfor %}
|
|
{% for text in section.unresolved %}<p>{{ text }}</p>{% endfor %}
|
|
{% for doc in section.unresolved_documents %}<p>{% if doc.url.startswith(('https://', 'http://')) %}<a class="admin__link" href="{{ doc.url }}">{{ doc.text }}</a>{% else %}{{ doc.text }}{% endif %}</p>{% endfor %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% for section in employee_view.sections if section.type == 'additional_education' %}
|
|
{% for link in section.links %}
|
|
{% if link.url.startswith(('https://', 'http://')) %}<a class="admin__link" href="{{ link.url }}">{{ link.text }}</a>{% endif %}
|
|
{% endfor %}
|
|
{% endfor %}
|
|
<form data-dpo method="post" action="/admin/employees/{{ employee.id }}/dpo" data-source="{{ employee_view.dpo_source }}" data-revision="{{ review.revision if review else 0 }}">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
|
<p>Оставьте по одной строке на каждое прохождение курса. Если удостоверение дублирует курс, перенесите его в основание и исключите лишнюю строку.</p>
|
|
<div data-rows>{% for course in employee_view.dpo_courses %}{{ row(course) }}{% endfor %}</div>
|
|
<template>{{ row({'kind':'other'}) }}</template>
|
|
<button type="button" class="button button--ghost" data-add>Добавить курс</button>
|
|
<label data-empty><input type="checkbox" name="confirm_empty"> Подтверждаю отсутствие курсов ДПО</label>
|
|
<button class="button" type="submit">Подтвердить список</button>
|
|
<p role="status" data-status></p>
|
|
</form>
|
|
</details>
|
|
</section>
|