Fix nested hascontent
authorMatthias Schmidt <gravatronics@live.com>
Fri, 8 Apr 2016 06:54:55 +0000 (08:54 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Fri, 8 Apr 2016 06:54:55 +0000 (08:54 +0200)
wcfsetup/install/files/acp/templates/cronjobLogList.tpl
wcfsetup/install/files/acp/templates/packageUpdateServerList.tpl
wcfsetup/install/files/acp/templates/userRankList.tpl

index 797a72f48ddaaf8adefc18687af7308babb436de..58062279f34781ed053c65d6d983654b6eb75d8c 100644 (file)
@@ -39,7 +39,7 @@
        </div>
 {/hascontent}
 
-{hascontent}
+{if $objects|count}
        <div class="section tabularBox">
                <table class="table">
                        <thead>
                        </thead>
                        
                        <tbody>
-                               {content}
-                                       {foreach from=$objects item=cronjobLog}
-                                               <tr>
-                                                       <td class="columnID columnCronjobID">{@$cronjobLog->cronjobID}</td>
-                                                       <td class="columnTitle columnClassName">{$cronjobLog->className}</td>
-                                                       <td class="columnText columnDescription">{$cronjobLog->description|language}</td>
-                                                       <td class="columnDate columnExecTime">{if $cronjobLog->execTime}{@$cronjobLog->execTime|time}{/if}</td>
-                                                       
-                                                       <td class="columnText columnSuccess">
-                                                               {if $cronjobLog->success}
-                                                                       <span class="badge green">{lang}wcf.acp.cronjob.log.success{/lang}</span>
-                                                               {elseif $cronjobLog->error}
-                                                                       <a class="badge red jsTooltip jsCronjobError" title="{lang}wcf.acp.cronjob.log.error.showDetails{/lang}">{lang}wcf.acp.cronjob.log.error{/lang}</a>
-                                                                       <span style="display: none">{@$cronjobLog->error}</span>
-                                                               {/if}
-                                                       </td>
-                                                       
-                                                       {event name='columns'}
-                                               </tr>
-                                       {/foreach}
-                               {/content}
+                               {foreach from=$objects item=cronjobLog}
+                                       <tr>
+                                               <td class="columnID columnCronjobID">{@$cronjobLog->cronjobID}</td>
+                                               <td class="columnTitle columnClassName">{$cronjobLog->className}</td>
+                                               <td class="columnText columnDescription">{$cronjobLog->description|language}</td>
+                                               <td class="columnDate columnExecTime">{if $cronjobLog->execTime}{@$cronjobLog->execTime|time}{/if}</td>
+                                               
+                                               <td class="columnText columnSuccess">
+                                                       {if $cronjobLog->success}
+                                                               <span class="badge green">{lang}wcf.acp.cronjob.log.success{/lang}</span>
+                                                       {elseif $cronjobLog->error}
+                                                               <a class="badge red jsTooltip jsCronjobError" title="{lang}wcf.acp.cronjob.log.error.showDetails{/lang}">{lang}wcf.acp.cronjob.log.error{/lang}</a>
+                                                               <span style="display: none">{@$cronjobLog->error}</span>
+                                                       {/if}
+                                               </td>
+                                               
+                                               {event name='columns'}
+                                       </tr>
+                               {/foreach}
                        </tbody>
                </table>
        </div>
                        </nav>
                {/hascontent}
        </footer>
-{hascontentelse}
+{else}
        <p class="info">{lang}wcf.acp.cronjob.log.noEntries{/lang}</p>
-{/hascontent}
+{/if}
 
 {include file='footer'}
index e9874879e29b12232d1434aacffb539022541dfc..5fae99af7324606f7993903bb086a8b368800aab 100644 (file)
@@ -29,7 +29,7 @@
        </div>
 {/hascontent}
 
-{hascontent}
+{if $objects|count}
        <div class="section tabularBox">
                <table class="table">
                        <thead>
                        </thead>
                        
                        <tbody>
-                               {content}
-                                       {foreach from=$objects item=updateServer}
-                                               <tr class="jsUpdateServerRow">
-                                                       <td class="columnIcon">
-                                                               <span class="icon icon16 fa-{if !$updateServer->isDisabled}check-{/if}square-o jsToggleButton jsTooltip pointer" title="{lang}wcf.global.button.{if !$updateServer->isDisabled}disable{else}enable{/if}{/lang}" data-object-id="{@$updateServer->packageUpdateServerID}"></span>
-                                                               <a href="{link controller='PackageUpdateServerEdit' id=$updateServer->packageUpdateServerID}{/link}" title="{lang}wcf.global.button.edit{/lang}" class="jsTooltip"><span class="icon icon16 fa-pencil"></span></a>
-                                                               <span class="icon icon16 fa-times jsDeleteButton jsTooltip pointer" title="{lang}wcf.global.button.delete{/lang}" data-object-id="{@$updateServer->packageUpdateServerID}" data-confirm-message="{lang}wcf.acp.updateServer.delete.sure{/lang}"></span>
-                                                               
-                                                               {event name='itemButtons'}
-                                                       </td>
-                                                       <td class="columnID">{@$updateServer->packageUpdateServerID}</td>
-                                                       <td class="columnText columnTitle"><a href="{link controller='PackageUpdateServerEdit' id=$updateServer->packageUpdateServerID}{/link}" title="{lang}wcf.acp.updateServer.edit{/lang}">{$updateServer->serverURL}</a></td>
-                                                       <td class="columnDigits">{#$updateServer->packages}</td>
-                                                       <td class="columnStatus"><span class="badge{if $updateServer->status == 'online'} green{else} red{/if}">{@$updateServer->status}</span></td>
-                                                       <td class="columnText" title="{@$updateServer->errorMessage}">{@$updateServer->errorMessage|truncate:"30"}</td>
-                                                       <td class="columnDate">{if $updateServer->lastUpdateTime}{@$updateServer->lastUpdateTime|time}{/if}</td>
+                               {foreach from=$objects item=updateServer}
+                                       <tr class="jsUpdateServerRow">
+                                               <td class="columnIcon">
+                                                       <span class="icon icon16 fa-{if !$updateServer->isDisabled}check-{/if}square-o jsToggleButton jsTooltip pointer" title="{lang}wcf.global.button.{if !$updateServer->isDisabled}disable{else}enable{/if}{/lang}" data-object-id="{@$updateServer->packageUpdateServerID}"></span>
+                                                       <a href="{link controller='PackageUpdateServerEdit' id=$updateServer->packageUpdateServerID}{/link}" title="{lang}wcf.global.button.edit{/lang}" class="jsTooltip"><span class="icon icon16 fa-pencil"></span></a>
+                                                       <span class="icon icon16 fa-times jsDeleteButton jsTooltip pointer" title="{lang}wcf.global.button.delete{/lang}" data-object-id="{@$updateServer->packageUpdateServerID}" data-confirm-message="{lang}wcf.acp.updateServer.delete.sure{/lang}"></span>
                                                        
-                                                       {event name='columns'}
-                                               </tr>
-                                       {/foreach}
-                               {/content}
+                                                       {event name='itemButtons'}
+                                               </td>
+                                               <td class="columnID">{@$updateServer->packageUpdateServerID}</td>
+                                               <td class="columnText columnTitle"><a href="{link controller='PackageUpdateServerEdit' id=$updateServer->packageUpdateServerID}{/link}" title="{lang}wcf.acp.updateServer.edit{/lang}">{$updateServer->serverURL}</a></td>
+                                               <td class="columnDigits">{#$updateServer->packages}</td>
+                                               <td class="columnStatus"><span class="badge{if $updateServer->status == 'online'} green{else} red{/if}">{@$updateServer->status}</span></td>
+                                               <td class="columnText" title="{@$updateServer->errorMessage}">{@$updateServer->errorMessage|truncate:"30"}</td>
+                                               <td class="columnDate">{if $updateServer->lastUpdateTime}{@$updateServer->lastUpdateTime|time}{/if}</td>
+                                               
+                                               {event name='columns'}
+                                       </tr>
+                               {/foreach}
                        </tbody>
                </table>
                
@@ -87,8 +85,8 @@
                        </ul>
                </nav>
        </footer>
-{hascontentelse}
+{else}
        <p class="info">{lang}wcf.global.noItems{/lang}</p>
-{/hascontent}
+{/if}
 
 {include file='footer'}
index f26e56b657365eed0815c086e44fb602a77a86b1..123896538e83c84e150fd047852b55001e5a3456 100644 (file)
@@ -28,7 +28,7 @@
        </div>
 {/hascontent}
 
-{hascontent}
+{if $objects|count}
        <div class="section tabularBox">
                <table class="table">
                        <thead>
                        </thead>
                        
                        <tbody>
-                               {content}
-                                       {foreach from=$objects item=userRank}
-                                               <tr class="jsUserRankRow">
-                                                       <td class="columnIcon">
-                                                               <a href="{link controller='UserRankEdit' id=$userRank->rankID}{/link}" title="{lang}wcf.global.button.edit{/lang}" class="jsTooltip"><span class="icon icon16 fa-pencil"></span></a>
-                                                               <span class="icon icon16 fa-times jsDeleteButton jsTooltip pointer" title="{lang}wcf.global.button.delete{/lang}" data-object-id="{@$userRank->rankID}" data-confirm-message="{lang}wcf.acp.user.rank.delete.sure{/lang}"></span>
-                                                               
-                                                               {event name='rowButtons'}
-                                                       </td>
-                                                       <td class="columnID columnRankID">{@$userRank->rankID}</td>
-                                                       <td class="columnTitle columnRankTitle"><a href="{link controller='UserRankEdit' id=$userRank->rankID}{/link}" title="{lang}wcf.acp.user.rank.edit{/lang}" class="badge label{if $userRank->cssClassName} {$userRank->cssClassName}{/if}">{$userRank->rankTitle|language}</a></td>
-                                                       <td class="columnText columnRankImage">{if $userRank->rankImage}{@$userRank->getImage()}{/if}</td>
-                                                       <td class="columnText columnGroupID">{$userRank->groupName|language}</td>
-                                                       <td class="columnText columnRequiredGender">{if $userRank->requiredGender}{if $userRank->requiredGender == 1}{lang}wcf.user.gender.male{/lang}{else}{lang}wcf.user.gender.female{/lang}{/if}{/if}</td>
-                                                       <td class="columnDigits columnRequiredPoints">{#$userRank->requiredPoints}</td>
+                               {foreach from=$objects item=userRank}
+                                       <tr class="jsUserRankRow">
+                                               <td class="columnIcon">
+                                                       <a href="{link controller='UserRankEdit' id=$userRank->rankID}{/link}" title="{lang}wcf.global.button.edit{/lang}" class="jsTooltip"><span class="icon icon16 fa-pencil"></span></a>
+                                                       <span class="icon icon16 fa-times jsDeleteButton jsTooltip pointer" title="{lang}wcf.global.button.delete{/lang}" data-object-id="{@$userRank->rankID}" data-confirm-message="{lang}wcf.acp.user.rank.delete.sure{/lang}"></span>
                                                        
-                                                       {event name='columns'}
-                                               </tr>
-                                       {/foreach}
-                               {/content}
+                                                       {event name='rowButtons'}
+                                               </td>
+                                               <td class="columnID columnRankID">{@$userRank->rankID}</td>
+                                               <td class="columnTitle columnRankTitle"><a href="{link controller='UserRankEdit' id=$userRank->rankID}{/link}" title="{lang}wcf.acp.user.rank.edit{/lang}" class="badge label{if $userRank->cssClassName} {$userRank->cssClassName}{/if}">{$userRank->rankTitle|language}</a></td>
+                                               <td class="columnText columnRankImage">{if $userRank->rankImage}{@$userRank->getImage()}{/if}</td>
+                                               <td class="columnText columnGroupID">{$userRank->groupName|language}</td>
+                                               <td class="columnText columnRequiredGender">{if $userRank->requiredGender}{if $userRank->requiredGender == 1}{lang}wcf.user.gender.male{/lang}{else}{lang}wcf.user.gender.female{/lang}{/if}{/if}</td>
+                                               <td class="columnDigits columnRequiredPoints">{#$userRank->requiredPoints}</td>
+                                               
+                                               {event name='columns'}
+                                       </tr>
+                               {/foreach}
                        </tbody>
                </table>
        </div>
@@ -84,8 +82,8 @@
                        </ul>
                </nav>
        </footer>
-{hascontentelse}
+{else}
        <p class="info">{lang}wcf.global.noItems{/lang}</p>
-{/hascontent}
+{/if}
 
 {include file='footer'}