Gallery-Archivist/archivist/apps/templates/importer/partials/tabnavbar.html

21 lines
874 B
HTML

<ul class="nav nav-tabs mb-3">
{% for tab in tabs %}
<li class="nav-item">
{% if not tab.adminOnly %}
{% url tab.url as tab_url %}
{% if tab_url == request.path %}
<a class="nav-link active" aria-current="page" href="{% url tab.url %}">{{ tab.name }}</a>
{% else %}
<a class="nav-link" href="{% url tab.url %}">{{ tab.name }}</a>
{% endif %}
{% elif request.user.is_staff and request.user.is_superuser %}
{% url tab.url as tab_url %}
{% if tab_url == request.path %}
<a class="nav-link active" aria-current="page" href="{% url tab.url %}">{{ tab.name }}</a>
{% else %}
<a class="nav-link" href="{% url tab.url %}">{{ tab.name }}</a>
{% endif %}
{% endif %}
</li>
{% endfor %}
</ul>