Hide menu items in module is disabled
authorjoshuaruesweg <josh@joshsboard.de>
Wed, 30 Jul 2014 15:02:11 +0000 (17:02 +0200)
committerjoshuaruesweg <josh@joshsboard.de>
Wed, 30 Jul 2014 15:02:11 +0000 (17:02 +0200)
com.woltlab.wcf/acpMenu.xml
wcfsetup/install/files/lib/acp/form/AdAddForm.class.php
wcfsetup/install/files/lib/acp/form/SmileyAddForm.class.php
wcfsetup/install/files/lib/acp/form/SmileyCategoryAddForm.class.php
wcfsetup/install/files/lib/acp/form/SmileyCategoryEditForm.class.php
wcfsetup/install/files/lib/acp/form/TagAddForm.class.php
wcfsetup/install/files/lib/acp/page/AdListPage.class.php
wcfsetup/install/files/lib/acp/page/SmileyCategoryListPage.class.php
wcfsetup/install/files/lib/acp/page/SmileyListPage.class.php
wcfsetup/install/files/lib/acp/page/TagListPage.class.php

index 42f72dfc57dc51c694fc0d42214f37dfcd1ad08d..3f4cc03c921612dfc44451feb90ed6ccb9bd3a67 100644 (file)
                
                <acpmenuitem name="wcf.acp.menu.link.smiley">
                        <parent>wcf.acp.menu.link.content</parent>
+                       <options>module_smiley</options>
                        <showorder>1</showorder>
                </acpmenuitem>
                <acpmenuitem name="wcf.acp.menu.link.smiley.list">
                
                <acpmenuitem name="wcf.acp.menu.link.tag">
                        <parent>wcf.acp.menu.link.content</parent>
+                       <options>module_tagging</options>
                        <showorder>4</showorder>
                </acpmenuitem>
                
                
                <acpmenuitem name="wcf.acp.menu.link.ad">
                        <parent>wcf.acp.menu.link.content</parent>
+                       <options>module_ad</options>
                        <showorder>7</showorder>
                </acpmenuitem>
                <acpmenuitem name="wcf.acp.menu.link.ad.list">
index 8b048c15d8cfec226324e2f33eded67372c63545..aa0a5bdce0b2fa03ca86bb7a520260fea39583be 100644 (file)
@@ -25,6 +25,16 @@ class AdAddForm extends AbstractForm {
         */
        public $activeMenuItem = 'wcf.acp.menu.link.ad.add';
        
+       /**
+        * @see \wcf\page\AbstractPage::$neededPermissions
+        */
+       public $neededPermissions = array('admin.content.ad.canManageAd');
+       
+       /**
+        * @see wcf\page\AbstractPage::$neededModules
+        */
+       public $neededModules = array('MODULE_AD');
+       
        /**
         * html code of the ad
         * @var string
@@ -61,11 +71,6 @@ class AdAddForm extends AbstractForm {
         */
        public $locations = array();
        
-       /**
-        * @see \wcf\page\AbstractPage::$neededPermissions
-        */
-       public $neededPermissions = array('admin.content.ad.canManageAd');
-       
        /**
         * id of the selected location's object type
         * @var integer
index df08f3d6baadfb67e8da3336eed671418aa49686..b4690a84f99391ef90253e3d7e7f4d7a1257c73e 100644 (file)
@@ -38,6 +38,11 @@ class SmileyAddForm extends AbstractForm {
         */
        public $neededPermissions = array('admin.content.smiley.canManageSmiley');
        
+       /**
+        * @see wcf\page\AbstractPage::$neededModules
+        */
+       public $neededModules = array('MODULE_SMILEY');
+       
        /**
         * primary smiley code
         * @var string
index f887e673d5caf840cfbc119ce434c1de51c6a629..4121283f4deadd2d7cf2680408677db657201a96 100644 (file)
@@ -26,4 +26,9 @@ class SmileyCategoryAddForm extends AbstractCategoryAddForm {
         * @see \wcf\acp\form\AbstractCategoryAddForm::$pageTitle
         */
        public $pageTitle = 'wcf.acp.smiley.category.add';
+       
+       /**
+        * @see wcf\page\AbstractPage::$neededModules
+        */
+       public $neededModules = array('MODULE_SMILEY');
 }
index 3df81ebdaacf9191963131f15163d41a4acb3135..7147f6bde0227b35a257baac42e842e11cc5bd3e 100644 (file)
@@ -26,4 +26,9 @@ class SmileyCategoryEditForm extends AbstractCategoryEditForm {
         * @see \wcf\acp\form\AbstractCategoryAddForm::$pageTitle
         */
        public $pageTitle = 'wcf.acp.smiley.category.edit';
+       
+       /**
+        * @see wcf\page\AbstractPage::$neededModules
+        */
+       public $neededModules = array('MODULE_SMILEY');
 }
index 3fee35353b3384abb961539e9f6b985493482ad3..4701a6b6f34d4da5bed2cc56f985fe03af78e904 100644 (file)
@@ -31,6 +31,11 @@ class TagAddForm extends AbstractForm {
         */
        public $neededPermissions = array('admin.content.tag.canManageTag');
        
+       /**
+        * @see wcf\page\AbstractPage::$neededModules
+        */
+       public $neededModules = array('MODULE_TAGGING');
+       
        /**
         * list of available languages
         * @var array
index c93b6816c944fa5094f8c3d4c15f7e73e39b313b..7a867fc4be4fe51aa4971716fc85b9ecb9167191 100644 (file)
@@ -23,6 +23,11 @@ class AdListPage extends MultipleLinkPage {
         */
        public $neededPermissions = array('admin.content.ad.canManageAd');
        
+       /**
+        * @see wcf\page\AbstractPage::$neededModules
+        */
+       public $neededModules = array('MODULE_AD');
+       
        /**
         * @see \wcf\page\MultipleLinkPage::$objectListClassName
         */
index 72f1b8387f91c024ba0c130672315b265cbc75b8..1466e4031c224804111488e6ed033b7601a23365 100644 (file)
@@ -26,4 +26,9 @@ class SmileyCategoryListPage extends AbstractCategoryListPage {
         * @see \wcf\acp\page\AbstractCategoryListPage::$pageTitle
         */
        public $pageTitle = 'wcf.acp.smiley.category.list';
+       
+       /**
+        * @see wcf\page\AbstractPage::$neededModules
+        */
+       public $neededModules = array('MODULE_SMILEY');
 }
index cc9359d0a1aa0f8a73348fc5ef9bf86140b30acb..4ab8651733d0f98c77805cba3bc7fcdc46e9722d 100644 (file)
@@ -27,6 +27,11 @@ class SmileyListPage extends MultipleLinkPage {
         */
        public $neededPermissions = array('admin.content.smiley.canManageSmiley');
        
+       /**
+        * @see wcf\page\AbstractPage::$neededModules
+        */
+       public $neededModules = array('MODULE_SMILEY');
+       
        /**
         * @see \wcf\page\MultipleLinkPage::$objectListClassName
         */
index 745e480e2b722c2e7021494756f79bebbaa7ead5..1debb091715303c3024838454d97475613041559 100644 (file)
@@ -25,6 +25,11 @@ class TagListPage extends SortablePage {
         */
        public $neededPermissions = array('admin.content.tag.canManageTag');
        
+       /**
+        * @see wcf\page\AbstractPage::$neededModules
+        */
+       public $neededModules = array('MODULE_TAGGING');
+       
        /**
         * @see \wcf\page\SortablePage::$defaultSortField
         */