Renamed templates and classes
authorLuzifr <szekely@woltlab.com>
Thu, 13 Oct 2011 17:23:59 +0000 (19:23 +0200)
committerLuzifr <szekely@woltlab.com>
Thu, 13 Oct 2011 17:23:59 +0000 (19:23 +0200)
*detailedPackageList* -> *packageListDetailed*; Also changed length of
inputs on one page.

wcfsetup/install/files/acp/templates/detailedPackageList.tpl [deleted file]
wcfsetup/install/files/acp/templates/packageList.tpl
wcfsetup/install/files/acp/templates/packageListDetailed.tpl [new file with mode: 0644]
wcfsetup/install/files/acp/templates/updateServerAdd.tpl
wcfsetup/install/files/lib/acp/page/DetailedPackageListPage.class.php [deleted file]
wcfsetup/install/files/lib/acp/page/PackageListDetailedPage.class.php [new file with mode: 0644]

diff --git a/wcfsetup/install/files/acp/templates/detailedPackageList.tpl b/wcfsetup/install/files/acp/templates/detailedPackageList.tpl
deleted file mode 100644 (file)
index 74c99dc..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-{include file='header'}
-
-<script type="text/javascript">
-       //<![CDATA[
-       $(function() {
-               WCF.Language.add('wcf.acp.package.view.button.uninstall.sure', '{lang}wcf.acp.package.view.button.uninstall.sure{/lang}');
-               
-               new WCF.ACP.PackageUninstallation($('.packageRow .uninstallButton'));
-       });
-       //]]>
-</script>
-
-<header class="mainHeading">
-       <img src="{@RELATIVE_WCF_DIR}icon/packageStandalone1.svg" alt="" />
-       <hgroup>
-               <h1>{lang}wcf.acp.package.list{/lang}</h1>
-       </hgroup>
-</header>
-
-<div class="contentHeader">
-       {pages print=true assign=pagesLinks controller='DetailedPackageList' link="pageNo=%d&sortField=$sortField&sortOrder=$sortOrder"}
-
-       {if $__wcf->session->getPermission('admin.system.package.canInstallPackage') || $additionalLargeButtons|isset}
-               <nav class="largeButtons">
-                       <ul>
-                               {if $__wcf->session->getPermission('admin.system.package.canInstallPackage')}<li><a href="{link controller='PackageStartInstall'}action=install{/link}" title="{lang}wcf.acp.package.startInstall{/lang}"><img src="{@RELATIVE_WCF_DIR}icon/add1.svg" alt="" /> <span>{lang}wcf.acp.package.startInstall{/lang}</span></a></li>{/if}
-                               {if $additionalLargeButtons|isset}{@$additionalLargeButtons}{/if}
-                       </ul>
-               </nav>
-       {/if}
-</div>
-
-{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>
-               </hgroup>
-               
-               <table>
-                       <thead>
-                               <tr>
-                                       <th colspan="2" class="columnID{if $sortField == 'packageID'} active{/if}"><a href="{link controller='DetailedPackageList'}pageNo={@$pageNo}&sortField=packageID&sortOrder={if $sortField == 'packageID' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.acp.package.list.id{/lang}{if $sortField == 'packageID'} <img src="{@RELATIVE_WCF_DIR}icon/sort{@$sortOrder}.svg" alt="" />{/if}</a></th>
-                                       <th colspan="2" class="columnTitle{if $sortField == 'packageName'} active{/if}"><a href="{link controller='DetailedPackageList'}pageNo={@$pageNo}&sortField=packageName&sortOrder={if $sortField == 'packageName' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.acp.package.list.name{/lang}{if $sortField == 'packageName'} <img src="{@RELATIVE_WCF_DIR}icon/sort{@$sortOrder}.svg" alt="" />{/if}</a></th>
-                                       <th class="columnText{if $sortField == 'author'} active{/if}"><a href="{link controller='DetailedPackageList'}pageNo={@$pageNo}&sortField=author&sortOrder={if $sortField == 'author' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.acp.package.list.author{/lang}{if $sortField == 'author'} <img src="{@RELATIVE_WCF_DIR}icon/sort{@$sortOrder}.svg" alt="" />{/if}</a></th>
-                                       <th class="columnText{if $sortField == 'packageVersion'}active{/if}"><a href="{link controller='DetailedPackageList'}pageNo={@$pageNo}&sortField=packageVersion&sortOrder={if $sortField == 'packageVersion' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.acp.package.list.version{/lang}{if $sortField == 'packageVersion'} <img src="{@RELATIVE_WCF_DIR}icon/sort{@$sortOrder}.svg" alt="" />{/if}</a></th>
-                                       <th class="columnDate{if $sortField == 'updateDate'} active{/if}"><a href="{link controller='DetailedPackageList'}pageNo={@$pageNo}&sortField=updateDate&sortOrder={if $sortField == 'updateDate' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.acp.package.updateDate{/lang}{if $sortField == 'updateDate'} <img src="{@RELATIVE_WCF_DIR}icon/sort{@$sortOrder}.svg" alt="" />{/if}</a></th>
-                                       
-                                       {if $additionalHeadColumns|isset}{@$additionalHeadColumns}{/if}
-                               </tr>
-                       </thead>
-                       
-                       <tbody>
-                               {foreach from=$objects item=$package}
-                                       <tr class="packageRow">
-                                               <td class="columnIcon">
-                                                       {if $__wcf->session->getPermission('admin.system.package.canUpdatePackage')}
-                                                               <a href="{link controller='PackageStartInstall' id=$package->packageID}action=update{/link}"><img src="{@RELATIVE_WCF_DIR}icon/update1.svg" alt="" title="{lang}wcf.acp.package.view.button.update{/lang}" class="balloonTooltip" /></a>
-                                                       {else}
-                                                               <img src="{@RELATIVE_WCF_DIR}icon/update1D.svg" alt="" title="{lang}wcf.acp.package.view.button.update{/lang}" />
-                                                       {/if}
-                                                       {if $__wcf->session->getPermission('admin.system.package.canUninstallPackage') && $package->package != 'com.woltlab.wcf' && $package->packageID != PACKAGE_ID}
-                                                               <img src="{@RELATIVE_WCF_DIR}icon/delete1.svg" alt="" title="{lang}wcf.acp.package.view.button.uninstall{/lang}" class="uninstallButton balloonTooltip" data-objectID="{@$package->packageID}" />
-                                                       {else}
-                                                               <img src="{@RELATIVE_WCF_DIR}icon/delete1D.svg" alt="" title="{lang}wcf.acp.package.view.button.uninstall{/lang}" />
-                                                       {/if}
-                                                       
-                                                       {if $additionalButtons[$package->packageID]|isset}{@$additionalButtons[$package->packageID]}{/if}
-                                               </td>
-                                               <td class="columnID"><p>{@$package->packageID}</p></td>
-                                               <td class="columnIcon">
-                                                       {if $package->standalone}
-                                                               <img src="{@RELATIVE_WCF_DIR}icon/packageStandalone1.svg" alt="" title="{lang}wcf.acp.package.list.standalone{/lang}" class="balloonTooltip" />
-                                                       {elseif $package->isPlugin()}
-                                                               <img src="{@RELATIVE_WCF_DIR}icon/packagePlugin1.svg" alt="" title="{lang}wcf.acp.package.list.plugin{/lang}" class="balloonTooltip" />
-                                                       {else}
-                                                               <img src="{@RELATIVE_WCF_DIR}icon/package1.svg" alt="" title="{lang}wcf.acp.package.list.other{/lang}" class="balloonTooltip" />
-                                                       {/if}
-                                               </td>
-                                               <td id="packageName{@$package->packageID}" class="columnTitle" title="{$package->packageDescription}">
-                                                       <a href="{link controller='PackageView' id=$package->packageID}{/link}"><span>{$package->getName()}{if $package->instanceNo > 1 && $package->instanceName == ''} (#{#$package->instanceNo}){/if}</span></a>
-                                               </td>
-                                               <td class="columnText><p>{if $package->authorURL}<a href="{@RELATIVE_WCF_DIR}acp/dereferrer.php?url={$package->authorURL|rawurlencode}" class="externalURL">{$package->author}</a>{else}{$package->author}{/if}</p></td>
-                                               <td class="columnText"><p>{$package->packageVersion}</p></td>
-                                               <td class="columnDate"><p>{@$package->updateDate|time}</p></td>
-                                               
-                                               {if $additionalColumns[$package->packageID]|isset}{@$additionalColumns[$package->packageID]}{/if}
-                                       </tr>
-                               {/foreach}
-                       </tbody>
-               </table>
-               
-       </div>
-{/if}
-
-<div class="contentFooter">
-       {@$pagesLinks}
-       
-       {if $__wcf->session->getPermission('admin.system.package.canInstallPackage') || $additionalLargeButtons|isset}
-               <nav class="largeButtons">
-                       <ul>
-                               {if $__wcf->session->getPermission('admin.system.package.canInstallPackage')}<li><a href="{link controller='PackageStartInstall'}action=install{/link}" title="{lang}wcf.acp.package.startInstall{/lang}"><img src="{@RELATIVE_WCF_DIR}icon/add1.svg" alt="" /> <span>{lang}wcf.acp.package.startInstall{/lang}</span></a></li>{/if}
-                               {if $additionalLargeButtons|isset}{@$additionalLargeButtons}{/if}
-                       </ul>
-               </nav>
-       {/if}
-</div>
-
-{include file='footer'}
index 489887f456a29e7c342a900257e5e98e9dcfb6a3..a6d21b796655137378fa116645a815ab1976ade8 100644 (file)
 <div class="contentFooter">
        <nav class="largeButtons">
                <ul>
-                       <li><a href="{link controller='DetailedPackageList'}{/link}" title="{lang}wcf.acp.menu.link.package.list{/lang}"><img src="{@RELATIVE_WCF_DIR}icon/package1.svg" alt="" /> <span>detailed package list</span></a></li>
+                       <li><a href="{link controller='PackageListDetailed'}{/link}" title="{lang}wcf.acp.menu.link.package.list{/lang}"><img src="{@RELATIVE_WCF_DIR}icon/package1.svg" alt="" /> <span>detailed package list</span></a></li>
                </ul>
        </nav>
 </div>
diff --git a/wcfsetup/install/files/acp/templates/packageListDetailed.tpl b/wcfsetup/install/files/acp/templates/packageListDetailed.tpl
new file mode 100644 (file)
index 0000000..75bae74
--- /dev/null
@@ -0,0 +1,108 @@
+{include file='header'}
+
+<script type="text/javascript">
+       //<![CDATA[
+       $(function() {
+               WCF.Language.add('wcf.acp.package.view.button.uninstall.sure', '{lang}wcf.acp.package.view.button.uninstall.sure{/lang}');
+               
+               new WCF.ACP.PackageUninstallation($('.packageRow .uninstallButton'));
+       });
+       //]]>
+</script>
+
+<header class="mainHeading">
+       <img src="{@RELATIVE_WCF_DIR}icon/packageStandalone1.svg" alt="" />
+       <hgroup>
+               <h1>{lang}wcf.acp.package.list{/lang}</h1>
+       </hgroup>
+</header>
+
+<div class="contentHeader">
+       {pages print=true assign=pagesLinks controller='PackageListDetailed' link="pageNo=%d&sortField=$sortField&sortOrder=$sortOrder"}
+
+       {if $__wcf->session->getPermission('admin.system.package.canInstallPackage') || $additionalLargeButtons|isset}
+               <nav class="largeButtons">
+                       <ul>
+                               {if $__wcf->session->getPermission('admin.system.package.canInstallPackage')}<li><a href="{link controller='PackageStartInstall'}action=install{/link}" title="{lang}wcf.acp.package.startInstall{/lang}"><img src="{@RELATIVE_WCF_DIR}icon/add1.svg" alt="" /> <span>{lang}wcf.acp.package.startInstall{/lang}</span></a></li>{/if}
+                               {if $additionalLargeButtons|isset}{@$additionalLargeButtons}{/if}
+                       </ul>
+               </nav>
+       {/if}
+</div>
+
+{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>
+               </hgroup>
+               
+               <table>
+                       <thead>
+                               <tr>
+                                       <th colspan="2" class="columnID{if $sortField == 'packageID'} active{/if}"><a href="{link controller='PackageListDetailed'}pageNo={@$pageNo}&sortField=packageID&sortOrder={if $sortField == 'packageID' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.acp.package.list.id{/lang}{if $sortField == 'packageID'} <img src="{@RELATIVE_WCF_DIR}icon/sort{@$sortOrder}.svg" alt="" />{/if}</a></th>
+                                       <th colspan="2" class="columnTitle{if $sortField == 'packageName'} active{/if}"><a href="{link controller='PackageListDetailed'}pageNo={@$pageNo}&sortField=packageName&sortOrder={if $sortField == 'packageName' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.acp.package.list.name{/lang}{if $sortField == 'packageName'} <img src="{@RELATIVE_WCF_DIR}icon/sort{@$sortOrder}.svg" alt="" />{/if}</a></th>
+                                       <th class="columnText{if $sortField == 'author'} active{/if}"><a href="{link controller='PackageListDetailed'}pageNo={@$pageNo}&sortField=author&sortOrder={if $sortField == 'author' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.acp.package.list.author{/lang}{if $sortField == 'author'} <img src="{@RELATIVE_WCF_DIR}icon/sort{@$sortOrder}.svg" alt="" />{/if}</a></th>
+                                       <th class="columnText{if $sortField == 'packageVersion'}active{/if}"><a href="{link controller='PackageListDetailed'}pageNo={@$pageNo}&sortField=packageVersion&sortOrder={if $sortField == 'packageVersion' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.acp.package.list.version{/lang}{if $sortField == 'packageVersion'} <img src="{@RELATIVE_WCF_DIR}icon/sort{@$sortOrder}.svg" alt="" />{/if}</a></th>
+                                       <th class="columnDate{if $sortField == 'updateDate'} active{/if}"><a href="{link controller='PackageListDetailed'}pageNo={@$pageNo}&sortField=updateDate&sortOrder={if $sortField == 'updateDate' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.acp.package.updateDate{/lang}{if $sortField == 'updateDate'} <img src="{@RELATIVE_WCF_DIR}icon/sort{@$sortOrder}.svg" alt="" />{/if}</a></th>
+                                       
+                                       {if $additionalHeadColumns|isset}{@$additionalHeadColumns}{/if}
+                               </tr>
+                       </thead>
+                       
+                       <tbody>
+                               {foreach from=$objects item=$package}
+                                       <tr class="packageRow">
+                                               <td class="columnIcon">
+                                                       {if $__wcf->session->getPermission('admin.system.package.canUpdatePackage')}
+                                                               <a href="{link controller='PackageStartInstall' id=$package->packageID}action=update{/link}"><img src="{@RELATIVE_WCF_DIR}icon/update1.svg" alt="" title="{lang}wcf.acp.package.view.button.update{/lang}" class="balloonTooltip" /></a>
+                                                       {else}
+                                                               <img src="{@RELATIVE_WCF_DIR}icon/update1D.svg" alt="" title="{lang}wcf.acp.package.view.button.update{/lang}" />
+                                                       {/if}
+                                                       {if $__wcf->session->getPermission('admin.system.package.canUninstallPackage') && $package->package != 'com.woltlab.wcf' && $package->packageID != PACKAGE_ID}
+                                                               <img src="{@RELATIVE_WCF_DIR}icon/delete1.svg" alt="" title="{lang}wcf.acp.package.view.button.uninstall{/lang}" class="uninstallButton balloonTooltip" data-objectID="{@$package->packageID}" />
+                                                       {else}
+                                                               <img src="{@RELATIVE_WCF_DIR}icon/delete1D.svg" alt="" title="{lang}wcf.acp.package.view.button.uninstall{/lang}" />
+                                                       {/if}
+                                                       
+                                                       {if $additionalButtons[$package->packageID]|isset}{@$additionalButtons[$package->packageID]}{/if}
+                                               </td>
+                                               <td class="columnID"><p>{@$package->packageID}</p></td>
+                                               <td class="columnIcon">
+                                                       {if $package->standalone}
+                                                               <img src="{@RELATIVE_WCF_DIR}icon/packageStandalone1.svg" alt="" title="{lang}wcf.acp.package.list.standalone{/lang}" class="balloonTooltip" />
+                                                       {elseif $package->isPlugin()}
+                                                               <img src="{@RELATIVE_WCF_DIR}icon/packagePlugin1.svg" alt="" title="{lang}wcf.acp.package.list.plugin{/lang}" class="balloonTooltip" />
+                                                       {else}
+                                                               <img src="{@RELATIVE_WCF_DIR}icon/package1.svg" alt="" title="{lang}wcf.acp.package.list.other{/lang}" class="balloonTooltip" />
+                                                       {/if}
+                                               </td>
+                                               <td id="packageName{@$package->packageID}" class="columnTitle" title="{$package->packageDescription}">
+                                                       <a href="{link controller='PackageView' id=$package->packageID}{/link}"><span>{$package->getName()}{if $package->instanceNo > 1 && $package->instanceName == ''} (#{#$package->instanceNo}){/if}</span></a>
+                                               </td>
+                                               <td class="columnText><p>{if $package->authorURL}<a href="{@RELATIVE_WCF_DIR}acp/dereferrer.php?url={$package->authorURL|rawurlencode}" class="externalURL">{$package->author}</a>{else}{$package->author}{/if}</p></td>
+                                               <td class="columnText"><p>{$package->packageVersion}</p></td>
+                                               <td class="columnDate"><p>{@$package->updateDate|time}</p></td>
+                                               
+                                               {if $additionalColumns[$package->packageID]|isset}{@$additionalColumns[$package->packageID]}{/if}
+                                       </tr>
+                               {/foreach}
+                       </tbody>
+               </table>
+               
+       </div>
+{/if}
+
+<div class="contentFooter">
+       {@$pagesLinks}
+       
+       {if $__wcf->session->getPermission('admin.system.package.canInstallPackage') || $additionalLargeButtons|isset}
+               <nav class="largeButtons">
+                       <ul>
+                               {if $__wcf->session->getPermission('admin.system.package.canInstallPackage')}<li><a href="{link controller='PackageStartInstall'}action=install{/link}" title="{lang}wcf.acp.package.startInstall{/lang}"><img src="{@RELATIVE_WCF_DIR}icon/add1.svg" alt="" /> <span>{lang}wcf.acp.package.startInstall{/lang}</span></a></li>{/if}
+                               {if $additionalLargeButtons|isset}{@$additionalLargeButtons}{/if}
+                       </ul>
+               </nav>
+       {/if}
+</div>
+
+{include file='footer'}
index 14cc152a4ae3b6179ae36acafea5902643c8836e..cbb30162e0ae9903d4d7ec8a1be525b28afc7755 100644 (file)
@@ -34,7 +34,7 @@
                        <dl{if $errorField == 'serverURL'} class="formError"{/if}>
                                <dt><label for="serverURL">{lang}wcf.acp.updateServer.serverURL{/lang}</label></dt>
                                <dd>
-                                       <input type="text" id="serverURL" name="serverURL" value="{$serverURL}" class="medium" />
+                                       <input type="text" id="serverURL" name="serverURL" value="{$serverURL}" class="long" />
                                        {if $errorField == 'serverURL'}
                                                <small class="innerError">
                                                        {if $errorType == 'empty'}
@@ -50,7 +50,7 @@
                        <dl>
                                <dt><label for="loginUsername">{lang}wcf.acp.updateServer.loginUsername{/lang}</label></dt>
                                <dd>
-                                       <input type="text" id="loginUsername" name="loginUsername" value="{$loginUsername}" class="long" />
+                                       <input type="text" id="loginUsername" name="loginUsername" value="{$loginUsername}" class="medium" />
                                        <small>{lang}wcf.acp.updateServer.loginUsername.description{/lang}</small>
                                </dd>
                        </dl>
@@ -58,7 +58,7 @@
                        <dl>
                                <dt><label for="loginPassword">{lang}wcf.acp.updateServer.loginPassword{/lang}</label></dt>
                                <dd>
-                                       <input type="password" id="loginPassword" name="loginPassword" value="{$loginPassword}" class="long" />
+                                       <input type="password" id="loginPassword" name="loginPassword" value="{$loginPassword}" class="medium" />
                                        <small><p>{lang}wcf.acp.updateServer.loginPassword.description{/lang}</p></small>
                                </dd>
                        </dl>
diff --git a/wcfsetup/install/files/lib/acp/page/DetailedPackageListPage.class.php b/wcfsetup/install/files/lib/acp/page/DetailedPackageListPage.class.php
deleted file mode 100644 (file)
index c196d40..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-<?php
-namespace wcf\acp\page;
-use wcf\system\menu\acp\ACPMenu;
-use wcf\data\package\PackageList;
-use wcf\page\SortablePage;
-use wcf\system\WCF;
-
-/**
- * Shows a list of all installed packages.
- * 
- * @author     Marcel Werk
- * @copyright  2001-2011 WoltLab GmbH
- * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package    com.woltlab.wcf
- * @subpackage acp.page
- * @category   Community Framework
- */
-class DetailedPackageListPage extends SortablePage {
-       /**
-        * @see wcf\page\AbstractPage::$neededPermissions
-        */
-       public $neededPermissions = array('admin.system.package.canUpdatePackage', 'admin.system.package.canUninstallPackage');
-       
-       /**
-        * @see wcf\page\MultipleLinkPage::$itemsPerPage
-        */
-       public $itemsPerPage = 50;
-       
-       /**
-        * @see wcf\page\SortablePage::$defaultSortField
-        */
-       public $defaultSortField = 'packageType';
-       
-       /**
-        * @see wcf\page\SortablePage::$defaultSortOrder
-        */
-       public $defaultSortOrder = 'DESC';
-       
-       /**
-        * @see wcf\page\SortablePage::$validSortFields
-        */
-       public $validSortFields = array('packageID', 'package', 'packageDir', 'packageName', 'instanceNo', 'packageDescription', 'packageVersion', 'packageDate', 'packageURL', 'parentPackageID', 'isUnique', 'standalone', 'author', 'authorURL', 'installDate', 'updateDate');
-       
-       /**
-        * @see wcf\page\MultipleLinkPage::$objectListClassName
-        */     
-       public $objectListClassName = 'wcf\data\package\PackageList';
-       
-       /**
-        * @see wcf\page\MultipleLinkPage::readObjects()
-        */     
-       protected function readObjects() {
-               $this->sqlOrderBy = 'package.'.($this->sortField == 'packageType' ? 'standalone '.$this->sortOrder.', package.parentPackageID '.$this->sortOrder : $this->sortField.' '.$this->sortOrder).($this->sortField != 'packageName' ? ', package.packageName ASC' : '');
-               
-               parent::readObjects();
-       }
-       
-       /**
-        * @see wcf\page\IPage::show()
-        */
-       public function show() {
-               // enable menu item
-               ACPMenu::getInstance()->setActiveMenuItem('wcf.acp.menu.link.package.list');
-               
-               parent::show();
-       }
-}
diff --git a/wcfsetup/install/files/lib/acp/page/PackageListDetailedPage.class.php b/wcfsetup/install/files/lib/acp/page/PackageListDetailedPage.class.php
new file mode 100644 (file)
index 0000000..fabb7be
--- /dev/null
@@ -0,0 +1,67 @@
+<?php
+namespace wcf\acp\page;
+use wcf\system\menu\acp\ACPMenu;
+use wcf\data\package\PackageList;
+use wcf\page\SortablePage;
+use wcf\system\WCF;
+
+/**
+ * Shows a list of all installed packages.
+ * 
+ * @author     Marcel Werk
+ * @copyright  2001-2011 WoltLab GmbH
+ * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package    com.woltlab.wcf
+ * @subpackage acp.page
+ * @category   Community Framework
+ */
+class PackageListDetailedPage extends SortablePage {
+       /**
+        * @see wcf\page\AbstractPage::$neededPermissions
+        */
+       public $neededPermissions = array('admin.system.package.canUpdatePackage', 'admin.system.package.canUninstallPackage');
+       
+       /**
+        * @see wcf\page\MultipleLinkPage::$itemsPerPage
+        */
+       public $itemsPerPage = 50;
+       
+       /**
+        * @see wcf\page\SortablePage::$defaultSortField
+        */
+       public $defaultSortField = 'packageType';
+       
+       /**
+        * @see wcf\page\SortablePage::$defaultSortOrder
+        */
+       public $defaultSortOrder = 'DESC';
+       
+       /**
+        * @see wcf\page\SortablePage::$validSortFields
+        */
+       public $validSortFields = array('packageID', 'package', 'packageDir', 'packageName', 'instanceNo', 'packageDescription', 'packageVersion', 'packageDate', 'packageURL', 'parentPackageID', 'isUnique', 'standalone', 'author', 'authorURL', 'installDate', 'updateDate');
+       
+       /**
+        * @see wcf\page\MultipleLinkPage::$objectListClassName
+        */     
+       public $objectListClassName = 'wcf\data\package\PackageList';
+       
+       /**
+        * @see wcf\page\MultipleLinkPage::readObjects()
+        */     
+       protected function readObjects() {
+               $this->sqlOrderBy = 'package.'.($this->sortField == 'packageType' ? 'standalone '.$this->sortOrder.', package.parentPackageID '.$this->sortOrder : $this->sortField.' '.$this->sortOrder).($this->sortField != 'packageName' ? ', package.packageName ASC' : '');
+               
+               parent::readObjects();
+       }
+       
+       /**
+        * @see wcf\page\IPage::show()
+        */
+       public function show() {
+               // enable menu item
+               ACPMenu::getInstance()->setActiveMenuItem('wcf.acp.menu.link.package.list');
+               
+               parent::show();
+       }
+}