{% from 'message_box.html' import message_box %} {% macro render_group_panel(membership, group, registration, from_management=false, switchable_plans=()) %} {% set plan = group.pricing_plan %} {% set chosen = group.chosen_plan %} {% set is_leader = group.leader_registration_id == registration.id %} {% set join_url = url_for_plugin('group_registration.join_link', group.registration_form, join_uuid=group.join_uuid, _external=true) %} {# The hook this macro answers is rendered *inside* ``, before its first row. Anything that is not table content gets foster-parented out of the table by the HTML parser, and the members table below implicitly closes the outer one -- which tore the panel into three pieces scattered around the page. One row spanning both columns keeps it whole. #} {% endmacro %}
{% trans name=group.name %}Group: {{ name }}{% endtrans %}
{% if group.state.name == 'forming' %}

{% trans seats=group.seats_left, target=group.target_size, label=chosen.label if chosen else '' -%} Your group needs {{ seats }} more member(s) to reach {{ target }} and confirm the "{{ label }}" rate. Share the code or the link below -- it will confirm itself the moment the last seat is filled. {%- endtrans %}

{% elif group.state.name == 'confirmed' %}

{% trans label=chosen.label if chosen else '' -%} This group is confirmed on the "{{ label }}" rate. The amount you pay will not change. {%- endtrans %}

{% elif group.state.name == 'short' %}

{% if plan %} {% trans aimed=chosen.label if chosen else '', label=plan.label -%} This group did not reach the "{{ aimed }}" seat count by the deadline, so the "{{ label }}" rate was applied instead. {%- endtrans %} {% else %} {% trans aimed=chosen.label if chosen else '' -%} This group did not reach the "{{ aimed }}" seat count by the deadline and does not qualify for a group rate, so the standard rate now applies. {%- endtrans %} {% endif %}

{% if membership.balance_due > 0 %} {# `i-callout` is not an Indico class; this is the one it really has. #} {% call message_box('warning') %} {% trans balance=format_currency(membership.balance_due, registration.currency) -%} You have an outstanding balance of {{ balance }}. Please contact the organizers to settle it. {%- endtrans %} {% trans -%} Until it is settled your registration stays on "awaiting payment". The checkout cannot take the difference on its own, so please arrange it with the organizers rather than paying again here. {%- endtrans %} {% endcall %} {% endif %} {% elif group.state.name == 'dissolved' %}

{% trans %}This group has been dissolved by the organizers and no group rate applies.{% endtrans %}

{% endif %} {% if group.state.name == 'forming' %}

{% trans %}Send these to the people you want in your group however you like -- we do not e-mail them for you.{% endtrans %}

{% endif %} {% for member in group.members %} {% if member.registration and not member.registration.is_deleted %} {% endif %} {% endfor %}
{% trans %}Member{% endtrans %} {% trans %}Status{% endtrans %}
{{ member.registration.full_name }} {%- if group.leader_registration_id == member.registration_id %} ({% trans %}leader{% endtrans %}) {%- endif %} {{ member.registration.state.title }}
{% if not from_management %} {% if is_leader and group.state.name == 'forming' and switchable_plans %} {# A leader may still move the group to another plan while nobody has paid. The endpoint refuses the rest, so this only has to offer what is plausible: plans that seat at least the members already in. #}
{% endif %}
{% if is_leader and group.state.name == 'forming' %} {% endif %} {% if group.state.name in ('forming', 'confirmed') and not registration.is_paid %} {% endif %}
{% endif %}