Add: importer partial tabnavbar template
This commit is contained in:
parent
19c2a48b1a
commit
15a688d18e
1 changed files with 21 additions and 0 deletions
21
archivist/apps/templates/importer/partials/tabnavbar.html
Normal file
21
archivist/apps/templates/importer/partials/tabnavbar.html
Normal 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>
|
Loading…
Reference in a new issue