{% load i18n %} {% with slots=form.get_slots %} {% with events_num=slots.events|length %} {% for dates in slots.dates %} {% for grouper in slots.users %} {% if form.cleaned_data.group_by %}
{{ form.cleaned_data.group_by }}: {{ grouper.grouper }}
{% endif %} {% for k in slots.extra_data %}{% endfor %} {% if events_num > 1 %}{% endif %} {% for date in dates %}{% endfor %} {% for user in grouper.users %}{% for event in user.events %} {% if forloop.first %} {% for k in slots.extra_data %}{% endfor %} {% endif %} {% if events_num > 1 %}{% endif %} {% for date in dates %} {% with booked=event.dates|get:date %}{% endwith %} {% endfor %} {% endfor %}{% endfor %}
{% trans "First name" %} {% trans "Last name" %}{{ k }}{% trans "Activity" %}{{ date|date:"D d/m" }}
1 %}rowspan="{{ events_num }}"{% endif %}>{{ user.user_first_name }} 1 %}rowspan="{{ events_num }}"{% endif %}>{{ user.user_last_name }} 1 %}rowspan="{{ events_num }}"{% endif %}>{{ user.extra_data|get:k }}{{ event.event }}{% if booked is True %}☐{% elif booked is None %}-{% endif %}
{% if form.cleaned_data.with_page_break %}{% if not forloop.last or not forloop.parentloop.last %}
{% endif %}{% endif %} {% endfor %} {% if not form.cleaned_data.with_page_break and not forloop.last %}
{% endif %} {% endfor %} {% endwith %} {% endwith %}