{% load i18n %}
<a class="quotabox" data-toggle="tooltip_html" data-placement="top"
        title="{% trans "Quota:" %} {{ q.name|force_escape|force_escape }}{% if q.cached_avail.1 is not None %}<br>{% blocktrans with num=q.cached_avail.1 %}Currently available: {{ num }}{% endblocktrans %}{% endif %}"
    href="{% url "control:event.items.quotas.show" event=q.event.slug organizer=q.event.organizer.slug quota=q.pk %}">
    {% if q.size|default_if_none:"NONE" == "NONE" %}
        <div class="progress">
        </div>
    {% else %}
        <div class="progress">
            <div class="progress-bar progress-bar-{% if q.cached_avail.0 < 10 %}danger{% elif q.cached_avail.0 < 100  %}warning{% else %}success{% endif %} progress-bar-{{ q.percent_paid }}">
            </div>
        </div>
    {% endif %}
    <div class="numbers">
        {{ q.cached_availability_paid_orders|default_if_none:"?" }} / {{ q.size|default_if_none:"∞" }}
    </div>
</a>
