{% if event.type == 'conference' %} {% extends 'events/registration/display/_event_registration_base.html' %} {% else %} {% extends 'events/registration/display/_meeting_registration_base.html' %} {% endif %} {% from 'message_box.html' import message_box %} {% block title %} {{- page_title -}} {% endblock %} {% block subtitle %} {% if num_participants %} {%- trans num=num_participants %}1 participant{% pluralize %}{{ num }} participants{% endtrans -%} {% endif %} {% endblock %} {% block description %} {%- if tables|length > 1 -%} {% trans -%} The lists of participants grouped by the registration form they used to register for the event. {%- endtrans %} {%- endif -%} {% endblock %} {% macro table_header(columns, show_checkin) %} {% if show_checkin %} {% endif %} {% for column in columns %} {{ column }} {% endfor %} {% endmacro %} {% macro table_row(registration, show_checkin) %} {% if show_checkin %} {% if registration.checked_in %}{% endif %} {% endif %} {% for column in registration.columns %} {{ column.text }} {% endfor %} {% endmacro %} {% macro participant_table(table) %}
{% set hidden_participants = table.num_participants - table.rows|length %} {% if table.title %}

{{ table.title }}

{% endif %} {% if table.rows %} {{ table_header(table.headers, table.show_checkin) }} {% for row in table.rows %} {{ table_row(row, table.show_checkin) }} {% endfor %} {% if hidden_participants %} {% endif %}
{% trans num=hidden_participants %}{{ num }} more participant{% pluralize %}{{ num }} more participants{% endtrans %}
{% elif table.num_participants %} {% call message_box('info', fixed_width=true) %} {% trans num=hidden_participants %}There is {{ num }} hidden participant{% pluralize %}There are {{ num }} hidden participants{% endtrans %} {% endcall %} {% else %} {% call message_box('info', fixed_width=true) %} {% trans %}There are no registrations yet.{% endtrans %} {% endcall %} {% endif %}
{% endmacro %} {% block content %} {% if not published or not tables %} {% call message_box('info', fixed_width=true) %} {% trans %}There are no published registrations.{% endtrans %} {% endcall %} {% elif not num_participants %} {% call message_box('info', fixed_width=true) %} {% trans %}There are no registrations yet.{% endtrans %} {% endcall %} {% else %}
{% for table in tables %} {{ participant_table(table) }} {% endfor %}
{% endif %} {% endblock %}