remove notifcationCount variable and limit displayed notifications to 5
This commit is contained in:
parent
d2f8bc7cbf
commit
5f0ce69a47
@ -39,10 +39,10 @@
|
|||||||
<li class="nav-item dropdown pe-3 d-flex align-items-center" title="Notifications">
|
<li class="nav-item dropdown pe-3 d-flex align-items-center" title="Notifications">
|
||||||
<a href="javascript:;" class="nav-link text-body p-0 notification" id="dropdownMenuButton" data-bs-toggle="dropdown" aria-expanded="false">
|
<a href="javascript:;" class="nav-link text-body p-0 notification" id="dropdownMenuButton" data-bs-toggle="dropdown" aria-expanded="false">
|
||||||
<i class="material-symbols-rounded">notifications</i>
|
<i class="material-symbols-rounded">notifications</i>
|
||||||
<span class='badge' {% if notificationCount == 0 %} style='display:none;' {% endif %}>{{ notificationCount }}</span>
|
<span class='badge' {% if (notifications|length) == 0 %} style='display:none;' {% endif %}>{{ notifications|length }}</span>
|
||||||
</a>
|
</a>
|
||||||
<ul class="dropdown-menu dropdown-menu-end px-2 py-3 me-sm-n4" aria-labelledby="dropdownMenuButton">
|
<ul class="dropdown-menu dropdown-menu-end px-2 py-3 me-sm-n4" aria-labelledby="dropdownMenuButton">
|
||||||
{% for note in notifications %}
|
{% for note in notifications|slice(0, 4) %}
|
||||||
<li class='mb-2'>
|
<li class='mb-2'>
|
||||||
<a class='dropdown-item border-radius-md' href="javascript:openNotification('{{ note.id }}');">
|
<a class='dropdown-item border-radius-md' href="javascript:openNotification('{{ note.id }}');">
|
||||||
<div class='d-flex py-1'>
|
<div class='d-flex py-1'>
|
||||||
|
Loading…
Reference in New Issue
Block a user