{% extends "memberships/base.html" %}
{% load styled_forms %}
{% load i18n %}

{% block title %}{% endblock %}
{% block meta_description %}{% endblock %}
{% block meta_keywords %}{% endblock %}
{% block meta_canonical_url %}<link rel="canonical" href="" />{% endblock %}

{% block extra_head %}
{{ block.super }}
<link rel="stylesheet" href="{{ STATIC_URL }}css/memberships.css">
<link rel="stylesheet" href="{{ STATIC_URL }}css/memberships-no-renew.css">
{% endblock %}

{% block body %}

<div class="t">
    
    <h1 style="margin-bottom:15px;">{% trans "Membership Application" %}</h1>

    <p>You are a member of every ({{ memberships.count }}) membership type available in this application.</p>
    <p>This application will be available starting at your next renewal period.</p>


    {% for membership in memberships %}

        <div class="membership-wrap">

            <div><strong><a href="{% url membership.details membership.pk %}">
                {{ membership.member_number }} {{ membership.membership_type }}
            </a></strong></div>

            <div class="membership-period">{{ membership.subscribe_dt|date:"N n, Y" }} - {% firstof membership.expire_dt|date:"N n, Y" "Forever" %}</div>

            {% if membership.get_renewal_period_dt.1 %}
            <div class="renew-period">Renew between {{ membership.get_renewal_period_dt.0|date:"N n, Y" }} and {{ membership.get_renewal_period_dt.1|date:"N n, Y" }}</div>
            {% else %}
            <div class="renew-period">This membership never expires. There is no renewal period.</div>
            {% endif %}

        </div>

    {% endfor %}

</div>
{% endblock %}