{% load common_tags %} {% load i18n %}
{% trans "Задачи" %}
{% if task.status == 'done' %} ✓ {% trans "Выполнено" %} {% elif task.status == 'in_progress' %} {% trans "В работе" %} {% elif task.status == 'cancelled' %} {% trans "Отменено" %} {% else %} {% trans "Ожидает" %} {% endif %} {{ task.get_priority_display }} {% if task.due_date %} {% trans "срок:" %} {{ task.due_date|date:"d.m.Y" }}{% if task.is_overdue %} — {% trans "просрочено" %}{% endif %} {% endif %}

{{ task.title }}

{% if can_edit %} {% trans "Редактировать" %} {% endif %} {% if can_delete %}
{% csrf_token %}
{% endif %}

{% trans "Описание" %}

{% if task.description %}
{{ task.description }}
{% else %}
{% trans "Описание не добавлено" %}
{% endif %}
{% if checklist %}

{% trans "Чек-лист" %}

{{ task.checklist_done }}/{{ task.checklist_total }}
{% for item in checklist %} {% endfor %}
{% endif %}

{% trans "Вложения" %}

{{ attachments|length }}
{% include "partials/task-attachments.html" %}

{% trans "Комментарии" %}

{{ comments|length }}
{% for comment in comments %}
{{ comment.author|initials }}
{{ comment.author.get_full_name|default:"—" }} {{ comment.created_at|date:"d.m.Y, H:i" }}

{{ comment.text }}

{% empty %}
{% trans "Комментариев пока нет" %}
{% endfor %}
{% csrf_token %}
{{ request.user|initials }}
{% if is_participant and task.status != 'cancelled' %}

{% trans "Действия" %}

{% if task.status == 'pending' %}
{% csrf_token %}
{% endif %} {% if task.status != 'done' %}
{% csrf_token %}
{% else %}
{% csrf_token %}
{% endif %} {% if can_edit and task.status != 'done' %}
{% csrf_token %}
{% endif %}
{% endif %}

{% trans "Участники" %}

{% for role_label, role_people in role_groups %} {% if role_people %}
{{ role_label }}
{% for emp in role_people %}
{{ emp|initials }}
{{ emp.get_full_name }}
{% if emp.post %}
{{ emp.post.name }}
{% endif %}
{% endfor %}
{% endif %} {% endfor %} {% if not task.responsible.all and not task.co_executors.all and not task.observers.all %}
{% trans "Не назначено" %}
{% endif %}
{% trans "Автор" %}
{{ task.creator.get_full_name|default:"—" }}
{% trans "Создано" %}
{{ task.created_at|date:"d.m.Y H:i" }}
{% if task.completed_at %}
{% trans "Выполнено" %}
{{ task.completed_at|date:"d.m.Y H:i" }}
{% endif %}