Added template administration (WIP)
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / lib / acp / page / TemplateGroupListPage.class.php
1 <?php
2 namespace wcf\acp\page;
3 use wcf\page\SortablePage;
4
5 /**
6 * Shows a list of installed template groups.
7 *
8 * @author Marcel Werk
9 * @copyright 2001-2013 WoltLab GmbH
10 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
11 * @package com.woltlab.wcf
12 * @subpackage acp.page
13 * @category Community Framework
14 */
15 class TemplateGroupListPage extends SortablePage {
16 /**
17 * @see wcf\page\AbstractPage::$activeMenuItem
18 */
19 public $activeMenuItem = 'wcf.acp.menu.link.template.group.list';
20
21 /**
22 * @see wcf\page\AbstractPage::$neededPermissions
23 */
24 public $neededPermissions = array('admin.template.canManageTemplate');
25
26 /**
27 * @see wcf\page\SortablePage::$defaultSortField
28 */
29 public $defaultSortField = 'templateGroupName';
30
31 /**
32 * @see wcf\page\MultipleLinkPage::$objectListClassName
33 */
34 public $objectListClassName = 'wcf\data\template\group\TemplateGroupList';
35
36 /**
37 * @see wcf\page\SortablePage::$defaultSortField
38 */
39 public $validSortFields = array('templateGroupID', 'templateGroupName', 'templateGroupFolderName', 'templates');
40
41 /**
42 * @see wcf\page\MultipleLinkPage::initObjectList
43 */
44 protected function initObjectList() {
45 parent::initObjectList();
46
47 $this->objectList->sqlSelects = "(SELECT COUNT(*) FROM wcf".WCF_N."_template WHERE templateGroupID = template_group.templateGroupID) AS templates";
48 }
49 }