{% 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) %}
{{ template_hook('before-registration-actions', registration=registration) }}
{% if registration.state.name == 'pending' %} {{ _render_pending_actions(registration) }} {% elif registration.state.name == 'unpaid' %} {{ _render_unpaid_actions(registration) }} {% elif registration.state.name == 'complete' %} {{ _render_complete_actions(registration) }} {% elif registration.state.name in ('rejected', 'withdrawn') %} {{ _render_cancelled_actions(registration) }} {% endif %}
{% if registration.state.name in ('unpaid', 'complete') %} {{ _render_check_in(registration) }} {% endif %} {{ template_hook('extra-registration-actions', registration=registration) }}
{% if registration.state.name not in ('rejected', 'withdrawn') %} {{ _render_withdraw_actions(registration) }} {% endif %} {% if all_tags %}
{{ _render_registration_tags(registration, assigned_tags, all_tags) }}
{% endif %} {{ template_hook('before-registration-summary', registration=registration) }} {{ render_registration_summary(registration, from_management=True) }} {% call render_invoice(registration, payment_enabled) %} {% endcall %} {% if registration.transaction %}
{% trans %}Payment transaction{% endtrans %}
{{ registration.transaction.render_details()|safe }}
{% endif %}
{% endmacro %} {% macro _render_pending_actions(registration) %}
{% trans %}Registration awaiting manager approval{% endtrans %}
{% trans -%} You can validate or reject this registration and the user will receive a notification. {%- endtrans %}
{% block registration_pending_action_buttons scoped %}
{%- trans %}Approve{% endtrans -%}
{%- trans %}Reject{% endtrans -%}
{% endblock %}
{% endmacro %} {% macro _render_unpaid_actions(registration) %}
{% trans %}Registration not paid yet{% endtrans %}
{% if registration.is_paid %} {% trans %}The current transaction is still pending.{% endtrans %} {% else %} {% trans %}You can mark the registration as paid manually.{% endtrans %} {% endif %}
{% if not registration.is_paid %}
{{ registration.render_price() }}
{% trans %}Mark as paid{% endtrans %}
{% if registration.registration_form.moderation_enabled %} {{ _render_reset_registration_button(registration, _('Reset approval')) }} {% endif %}
{% endif %} {% endmacro %} {% macro _render_complete_actions(registration) %}
{% trans %}This registration is complete{% endtrans %}
{% trans submitted=registration.submitted_dt|format_date(timezone=registration.event.tzinfo) -%} Submitted: {{ submitted }} {%- endtrans %}
{% set can_reset = registration.registration_form.moderation_enabled and not registration.is_paid %} {% set can_get_ticket = registration.registration_form.tickets_enabled and not registration.is_ticket_blocked %} {% 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) %}
{% 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 %}
{% set action = _('Reset rejection') if registration.state.name == 'rejected' else _('Reset withdrawal') %} {{ _render_reset_registration_button(registration, action, registration.has_conflict()) }}
{% endmacro %} {% macro _render_registration_tags(registration, assigned_tags, all_tags) %}
{% endmacro %} {% macro _render_reset_registration_button(registration, action_text, conflict=false) %} {% set confirm_notification -%} {%- 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 -%} {%- endset %} {% block reset_registration_button scoped %} {{ action_text }} {% 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 %}
{% trans %}Check-in{% endtrans %}
{% 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 %}