move admin panel to user drop down

This commit is contained in:
Robert Einsle 2019-02-04 07:57:03 +01:00
parent 6385689b10
commit d3c886940b

View File

@ -36,11 +36,6 @@
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="{% url 'billard:location_index' %}">Standorte</a> <a class="nav-link" href="{% url 'billard:location_index' %}">Standorte</a>
</li> </li>
{% if user.is_superuser %}
<li class="nav-item">
<a class="nav-link" href="/admin">Administration</a>
</li>
{% endif %}
</ul> </ul>
{% if user.is_authenticated %} {% if user.is_authenticated %}
<ul class="navbar-nav ml-auto"> <ul class="navbar-nav ml-auto">
@ -51,7 +46,11 @@
</a> </a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="userMenu"> <div class="dropdown-menu dropdown-menu-right" aria-labelledby="userMenu">
<a class="dropdown-item" href="{% url 'billard:my_account' %}">My account</a> <a class="dropdown-item" href="{% url 'billard:my_account' %}">My account</a>
<a class="disabled dropdown-item" href="#">{% settings_value "PRODUCT_VERSION" %}</a> {% if user.is_superuser %}
<a class="dropdown-item" href="/admin">Administration</a>
{% endif %}
<a class="disabled dropdown-item"
href="#">{% settings_value "PRODUCT_VERSION" %}</a>
<div class="dropdown-divider"></div> <div class="dropdown-divider"></div>
<a class="dropdown-item" href="{% url 'logout' %}">Log out</a> <a class="dropdown-item" href="{% url 'logout' %}">Log out</a>
</div> </div>