From: Matthias Schmidt Date: Tue, 8 Jul 2014 17:46:00 +0000 (+0200) Subject: Add stat handler categories X-Git-Tag: 2.1.0_Alpha_1~602^2~6 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5ee3e44830de5400084fb4d7a1a7eed82842f4a8;p=GitHub%2FWoltLab%2FWCF.git Add stat handler categories --- 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]]> - - - - + + + + - + - - + + - - - - - + + + + + +