{% if subscription %} 
    {% if subscription.status == subscription.STATUS_ACTIVE and not subscription.current_period_end %}
        <div class="alert alert-success lead">
            Your subscription is <strong>{{ subscription.status }}</strong>.
        </div>
    {% else %}
        {% if subscription.status == subscription.STATUS_TRIALING %}
            {% if subscription.plan and customer.card_kind %}
                <div class="alert alert-info lead">
                    Your free trial will end in <strong>{{ subscription.current_period_end|timeuntil }}</strong> after which you commence a <strong>{{ subscription.plan.name }}</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_CANCELED %}
                <div class="alert alert-danger lead">
                    Your subscription has been <strong>canceled</strong>.
                </div>
            {% elif customer.subscription.is_status_temporarily_current %}
            	<div class="alert alert-warning lead">
                    Your subscription has been <strong>canceled</strong> on {{ subscription.canceled_at }}
                    {% if subscription.is_period_current %}
                        You can continue to use the site for another <strong>{{ subscription.current_period_end|timeuntil }}.</strong>
                    {% endif %}
                </div>
            {% else %}
                <div class="alert alert-success lead">
                    Your subscription is <strong>{{ subscription.status }}</strong>.
                </div>
            {% endif %}
        {% endif %}
    {% endif %}
{% endif %}
