{% load i18n serviceform_tags %}

{% trans "Participation to activities" %}

{% for c1 in service_form.sub_items %} {% has_responsible c1 responsible as c1_hr %} {% if c1_hr %}
{{ c1.id_display }} {{ c1.name }} {% responsible_link c1 %}
{% for c2 in c1.sub_items %} {% has_responsible c2 responsible as c2_hr %} {% if c2_hr %}
{{ c2.id_display }} {{ c2.name }} {% responsible_link c2 %}
{% for a in c2.sub_items %} {% has_responsible a responsible as a_hr %} {% if a_hr %}
{{ a.id_display }}. {{ a.name }} {% responsible_link a %} {% if not a.has_choices %}({{ a.participation_items|length }}{%if a.people_needed%}/{{ a.people_needed }}{%endif%}){% endif %}
{% if a.has_choices %} {% for c in a.sub_items %} {% has_responsible c responsible as c_hr %} {% if c_hr %}
{{ c.id_display }}. {{ c.name }} {% responsible_link c %} ({{ c.participation_items|length }}{%if c.people_needed%}/{{ c.people_needed }}{%endif%})
{% for pc in c.participation_items %} {% include "serviceform/reports/snippets/_participant_row.html" with item=pc participant=pc.cached_participant %} {% endfor %} {% for pc in c.old_participation_items %}
{% include "serviceform/reports/snippets/_participant_row.html" with item=pc participant=pc.cached_participant %}
{% endfor %} {% endif %} {% endfor %} {% else %} {% for pa in a.participation_items %} {% include "serviceform/reports/snippets/_participant_row.html" with item=pa participant=pa.cached_participant %} {% endfor %}
{% for pa in a.old_participation_items %} {% include "serviceform/reports/snippets/_participant_row.html" with item=pa participant=pa.cached_participant %} {% endfor %}
{% endif %} {% endif %} {% endfor %} {% endif %} {% endfor %} {% endif %} {% endfor %}

{% trans "Answers to questions" %}

{% for q in service_form.questions %} {% if q.responsible == responsible %}
{{ q.id_display }} {{ q.question }}
{% endif %} {% endfor %}