[FIX] Active class on notification icon

This commit is contained in:
Peter Pfeufer 2025-05-22 09:21:05 +02:00
parent 54910746e3
commit fa32f87a35
No known key found for this signature in database

View File

@ -2,8 +2,8 @@
{% load navactive %} {% load navactive %}
{% load auth_notifications %} {% load auth_notifications %}
<li class="nav-item {% navactive request 'notifications:' %}" id="menu_item_notifications"> <li class="nav-item" id="menu_item_notifications">
<a class="nav-link" href="{% url 'notifications:list' %}"> <a class="nav-link {% navactive request 'notifications:' %}" href="{% url 'notifications:list' %}">
{% with unread_count=request.user|user_unread_notification_count %} {% with unread_count=request.user|user_unread_notification_count %}
<i class="fa-solid fa-bell{% if unread_count %} text-danger{% endif %}"></i> <i class="fa-solid fa-bell{% if unread_count %} text-danger{% endif %}"></i>
{% endwith %} {% endwith %}