{% load i18n pretty_money perms %}

<dl class="row">
    <dt class="col-xl-6">{% trans 'name'|capfirst %}</dt>
    <dd class="col-xl-6">{{ club.name }}</dd>

    {% if club.parent_club %}
    <dt class="col-xl-6">
        <a href="{% url 'member:club_detail' club.parent_club.pk %}">{% trans 'Club Parent'|capfirst %}</a>
    </dt>
    <dd class="col-xl-6"> {{ club.parent_club.name }}</dd>
    {% endif %}

    {% if club.require_memberships %}
    {% if club.membership_start %}
    <dt class="col-xl-6">{% trans 'membership start'|capfirst %}</dt>
    <dd class="col-xl-6">{{ club.membership_start }}</dd>
    {% endif %}

    {% if club.membership_end %}
    <dt class="col-xl-6">{% trans 'membership end'|capfirst %}</dt>
    <dd class="col-xl-6">{{ club.membership_end }}</dd>
    {% endif %}

    {% if club.membership_duration %}
    <dt class="col-xl-6">{% trans 'membership duration'|capfirst %}</dt>
    <dd class="col-xl-6">{{ club.membership_duration }} {% trans "days" %}</dd>
    {% endif %}

    {% if club.membership_fee_paid == club.membership_fee_unpaid %}
    <dt class="col-xl-6">{% trans 'membership fee'|capfirst %}</dt>
    <dd class="col-xl-6">{{ club.membership_fee_paid|pretty_money }}</dd>
    {% else %}
    <dt class="col-xl-6">{% trans 'membership fee (paid students)'|capfirst %}</dt>
    <dd class="col-xl-6">{{ club.membership_fee_paid|pretty_money }}</dd>

    <dt class="col-xl-6">{% trans 'membership fee (unpaid students)'|capfirst %}</dt>
    <dd class="col-xl-6">{{ club.membership_fee_unpaid|pretty_money }}</dd>
    {% endif %}
    {% endif %}

    {% if "note.view_note"|has_perm:club.note %}
    <dt class="col-xl-6">{% trans 'balance'|capfirst %}</dt>
    <dd class="col-xl-6">{{ club.note.balance | pretty_money }}</dd>
    {% endif %}

    <dt class="col-xl-6">{% trans 'aliases'|capfirst %}</dt>
    <dd class="col-xl-6">
        <a class="badge badge-secondary" href="{% url 'member:club_alias' club.pk %}">
            <i class="fa fa-edit"></i>
            {% trans 'Manage aliases' %} ({{ club.note.alias.all|length }})
        </a>
    </dd>

    <dt class="col-xl-4">{% trans 'email'|capfirst %}</dt>
    <dd class="col-xl-8"><a href="mailto:{{ club.email }}">{{ club.email }}</a></dd>
</dl>
