add dashboard nav
This commit is contained in:
parent
bd1b996695
commit
6d0f2a7395
|
@ -62,18 +62,10 @@ Usefull context:
|
||||||
{% for item, render in items %}
|
{% for item, render in items %}
|
||||||
{{ render }}
|
{{ render }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% if user.is_staff %}
|
|
||||||
<a class="nav-item" href="{% url "admin:index" %}" target="new">
|
|
||||||
{% translate "Admin" %}
|
|
||||||
</a>
|
|
||||||
{% endif %}
|
|
||||||
{% if user.is_authenticated %}
|
|
||||||
<a class="nav-item" href="{% url "logout" %}" title="{% translate "Disconnect" %}"
|
|
||||||
aria-label="{% translate "Disconnect" %}">
|
|
||||||
<i class="fa fa-power-off"></i>
|
|
||||||
</a>
|
|
||||||
{% endif %}
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
{% if user.is_authenticated %}
|
||||||
|
{% include "./dashboard/nav.html" %}
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</nav>
|
</nav>
|
||||||
|
|
27
aircox/templates/aircox/dashboard/nav.html
Normal file
27
aircox/templates/aircox/dashboard/nav.html
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
{% load i18n %}
|
||||||
|
<div class="dropdown is-hoverable is-right">
|
||||||
|
<div class="dropdown-trigger">
|
||||||
|
<button class="button square" aria-haspopup="true" aria-controls="dropdown-menu" type="button">
|
||||||
|
<span class="icon">
|
||||||
|
<i class="fa fa-user" aria-hidden="true"></i>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="dropdown-menu" id="dropdown-menu" role="menu" style="z-index:200">
|
||||||
|
<div class="dropdown-content">
|
||||||
|
{% block user-menu %}
|
||||||
|
{% endblock %}
|
||||||
|
{% if user.is_admin %}
|
||||||
|
{% block admin-menu %}
|
||||||
|
<a class="nav-item" href="{% url "admin:index" %}" target="new">
|
||||||
|
{% translate "Admin" %}
|
||||||
|
</a>
|
||||||
|
{% endblock %}
|
||||||
|
<hr class="dropdown-divider" />
|
||||||
|
{% endif %}
|
||||||
|
<a class="dropdown-item" href="{% url "logout" %}">
|
||||||
|
{% translate "Disconnect" %}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
Loading…
Reference in New Issue
Block a user