{% load i18n %} {% load l10n %} {% with c=event.currency %}
{% if not actor.is_external_portal %} {% endif %}

{{ event.name }}

{% if event.is_archived %}{% translate 'Archived' %}{% endif %} {% if actor.is_creator %} {% elif actor.is_wygiwyh_user %} {% endif %} {% include 'splits/fragments/event/share_menu.html' %}
{% blocktranslate count counter=active_participants_count %}{{ counter }} person{% plural %}{{ counter }} people{% endblocktranslate %} {% if event.description %}
{{ event.description }}
{% endif %}
{# The one number people open this page for #} {% if my_balance %}
{% if not my_balance.net_balance %}
{% if transfers %}{% translate 'You are settled up' %}{% else %}{% translate 'Everyone is settled up' %}{% endif %}
{% else %}
{% if my_balance.net_balance > 0 %}{% translate 'You are owed' %}{% else %}{% translate 'You owe' %}{% endif %}
{# Show the magnitude; the sentence above carries the direction #}
{% endif %}
{% translate 'Group total' %}
{% endif %}
{% if transfers %}
{% translate 'Settle up' %}
    {% for item in transfers %}{% with t=item.transfer %}
  • {% if t.from_participant.id == me_id %}{% translate 'You' %}{% else %}{{ t.from_participant.name }}{% endif %} {% if t.to_participant.id == me_id %}{% translate 'You' %}{% else %}{{ t.to_participant.name }}{% endif %}
    {% if item.tx_links %}
    {% include 'splits/fragments/tx_links.html' with links=item.tx_links %}
    {% endif %} {% if item.can_record or item.user_direction %}
    {% if item.can_record %} {% endif %} {% if item.user_direction %} {% endif %}
    {% endif %}
  • {% endwith %}{% endfor %}
{% endif %}
{% translate 'Balances' %}
    {% for row in balance_rows %}{% with b=row.balance %}
  • {{ b.participant.name }} {% if b.participant.id == me_id %}{% translate 'you' %}{% endif %} {% if not b.participant.is_active %}{% translate 'inactive' %}{% endif %}
    {# Diverging bar: right of center is owed money, left owes #}
    {% translate 'paid' %} · {% translate 'share' %}
  • {% endwith %}{% endfor %}
{% translate 'Activity' %}
{% if activity %}
    {% for item in activity %} {% include 'splits/fragments/event/activity_item.html' %} {% endfor %}
{% else %} {% endif %}
{% endwith %}