{% load i18n %}

<ul class='nav nav-tabs'>
    <li{% ifequal tab 'details' %} class='active'{% endifequal %}>
        <a href="{% url 'so-detail' order.id %}">{% trans "Order Items" %}</a>
    </li>
    <li{% if tab == 'builds' %} class='active'{% endif %}>
        <a href="{% url 'so-builds' order.id %}">
            {% trans "Build Orders" %}
            {% if order.builds.count > 0 %}
            <span class='badge'>{{ order.builds.count }}</span>
            {% endif %}
        </a>
    </li>
    <li{% if tab == 'attachments' %} class='active'{% endif %}>
        <a href="{% url 'so-attachments' order.id %}">{% trans "Attachments" %}
            {% if order.attachments.count > 0 %}
            <span class='badge'>{{ order.attachments.count }}</span>
            {% endif %}
        </a>
    </li>
    <li{% ifequal tab 'notes' %} class='active'{% endifequal %}>
        <a href="{% url 'so-notes' order.id %}">{% trans "Notes" %}{% if order.notes %} <span class='fas fa-info-circle'></span>{% endif %}</a>
    </li>
</ul>