Template and API overhaul
authorAlexander Ebert <ebert@woltlab.com>
Fri, 30 Sep 2011 19:39:27 +0000 (21:39 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 30 Sep 2011 19:39:27 +0000 (21:39 +0200)
Changed MultipleLinkPage to use the new Iterator-API for DatabaseObjectLists and modified templates to use hascontent instead of lame if-conditions

15 files changed:
wcfsetup/install/files/acp/templates/acpSessionLog.tpl
wcfsetup/install/files/acp/templates/acpSessionLogList.tpl
wcfsetup/install/files/acp/templates/cronjobList.tpl
wcfsetup/install/files/acp/templates/cronjobLogList.tpl
wcfsetup/install/files/acp/templates/packageList.tpl
wcfsetup/install/files/acp/templates/updateServerList.tpl
wcfsetup/install/files/acp/templates/userGroupList.tpl
wcfsetup/install/files/lib/acp/page/ACPSessionLogListPage.class.php
wcfsetup/install/files/lib/acp/page/ACPSessionLogPage.class.php
wcfsetup/install/files/lib/acp/page/CronjobListPage.class.php
wcfsetup/install/files/lib/acp/page/CronjobLogListPage.class.php
wcfsetup/install/files/lib/acp/page/PackageListPage.class.php
wcfsetup/install/files/lib/acp/page/UpdateServerListPage.class.php
wcfsetup/install/files/lib/acp/page/UserGroupListPage.class.php
wcfsetup/install/files/lib/page/MultipleLinkPage.class.php

index 75a5547c1c9d97d5ba16b1e789a10abba4c26dd3..e594a097d021bb3aaf6768e6707ca32c3f4763f3 100644 (file)
@@ -11,7 +11,7 @@
        {pages print=true assign=pagesLinks link="index.php?page=ACPSessionLog&sessionLogID=$sessionLogID&pageNo=%d&sortField=$sortField&sortOrder=$sortOrder"|concat:SID_ARG_2ND_NOT_ENCODED}
 </div>
 
-{if $sessionAccessLogs|count}
+{hascontent}
        <div class="border boxTitle">
                <hgroup>
                        <h1>{lang}wcf.acp.sessionLog.access.list{/lang} <span class="badge" title="{lang}wcf.acp.sessionLog.access.list.count{/lang}">{#$items}</span></h1>
                        </thead>
                        
                        <tbody>
-                       {foreach from=$sessionAccessLogs item=sessionAccessLog}
-                               <tr>
-                                       <td class="columnID columnSessionAccessLogID"><p>{@$sessionAccessLog->sessionAccessLogID}</p></td>
-                                       <td class="columnURL columnIpAddress"{if $sessionAccessLog->ipAddress != $sessionLog->ipAddress} style="color: red"{/if}><p>{$sessionAccessLog->ipAddress}</p></td>
-                                       <td class="columnDate columnTime"><p>{@$sessionAccessLog->time|time}</p></td>
-                                       <td class="columnTitle columnPackageName"><p>{$sessionAccessLog->packageName}</p></td>
-                                       <td class="columnText columnClassName"><p>{$sessionAccessLog->className}</p></td>
-                                       <td class="columnURL columnRequestURI" title="{$sessionAccessLog->requestURI}"><p>{if !$sessionAccessLog->hasProtectedURI()}<a href="{$sessionAccessLog->requestURI}{@SID_ARG_2ND}">{$sessionAccessLog->requestURI|truncate:50}</a>{else}{$sessionAccessLog->requestURI|truncate:50}{/if}</p></td>
-                                       <td class="columnTextolumnRequestMethod"><p>{$sessionAccessLog->requestMethod}</p></td>
+                               {content}
+                                       {foreach from=$objects item=sessionAccessLog}
+                                               <tr>
+                                                       <td class="columnID columnSessionAccessLogID"><p>{@$sessionAccessLog->sessionAccessLogID}</p></td>
+                                                       <td class="columnURL columnIpAddress"{if $sessionAccessLog->ipAddress != $sessionLog->ipAddress} style="color: red"{/if}><p>{$sessionAccessLog->ipAddress}</p></td>
+                                                       <td class="columnDate columnTime"><p>{@$sessionAccessLog->time|time}</p></td>
+                                                       <td class="columnTitle columnPackageName"><p>{$sessionAccessLog->packageName}</p></td>
+                                                       <td class="columnText columnClassName"><p>{$sessionAccessLog->className}</p></td>
+                                                       <td class="columnURL columnRequestURI" title="{$sessionAccessLog->requestURI}"><p>{if !$sessionAccessLog->hasProtectedURI()}<a href="{$sessionAccessLog->requestURI}{@SID_ARG_2ND}">{$sessionAccessLog->requestURI|truncate:50}</a>{else}{$sessionAccessLog->requestURI|truncate:50}{/if}</p></td>
+                                                       <td class="columnTextolumnRequestMethod"><p>{$sessionAccessLog->requestMethod}</p></td>
                                        
-                                       {if $additionalColumns.$sessionAccessLog->sessionAccessLogID|isset}{@$additionalColumns.$sessionAccessLog->sessionAccessLogID}{/if}
-                               </tr>
-                       {/foreach}
+                                                       {if $additionalColumns.$sessionAccessLog->sessionAccessLogID|isset}{@$additionalColumns.$sessionAccessLog->sessionAccessLogID}{/if}
+                                               </tr>
+                                       {/foreach}
+                               {/content}
                        </tbody>
                </table>
                
index 09dbf68d98c3ee8674bff223e96d7dc258f3df39..18fb1583b5208ce9a84f480cdef0644b58582f50 100644 (file)
@@ -11,7 +11,7 @@
        {pages print=true assign=pagesLinks link="index.php?page=ACPSessionLogList&pageNo=%d&sortField=$sortField&sortOrder=$sortOrder"|concat:SID_ARG_2ND_NOT_ENCODED}
 </div>
 
-{if $sessionLogs|count}
+{hascontent}
        <div class="border boxTitle">
                <hgroup>
                        <h1>{lang}wcf.acp.sessionLog.list{/lang} <span class="badge" title="{lang}wcf.acp.sessionLog.list.count{/lang}">{#$items}</span></h1>
                                        <th class="columnText columnUserAgent{if $sortField == 'userAgent'} active{/if}"><a href="index.php?page=ACPSessionLogList&amp;pageNo={@$pageNo}&amp;sortField=userAgent&amp;sortOrder={if $sortField == 'userAgent' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{@SID_ARG_2ND}">{lang}wcf.user.userAgent{/lang}{if $sortField == 'userAgent'} <img src="{@RELATIVE_WCF_DIR}icon/sort{@$sortOrder}.svg" alt="" />{/if}</a></th>
                                        <th class="columnDate columnTime{if $sortField == 'time'} active{/if}"><a href="index.php?page=ACPSessionLogList&amp;pageNo={@$pageNo}&amp;sortField=time&amp;sortOrder={if $sortField == 'time' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{@SID_ARG_2ND}">{lang}wcf.acp.sessionLog.time{/lang}{if $sortField == 'time'} <img src="{@RELATIVE_WCF_DIR}icon/sort{@$sortOrder}.svg" alt="" />{/if}</a></th>
                                        <th class="columnDate columnLastActivityTime{if $sortField == 'lastActivityTime'} active{/if}"><a href="index.php?page=ACPSessionLogList&amp;pageNo={@$pageNo}&amp;sortField=lastActivityTime&amp;sortOrder={if $sortField == 'lastActivityTime' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{@SID_ARG_2ND}">{lang}wcf.acp.sessionLog.lastActivityTime{/lang}{if $sortField == 'lastActivityTime'} <img src="{@RELATIVE_WCF_DIR}icon/sort{@$sortOrder}.svg" alt="" />{/if}</a></th>
-                                       <th class="columnDigits columnActions{if $sortField == 'actions'} active{/if}"><a href="index.php?page=ACPSessionLogList&amp;pageNo={@$pageNo}&amp;sortField=actions&amp;sortOrder={if $sortField == 'actions' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{@SID_ARG_2ND}">{lang}wcf.acp.sessionLog.actions{/lang}{if $sortField == 'actions'} <img src="{@RELATIVE_WCF_DIR}icon/sort{@$sortOrder}.svg" alt="" />{/if}</a></th>
+                                       <th class="columnDigits columnAccesses{if $sortField == 'accesses'} active{/if}"><a href="index.php?page=ACPSessionLogList&amp;pageNo={@$pageNo}&amp;sortField=accesses&amp;sortOrder={if $sortField == 'accesses' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{@SID_ARG_2ND}">{lang}wcf.acp.sessionLog.accesses{/lang}{if $sortField == 'accesses'} <img src="{@RELATIVE_WCF_DIR}icon/sort{@$sortOrder}.svg" alt="" />{/if}</a></th>
                                        
                                        {if $additionalColumnHeads|isset}{@$additionalColumnHeads}{/if}
                                </tr>
                        </thead>
                        
                        <tbody>
-                       {foreach from=$sessionLogs item=sessionLog}
-                               <tr class="{if $sessionLog->active} activeContainer{/if}">
-                                       <td class="columnID columnSessionLogID"><p>{@$sessionLog->sessionLogID}</p></td>
-                                       <td class="columnTitle columnUsername"><p>{if $__wcf->user->userID == $sessionLog->userID}<img src="{@RELATIVE_WCF_DIR}icon/user1.svg" alt="" />{/if} <a href="index.php?page=ACPSessionLog&amp;sessionLogID={@$sessionLog->sessionLogID}{@SID_ARG_2ND}">{$sessionLog->username}</a></p></td>
-                                       <td class="columnURL columnIpAddress"><p><a href="index.php?page=ACPSessionLog&amp;sessionLogID={@$sessionLog->sessionLogID}{@SID_ARG_2ND}">{$sessionLog->ipAddress}</a>{if $sessionLog->hostname != $sessionLog->ipAddress}<br /><a href="index.php?page=ACPSessionLog&amp;sessionLogID={@$sessionLog->sessionLogID}{@SID_ARG_2ND}">{$sessionLog->hostname}</a>{/if}</p></td>
-                                       <td class="columnText columnUserAgent"><p><a href="index.php?page=ACPSessionLog&amp;sessionLogID={@$sessionLog->sessionLogID}{@SID_ARG_2ND}">{$sessionLog->userAgent}</a></p></td>
-                                       <td class="columnDate columnTime"><p>{@$sessionLog->time|time}</p></td>
-                                       <td class="columnDate columnLastActivityTime"><p>{@$sessionLog->lastActivityTime|time}</p></td>
-                                       <td class="columnDigits columnActions"><p>{#$sessionLog->actions}</p></td>
+                               {content}
+                                       {foreach from=$objects item=sessionLog}
+                                               <tr class="{if $sessionLog->active} activeContainer{/if}">
+                                                       <td class="columnID columnSessionLogID"><p>{@$sessionLog->sessionLogID}</p></td>
+                                                       <td class="columnTitle columnUsername"><p>{if $__wcf->user->userID == $sessionLog->userID}<img src="{@RELATIVE_WCF_DIR}icon/user1.svg" alt="" />{/if} <a href="index.php?page=ACPSessionLog&amp;sessionLogID={@$sessionLog->sessionLogID}{@SID_ARG_2ND}">{$sessionLog->username}</a></p></td>
+                                                       <td class="columnURL columnIpAddress"><p><a href="index.php?page=ACPSessionLog&amp;sessionLogID={@$sessionLog->sessionLogID}{@SID_ARG_2ND}">{$sessionLog->ipAddress}</a>{if $sessionLog->hostname != $sessionLog->ipAddress}<br /><a href="index.php?page=ACPSessionLog&amp;sessionLogID={@$sessionLog->sessionLogID}{@SID_ARG_2ND}">{$sessionLog->hostname}</a>{/if}</p></td>
+                                                       <td class="columnText columnUserAgent"><p><a href="index.php?page=ACPSessionLog&amp;sessionLogID={@$sessionLog->sessionLogID}{@SID_ARG_2ND}">{$sessionLog->userAgent}</a></p></td>
+                                                       <td class="columnDate columnTime"><p>{@$sessionLog->time|time}</p></td>
+                                                       <td class="columnDate columnLastActivityTime"><p>{@$sessionLog->lastActivityTime|time}</p></td>
+                                                       <td class="columnDigits columnAccesses"><p>{#$sessionLog->accesses}</p></td>
                                        
-                                       {if $additionalColumns.$sessionLog->sessionLogID|isset}{@$additionalColumns.$sessionLog->sessionLogID}{/if}
-                               </tr>
-                       {/foreach}
+                                                       {if $additionalColumns.$sessionLog->sessionLogID|isset}{@$additionalColumns.$sessionLog->sessionLogID}{/if}
+                                               </tr>
+                                       {/foreach}
+                               {/content}
                        </tbody>
                </table>
                
@@ -54,6 +56,6 @@
        <div class="contentFooter">
                {@$pagesLinks}
        </div>
-{/if}
+{/hascontent}
 
 {include file='footer'}
index a01e53012c46fbc7f1eeadfcc0abba9ac1253c7f..4fea907636c0bf516073b773ffad6927739dc3f5 100644 (file)
        {/if}
 </div>
 
-{if !$items}
-       <div class="border content">
-               <div class="container-1">
-                       <p class="warning">{lang}wcf.acp.cronjob.noneAvailable{/lang}</p>
-               </div>
-       </div>
-{else}
+{hascontent}
        <div class="border boxTitle">
                <hgroup>
                        <h1>{lang}wcf.acp.cronjob.list{/lang} <span class="badge" title="{lang}wcf.acp.cronjob.list.count{/lang}">{#$items}</span></h1>
                        </thead>
                        
                        <tbody>
-                       {foreach from=$cronjobs item=cronjob}
-                               <tr class="cronjobRow">
-                                       <td class="columnIcon">
-                                               {if $__wcf->session->getPermission('admin.system.cronjob.canEditCronjob')}
-                                                       <img src="{@RELATIVE_WCF_DIR}icon/run1.svg" alt="" title="{lang}wcf.acp.cronjob.execute{/lang}" data-objectID="{@$cronjob->cronjobID}" class="executeButton balloonTooltip" />
-                                               {else}
-                                                       <img src="{@RELATIVE_WCF_DIR}icon/run1D.svg" alt="" title="{lang}wcf.acp.cronjob.execute{/lang}" />
-                                               {/if}
+                               {content}
+                                       {foreach from=$objects item=cronjob}
+                                               <tr class="cronjobRow">
+                                                       <td class="columnIcon">
+                                                               {if $__wcf->session->getPermission('admin.system.cronjob.canEditCronjob')}
+                                                                       <img src="{@RELATIVE_WCF_DIR}icon/run1.svg" alt="" title="{lang}wcf.acp.cronjob.execute{/lang}" data-objectID="{@$cronjob->cronjobID}" class="executeButton balloonTooltip" />
+                                                               {else}
+                                                                       <img src="{@RELATIVE_WCF_DIR}icon/run1D.svg" alt="" title="{lang}wcf.acp.cronjob.execute{/lang}" />
+                                                               {/if}
                                                
-                                               {if $cronjob->canBeDisabled()}
-                                                       <img src="{@RELATIVE_WCF_DIR}icon/{if $cronjob->active}enabled{else}disabled{/if}1.svg" alt="" data-objectID="{@$cronjob->cronjobID}" data-disableMessage="{lang}wcf.global.button.disable{/lang}" data-enableMessage="{lang}wcf.global.button.enable{/lang}" title="{lang}wcf.global.button.{if $cronjob->active}disable{else}enable{/if}{/lang}" class="toggleButton balloonTooltip" />
-                                               {else}
-                                                       {if $cronjob->active}
-                                                               <img src="{@RELATIVE_WCF_DIR}icon/enabled1D.svg" alt="" title="{lang}wcf.global.button.disable{/lang}" />
-                                                       {else}
-                                                               <img src="{@RELATIVE_WCF_DIR}icon/disabled1D.svg" alt="" title="{lang}wcf.global.button.enable{/lang}" />
-                                                       {/if}
-                                               {/if}
+                                                               {if $cronjob->canBeDisabled()}
+                                                                       <img src="{@RELATIVE_WCF_DIR}icon/{if $cronjob->active}enabled{else}disabled{/if}1.svg" alt="" data-objectID="{@$cronjob->cronjobID}" data-disableMessage="{lang}wcf.global.button.disable{/lang}" data-enableMessage="{lang}wcf.global.button.enable{/lang}" title="{lang}wcf.global.button.{if $cronjob->active}disable{else}enable{/if}{/lang}" class="toggleButton balloonTooltip" />
+                                                               {else}
+                                                                       {if $cronjob->active}
+                                                                               <img src="{@RELATIVE_WCF_DIR}icon/enabled1D.svg" alt="" title="{lang}wcf.global.button.disable{/lang}" />
+                                                                       {else}
+                                                                               <img src="{@RELATIVE_WCF_DIR}icon/disabled1D.svg" alt="" title="{lang}wcf.global.button.enable{/lang}" />
+                                                                       {/if}
+                                                               {/if}
                                                
-                                               {if $cronjob->isEditable()}
-                                                       <a href="index.php?form=CronjobEdit&amp;cronjobID={@$cronjob->cronjobID}{@SID_ARG_2ND}"><img src="{@RELATIVE_WCF_DIR}icon/edit1.svg" alt="" title="{lang}wcf.global.button.edit{/lang}" class="balloonTooltip" /></a>
-                                               {else}
-                                                       <img src="{@RELATIVE_WCF_DIR}icon/edit1D.svg" alt="" title="{lang}wcf.global.button.edit{/lang}" />
-                                               {/if}
-                                               {if $cronjob->isDeletable()}
-                                                       <img src="{@RELATIVE_WCF_DIR}icon/delete1.svg" alt="" data-objectID="{@$cronjob->cronjobID}" data-confirmMessage="{lang}wcf.acp.cronjob.delete.sure{/lang}" title="{lang}wcf.global.button.delete{/lang}" class="deleteButton balloonTooltip" />
-                                               {else}
-                                                       <img src="{@RELATIVE_WCF_DIR}icon/delete1D.svg" alt="" title="{lang}wcf.global.button.delete{/lang}" />
-                                               {/if}
-                                               {if $additionalButtons[$cronjob->cronjobID]|isset}{@$additionalButtons[$cronjob->cronjobID]}{/if}
-                                       </td>
-                                       <td class="columnID"><p>{@$cronjob->cronjobID}</p></td>
-                                       <td class="columnDate columnStartMinute"><p>{$cronjob->startMinute|truncate:30:' ...'}</p></td>
-                                       <td class="columnDate columnStartHour"><p>{$cronjob->startHour|truncate:30:' ...'}</p></td>
-                                       <td class="columnDate columnStartDom"><p>{$cronjob->startDom|truncate:30:' ...'}</p></td>
-                                       <td class="columnDate columnStartMonth"><p>{$cronjob->startMonth|truncate:30:' ...'}</p></td>
-                                       <td class="columnDate columnStartDow"><p>{$cronjob->startDow|truncate:30:' ...'}</p></td>
-                                       <td class="columnText columnDescription" title="{$cronjob->description}">
-                                               {if $cronjob->isEditable()}
-                                                       <p><a title="{lang}wcf.acp.cronjob.edit{/lang}" href="index.php?form=CronjobEdit&amp;cronjobID={@$cronjob->cronjobID}{@SID_ARG_2ND}">{$cronjob->description|truncate:50:" ..."}</a></p>
-                                               {else}
-                                                       <p>{$cronjob->description|truncate:50:' ...'}</p>
-                                               {/if}
-                                       </td>
-                                       <td class="columnDate columnNextExec">
-                                               {if $cronjob->active && $cronjob->nextExec != 1}
-                                                       <p>{@$cronjob->nextExec|plainTime}</p>
-                                               {/if}
-                                       </td>
+                                                               {if $cronjob->isEditable()}
+                                                                       <a href="index.php?form=CronjobEdit&amp;cronjobID={@$cronjob->cronjobID}{@SID_ARG_2ND}"><img src="{@RELATIVE_WCF_DIR}icon/edit1.svg" alt="" title="{lang}wcf.global.button.edit{/lang}" class="balloonTooltip" /></a>
+                                                               {else}
+                                                                       <img src="{@RELATIVE_WCF_DIR}icon/edit1D.svg" alt="" title="{lang}wcf.global.button.edit{/lang}" />
+                                                               {/if}
+                                                               {if $cronjob->isDeletable()}
+                                                                       <img src="{@RELATIVE_WCF_DIR}icon/delete1.svg" alt="" data-objectID="{@$cronjob->cronjobID}" data-confirmMessage="{lang}wcf.acp.cronjob.delete.sure{/lang}" title="{lang}wcf.global.button.delete{/lang}" class="deleteButton balloonTooltip" />
+                                                               {else}
+                                                                       <img src="{@RELATIVE_WCF_DIR}icon/delete1D.svg" alt="" title="{lang}wcf.global.button.delete{/lang}" />
+                                                               {/if}
+                                                               {if $additionalButtons[$cronjob->cronjobID]|isset}{@$additionalButtons[$cronjob->cronjobID]}{/if}
+                                                       </td>
+                                                       <td class="columnID"><p>{@$cronjob->cronjobID}</p></td>
+                                                       <td class="columnDate columnStartMinute"><p>{$cronjob->startMinute|truncate:30:' ...'}</p></td>
+                                                       <td class="columnDate columnStartHour"><p>{$cronjob->startHour|truncate:30:' ...'}</p></td>
+                                                       <td class="columnDate columnStartDom"><p>{$cronjob->startDom|truncate:30:' ...'}</p></td>
+                                                       <td class="columnDate columnStartMonth"><p>{$cronjob->startMonth|truncate:30:' ...'}</p></td>
+                                                       <td class="columnDate columnStartDow"><p>{$cronjob->startDow|truncate:30:' ...'}</p></td>
+                                                       <td class="columnText columnDescription" title="{$cronjob->description}">
+                                                               {if $cronjob->isEditable()}
+                                                                       <p><a title="{lang}wcf.acp.cronjob.edit{/lang}" href="index.php?form=CronjobEdit&amp;cronjobID={@$cronjob->cronjobID}{@SID_ARG_2ND}">{$cronjob->description|truncate:50:" ..."}</a></p>
+                                                               {else}
+                                                                       <p>{$cronjob->description|truncate:50:' ...'}</p>
+                                                               {/if}
+                                                       </td>
+                                                       <td class="columnDate columnNextExec">
+                                                               {if $cronjob->active && $cronjob->nextExec != 1}
+                                                                       <p>{@$cronjob->nextExec|plainTime}</p>
+                                                               {/if}
+                                                       </td>
                                        
-                                       {if $additionalColumns[$cronjob->cronjobID]|isset}{@$additionalColumns[$cronjob->cronjobID]}{/if}
-                               </tr>
-                       {/foreach}
+                                                       {if $additionalColumns[$cronjob->cronjobID]|isset}{@$additionalColumns[$cronjob->cronjobID]}{/if}
+                                               </tr>
+                                       {/foreach}
+                               {/content}
                        </tbody>
                </table>
                
                        </nav>
                {/if}
        </div>
-{/if}
+{hascontentelse}
+       <div class="border content">
+               <div class="container-1">
+                       <p class="warning">{lang}wcf.acp.cronjob.noneAvailable{/lang}</p>
+               </div>
+       </div>
+{/hascontent}
 
 {include file='footer'}
index a702f773185943e90859712ef9e6f436509823a9..3c45e9584193ee4cfb7b35ea8ac5504a57b1ce77 100644 (file)
                                </thead>
                                
                                <tbody>
-                               {content}
-                                       {foreach from=$cronjobLogs item=cronjobLog}
-                                               <tr>
-                                                       <td class="columnID columnCronjobID"><p>{@$cronjobLog->cronjobID}</p></td>
-                                                       <td class="columnTitle columnClassName"><p>{$cronjobLog->className}</p></td>
-                                                       <td class="columnText columnDescription"><p>{$cronjobLog->description}</p></td>
-                                                       {if $cronjobLog->success}
-                                                               <td class="columnDate columnExecTime"><p>{@$cronjobLog->execTime|time} {lang}wcf.acp.cronjob.log.success{/lang}</p></td>
-                                                       {elseif $cronjobLog->error}
-                                                               <td class="columnDate columnExecTime">
-                                                                       <p>{@$cronjobLog->execTime|time} {lang}wcf.acp.cronjob.log.error{/lang}<br />
-                                                                       {@$cronjobLog->error}</p>
-                                                               </td>
-                                                       {else}
-                                                               <td class="columnDate columnExecTime"></td>
-                                                       {/if}
+                                       {content}
+                                               {foreach from=$objects item=cronjobLog}
+                                                       <tr>
+                                                               <td class="columnID columnCronjobID"><p>{@$cronjobLog->cronjobID}</p></td>
+                                                               <td class="columnTitle columnClassName"><p>{$cronjobLog->className}</p></td>
+                                                               <td class="columnText columnDescription"><p>{$cronjobLog->description}</p></td>
+                                                               {if $cronjobLog->success}
+                                                                       <td class="columnDate columnExecTime"><p>{@$cronjobLog->execTime|time} {lang}wcf.acp.cronjob.log.success{/lang}</p></td>
+                                                               {elseif $cronjobLog->error}
+                                                                       <td class="columnDate columnExecTime">
+                                                                               <p>{@$cronjobLog->execTime|time} {lang}wcf.acp.cronjob.log.error{/lang}<br />
+                                                                               {@$cronjobLog->error}</p>
+                                                                       </td>
+                                                               {else}
+                                                                       <td class="columnDate columnExecTime"></td>
+                                                               {/if}
                                                        
-                                                       {if $cronjobLog->additionalColumns|isset}{@$cronjobLog->additionalColumns}{/if}
-                                               </tr>
-                                       {/foreach}
-                               {/content}
+                                                               {if $cronjobLog->additionalColumns|isset}{@$cronjobLog->additionalColumns}{/if}
+                                                       </tr>
+                                               {/foreach}
+                                       {/content}
                                </tbody>
                        </table>
                        
index 3a7e27e8f7f9285cf68d161aeb6248a167baac5c..975e53f60a8eb24dbd853330a37a09b54556028b 100644 (file)
@@ -31,7 +31,7 @@
        {/if}
 </div>
 
-{if $packages|count > 0}
+{if $objects|count > 0}
        <div class="border boxTitle">
                <hgroup>
                        <h1><a href="#">{lang}wcf.acp.package.list{/lang} <span class="badge" title="{lang}wcf.acp.package.list.count{/lang}">{#$items}</span></a></h1>
@@ -51,7 +51,7 @@
                        </thead>
                        
                        <tbody>
-                               {foreach from=$packages item=$package}
+                               {foreach from=$objects item=$package}
                                        <tr class="packageRow">
                                                <td class="columnIcon">
                                                        {if $__wcf->session->getPermission('admin.system.package.canUpdatePackage')}
index c062784afee69180490c2cc65702c576a79a2817..0c109d5525f4673cd470db0d84115e6e0728ea35 100644 (file)
        </nav>
 </div>
 
-{if !$items}
-       <div class="border content">
-               <p class="warning">{lang}wcf.acp.updateServer.list.noneAvailable{/lang}</p>
-       </div>
-{else}
+{hascontent}
        <div class="border boxTitle">
                <hgroup>
                        <h1>{lang}wcf.acp.updateServer.list{/lang} <span class="badge" title="{lang}wcf.acp.updateServer.list.count{/lang}">{#$items}</span></h1>
                        </thead>
                        
                        <tbody>
-                               {foreach from=$updateServers item=updateServer}
-                                       <tr class="updateServerRow">
-                                               <td class="columnIcon">
-                                                       <img src="{@RELATIVE_WCF_DIR}icon/{if !$updateServer->disabled}enabled{else}disabled{/if}1.svg" alt="" title="{lang}wcf.global.button.{if !$updateServer->disabled}disable{else}enable{/if}{/lang}" data-objectID="{@$updateServer->packageUpdateServerID}" data-disableMessage="{lang}wcf.global.button.disable{/lang}" data-enableMessage="{lang}wcf.global.button.enable{/lang}" class="toggleButton balloonTooltip" />
-                                                       <a href="index.php?form=UpdateServerEdit&amp;packageUpdateServerID={@$updateServer->packageUpdateServerID}{@SID_ARG_2ND}"><img src="{@RELATIVE_WCF_DIR}icon/edit1.svg" alt="" title="{lang}wcf.global.button.edit{/lang}" class="balloonTooltip" /></a>
-                                                       <img src="{@RELATIVE_WCF_DIR}icon/delete1.svg" alt="" title="{lang}wcf.global.button.delete{/lang}" data-objectID="{@$updateServer->packageUpdateServerID}" data-confirmMessage="{lang}wcf.acp.updateServer.delete.sure{/lang}" class="deleteButton balloonTooltip" />
+                               {content}
+                                       {foreach from=$objects item=updateServer}
+                                               <tr class="updateServerRow">
+                                                       <td class="columnIcon">
+                                                               <img src="{@RELATIVE_WCF_DIR}icon/{if !$updateServer->disabled}enabled{else}disabled{/if}1.svg" alt="" title="{lang}wcf.global.button.{if !$updateServer->disabled}disable{else}enable{/if}{/lang}" data-objectID="{@$updateServer->packageUpdateServerID}" data-disableMessage="{lang}wcf.global.button.disable{/lang}" data-enableMessage="{lang}wcf.global.button.enable{/lang}" class="toggleButton balloonTooltip" />
+                                                               <a href="index.php?form=UpdateServerEdit&amp;packageUpdateServerID={@$updateServer->packageUpdateServerID}{@SID_ARG_2ND}"><img src="{@RELATIVE_WCF_DIR}icon/edit1.svg" alt="" title="{lang}wcf.global.button.edit{/lang}" class="balloonTooltip" /></a>
+                                                               <img src="{@RELATIVE_WCF_DIR}icon/delete1.svg" alt="" title="{lang}wcf.global.button.delete{/lang}" data-objectID="{@$updateServer->packageUpdateServerID}" data-confirmMessage="{lang}wcf.acp.updateServer.delete.sure{/lang}" class="deleteButton balloonTooltip" />
                                                        
-                                                       {if $additionalButtons[$updateServer->packageUpdateServerID]|isset}{@$additionalButtons[$updateServer->packageUpdateServerID]}{/if}
-                                               </td>
-                                               <td class="columnID"><p>{@$updateServer->packageUpdateServerID}</p></td>
-                                               <td class="columnText columnTitle"><p><a href="index.php?form=UpdateServerEdit&amp;packageUpdateServerID={@$updateServer->packageUpdateServerID}{@SID_ARG_2ND}" title="{lang}wcf.global.button.edit{/lang}">{$updateServer->serverURL}</a></p></td>
-                                               <td class="columnDigits"><p>{#$updateServer->packages}</p></td>
-                                               <td class="columnStatus"><p class="badge{if $updateServer->status == 'online'} badgeSuccess{else} badgeError{/if}">{@$updateServer->status}</p></td>
-                                               <td class="columnText"><p title="{@$updateServer->errorMessage}">{@$updateServer->errorMessage|truncate:"30"}</p></td>
-                                               <td class="columnDate"><p>{if $updateServer->lastUpdateTime}{@$updateServer->lastUpdateTime|time}{/if}</p></td>
+                                                               {if $additionalButtons[$updateServer->packageUpdateServerID]|isset}{@$additionalButtons[$updateServer->packageUpdateServerID]}{/if}
+                                                       </td>
+                                                       <td class="columnID"><p>{@$updateServer->packageUpdateServerID}</p></td>
+                                                       <td class="columnText columnTitle"><p><a href="index.php?form=UpdateServerEdit&amp;packageUpdateServerID={@$updateServer->packageUpdateServerID}{@SID_ARG_2ND}" title="{lang}wcf.global.button.edit{/lang}">{$updateServer->serverURL}</a></p></td>
+                                                       <td class="columnDigits"><p>{#$updateServer->packages}</p></td>
+                                                       <td class="columnStatus"><p class="badge{if $updateServer->status == 'online'} badgeSuccess{else} badgeError{/if}">{@$updateServer->status}</p></td>
+                                                       <td class="columnText"><p title="{@$updateServer->errorMessage}">{@$updateServer->errorMessage|truncate:"30"}</p></td>
+                                                       <td class="columnDate"><p>{if $updateServer->lastUpdateTime}{@$updateServer->lastUpdateTime|time}{/if}</p></td>
                                                
-                                               {if $additionalColumns[$updateServer->packageUpdateServerID]|isset}{@$additionalColumns[$updateServer->packageUpdateServerID]}{/if}
-                                       </tr>
-                               {/foreach}
+                                                       {if $additionalColumns[$updateServer->packageUpdateServerID]|isset}{@$additionalColumns[$updateServer->packageUpdateServerID]}{/if}
+                                               </tr>
+                                       {/foreach}
+                               {/content}
                        </tbody>
                </table>
                
                        <ul><li><a href="index.php?form=UpdateServerAdd{@SID_ARG_2ND}" title="{lang}wcf.acp.updateServer.add{/lang}"><img src="{@RELATIVE_WCF_DIR}icon/add1.svg" alt="" /> <span>{lang}wcf.acp.updateServer.add{/lang}</span></a></li></ul>
                </nav>
        </div>
-{/if}
+{hascontentelse}
+       <div class="border content">
+               <p class="warning">{lang}wcf.acp.updateServer.list.noneAvailable{/lang}</p>
+       </div>
+{/hascontent}
 
 {include file='footer'}
index 8533495ec77befa354bea279f6a003fc3ddabab8..595ebcbbc27f7f0d299411ba75828d89581ec347 100644 (file)
@@ -17,7 +17,7 @@
        </nav>
 </div>
 
-{if $groups|count}
+{hascontent}
        <div class="border boxTitle">
                <hgroup>
                        <h1>{lang}wcf.acp.group.list{/lang} <span class="badge" title="{lang}wcf.acp.group.list.count{/lang}">{#$items}</span></h1>
                        </thead>
                        
                        <tbody>
-                               {foreach from=$groups item=group}
-                                       <tr id="groupContainer{@$group->groupID}">
-                                               <td class="columnIcon">
-                                                       {if $group->isEditable()}
-                                                               <a href="index.php?form=UserGroupEdit&amp;groupID={@$group->groupID}{@SID_ARG_2ND}"><img src="{@RELATIVE_WCF_DIR}icon/edit1.svg" alt="" title="{lang}wcf.global.button.edit{/lang}" class="balloonTooltip" /></a>
-                                                       {else}
-                                                               <img src="{@RELATIVE_WCF_DIR}icon/edit1D.svg" alt="" title="{lang}wcf.acp.group.edit{/lang}" />
-                                                       {/if}
-                                                       {if $group->isDeletable()}
-                                                               <img src="{@RELATIVE_WCF_DIR}icon/delete1.svg" alt="" data-objectID="{@$group->groupID}" data-confirmMessage="{lang}wcf.acp.group.delete.sure{/lang}" title="{lang}wcf.global.button.delete{/lang}" class="deleteButton balloonTooltip" />
-                                                       {else}
-                                                               <img src="{@RELATIVE_WCF_DIR}icon/delete1D.svg" alt="" title="{lang}wcf.global.button.delete{/lang}" />
-                                                       {/if}
+                               {content}
+                                       {foreach from=$objects item=group}
+                                               <tr id="groupContainer{@$group->groupID}">
+                                                       <td class="columnIcon">
+                                                               {if $group->isEditable()}
+                                                                       <a href="index.php?form=UserGroupEdit&amp;groupID={@$group->groupID}{@SID_ARG_2ND}"><img src="{@RELATIVE_WCF_DIR}icon/edit1.svg" alt="" title="{lang}wcf.global.button.edit{/lang}" class="balloonTooltip" /></a>
+                                                               {else}
+                                                                       <img src="{@RELATIVE_WCF_DIR}icon/edit1D.svg" alt="" title="{lang}wcf.acp.group.edit{/lang}" />
+                                                               {/if}
+                                                               {if $group->isDeletable()}
+                                                                       <img src="{@RELATIVE_WCF_DIR}icon/delete1.svg" alt="" data-objectID="{@$group->groupID}" data-confirmMessage="{lang}wcf.acp.group.delete.sure{/lang}" title="{lang}wcf.global.button.delete{/lang}" class="deleteButton balloonTooltip" />
+                                                               {else}
+                                                                       <img src="{@RELATIVE_WCF_DIR}icon/delete1D.svg" alt="" title="{lang}wcf.global.button.delete{/lang}" />
+                                                               {/if}
                                                        
-                                                       {if $additionalButtons[$group->groupID]|isset}{@$additionalButtons[$group->groupID]}{/if}
-                                               </td>
-                                               <td class="columnID columnGroupID"><p>{@$group->groupID}</p></td>
-                                               <td class="columnTitle columnGroupName">{if $group->isEditable()}<p><a title="{lang}wcf.acp.group.edit{/lang}" href="index.php?form=UserGroupEdit&amp;groupID={@$group->groupID}{@SID_ARG_2ND}">{lang}{$group->groupName}{/lang}</a>{else}{lang}{$group->groupName}{/lang}</p>{/if}</td>
-                                               <td class="columnDigits columnMembers"><p><a title="{lang}wcf.acp.group.showMembers{/lang}" href="index.php?form=UserSearch&amp;groupID={@$group->groupID}{@SID_ARG_2ND}">{#$group->members}</p></a></td>
+                                                               {if $additionalButtons[$group->groupID]|isset}{@$additionalButtons[$group->groupID]}{/if}
+                                                       </td>
+                                                       <td class="columnID columnGroupID"><p>{@$group->groupID}</p></td>
+                                                       <td class="columnTitle columnGroupName">{if $group->isEditable()}<p><a title="{lang}wcf.acp.group.edit{/lang}" href="index.php?form=UserGroupEdit&amp;groupID={@$group->groupID}{@SID_ARG_2ND}">{lang}{$group->groupName}{/lang}</a>{else}{lang}{$group->groupName}{/lang}</p>{/if}</td>
+                                                       <td class="columnDigits columnMembers"><p><a title="{lang}wcf.acp.group.showMembers{/lang}" href="index.php?form=UserSearch&amp;groupID={@$group->groupID}{@SID_ARG_2ND}">{#$group->members}</p></a></td>
                                                
-                                               {if $additionalColumns[$group->groupID]|isset}{@$additionalColumns[$group->groupID]}{/if}
-                                       </tr>
-                               {/foreach}
+                                                       {if $additionalColumns[$group->groupID]|isset}{@$additionalColumns[$group->groupID]}{/if}
+                                               </tr>
+                                       {/foreach}
+                               {/content}
                        </tbody>
                </table>
                
        </div>
-{/if}
-
-<div class="contentFooter">
-       {@$pagesLinks}
-       <nav class="largeButtons">
-               <ul>
-                       <li><a href="index.php?form=UserGroupAdd{@SID_ARG_2ND}" title="{lang}wcf.acp.group.add{/lang}"><img src="{@RELATIVE_WCF_DIR}icon/add1.svg" alt="" /> <span>{lang}wcf.acp.group.add{/lang}</span></a></li>
-                       {if $additionalLargeButtons|isset}{@$additionalLargeButtons}{/if}
-               </ul>
-       </nav>
-</div>
+       
+       <div class="contentFooter">
+               {@$pagesLinks}
+               <nav class="largeButtons">
+                       <ul>
+                               <li><a href="index.php?form=UserGroupAdd{@SID_ARG_2ND}" title="{lang}wcf.acp.group.add{/lang}"><img src="{@RELATIVE_WCF_DIR}icon/add1.svg" alt="" /> <span>{lang}wcf.acp.group.add{/lang}</span></a></li>
+                               {if $additionalLargeButtons|isset}{@$additionalLargeButtons}{/if}
+                       </ul>
+               </nav>
+       </div>
+{/hascontent}
 
 {include file='footer'}
index fd0178189be03839e4d6fe20c5205c41f5461390..60203337c2526f59e807adea0880db70b44bbdca 100755 (executable)
@@ -38,7 +38,7 @@ class ACPSessionLogListPage extends SortablePage {
        /**
         * @see wcf\page\SortablePage::$validSortFields
         */
-       public $validSortFields = array('sessionLogID', 'username', 'ipAddress', 'userAgent', 'time', 'lastActivityTime', 'actions');
+       public $validSortFields = array('sessionLogID', 'username', 'ipAddress', 'userAgent', 'time', 'lastActivityTime', 'accesses');
        
        /**
         * @see wcf\page\MultipleLinkPage::$objectListClassName
@@ -49,22 +49,11 @@ class ACPSessionLogListPage extends SortablePage {
         * @see wcf\page\MultipleLinkPage::readObjects()
         */
        public function readObjects() {
-               $this->sqlOrderBy = (($this->sortField != 'actions' && $this->sortField != 'username') ? 'acp_session_log.' : '').$this->sortField." ".$this->sortOrder;
+               $this->sqlOrderBy = (($this->sortField != 'accesses' && $this->sortField != 'username') ? 'acp_session_log.' : '').$this->sortField." ".$this->sortOrder;
                
                parent::readObjects();
        }
        
-       /**
-        * @see wcf\page\IPage::assignVariables()
-        */
-       public function assignVariables() {
-               parent::assignVariables();
-               
-               WCF::getTPL()->assign(array(
-                       'sessionLogs' => $this->objectList->getObjects()
-               ));
-       }
-       
        /**
         * @see wcf\page\IPage::show()
         */
index 9e668ce9b483a457feb5f478aeef6958dd93c618..a2ad57d0bd3bb6edf38a10bfc9b59e04aa732131 100755 (executable)
@@ -93,7 +93,6 @@ class ACPSessionLogPage extends SortablePage {
                parent::assignVariables();
                
                WCF::getTPL()->assign(array(
-                       'sessionAccessLogs' => $this->objectList->getObjects(),
                        'sessionLogID' => $this->sessionLogID,
                        'sessionLog' => $this->sessionLog
                ));
index e99f7dd9554d260b8e0c63973a5ca0958663916e..aadff1c727eaff14a84a33590128592e816b9c62 100755 (executable)
@@ -51,17 +51,6 @@ class CronjobListPage extends SortablePage {
                $this->sqlOrderBy = "cronjob.".$this->sortField." ".$this->sortOrder;
        }
        
-       /**
-        * @see wcf\page\IPage::assignVariables()
-        */
-       public function assignVariables() {
-               parent::assignVariables();
-               
-               WCF::getTPL()->assign(array(
-                       'cronjobs' => $this->objectList->getObjects()
-               ));
-       }
-       
        /**
         * @see wcf\page\IPage::show()
         */
index 7da37780a9200cb8344fac80ba7268c1807d1f47..16a7f413a41cef7f92e5d7aa39616d149b638f9f 100755 (executable)
@@ -71,17 +71,6 @@ class CronjobLogListPage extends SortablePage {
                parent::readObjects();
        }
        
-       /**
-        * @see wcf\page\IPage::assignVariables()
-        */
-       public function assignVariables() {
-               parent::assignVariables();
-               
-               WCF::getTPL()->assign(array(
-                       'cronjobLogs' => $this->objectList->getObjects()
-               ));
-       }
-       
        /**
         * @see wcf\page\IPage::show()
         */
index e0463ab0b25fc52f5a0ca058918b1cceb5ff358b..466c14d6f032345bc797752d67ecd67fb206293d 100755 (executable)
@@ -60,15 +60,6 @@ class PackageListPage extends SortablePage {
                parent::readObjects();
        }
        
-       /**
-        * @see wcf\page\IPage::assignVariables()
-        */
-       public function assignVariables() {
-               parent::assignVariables();
-               
-               WCF::getTPL()->assign('packages', $this->objectList->getObjects());
-       }
-       
        /**
         * @see wcf\page\IPage::show()
         */
index 250b5b45a3e61d85115a62428a1ae719ad20fae5..0b766057ef70156f1a696bb0d952adda1b019c4c 100755 (executable)
@@ -71,7 +71,6 @@ class UpdateServerListPage extends SortablePage {
                parent::assignVariables();
                
                WCF::getTPL()->assign(array(
-                       'updateServers' => $this->objectList->getObjects(),
                        'deletedPackageUpdateServerID' => $this->deletedPackageUpdateServerID
                ));
        }
index d91b79d9d202b840da029f16c7f03a8733bdf8a0..c6fae86d9616bc49ffea003ff1fb8aa7c632e103 100755 (executable)
@@ -83,7 +83,6 @@ class UserGroupListPage extends SortablePage {
                parent::assignVariables();
                
                WCF::getTPL()->assign(array(
-                       'groups' => $this->objectList->getObjects(),
                        'deletedGroups' => $this->deletedGroups
                ));
        }
index 088f4c11b536085e10fc5f3217762456636ec80a..4cb015d98f8707c77438fc9169d1bae9ab00919b 100644 (file)
@@ -65,12 +65,6 @@ abstract class MultipleLinkPage extends AbstractPage {
         */     
        public $objectListClassName = '';
        
-       /**
-        * list of DatabaseObject objects
-        * @var array<wcf\data\DatabaseObject>
-        */     
-       public $objects = array();
-       
        /**
         * @see wcf\data\DatabaseObjectList::$sqlLimit
         */     
@@ -140,8 +134,6 @@ abstract class MultipleLinkPage extends AbstractPage {
                $this->objectList->sqlOffset = $this->sqlOffset;
                $this->objectList->sqlOrderBy = $this->sqlOrderBy;
                $this->objectList->readObjects();
-               
-               $this->objects = $this->objectList->getObjects();
        }
        
        /**
@@ -193,7 +185,7 @@ abstract class MultipleLinkPage extends AbstractPage {
                        'itemsPerPage' => $this->itemsPerPage,
                        'startIndex' => $this->startIndex,
                        'endIndex' => $this->endIndex,
-                       'objects' => $this->objects
+                       'objects' => $this->objectList
                ));
        }
 }