Hide reaction filter in user profile in only one reaction exists
authorMatthias Schmidt <gravatronics@live.com>
Sun, 8 Sep 2019 17:51:53 +0000 (19:51 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Sun, 8 Sep 2019 17:51:53 +0000 (19:51 +0200)
com.woltlab.wcf/templates/userProfileLikes.tpl

index 260c314460e17f87c755e9b8d5284a8b17b7cad3..1a51843592376c0ddf7625c06f3eeff23ffd8ea2 100644 (file)
                        <li><a class="button small" data-like-type="given">{lang}wcf.like.reactionsGiven{/lang}</a></li>
                </ul>
                
-               <ul class="buttonGroup" id="reactionType">
-                       {foreach from=$__wcf->getReactionHandler()->getReactionTypes() item=reactionType name=reactionTypeLoop}
-                               <li><a class="button small jsTooltip" data-reaction-type-id="{$reactionType->reactionTypeID}" title="{$reactionType->getTitle()}">{@$reactionType->renderIcon()} <span class="invisible">{$reactionType->getTitle()}</span></a></li>
-                       {/foreach}
-               </ul>
+               {if $__wcf->getReactionHandler()->getReactionTypes()|count > 1}
+                       <ul class="buttonGroup" id="reactionType">
+                               {foreach from=$__wcf->getReactionHandler()->getReactionTypes() item=reactionType name=reactionTypeLoop}
+                                       <li><a class="button small jsTooltip" data-reaction-type-id="{$reactionType->reactionTypeID}" title="{$reactionType->getTitle()}">{@$reactionType->renderIcon()} <span class="invisible">{$reactionType->getTitle()}</span></a></li>
+                               {/foreach}
+                       </ul>
+               {/if}
        </li>
        
        {include file='userProfileLikeItem'}