feat: add admin panel button for staff users
This commit is contained in:
@@ -24,6 +24,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex items-center gap-4">
|
<div class="flex items-center gap-4">
|
||||||
{% if user.is_authenticated %}
|
{% if user.is_authenticated %}
|
||||||
|
{% if user.is_staff %}
|
||||||
|
<a href="{% url 'admin:index' %}" class="text-sm font-medium text-purple-600 hover:text-purple-800 transition">Админ-панель</a>
|
||||||
|
{% endif %}
|
||||||
<span class="text-sm text-gray-600">Привет, <b>{{ user.first_name|default:user.username }}</b></span>
|
<span class="text-sm text-gray-600">Привет, <b>{{ user.first_name|default:user.username }}</b></span>
|
||||||
<form action="{% url 'lms:logout' %}" method="post" class="inline">
|
<form action="{% url 'lms:logout' %}" method="post" class="inline">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
|||||||
Reference in New Issue
Block a user