{% load i18n %}
<ul class="horizontal-tab-list">
    <li>
        {% if tab == 'summary' %}
            <span>{% trans "Summary"%}</span>
        {% else %}
            <a href="{{ entity.get_absolute_url }}">{% trans "Summary"%}</a>
        {% endif %}
    </li>
    <li>
        {% if tab == 'contracts' %}
            <span>{% trans "Contracts"%}</span>
        {% else %}
            <a href="{% url "entity_contracts" entity.id %}">{% trans "Contracts"%}</a>
        {% endif %}
    </li>
    <li>
        {% if tab == 'costumers' %}
            <span>{% trans "Costumers"%}</span>
        {% else %}
            <a href="{% url "entity_costumers" entity.id %}">{% trans "Costumers"%}</a>
        {% endif %}
    </li>
    <li>
        {% if tab == 'tenders' %}
            <span>{% trans "Tenders" %}</span>
        {% else %}
            <a href="{% url "entity_tenders" entity.id %}">{% trans "Tenders"%}</a>
        {% endif %}
    </li>
</ul>

{% load i18n %}
<ul class="horizontal-tab-list">
    <li>
        {% if tab == 'summary' %}
            <span>{% trans "Summary"%}</span>
        {% else %}
            <a href="{{ entity.get_absolute_url }}">{% trans "Summary"%}</a>
        {% endif %}
    </li>
    <li>
        {% if tab == 'contracts' %}
            <span>{% trans "Contracts"%}</span>
        {% else %}
            <a href="{% url "entity_contracts" entity.id %}">{% trans "Contracts"%}</a>
        {% endif %}
    </li>
    <li>
        {% if tab == 'costumers' %}
            <span>{% trans "Costumers"%}</span>
        {% else %}
            <a href="{% url "entity_costumers" entity.id %}">{% trans "Costumers"%}</a>
        {% endif %}
    </li>
    {% if entity.tender_set.count %}
    <li>
        {% if tab == 'tenders' %}
            <span>{% trans "Tenders" %}</span>
        {% else %}
            <a href="{% url "entity_tenders" entity.id %}">{% trans "Tenders"%}</a>
        {% endif %}
    </li>
    {% endif %}
</ul>

Hide tenders tab in entity when there are no entries.
Hide tenders tab in entity when there are no entries.
