Add: importer partial tabnavbar template

This commit is contained in:
Aroy-Art 2024-10-14 21:07:39 +02:00
parent 19c2a48b1a
commit 15a688d18e
Signed by: Aroy
GPG key ID: DB9689E9391DD156

View file

@ -0,0 +1,21 @@
<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>