From 74970400012692150dfbc6c889e3419c2f260404 Mon Sep 17 00:00:00 2001 From: Piotr Gawron <piotr.gawron@uni.lu> Date: Fri, 3 Mar 2017 17:34:34 +0100 Subject: [PATCH] not existing reminder types are not visible --- smash/web/templates/_base.html | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/smash/web/templates/_base.html b/smash/web/templates/_base.html index 8ef39d68..7b7ed010 100644 --- a/smash/web/templates/_base.html +++ b/smash/web/templates/_base.html @@ -131,16 +131,18 @@ desired effect <span class="label label-warning"> {{notifications.0}}</span> </a> <ul class="dropdown-menu"> - <li class="header"> You have {{notifications.0}} notifications </li> + <li class="header"> You have {{notifications.0}} notification(s): </li> <li> <!-- Inner Menu: contains the notifications --> <ul class="menu"> {% for notification in notifications.1 %} - <li><!-- start notification --> - <a href="{% url notification.type %}"> - <i class="fa {{notification.style}}"></i> {{ notification.title }}: {{ notification.count }} - </a> - </li> + {% if notification.count > 0 %} + <li><!-- start notification --> + <a href="{% url notification.type %}"> + <i class="fa {{notification.style}}"></i> {{ notification.title }}: {{ notification.count }} + </a> + </li> + {% endif %} {% endfor %} <!-- end notification --> </ul> -- GitLab