Hide tab menu on trophy category list if there is only one category
authorJoshua Rüsweg <josh@bastelstu.be>
Tue, 1 Aug 2017 12:00:15 +0000 (14:00 +0200)
committerJoshua Rüsweg <josh@bastelstu.be>
Tue, 1 Aug 2017 12:00:15 +0000 (14:00 +0200)
See #2315

com.woltlab.wcf/templates/trophyList.tpl

index 7b50e064454404ea69ee74462a41820c2e75514e..f97ab713ecee8f51d879b31b9450b08c29bb6c1a 100644 (file)
 {/hascontent}
 
 <div class="section">
-       <nav class="tabMenu">
-               <ul>
-                       {foreach from=$categories item='menuCategory'}
-                               <li{if $menuCategory->categoryID == $category->categoryID} class="active"{/if}><a href="{$menuCategory->getLink()}">{$menuCategory->getTitle()}</a></li>
-                       {/foreach}
-               </ul>
-       </nav>
+       {if $categories|count > 1}
+               <nav class="tabMenu">
+                       <ul>
+                               {foreach from=$categories item='menuCategory'}
+                                       <li{if $menuCategory->categoryID == $category->categoryID} class="active"{/if}><a href="{$menuCategory->getLink()}">{$menuCategory->getTitle()}</a></li>
+                               {/foreach}
+                       </ul>
+               </nav>
+       {/if}
 
        <div class="tabMenuContent">
                {if $objects|count}