From 3bb987a330b5884b07366c48269e4aeec0e122ed Mon Sep 17 00:00:00 2001 From: Christiane Maier-Stadtherr Date: Mon, 11 Apr 2016 14:43:41 +0200 Subject: [PATCH 1/2] Complete Hathor overrides for com_menu --- .../hathor/html/com_menus/items/default.php | 7 ++++--- .../hathor/html/com_menus/menu/edit.php | 17 ++++++++++++++++- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/administrator/templates/hathor/html/com_menus/items/default.php b/administrator/templates/hathor/html/com_menus/items/default.php index 1781aa57d0f7d..cf461aa1bc026 100644 --- a/administrator/templates/hathor/html/com_menus/items/default.php +++ b/administrator/templates/hathor/html/com_menus/items/default.php @@ -22,6 +22,7 @@ $ordering = ($listOrder == 'a.lft'); $canOrder = $user->authorise('core.edit.state', 'com_menus'); $saveOrder = ($listOrder == 'a.lft' && $listDirn == 'asc'); +$menutypeid = (int) $this->state->get('menutypeid'); $assoc = JLanguageAssociations::isEnabled(); ?> @@ -136,10 +137,10 @@ items as $i => $item) : $orderkey = array_search($item->id, $this->ordering[$item->parent_id]); - $canCreate = $user->authorise('core.create', 'com_menus'); - $canEdit = $user->authorise('core.edit', 'com_menus'); + $canCreate = $user->authorise('core.create', 'com_menus.menu.' . $menutypeid); + $canEdit = $user->authorise('core.edit', 'com_menus.menu.' . $menutypeid); $canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $user->get('id')|| $item->checked_out == 0; - $canChange = $user->authorise('core.edit.state', 'com_menus') && $canCheckin; + $canChange = $user->authorise('core.edit.state', 'com_menus.menu.' . $menutypeid) && $canCheckin; ?> diff --git a/administrator/templates/hathor/html/com_menus/menu/edit.php b/administrator/templates/hathor/html/com_menus/menu/edit.php index 3dbeab8f6edf9..0abe46654a2e9 100644 --- a/administrator/templates/hathor/html/com_menus/menu/edit.php +++ b/administrator/templates/hathor/html/com_menus/menu/edit.php @@ -45,10 +45,25 @@ form->getInput('description'); ?> + +
+ canDo->get('core.admin')) : ?> +
+ item->id, array('useCookie' => 1)); ?> + + +
+ + form->getLabel('rules'); ?> + form->getInput('rules'); ?> +
+ +
+ - +
From c4645d0eb9ad3f66a95eec175f2af5227dfb3e77 Mon Sep 17 00:00:00 2001 From: Christiane Maier-Stadtherr Date: Mon, 11 Apr 2016 15:18:36 +0200 Subject: [PATCH 2/2] hathor override of com_menus/menus/default --- .../templates/hathor/html/com_menus/menus/default.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/administrator/templates/hathor/html/com_menus/menus/default.php b/administrator/templates/hathor/html/com_menus/menus/default.php index ade1d6264b83b..f500642b3ae74 100644 --- a/administrator/templates/hathor/html/com_menus/menus/default.php +++ b/administrator/templates/hathor/html/com_menus/menus/default.php @@ -99,14 +99,19 @@ $canCreate = $user->authorise('core.create', 'com_menus'); $canEdit = $user->authorise('core.edit', 'com_menus'); $canChange = $user->authorise('core.edit.state', 'com_menus'); + $canManageItems = $user->authorise('core.manage', 'com_menus.menu.' . (int) $item->id); ?> id); ?> - + + escape($item->title); ?> + + escape($item->title); ?> +

( id).' title='.$this->escape($item->description).'">'.