diff --git a/core/templates/core/base/header.jinja b/core/templates/core/base/header.jinja index 87453d22..cb47a47c 100644 --- a/core/templates/core/base/header.jinja +++ b/core/templates/core/base/header.jinja @@ -77,22 +77,22 @@
- {% set notification_count = user.notifications.filter(viewed=False).count() %} + {% set notifications = user.notifications.filter(viewed=False).order_by("-date")|list %} - {% if notification_count > 0 %} + {%- if notifications|length > 0 -%} - {% if notification_count < 100 %} - {{ notification_count }} - {% else %} -   - {% endif %} + {% if notifications|length < 100 %} + {{ notifications|length }} + {%- else -%} + 99+ + {%- endif -%} {% endif %}