{% if preview %} {% extends 'events/management/base.html' %} {% elif 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 back_button_url -%} {%- if preview -%} {{ url_for('.manage_regform_list', event) }} {%- endif -%} {%- endblock %} {% block title %} {%- if not preview -%} {{- page_title -}} {%- else -%} {% trans %}Participant List Preview{% endtrans %} {%- endif -%} {% endblock %} {% block subtitle %} {% if num_participants %} {%- trans num=num_participants %}1 participant{% pluralize %}{{ num }} participants{% endtrans -%} {% endif %} {% endblock %} {% block description %} {%- if preview == 'guest' -%} {% trans -%} This preview shows the participant list like an unregistered guest would see it. {%- endtrans %}
{%- trans %}Show registered participant view instead.{% endtrans -%} {% elif preview %} {% trans -%} This preview shows the participant list like a registered participant would see it. {%- endtrans %}
{%- trans %}Show unregistered guest view instead.{% endtrans -%} {%- elif 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 %} {% if column.is_picture %} {% if column.text %} {% else %}
{% endif %} {% else %} {{ column.text }} {% endif %} {% 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 %}