mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-08 16:48:16 -06:00
Update notification bell when notifications have been cleared
This commit is contained in:
parent
5131cc92f0
commit
4f0cc950bc
@ -29,3 +29,5 @@
|
|||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
{% include 'inc/notification_bell.html' %}
|
||||||
|
|
||||||
|
9
netbox/templates/inc/notification_bell.html
Normal file
9
netbox/templates/inc/notification_bell.html
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{% if notifications %}
|
||||||
|
<span class="text-primary" id="notifications-alert" hx-swap-oob="true">
|
||||||
|
<i class="mdi mdi-bell-badge"></i>
|
||||||
|
</span>
|
||||||
|
{% else %}
|
||||||
|
<span class="text-muted" id="notifications-alert" hx-swap-oob="true">
|
||||||
|
<i class="mdi mdi-bell"></i>
|
||||||
|
</span>
|
||||||
|
{% endif %}
|
@ -6,11 +6,7 @@
|
|||||||
{% with notifications=request.user.notifications.unread.exists %}
|
{% with notifications=request.user.notifications.unread.exists %}
|
||||||
<div class="nav-item dropdown">
|
<div class="nav-item dropdown">
|
||||||
<a href="#" class="nav-link" data-bs-toggle="dropdown" hx-get="{% url 'extras:notifications' %}" hx-target="next .notifications" aria-label="Notifications">
|
<a href="#" class="nav-link" data-bs-toggle="dropdown" hx-get="{% url 'extras:notifications' %}" hx-target="next .notifications" aria-label="Notifications">
|
||||||
{% if notifications %}
|
{% include 'inc/notification_bell.html' %}
|
||||||
<span class="text-primary"><i class="mdi mdi-bell-badge"></i></span>
|
|
||||||
{% else %}
|
|
||||||
<i class="mdi mdi-bell"></i>
|
|
||||||
{% endif %}
|
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-menu dropdown-menu-end dropdown-menu-arrow notifications"></div>
|
<div class="dropdown-menu dropdown-menu-end dropdown-menu-arrow notifications"></div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user