{% load perm_tags %}
{% if not user_is_registrant %}
{% if user.is_anonymous %}
{% if can_auto_refund %}
{% trans "An anonymous user has canceled the registration for:" %}
{% else %}
{% trans "An anonymous user has requested cancellation of the registration for:" %}
{% endif %}
{% else %}
{% if can_auto_refund %}
{% blocktrans with user.first_name as first_name and user.last_name as last_name %}{{ first_name }} {{ last_name }} has canceled the registration for: {% endblocktrans %}
{% else %}
{% blocktrans with user.first_name as first_name and user.last_name as last_name %}{{ first_name }} {{ last_name }} has requested cancellation of the registration for: {% endblocktrans %}
{% endif %}
{% if registrant.first_name or registrant.last_name %} {{ registrant.first_name }} {{ registrant.last_name }} {% else %} {% trans "Guest" %} #{{ registrant.pk }} {% endif %}
{% endif %}
{% else %}
{% if registrant.first_name or registrant.last_name %}
{% if can_auto_refund %}
{% blocktrans with registrant.first_name as first_name and registrant.last_name as last_name %}{{ first_name }} {{ last_name }} has canceled their registration. {% endblocktrans %}
{% else %}
{% blocktrans with registrant.first_name as first_name and registrant.last_name as last_name %}{{ first_name }} {{ last_name }} has requested to cancel their registration. {% endblocktrans %}
{% endif %}
{% else %}
{% if can_auto_refund %}
{% blocktrans with registrant.pk as registrant_id %}Guest #{{ registrant_id }} has canceled their registration.{% endblocktrans %}
{% else %}
{% blocktrans with registrant.pk as registrant_id %}Guest #{{ registrant_id }} has requested to cancel their registration.{% endblocktrans %}
{% endif %}
{% endif %}
{% endif %}
{% blocktrans with event.title as title and event.start_dt as start_dt %}
Registration: {{ title }} on {{ start_dt }} on {{ SITE_GLOBAL_SITEDISPLAYNAME }}
{% endblocktrans %}
{% if allow_refunds == "Auto" and not can_auto_refund %}
{% trans "Automatic refunds are turned on, but the system was not able to refund in this case. You can still refund manually from the invoice." %}
{% endif %}
{% if can_refund and not can_auto_refund %}
{% trans "Refund their registration here" %}
{% else %}
{% trans "View their registration invoice here" %}
{% endif %}
{% blocktrans with event.registrants.count as eventreg and registrants_paid.count as regpaid and event.money_collected as eventmoney and registrants_pending.count as regpend and event.money_outstanding as eventout %}We now have {{ eventreg }} registrants, {{ regpaid }} paid (${{ eventmoney }}) and {{ regpend }} pending ({{ eventout }}){% endblocktrans %}