David Duarte Posted August 2, 2018 Share Posted August 2, 2018 Hello there, On V 7.6 we now have the notifications NEW string ready for translation. Before having this option available, we decided to replace the text NEW by the number of notifications, as we think this can easily attract the user attention. On this minimalistic version, if the user don't have any notification the div is not displayed, we only show what needs to be shown 😉 Feel free to use it. {if count($clientAlerts) > 0} <div class="notifications"> <li> <a href="#" data-toggle="popover" id="accountNotifications" data-placement="bottom"> {$LANG.notifications} <span class="label label-info">{count($clientAlerts)}</span> <b class="caret"></b> </a> <div id="accountNotificationsContent" class="hidden"> <ul class="client-alerts"> {foreach $clientAlerts as $alert} <li> <a href="{$alert->getLink()}"> <i class="fas fa-fw fa-{if $alert->getSeverity() == 'danger'}exclamation-circle{elseif $alert->getSeverity() == 'warning'}exclamation-triangle{elseif $alert->getSeverity() == 'info'}info-circle{else}check-circle{/if}"></i> <div class="message">{$alert->getMessage()}</div> </a> </li> {foreachelse} <li class="none"> {$LANG.notificationsnone} </li> {/foreach} </ul> </div> </li></div>{else}<br /><br />{/if} Best regards, David Duarte 3 Quote Link to comment Share on other sites More sharing options...
yggdrasil Posted August 3, 2018 Share Posted August 3, 2018 Wonderful. Thank you for sharing. Even small changes like this can make a bit difference in GUI design for users. 0 Quote Link to comment Share on other sites More sharing options...
TGK Posted August 28, 2018 Share Posted August 28, 2018 nice job its working on 7.5.2?  thanks 0 Quote Link to comment Share on other sites More sharing options...
David Duarte Posted August 28, 2018 Author Share Posted August 28, 2018 5 hours ago, TGK said: nice job its working on 7.5.2? Yes it is ;-) Thank you 0 Quote Link to comment Share on other sites More sharing options...
agarzon Posted October 4, 2018 Share Posted October 4, 2018 Good idea... I'm taking it. 😀 For anyone else willing to go straight to it: The file is in templates/{yourtheme}/header.tpl Search this line: <span class="label label-info">{lang key='notificationsnew'}</span> And replace it with: <span class="label label-info">{count($clientAlerts)}</span>  2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.