Add categories for page object types
authorMatthias Schmidt <gravatronics@live.com>
Fri, 4 Jul 2014 20:13:16 +0000 (22:13 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Fri, 4 Jul 2014 20:13:16 +0000 (22:13 +0200)
com.woltlab.wcf/objectType.xml
wcfsetup/install/files/lib/system/page/PageManager.class.php
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index ef5f327891bb45cff8067af9723cebe45743348f..30c024b26d2cfb61a0df49e7d4b5c3fa397c02a5 100644 (file)
                        <name>com.woltlab.wcf.AccountManagementForm</name>
                        <definitionname>com.woltlab.wcf.page</definitionname>
                        <classname><![CDATA[wcf\form\AccountManagementForm]]></classname>
+                       <categoryname>com.woltlab.wcf.user</categoryname>
                </type>
                <type>
                        <name>com.woltlab.wcf.AvatarEditForm</name>
                        <definitionname>com.woltlab.wcf.page</definitionname>
                        <classname><![CDATA[wcf\form\AvatarEditForm]]></classname>
+                       <categoryname>com.woltlab.wcf.user</categoryname>
                </type>
                <type>
                        <name>com.woltlab.wcf.DisclaimerForm</name>
                        <definitionname>com.woltlab.wcf.page</definitionname>
                        <classname><![CDATA[wcf\form\DisclaimerForm]]></classname>
+                       <categoryname>com.woltlab.wcf.other</categoryname>
                </type>
                <type>
                        <name>com.woltlab.wcf.EmailActivationForm</name>
                        <definitionname>com.woltlab.wcf.page</definitionname>
                        <classname><![CDATA[wcf\form\EmailActivationForm]]></classname>
+                       <categoryname>com.woltlab.wcf.user</categoryname>
                </type>
                <type>
                        <name>com.woltlab.wcf.EmailNewActivationCodeForm</name>
                        <definitionname>com.woltlab.wcf.page</definitionname>
                        <classname><![CDATA[wcf\form\EmailNewActivationCodeForm]]></classname>
+                       <categoryname>com.woltlab.wcf.user</categoryname>
                </type>
                <type>
                        <name>com.woltlab.wcf.LoginForm</name>
                        <definitionname>com.woltlab.wcf.page</definitionname>
                        <classname><![CDATA[wcf\form\LoginForm]]></classname>
+                       <categoryname>com.woltlab.wcf.user</categoryname>
                </type>
                <type>
                        <name>com.woltlab.wcf.LostPasswordForm</name>
                        <definitionname>com.woltlab.wcf.page</definitionname>
                        <classname><![CDATA[wcf\form\LostPasswordForm]]></classname>
+                       <categoryname>com.woltlab.wcf.user</categoryname>
                </type>
                <type>
                        <name>com.woltlab.wcf.MailForm</name>
                        <definitionname>com.woltlab.wcf.page</definitionname>
                        <classname><![CDATA[wcf\form\MailForm]]></classname>
+                       <categoryname>com.woltlab.wcf.user</categoryname>
                </type>
                <type>
                        <name>com.woltlab.wcf.ModerationActivationForm</name>
                        <definitionname>com.woltlab.wcf.page</definitionname>
                        <classname><![CDATA[wcf\form\ModerationActivationForm]]></classname>
+                       <categoryname>com.woltlab.wcf.moderation</categoryname>
                </type>
                <type>
                        <name>com.woltlab.wcf.ModerationReportForm</name>
                        <definitionname>com.woltlab.wcf.page</definitionname>
                        <classname><![CDATA[wcf\form\ModerationReportForm]]></classname>
+                       <categoryname>com.woltlab.wcf.moderation</categoryname>
                </type>
                <type>
                        <name>com.woltlab.wcf.NewPasswordForm</name>
                        <definitionname>com.woltlab.wcf.page</definitionname>
                        <classname><![CDATA[wcf\form\NewPasswordForm]]></classname>
+                       <categoryname>com.woltlab.wcf.user</categoryname>
                </type>
                <type>
                        <name>com.woltlab.wcf.NotificationSettingsForm</name>
                        <definitionname>com.woltlab.wcf.page</definitionname>
                        <classname><![CDATA[wcf\form\NotificationSettingsForm]]></classname>
+                       <categoryname>com.woltlab.wcf.user</categoryname>
                </type>
                <type>
                        <name>com.woltlab.wcf.RegisterActivationForm</name>
                        <definitionname>com.woltlab.wcf.page</definitionname>
                        <classname><![CDATA[wcf\form\RegisterActivationForm]]></classname>
+                       <categoryname>com.woltlab.wcf.user</categoryname>
                </type>
                <type>
                        <name>com.woltlab.wcf.RegisterForm</name>
                        <definitionname>com.woltlab.wcf.page</definitionname>
                        <classname><![CDATA[wcf\form\RegisterForm]]></classname>
+                       <categoryname>com.woltlab.wcf.user</categoryname>
                </type>
                <type>
                        <name>com.woltlab.wcf.RegisterNewActivationCodeForm</name>
                        <definitionname>com.woltlab.wcf.page</definitionname>
                        <classname><![CDATA[wcf\form\RegisterNewActivationCodeForm]]></classname>
+                       <categoryname>com.woltlab.wcf.user</categoryname>
                </type>
                <type>
                        <name>com.woltlab.wcf.SearchForm</name>
                        <definitionname>com.woltlab.wcf.page</definitionname>
                        <classname><![CDATA[wcf\form\SearchForm]]></classname>
+                       <categoryname>com.woltlab.wcf.other</categoryname>
                </type>
                <type>
                        <name>com.woltlab.wcf.SettingsForm</name>
                        <definitionname>com.woltlab.wcf.page</definitionname>
                        <classname><![CDATA[wcf\form\SettingsForm]]></classname>
+                       <categoryname>com.woltlab.wcf.user</categoryname>
                </type>
                <type>
                        <name>com.woltlab.wcf.SignatureEditForm</name>
                        <definitionname>com.woltlab.wcf.page</definitionname>
                        <classname><![CDATA[wcf\form\SignatureEditForm]]></classname>
                        <options>module_user_signature</options>
+                       <categoryname>com.woltlab.wcf.user</categoryname>
                </type>
                <type>
                        <name>com.woltlab.wcf.UserSearchForm</name>
                        <definitionname>com.woltlab.wcf.page</definitionname>
                        <classname><![CDATA[wcf\form\UserSearchForm]]></classname>
                        <options>module_members_list</options>
+                       <categoryname>com.woltlab.wcf.other</categoryname>
                </type>
                <type>
                        <name>com.woltlab.wcf.DashboardPage</name>
                        <definitionname>com.woltlab.wcf.page</definitionname>
                        <classname><![CDATA[wcf\page\DashboardPage]]></classname>
                        <options>module_dashboard_page</options>
+                       <categoryname>com.woltlab.wcf.other</categoryname>
                </type>
                <type>
                        <name>com.woltlab.wcf.DeletedContentListPage</name>
                        <definitionname>com.woltlab.wcf.page</definitionname>
                        <classname><![CDATA[wcf\page\DeletedContentListPage]]></classname>
+                       <categoryname>com.woltlab.wcf.moderation</categoryname>
                </type>
                <type>
                        <name>com.woltlab.wcf.FollowingPage</name>
                        <definitionname>com.woltlab.wcf.page</definitionname>
                        <classname><![CDATA[wcf\page\FollowingPage]]></classname>
+                       <categoryname>com.woltlab.wcf.user</categoryname>
                </type>
                <type>
                        <name>com.woltlab.wcf.IgnoredUsersPage</name>
                        <definitionname>com.woltlab.wcf.page</definitionname>
                        <classname><![CDATA[wcf\page\IgnoredUsersPage]]></classname>
+                       <categoryname>com.woltlab.wcf.user</categoryname>
                </type>
                <type>
                        <name>com.woltlab.wcf.MembersListPage</name>
                        <definitionname>com.woltlab.wcf.page</definitionname>
                        <classname><![CDATA[wcf\page\MembersListPage]]></classname>
                        <options>module_members_list</options>
+                       <categoryname>com.woltlab.wcf.other</categoryname>
                </type>
                <type>
                        <name>com.woltlab.wcf.ModerationListPage</name>
                        <definitionname>com.woltlab.wcf.page</definitionname>
                        <classname><![CDATA[wcf\page\ModerationListPage]]></classname>
+                       <categoryname>com.woltlab.wcf.moderation</categoryname>
                </type>
                <type>
                        <name>com.woltlab.wcf.NotificationListPage</name>
                        <definitionname>com.woltlab.wcf.page</definitionname>
                        <classname><![CDATA[wcf\page\NotificationListPage]]></classname>
+                       <categoryname>com.woltlab.wcf.user</categoryname>
                </type>
                <type>
                        <name>com.woltlab.wcf.PrivacyPolicyPage</name>
                        <definitionname>com.woltlab.wcf.page</definitionname>
                        <classname><![CDATA[wcf\page\PrivacyPolicyPage]]></classname>
                        <options>module_privacy_policy_page</options>
+                       <categoryname>com.woltlab.wcf.other</categoryname>
                </type>
                <type>
                        <name>com.woltlab.wcf.RecentActivityListPage</name>
                        <definitionname>com.woltlab.wcf.page</definitionname>
                        <classname><![CDATA[wcf\page\RecentActivityListPage]]></classname>
+                       <categoryname>com.woltlab.wcf.other</categoryname>
                </type>
                <type>
                        <name>com.woltlab.wcf.SearchResultPage</name>
                        <definitionname>com.woltlab.wcf.page</definitionname>
                        <classname><![CDATA[wcf\page\SearchResultPage]]></classname>
+                       <categoryname>com.woltlab.wcf.other</categoryname>
                </type>
                <type>
                        <name>com.woltlab.wcf.TaggedPage</name>
                        <definitionname>com.woltlab.wcf.page</definitionname>
                        <classname><![CDATA[wcf\page\TaggedPage]]></classname>
                        <options>module_tagging</options>
+                       <categoryname>com.woltlab.wcf.other</categoryname>
                </type>
                <type>
                        <name>com.woltlab.wcf.TeamPage</name>
                        <definitionname>com.woltlab.wcf.page</definitionname>
                        <classname><![CDATA[wcf\page\TeamPage]]></classname>
                        <options>module_team_page</options>
+                       <categoryname>com.woltlab.wcf.other</categoryname>
                </type>
                <type>
                        <name>com.woltlab.wcf.UserPage</name>
                        <definitionname>com.woltlab.wcf.page</definitionname>
                        <classname><![CDATA[wcf\page\UserPage]]></classname>
+                       <categoryname>com.woltlab.wcf.user</categoryname>
                </type>
                <type>
                        <name>com.woltlab.wcf.UsersOnlineListPage</name>
                        <definitionname>com.woltlab.wcf.page</definitionname>
                        <classname><![CDATA[wcf\page\UsersOnlineListPage]]></classname>
+                       <categoryname>com.woltlab.wcf.other</categoryname>
                </type>
                <!-- /pages -->
                
index b574244cb4a67ac031d705aecc1c3134696ea3e5..371000992afec60ee67b9731038145f85d5e120f 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 namespace wcf\system\page;
 use wcf\data\object\type\ObjectTypeCache;
-use wcf\data\package\PackageCache;
 use wcf\system\application\ApplicationHandler;
 use wcf\system\exception\SystemException;
 use wcf\system\SingletonFactory;
@@ -82,16 +81,19 @@ class PageManager extends SingletonFactory {
                
                $selection = array();
                foreach ($objectTypes as $objectType) {
-                       $selection[$objectType->objectTypeID] = WCF::getLanguage()->get('wcf.page.'.$objectType->objectType);
-                       
-                       if ($application === null && substr($objectType->className, 0, 3) != 'wcf') {
-                               $classNamePieces = explode('\\', $objectType->className);
-                               
-                               $selection[$objectType->objectTypeID] .= ' ('.PackageCache::getInstance()->getPackage(ApplicationHandler::getInstance()->getApplication($classNamePieces[0])->packageID).')';
+                       $categoryName = WCF::getLanguage()->get('wcf.page.category.'.$objectType->categoryname);
+                       if (!isset($selection[$categoryName])) {
+                               $selection[$categoryName] = array();
                        }
+                       
+                       $selection[$categoryName][$objectType->objectTypeID] = WCF::getLanguage()->get('wcf.page.'.$objectType->objectType);
                }
                
-               asort($selection);
+               ksort($selection);
+               
+               foreach ($selection as &$subSelection) {
+                       asort($subSelection);
+               }
                
                return $selection;
        }
index cdcb1ba1d009330271aa659c6eca8ceb1a92aaf8..1e7b8a36c9494d6c49c7ab1cd9b7ff02dcafc7f6 100644 (file)
@@ -2327,6 +2327,9 @@ Fehler sind beispielsweise:
 <li><a href="http://support.apple.com/kb/ph11920" class="externalURL" rel="nofollow">Safari</a></li>
 <li><a href="http://windows.microsoft.com/de-DE/internet-explorer/delete-manage-cookies" class="externalURL" rel="nofollow">Windows Internet Explorer</a></li>
 </ul>]]></item>
+               <item name="wcf.page.category.com.woltlab.wcf.moderation"><![CDATA[Moderation]]></item>
+               <item name="wcf.page.category.com.woltlab.wcf.other"><![CDATA[Weitere Seiten]]></item>
+               <item name="wcf.page.category.com.woltlab.wcf.user"><![CDATA[Benutzer]]></item>
                <item name="wcf.page.com.woltlab.wcf.AccountManagementForm"><![CDATA[Benutzerkonto-Verwaltung]]></item>
                <item name="wcf.page.com.woltlab.wcf.AvatarEditForm"><![CDATA[Avatar-Verwaltung]]></item>
                <item name="wcf.page.com.woltlab.wcf.DisclaimerForm"><![CDATA[Disclaimer]]></item>
index 33642a064a6104b223d09bc9f9888e70e69be172..7feeb6f4cf9d5859ede16a0b158dc1116e0ab087 100644 (file)
@@ -2188,6 +2188,9 @@ Errors are:
                <item name="wcf.page.cookiePolicy.info"><![CDATA[TODO: Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. <a href="{link controller='CookiePolicy'}{/link}">Weitere Informationen</a>]]></item>
                <item name="wcf.page.cookiePolicy"><![CDATA[TODO: Einsatz von Cookies]]></item>
                <item name="wcf.page.cookiePolicy.text"><![CDATA[TODO]]></item>
+               <item name="wcf.page.category.com.woltlab.wcf.moderation"><![CDATA[Moderation]]></item>
+               <item name="wcf.page.category.com.woltlab.wcf.other"><![CDATA[Other Pages]]></item>
+               <item name="wcf.page.category.com.woltlab.wcf.user"><![CDATA[Users]]></item>
                <item name="wcf.page.com.woltlab.wcf.AccountManagementForm"><![CDATA[Account Management]]></item>
                <item name="wcf.page.com.woltlab.wcf.AvatarEditForm"><![CDATA[Avatar Management]]></item>
                <item name="wcf.page.com.woltlab.wcf.DisclaimerForm"><![CDATA[Disclaimer]]></item>