{% load i18n %}

{% trans "Проекты" %}

{% trans "Межотдельские проекты со шагами и задачами" %}

{% if page_tab != 'templates' %} {% endif %}
{% if ug_message %}
{{ ug_message }}
{% endif %} {% if ug_error %}
{{ ug_error }}
{% endif %}
{% with tabbase="display:inline-flex; padding:0.375rem 0.75rem; border-radius:calc(var(--radius) - 2px); font-size:0.8125rem; font-weight:500; text-decoration:none;" %} {% trans "Проекты" %} {% trans "Шаблоны" %} {% endwith %}
{% if page_tab == 'templates' %}

{% trans "Новый шаблон" %}

{% trans "Соберите шаги и шаблоны задач. Стрелки ↑↓ меняют порядок шагов." %}

{% csrf_token %}
{% for t in templates %}
{{ t.name }}
{{ t.steps.count }} {% trans "шаг." %} · {{ t.default_duration_days }} {% trans "дн." %} {% if t.description %} · {{ t.description|truncatechars:80 }}{% endif %}
{% trans "Редактировать" %}
{% if t.steps.all %}
{% for s in t.steps.all %}
{{ forloop.counter }}. {{ s.title }}
{% for it in s.items.all %}
· {{ it.title }} {% if it.department %} ({{ it.department.name }}){% endif %} {% if it.priority and it.priority != 'medium' %} · {% if it.priority == 'high' %}{% trans "высокий" %}{% else %}{% trans "низкий" %}{% endif %} {% endif %} {% if it.description %}
{{ it.description|truncatechars:100 }}
{% endif %}
{% empty %} {% trans "Нет шаблонов задач" %} {% endfor %}
{% endfor %}
{% endif %}
{% empty %}
{% trans "Сохранённых шаблонов пока нет — заполните форму выше." %}
{% endfor %}
{% else %} {% if active_status %}
{% with base="display:inline-flex; padding:0.3rem 0.65rem; border-radius:calc(var(--radius) - 2px); font-size:0.75rem; text-decoration:none; border:1px solid var(--color-border);" %} {% trans "Все" %} {% trans "Черновики" %} {% trans "Активные" %} {% trans "Завершённые" %} {% endwith %}
{% endif %}
{% for p in projects %}
{{ p.title }}
{% if p.pharmacy %}{{ p.pharmacy }} · {% endif %} {% if p.owner %}{{ p.owner.get_full_name }} · {% endif %} {{ p.get_status_display }} {% if p.due_date %} · {% trans "до" %} {{ p.due_date }}{% endif %}
{{ p.done_count }}/{{ p.total_count }} · {{ p.pct }}%
{% empty %}
{% trans "Проектов пока нет. Создайте из шаблона или вручную." %}
{% endfor %}
{% endif %}
{{ departments_tree|json_script:"proj-departments-tree" }} {% include "partials/project-steps-builder-assets.html" %}
{% csrf_token %}

{% trans "Новый проект" %}