{# SPDX-FileCopyrightText: 2024-2026 JWP Consulting GK #} {# SPDX-License-Identifier: AGPL-3.0-or-later #} {% load i18n %} {% load projectify %} {% load rules %}
{% has_perm "workspace.update_section" user section.project.workspace as can_update_section %} {% has_perm "workspace.create_task" user section.project.workspace as can_create_task %} {% has_perm "workspace.update_task" user section.project.workspace as can_update_task %}
{% csrf_token %}

{{ section.title }}

{% if can_update_section %} {% circle_anchor label=_("Update section") icon_style="pencil" href="dashboard:sections:update" section_uuid=section.uuid size=4 %} {% endif %}
{% include "workspace/common/loading_spinner.html" %} {% if can_create_task %} {% go_to_action href="dashboard:sections:create-task" label=_("Add task") style="secondary" icon_style="plus" section_uuid=section.uuid %} {% endif %}
{% if not section.minimized %} {% for task in section.task_set.all %} {% empty %} {% endfor %}
{% translate "Task title" %} {% translate "Task labels" %} {% translate "Task actions" %}
{% if can_update_task %}
{% csrf_token %}
{% else %} {% endif %} {{ task.title }}
{% for label in task.labels.all %}
{{ label.name }}
{% endfor %}
{% if can_update_task %}
{# TODO in AT, say "currently assigned to ..." #} {% user_avatar task.assignee %} {% circle_button label=_("Move task up") value="up" name="direction" disabled=task.first icon_style="chevron-up" %} {% circle_button label=_("Move task down") value="down" name="direction" disabled=task.last icon_style="chevron-down" %} {% csrf_token %}

...

{% icon "dots-horizontal" %} {% else %}
{% user_avatar task.assignee %}
{% endif %}
{% if section.has_tasks %} {% translate "No tasks found for your search." %} {% else %} {% translate "No tasks in this section." %} {% if can_create_task %} {% anchor 'dashboard:sections:create-task' label=_("Add a task here") section_uuid=section.uuid %} {% endif %} {% endif %}
{% endif %}