<tr>
    <td style="width:12pt;text-align:right;font-weight: bold; color: cmyk(0,0,0,100);font-size: 10pt">{{ loop.index }}</td>
    <td>
        <p>
            <span style="font-weight: bold">{{ attendance.participant.firstname ~' '~ attendance.participant.lastname }}</span>,
            {{ attendance.participant.age ?: '?' }}&nbsp;Jahre{% if expanded and (is_granted('ROLE_PARTICIPANTS_ADMIN') or offer.collectDateOfBirth) %}{% if attendance.participant.dateOfBirth %} ({{ attendance.participant.dateOfBirth|date('d.m.Y') }}){% endif %}{% endif %}
        </p>
        {% if attendance.participant.user %}
            <p style="color: cmyk(0,0,0,100)">
                <span style="font-weight: bold">Kontakt:</span> {{ attendance.participant.user.firstname ~ ' ' ~ attendance.participant.user.lastname }}
            </p>
        {% endif %}
    </td>
    <td style="color: cmyk(0,0,0,100); width: 100pt">
        <p>
            <span>T:</span>
            <span>
                {{ attendance.participant.phone }}
            </span>
        </p>
        <p>
            <span>M:</span>
            <span>
                {{ attendance.participant.mobile }}
            </span>
        </p>
    </td>
    {% if expanded -%}
        {% for consentForm in consentForms -%}
            <td style="text-align: center; width: 30pt;vertical-align: middle">
                {% set state = attendanceConsents["" ~ attendance.id]["" ~ consentForm.id] -%}
                {% if state.isAgreed -%}
                    <svg width="4mm" height="4mm" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><rect width="256" height="256" fill="none"/><polyline points="40 144 96 200 224 72" fill="none" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"/></svg>
                {% elseif state.isDisagreed -%}
                    <svg width="4mm" height="4mm" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><rect width="256" height="256" fill="none"/><line x1="200" y1="56" x2="56" y2="200" fill="none" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"/><line x1="200" y1="200" x2="56" y2="56" fill="none" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"/></svg>
                {% else -%}
                    <svg width="4mm" height="4mm" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><rect width="256" height="256" fill="none"/><line x1="56" y1="128" x2="200" y2="128" fill="none" stroke="cmyk(0,0,0,40)" stroke-linecap="round" stroke-width="20"/></svg>
                {% endif -%}
            </td>
        {% endfor -%}
        {% for extra in offer.applicationExtra ?? [] -%}
            <td style="text-align: center; width: 30pt; font-size: 8pt; vertical-align: middle">
                {% set val = attendance.getExtra(extra.uuid) -%}
                {% if extra.type == 'yn' -%}
                    {{ val == 'y' ? 'Ja' : 'Nein' }}
                {% elseif extra.type == 'file' -%}
                    {# The filename would blow up a 30pt print column — on paper all
                       that matters is whether the file is there; it is downloaded
                       from the participant list in the admin. #}
                    {{ val ? 'Ja' : '–' }}
                {% else -%}
                    {{ val }}
                {% endif -%}
            </td>
        {% endfor -%}
        <td style="font-size: 8pt">
            {{ attendance.participant.sharedNotes|default }}
        </td>
    {% else -%}
        <td style="width: 22%"></td>
    {% endif -%}
</tr>