1
0
mirror of https://gitlab.crans.org/mediatek/med.git synced 2025-06-21 11:18:24 +02:00

Merge index views

This commit is contained in:
Alexandre Iooss
2019-08-10 08:04:46 +02:00
parent be96a61ff2
commit aca1d2def6
9 changed files with 189 additions and 108 deletions

View File

@ -25,10 +25,9 @@ SPDX-License-Identifier: GPL-3.0-or-later
{% endif %}
{% endblock %}
{% block userlinks %}
{% if user.is_authenticated %}
{% if available_apps %}
{# When in admin site, list all admin pages and documentation #}
<span class="dropdown">
{% if available_apps %}
{# When in admin site, list all admin pages and documentation #}
<span class="dropdown">
<a href="{% url 'admin:index' %}">{% trans 'Explore database' %}</a>
<span class="dropdown-content">
{% for app in available_apps %}
@ -47,10 +46,11 @@ SPDX-License-Identifier: GPL-3.0-or-later
{% endif %}
</span>
</span> /
{% elif user.is_staff %}
{# When not in admin site, but user is staff then add a link #}
<a href="{% url 'admin:index' %}">{% trans 'Explore database' %}</a> /
{% endif %}
{% else %}
{# When not in admin site, but user is staff then add a link #}
<a href="{% url 'admin:index' %}">{% trans 'Explore database' %}</a> /
{% endif %}
{% if user.is_authenticated %}
<a href="{% url 'logout' %}">{% trans 'Log out' %}</a>
{% else %}
<a href="{% url 'login' %}">{% trans 'Log in' %}</a>