From: joshuaruesweg Date: Wed, 30 Jul 2014 15:02:11 +0000 (+0200) Subject: Hide menu items in module is disabled X-Git-Tag: 2.1.0_Alpha_1~353^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b46211f7df0784a7b776c2fbc1fa66169338757a;p=GitHub%2FWoltLab%2FWCF.git Hide menu items in module is disabled --- diff --git a/com.woltlab.wcf/acpMenu.xml b/com.woltlab.wcf/acpMenu.xml index 42f72dfc57..3f4cc03c92 100644 --- a/com.woltlab.wcf/acpMenu.xml +++ b/com.woltlab.wcf/acpMenu.xml @@ -414,6 +414,7 @@ wcf.acp.menu.link.content + module_smiley 1 @@ -489,6 +490,7 @@ wcf.acp.menu.link.content + module_tagging 4 @@ -532,6 +534,7 @@ wcf.acp.menu.link.content + module_ad 7 diff --git a/wcfsetup/install/files/lib/acp/form/AdAddForm.class.php b/wcfsetup/install/files/lib/acp/form/AdAddForm.class.php index 8b048c15d8..aa0a5bdce0 100644 --- a/wcfsetup/install/files/lib/acp/form/AdAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/AdAddForm.class.php @@ -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 diff --git a/wcfsetup/install/files/lib/acp/form/SmileyAddForm.class.php b/wcfsetup/install/files/lib/acp/form/SmileyAddForm.class.php index df08f3d6ba..b4690a84f9 100644 --- a/wcfsetup/install/files/lib/acp/form/SmileyAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/SmileyAddForm.class.php @@ -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 diff --git a/wcfsetup/install/files/lib/acp/form/SmileyCategoryAddForm.class.php b/wcfsetup/install/files/lib/acp/form/SmileyCategoryAddForm.class.php index f887e673d5..4121283f4d 100644 --- a/wcfsetup/install/files/lib/acp/form/SmileyCategoryAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/SmileyCategoryAddForm.class.php @@ -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'); } diff --git a/wcfsetup/install/files/lib/acp/form/SmileyCategoryEditForm.class.php b/wcfsetup/install/files/lib/acp/form/SmileyCategoryEditForm.class.php index 3df81ebdaa..7147f6bde0 100644 --- a/wcfsetup/install/files/lib/acp/form/SmileyCategoryEditForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/SmileyCategoryEditForm.class.php @@ -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'); } diff --git a/wcfsetup/install/files/lib/acp/form/TagAddForm.class.php b/wcfsetup/install/files/lib/acp/form/TagAddForm.class.php index 3fee35353b..4701a6b6f3 100644 --- a/wcfsetup/install/files/lib/acp/form/TagAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/TagAddForm.class.php @@ -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 diff --git a/wcfsetup/install/files/lib/acp/page/AdListPage.class.php b/wcfsetup/install/files/lib/acp/page/AdListPage.class.php index c93b6816c9..7a867fc4be 100644 --- a/wcfsetup/install/files/lib/acp/page/AdListPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/AdListPage.class.php @@ -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 */ diff --git a/wcfsetup/install/files/lib/acp/page/SmileyCategoryListPage.class.php b/wcfsetup/install/files/lib/acp/page/SmileyCategoryListPage.class.php index 72f1b8387f..1466e4031c 100644 --- a/wcfsetup/install/files/lib/acp/page/SmileyCategoryListPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/SmileyCategoryListPage.class.php @@ -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'); } diff --git a/wcfsetup/install/files/lib/acp/page/SmileyListPage.class.php b/wcfsetup/install/files/lib/acp/page/SmileyListPage.class.php index cc9359d0a1..4ab8651733 100644 --- a/wcfsetup/install/files/lib/acp/page/SmileyListPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/SmileyListPage.class.php @@ -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 */ diff --git a/wcfsetup/install/files/lib/acp/page/TagListPage.class.php b/wcfsetup/install/files/lib/acp/page/TagListPage.class.php index 745e480e2b..1debb09171 100644 --- a/wcfsetup/install/files/lib/acp/page/TagListPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/TagListPage.class.php @@ -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 */