{% load i18n %} {% comment %} Whole body of the export progress modal (header, figures, footer), served by app_data:data_exporter_progress. Self-refreshing while the task is live: the polling attributes are omitted once it is terminal, which is what stops the loop (same idiom as app_data/tasks/detail.html). The modal header is part of this partial on purpose - it is what lets the title follow the task's state rather than staying on "in progress" for ever. {% endcomment %} {% if is_running %}
{% else %}
{% endif %} {% comment %} While the export is RUNNING the footer depends on ui_perm_task (p_task_view): with p_task_view Abort + Hide - hiding is safe, the task stays followable from the Tasks menu and its result is downloadable there without p_task_view Abort only - this modal is the user's ONLY view of the export, so letting them dismiss it would orphan the run with no way back to the download link The modal carries data-bs-backdrop="static", data-bs-keyboard="false" and no close "x", so these buttons are the only way out - which is what makes the omission of Hide actually binding. Once the task is TERMINAL the export is over: Close is offered to everyone, p_task_view or not. Without it a user lacking the permission would be trapped in a modal with no exit at all, and there is nothing left to orphan - the result link is right there in the body. {% endcomment %}