Small optimizations
authorMarcel Werk <burntime@woltlab.com>
Sat, 21 Dec 2013 13:38:48 +0000 (14:38 +0100)
committerMarcel Werk <burntime@woltlab.com>
Sat, 21 Dec 2013 13:38:48 +0000 (14:38 +0100)
com.woltlab.wcf/templates/userInformationStatistics.tpl
com.woltlab.wcf/templates/userSidebar.tpl

index b8bb82be5c48405f26f0c347d8ebe9fd3fdb6ebb..2363e03f1530f044c36b7a0df6e9cb1b140499ba 100644 (file)
@@ -1,11 +1,13 @@
 <dl class="plain inlineDataList userStats">
        {event name='statistics'}
        
-       {if MODULE_LIKE}
+       {if MODULE_LIKE && $user->likesReceived}
                <dt>{lang}wcf.like.likesReceived{/lang}</dt>
                <dd>{#$user->likesReceived}</dd>
        {/if}
        
-       <dt>{lang}wcf.user.activityPoint{/lang}</dt>
-       <dd>{#$user->activityPoints}</dd>
+       {if $user->activityPoints}
+               <dt>{lang}wcf.user.activityPoint{/lang}</dt>
+               <dd>{#$user->activityPoints}</dd>
+       {/if}
 </dl>
\ No newline at end of file
index c1942d5b2812c57d615d2f7d069a93717cf2ffa7..16fcef9ee8dd5d58e3f158a03b99ffdae0d58ce9 100644 (file)
        </div>
 </fieldset>
 
-<fieldset>
-       <legend class="invisible">{lang}wcf.user.stats{/lang}</legend>
-       
-       <dl class="plain statsDataList">
-               {event name='statistics'}
-               
-               <dt>{if $user->activityPoints}<a class="activityPointsDisplay jsTooltip" title="{lang}wcf.user.activityPoint.showDetails{/lang}" data-user-id="{@$user->userID}">{lang}wcf.user.activityPoint{/lang}</a>{else}{lang}wcf.user.activityPoint{/lang}{/if}</dt>
-               <dd>{#$user->activityPoints}</dd>
-               
-               {if MODULE_LIKE}
-                       <dt>{lang}wcf.like.likesReceived{/lang}</dt>
-                       <dd>{#$user->likesReceived}</dd>
-               {/if}
+{hascontent}
+       <fieldset>
+               <legend class="invisible">{lang}wcf.user.stats{/lang}</legend>
                
-               <dt>{lang}wcf.user.profileHits{/lang}</dt>
-               <dd{if $user->getProfileAge() > 1} title="{lang}wcf.user.profileHits.hitsPerDay{/lang}"{/if}>{#$user->profileHits}</dd>
-       </dl>
-</fieldset>
+               <dl class="plain statsDataList">
+                       {content}
+                               {event name='statistics'}
+                               
+                               {if MODULE_LIKE && $user->likesReceived}
+                                       <dt>{lang}wcf.like.likesReceived{/lang}</dt>
+                                       <dd>{#$user->likesReceived}</dd>
+                               {/if}
+                               
+                               {if $user->activityPoints}
+                                       <dt>{if $user->activityPoints}<a class="activityPointsDisplay jsTooltip" title="{lang}wcf.user.activityPoint.showDetails{/lang}" data-user-id="{@$user->userID}">{lang}wcf.user.activityPoint{/lang}</a>{else}{lang}wcf.user.activityPoint{/lang}{/if}</dt>
+                                       <dd>{#$user->activityPoints}</dd>
+                               {/if}
+                               
+                               {if $user->profileHits}
+                                       <dt>{lang}wcf.user.profileHits{/lang}</dt>
+                                       <dd{if $user->getProfileAge() > 1} title="{lang}wcf.user.profileHits.hitsPerDay{/lang}"{/if}>{#$user->profileHits}</dd>
+                               {/if}
+                       {/content}
+               </dl>
+       </fieldset>
+{/hascontent}
 
 {if $followingCount}
        <fieldset>