{% extends "base.html" %} {% block title %}{{ recipe.name }} — {{ _('Task') }} — TieMeasureFlow{% endblock %} {% block content %}
{{ _('Seleziona altra ricetta') }}
{{ recipe.code }} {% if recipe.current_version or recipe.version %} v{{ recipe.current_version.version_number if recipe.current_version else recipe.version }} {% endif %}

{{ recipe.name }}

{% if recipe.description %}

{{ recipe.description }}

{% endif %}
{% if tasks %} {{ _('AVVIA') }} {% endif %} {% if lot_number %}
{{ _('Lotto') }}: {{ lot_number }}
{% endif %} {% if serial_number %}
{{ _('Seriale') }}: {{ serial_number }}
{% endif %}

{{ _('Task da eseguire') }}

{{ tasks|length }} task {%- set total_subs = namespace(count=0) -%} {%- for t in tasks -%} {%- if t.subtask_count is defined -%} {%- set total_subs.count = total_subs.count + t.subtask_count -%} {%- elif t.subtasks -%} {%- set total_subs.count = total_subs.count + t.subtasks|length -%} {%- endif -%} {%- endfor -%} {%- if total_subs.count > 0 %} · {{ total_subs.count }} {{ _('misurazioni totali') }}{% endif %}
{% if tasks %}
{% for task in tasks %}
{{ loop.index }}

{{ loop.index }}/{{ tasks|length }} {{ task.title or task.name or (_('Task') ~ ' ' ~ loop.index) }}

{% if task.directive or task.description %}

{{ task.directive or task.description }}

{% endif %}
{% if task.subtask_count is defined or task.subtasks %} {% if task.subtask_count is defined %} {{ task.subtask_count }} {% elif task.subtasks %} {{ task.subtasks|length }} {% endif %} {{ _('misurazioni') }} {% endif %} {% if task.file_path %} {% if task.file_path.endswith('.pdf') %} {% else %} {% endif %} {{ _('Allegato') }} {% endif %}
{% if current_user and 'Maker' in current_user.get('roles', []) %} {% endif %}
{% endfor %}
{% else %}

{{ _('Nessun task disponibile') }}

{{ _('Questa ricetta non ha ancora task definiti.') }}

{% endif %}
{% endblock %}