Hide users online data list if no members are online
authorMatthias Schmidt <gravatronics@live.com>
Fri, 22 Aug 2014 17:28:30 +0000 (19:28 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Fri, 22 Aug 2014 17:28:30 +0000 (19:28 +0200)
com.woltlab.wcf/templates/usersOnlineInfoBox.tpl

index 5e6be88120874e70fb53dfb73ae2e8075beef0d0..f4176913be2e0ce27820e4d3efd5e52e3fe5464b 100644 (file)
@@ -9,11 +9,13 @@
                                <p>{lang}wcf.user.usersOnline.detail{/lang}{if $usersOnlineShowRecord && USERS_ONLINE_RECORD} - {lang}wcf.user.usersOnline.record{/lang}{/if}</p>
                        </div>
                        
-                       <ul class="dataList">
-                               {foreach from=$usersOnlineList->getObjects() item=userOnline}
-                                       <li><a href="{link controller='User' object=$userOnline->getDecoratedObject()}{/link}" class="userLink" data-user-id="{@$userOnline->userID}">{@$userOnline->getFormattedUsername()}</a></li>
-                               {/foreach}
-                       </ul>
+                       {if $usersOnlineList|count}
+                               <ul class="dataList">
+                                       {foreach from=$usersOnlineList->getObjects() item=userOnline}
+                                               <li><a href="{link controller='User' object=$userOnline->getDecoratedObject()}{/link}" class="userLink" data-user-id="{@$userOnline->userID}">{@$userOnline->getFormattedUsername()}</a></li>
+                                       {/foreach}
+                               </ul>
+                       {/if}
                        
                        {if USERS_ONLINE_ENABLE_LEGEND && $usersOnlineList->getUsersOnlineMarkings()|count}
                                <div class="usersOnlineLegend">