mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-21 23:43:11 +01:00
fix design on login/logout button when not staff
This commit is contained in:
parent
6fe5f1681f
commit
2d561d15c8
@ -59,7 +59,9 @@
|
||||
<div class="dropdown-divider"></div>
|
||||
{% endif %}
|
||||
<form action="{% url 'helpdesk:logout' %}" method="post">{% csrf_token %}
|
||||
<button type="submit" class="dropdown-item"><i class="fas fa-fw fa-sign-out-alt"></i> {% trans "Logout" %}</button>
|
||||
<button type="submit" class="dropdown-item">
|
||||
<i class="fas fa-fw fa-sign-out-alt"></i> {% trans "Logout" %}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</li>
|
||||
@ -82,13 +84,17 @@
|
||||
{{user.username}}
|
||||
</div>
|
||||
</div>
|
||||
<li class="nav-item dropdown no-arrow">
|
||||
<li class="nav-item">
|
||||
{% if user.is_authenticated %}
|
||||
<form action="{% url 'helpdesk:logout' %}" method="post">{% csrf_token %}
|
||||
<button type="submit" class="nav-link dropdown-toggle" id="userDropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="fas fa-fw fa-sign-out-alt"></i> {% trans "Logout" %}</button>
|
||||
<button type="submit" class="btn btn-outline-secondary">
|
||||
<i class="fas fa-fw fa-sign-out-alt"></i> {% trans "Logout" %}
|
||||
</button>
|
||||
</form>
|
||||
{% else %}
|
||||
<a class="nav-link dropdown-toggle" href="{% url 'helpdesk:login' %}?next={% if next %}{{ next|escape }}{% else %}{% url 'helpdesk:home' %}{% endif %}" id="userDropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="fas fa-fw fa-sign-in-alt"></i> {% trans "Log In" %}</a>
|
||||
{% else %}
|
||||
<a class="btn btn-outline-secondary" href="{% url 'helpdesk:login' %}?next={% if next %}{{ next|escape }}{% else %}{% url 'helpdesk:home' %}{% endif %}">
|
||||
<i class="fas fa-fw fa-sign-in-alt"></i> {% trans "Log In" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endif %}
|
||||
|
Loading…
Reference in New Issue
Block a user