{% if subscription %} 
    {% if subscription.status == subscription.STATUS_ACTIVE %}
        {% if subscription.status == subscription.STATUS_TRIALING %}
            {% if customer.plan and customer.card_kind %}
                <div class="alert alert-info">
                    Your free trial will end in <strong>{{ subscription.current_period_end|timeuntil }}</strong> after which you commence a <strong>{{ subscription.plan_display }}</strong> plan.
                </div>
            {% else %}
                <div class="alert alert-warning lead">
                    Your free trial will end in <strong>{{ subscription.current_period_end|timeuntil }}</strong> after which you will need to get a subscription to continue using the site.
                </div>
            {% endif %}
        {% else %}
            {% if subscription.status == subscription.STATUS_CANCELLED %}
                {% if subscription.is_period_current %}
                    <div class="alert alert-warning lead">
                        Your subscription has been <strong>canceled</strong> but you can continue to use the site for another <strong>{{ subscription.current_period_end|timeuntil }}</strong>.
                    </div>
                {% else %}
                    <div class="alert alert-danger lead">
                        Your subscription has been <strong>canceled</strong>.
                    </div>
                {% endif %}
            {% else %}
                <div class="alert alert-danger lead">
                    Your subscription is <strong>{{ subscription.status }}</strong>.
                </div>
            {% endif %}
        {% endif %}
    {% endif %}
{% endif %}
