fix design on login/logout button when not staff

This commit is contained in:
Benbb96 2024-05-07 15:43:12 +02:00
parent 6fe5f1681f
commit 2d561d15c8
No known key found for this signature in database

View File

@ -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 %}