From 5ee3e44830de5400084fb4d7a1a7eed82842f4a8 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Tue, 8 Jul 2014 19:46:00 +0200 Subject: [PATCH] Add stat handler categories --- com.woltlab.wcf/objectType.xml | 5 ++++ wcfsetup/install/files/acp/templates/stat.tpl | 24 +++++++++++------- .../files/lib/acp/page/StatPage.class.php | 9 ++++++- wcfsetup/install/lang/de.xml | 1 + wcfsetup/install/lang/en.xml | 25 ++++++++++--------- 5 files changed, 42 insertions(+), 22 deletions(-) diff --git a/com.woltlab.wcf/objectType.xml b/com.woltlab.wcf/objectType.xml index 30c024b26d..be8a7221f0 100644 --- a/com.woltlab.wcf/objectType.xml +++ b/com.woltlab.wcf/objectType.xml @@ -339,26 +339,31 @@ com.woltlab.wcf.statDailyHandler 1 + com.woltlab.wcf.general com.woltlab.wcf.attachment com.woltlab.wcf.statDailyHandler + com.woltlab.wcf.general com.woltlab.wcf.attachment.diskUsage com.woltlab.wcf.statDailyHandler + com.woltlab.wcf.general com.woltlab.wcf.like com.woltlab.wcf.statDailyHandler + com.woltlab.wcf.general com.woltlab.wcf.dislike com.woltlab.wcf.statDailyHandler + com.woltlab.wcf.general diff --git a/wcfsetup/install/files/acp/templates/stat.tpl b/wcfsetup/install/files/acp/templates/stat.tpl index f74ae45e52..71ba2ea6d9 100644 --- a/wcfsetup/install/files/acp/templates/stat.tpl +++ b/wcfsetup/install/files/acp/templates/stat.tpl @@ -15,7 +15,7 @@ new WCF.ACP.Stat.Chart(); }); - +

{lang}wcf.acp.stat{/lang}

@@ -56,15 +56,21 @@ + + +
+ {lang}wcf.acp.stat.types{/lang} -
-
-
- {foreach from=$availableObjectTypes item=objectType} - - {/foreach} -
-
+ {foreach from=$availableObjectTypes key=categoryName item=objectTypes} +
+
+
+ {foreach from=$objectTypes item=objectType} + + {/foreach} +
+
+ {/foreach}
diff --git a/wcfsetup/install/files/lib/acp/page/StatPage.class.php b/wcfsetup/install/files/lib/acp/page/StatPage.class.php index 6c80448aaa..82ec3c4bdb 100644 --- a/wcfsetup/install/files/lib/acp/page/StatPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/StatPage.class.php @@ -58,7 +58,14 @@ class StatPage extends AbstractPage { $this->startDate = $d->format('Y-m-d'); // get object types - $this->availableObjectTypes = ObjectTypeCache::getInstance()->getObjectTypes('com.woltlab.wcf.statDailyHandler'); + $objectTypes = ObjectTypeCache::getInstance()->getObjectTypes('com.woltlab.wcf.statDailyHandler'); + foreach ($objectTypes as $objectType) { + if (!isset($this->availableObjectTypes[$objectType->categoryname])) { + $this->availableObjectTypes[$objectType->categoryname] = array(); + } + + $this->availableObjectTypes[$objectType->categoryname][] = $objectType; + } } /** diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index c7e491c3dc..5295415872 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -1234,6 +1234,7 @@ GmbH=Gesellschaft mit beschränkter Haftung]]> + diff --git a/wcfsetup/install/lang/en.xml b/wcfsetup/install/lang/en.xml index 170636d033..1585a523bc 100644 --- a/wcfsetup/install/lang/en.xml +++ b/wcfsetup/install/lang/en.xml @@ -1182,27 +1182,28 @@ GmbH=Gesellschaft mit beschränkter Haftung]]> - - - - + + + + - + - - + + - - - - - + + + + + + -- 2.20.1