Badge in the main menu is now only shown when there is something new
authorMarcel Werk <burntime@woltlab.com>
Wed, 9 Nov 2011 18:16:05 +0000 (19:16 +0100)
committerMarcel Werk <burntime@woltlab.com>
Wed, 9 Nov 2011 18:16:05 +0000 (19:16 +0100)
com.woltlab.wcf/template/mainMenu.tpl

index d89fee18176a1df337f266bf24ca6ad495255361..34a16955789551ef94bfb5b4638c228ffb8bda16 100644 (file)
@@ -2,12 +2,12 @@
        <nav id="mainMenu" class="mainMenu">
                <ul>
                        {foreach from=$__wcf->getPageMenu()->getMenuItems('header') item=menuItem}
-                               <li{if $__wcf->getPageMenu()->getActiveMenuItem() == $menuItem->menuItem} class="activeMenuItem"{/if}><a href="{$menuItem->menuItemLink}">{lang}{$menuItem->menuItem}{/lang} <span class="badge">{#$menuItem->getProcessor()->getNotifications()}</span></a> 
+                               <li{if $__wcf->getPageMenu()->getActiveMenuItem() == $menuItem->menuItem} class="activeMenuItem"{/if}><a href="{$menuItem->menuItemLink}">{lang}{$menuItem->menuItem}{/lang}{if $menuItem->getProcessor()->getNotifications()} <span class="badge">{#$menuItem->getProcessor()->getNotifications()}</span>{/if}</a> 
                                
                                {if $__wcf->getPageMenu()->getMenuItems($menuItem->menuItem)|count > 0}
                                        <ul>
                                                {foreach from=$__wcf->getPageMenu()->getMenuItems($menuItem->menuItem) item=subMenuItem}
-                                                       <li><a href="{$subMenuItem->menuItemLink}">{lang}{$subMenuItem->menuItem}{/lang}</a> <span class="badge">{#$subMenuItem->getProcessor()->getNotifications()}</span></li>
+                                                       <li><a href="{$subMenuItem->menuItemLink}">{lang}{$subMenuItem->menuItem}{/lang}</a>{if $subMenuItem->getProcessor()->getNotifications()} <span class="badge">{#$subMenuItem->getProcessor()->getNotifications()}</span>{/if}</li>
                                                {/foreach}
                                        </ul>
                                {/if}