{% from 'events/registration/display/_registration_summary_blocks.html' import render_registration_summary, render_invoice %} {% macro render_registration_details(registration, payment_enabled, assigned_tags, all_tags) %} {% set can_manage_registration = registration.event.can_manage(session.user, permission='registration') %} {% set can_moderate = registration.event.can_manage(session.user, permission='registration_moderation') %} {% set can_checkin = registration.event.can_manage(session.user, permission='registration_checkin') %}
{{ template_hook('before-registration-actions', registration=registration) }}
{% if registration.state.name == 'pending' %} {{ _render_pending_actions(registration, can_manage_registration or can_moderate) }} {% elif registration.state.name == 'unpaid' %} {{ _render_unpaid_actions(registration, can_manage_registration, can_manage_registration or can_moderate) }} {% elif registration.state.name == 'complete' %} {{ _render_complete_actions(registration, can_manage_registration, can_manage_registration or can_moderate) }} {% elif registration.state.name in ('rejected', 'withdrawn') %} {{ _render_cancelled_actions(registration, can_manage_registration or can_moderate) }} {% endif %}
{% block checkin_state scoped %} {% if registration.state.name in ('unpaid', 'complete') and (can_manage_registration or can_checkin) %} {{ _render_check_in(registration) }} {% endif %} {% endblock %} {{ template_hook('extra-registration-actions', registration=registration) }}
{% block render_withdraw_actions scoped %} {% if registration.state.name not in ('rejected', 'withdrawn') and (can_manage_registration or can_moderate) %} {{ _render_withdraw_actions(registration) }} {% endif %} {% endblock %} {% block render_allow_modification scoped %} {% if can_manage_registration %} {{ _render_allow_modification(registration) if registration.is_active }} {% endif %} {% endblock %} {% if can_manage_registration and all_tags %}
{{ _render_registration_tags(registration, assigned_tags, all_tags) }}
{% endif %} {% block render_view_logs scoped %} {% if can_manage_registration %} {{ _render_view_logs(registration) }} {% endif %} {% endblock %} {{ template_hook('before-registration-summary', registration=registration) }} {{ render_registration_summary(registration, from_management=True, can_manage_registration=can_manage_registration) }} {% if can_manage_registration %} {% call render_invoice(registration, payment_enabled) %} {% endcall %} {% if registration.transaction %}
{% trans %}Payment transaction{% endtrans %}
{{ registration.transaction.render_details()|safe }}
{% endif %} {% endif %}
{% endmacro %} {% macro _render_pending_actions(registration, can_moderate) %}
{% trans %}Registration awaiting manager approval{% endtrans %}
{% if can_moderate %} {% trans -%} You can validate or reject this registration and the user will receive a notification. {%- endtrans %} {% endif %}
{% if can_moderate %}
{% block registration_pending_action_buttons scoped %}
{% endblock %}
{% endif %} {% endmacro %} {% macro _render_unpaid_actions(registration, can_manage_registration, can_moderate) %}
{% trans %}Registration not paid yet{% endtrans %}
{% if registration.is_paid %} {% trans %}The current transaction is still pending.{% endtrans %} {% elif can_manage_registration %} {% trans %}You can mark the registration as paid manually.{% endtrans %} {% endif %}
{% if not registration.is_paid and (can_manage_registration or can_moderate) %}
{% if can_manage_registration %}
{{ registration.render_price() }}
{% endif %} {% if can_moderate and registration.registration_form.moderation_enabled %} {{ _render_reset_registration_button(registration, _('Reset approval')) }} {% endif %}
{% endif %} {% endmacro %} {% macro _render_complete_actions(registration, can_manage, can_moderate) %}
{% trans %}This registration is complete{% endtrans %}
{% trans submitted=registration.submitted_dt|format_date(timezone=registration.event.tzinfo) -%} Submitted: {{ submitted }} {%- endtrans %}
{% set can_reset = can_moderate and registration.registration_form.moderation_enabled and not registration.is_paid %} {% set ticket_template = registration.registration_form.get_ticket_template() %} {% set can_get_ticket = registration.registration_form.tickets_enabled and (not ticket_template.is_ticket or not registration.is_ticket_blocked) and can_manage %} {% if can_reset or can_get_ticket %}
{% if can_reset %} {{ _render_reset_registration_button(registration, _('Reset approval')) }} {% endif %} {% if can_get_ticket %} {% trans %}Get ticket{% endtrans %} {% endif %}
{% endif %} {% endmacro %} {% macro _render_cancelled_actions(registration, can_moderate) %}
{% trans state=registration.state.title|lower -%} This registration is {{ state }} {%- endtrans %}
{% if registration.state.name == 'rejected' and registration.rejection_reason %} {% trans reason=registration.rejection_reason %}Reason: {{ reason }}{% endtrans %} {% endif %}
{% if can_moderate %}
{% set action = _('Reset rejection') if registration.state.name == 'rejected' else _('Reset withdrawal') %} {{ _render_reset_registration_button(registration, action, registration.has_conflict()) }}
{% endif %} {% endmacro %} {% macro _render_registration_tags(registration, assigned_tags, all_tags) %}
{% endmacro %} {% macro _render_reset_registration_button(registration, action_text, conflict=false) %} {% set confirm_notification -%} {%- block reset_registration_button_confirm_notification_text scoped -%} {%- if registration.state.name == 'withdrawn' -%} {% trans %}This will trigger a notification email.{% endtrans %} {%- else -%} {% trans %}This action will not be notified to the registrant.{% endtrans %} {%- endif -%} {%- endblock -%} {%- endset %} {% block reset_registration_button scoped %} {% endblock %} {% endmacro %} {% macro _render_check_in(registration) %}
{% if registration.checked_in %}
{% trans %}Checked in{% endtrans %}
{% trans checked_in_dt=registration.checked_in_dt|format_date(timezone=registration.event.tzinfo) -%} Checked in: {{ checked_in_dt }} {%- endtrans %} ( {%- trans %}reset{% endtrans -%} )
{% else %}
{% trans %}Not checked in{% endtrans %}
{% if registration.registration_form.tickets_enabled %} {% trans -%} You can mark the registration as checked in manually here or with the Indico Check in app. {%- endtrans %} {% else %} {% trans -%} You can mark the registration as checked in manually. {%- endtrans %} {% endif %}
{% endif %}
{% endmacro %} {% macro _render_withdraw_actions(registration) %}
{% trans %}Withdraw registration{% endtrans %}
{% trans -%} If the participant decided to no longer attend the event, you can withdraw their registration. {%- endtrans %}
{% endmacro %} {% macro _render_allow_modification(registration) %}
{% if registration.modification_end_dt is none %}
{% trans %}Allow the participant to modify their registration{% endtrans %}
{% trans -%} You can exceptionally allow this participant to modify their registration, regardless of the modification settings or deadline configured in the registration form. {%- endtrans %}
{% elif registration.modification_deadline_passed %}
{% trans %}The participant can no longer exceptionally modify their registration{% endtrans %}
{% trans modification_end_dt=registration.modification_end_dt|format_date(timezone=registration.event.tzinfo) -%} The specified modification deadline ({{ modification_end_dt }}) has passed. {% endtrans -%}
{% else %}
{% trans %}The participant can exceptionally modify their registration{% endtrans %}
{% trans modification_end_dt=registration.modification_end_dt|format_date(timezone=registration.event.tzinfo) -%} The participant is allowed to modify their registration until: {{ modification_end_dt }} {%- endtrans %}
{% endif %}
{% if registration.modification_end_dt is none %} {% else %} {% endif %}
{% endmacro %} {% macro _render_view_logs(registration) %}
{% trans %}Logs{% endtrans %}
{% trans -%} View all logs related to this registration. {%- endtrans %}
{% endmacro %}