{% with request.user.customer.current_subscription as subscription %}
    {% if subscription.status == "active" %}
        <div class="alert alert-info">
            Your subscription will automatically renew in <strong>{{ subscription.period_end|timeuntil }}</strong>.
        </div>
    {% else %}
        {% if subscription.status == "trialing" %}
            {% if request.user.customer.plan and request.user.customer.card_kind %}
                <div class="alert alert-info">
                    Your free trial will end in <strong>{{ subscription.period_end|timeuntil }}</strong> after which you commence a <strong>{{ request.user.customer.display_plan }}</strong> plan.
                </div>
            {% else %}
                <div class="alert alert-warning lead">
                    Your free trial will end in <strong>{{ subscription.period_end|timeuntil }}</strong> after which you will need to get a subscription to continue using the site.
                </div>
            {% endif %}
        {% else %}
            {% if subscription.status == "canceled" %}
                {% 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.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 %}
{% endwith %}