From: Matthias Schmidt Date: Wed, 23 Dec 2020 15:22:22 +0000 (+0100) Subject: Show number of styles referencing a template group X-Git-Tag: 5.4.0_Alpha_1~508 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d84240b8800c47d48bb6096b455bc1962141b195;p=GitHub%2FWoltLab%2FWCF.git Show number of styles referencing a template group Close #3747 --- diff --git a/wcfsetup/install/files/acp/templates/templateGroupList.tpl b/wcfsetup/install/files/acp/templates/templateGroupList.tpl index 3b43cd9e82..fa2516850c 100644 --- a/wcfsetup/install/files/acp/templates/templateGroupList.tpl +++ b/wcfsetup/install/files/acp/templates/templateGroupList.tpl @@ -47,6 +47,7 @@ {lang}wcf.global.name{/lang} {lang}wcf.acp.template.group.folderName{/lang} {lang}wcf.acp.template.group.templates{/lang} + {lang}wcf.acp.template.group.styles{/lang} {event name='columnHeads'} @@ -84,6 +85,7 @@ {$templateGroup->templateGroupFolderName} {#$templateGroup->templates} + {#$templateGroup->styles} {event name='columns'} diff --git a/wcfsetup/install/files/lib/acp/page/TemplateGroupListPage.class.php b/wcfsetup/install/files/lib/acp/page/TemplateGroupListPage.class.php index 328022f957..9387369ba0 100644 --- a/wcfsetup/install/files/lib/acp/page/TemplateGroupListPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/TemplateGroupListPage.class.php @@ -37,7 +37,7 @@ class TemplateGroupListPage extends SortablePage { /** * @inheritDoc */ - public $validSortFields = ['templateGroupID', 'templateGroupName', 'templateGroupFolderName', 'templates']; + public $validSortFields = ['templateGroupID', 'templateGroupName', 'templateGroupFolderName', 'templates', 'styles']; /** * @inheritDoc @@ -45,6 +45,7 @@ class TemplateGroupListPage extends SortablePage { protected function initObjectList() { parent::initObjectList(); - $this->objectList->sqlSelects = "(SELECT COUNT(*) FROM wcf".WCF_N."_template WHERE templateGroupID = template_group.templateGroupID) AS templates"; + $this->objectList->sqlSelects = "(SELECT COUNT(*) FROM wcf".WCF_N."_template WHERE templateGroupID = template_group.templateGroupID) AS templates, + (SELECT COUNT(*) FROM wcf".WCF_N."_style WHERE templateGroupID = template_group.templateGroupID) AS styles"; } } diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index 0393886416..30d6425de4 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -2997,6 +2997,7 @@ Kein Abschnitt darf leer sein und alle Abschnitten dürfen nur folgende Zeichen + Templategruppe hinzufügen.]]> diff --git a/wcfsetup/install/lang/en.xml b/wcfsetup/install/lang/en.xml index 3585fb9a30..4ca3a66283 100644 --- a/wcfsetup/install/lang/en.xml +++ b/wcfsetup/install/lang/en.xml @@ -2925,6 +2925,7 @@ If you have already bought the licenses for the listed apps, th + template group first.]]>