From e5d25b46359997f40f4bfa6ccf38d71c0ee8dac4 Mon Sep 17 00:00:00 2001 From: Cameron <cameron@e107coders.org> Date: Thu, 7 Mar 2013 05:02:04 -0800 Subject: [PATCH] Support added for dividers in admin-menu --- e107_admin/cpage.php | 8 +++++--- e107_handlers/sitelinks_class.php | 3 ++- e107_themes/bootstrap/admin_template.php | 3 +++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/e107_admin/cpage.php b/e107_admin/cpage.php index 291945191..11b7d3e53 100644 --- a/e107_admin/cpage.php +++ b/e107_admin/cpage.php @@ -57,11 +57,13 @@ class page_admin extends e_admin_dispatcher protected $adminMenu = array( 'page/list' => array('caption'=> CUSLAN_48, 'perm' => '5'), + 'menu/list' => array('caption'=> CUSLAN_49, 'perm' => 'J', 'tab' => 2), 'page/create' => array('caption'=> CUSLAN_12, 'perm' => '5'), + 'other' => array('divider'=> true), 'cat/list' => array('caption'=> "List Books/Chapters", 'perm' => '5'), // Create Category. 'cat/create' => array('caption'=> "Add Book/Chapter", 'perm' => '5'), // Category List - 'divider' => true, - 'menu/list' => array('caption'=> CUSLAN_49, 'perm' => 'J', 'tab' => 2), + 'other2' => array('divider'=> true), + // 'menu/create' => array('caption'=> CUSLAN_31, 'perm' => 'J', 'tab' => 2), 'page/prefs' => array('caption'=> LAN_OPTIONS, 'perm' => '0') ); @@ -72,7 +74,7 @@ class page_admin extends e_admin_dispatcher 'menu/edit' => 'menu/create' ); - protected $menuTitle = 'Custom Pages'; + protected $menuTitle = ADLAN_42; } class page_admin_form_ui extends e_admin_form_ui diff --git a/e107_handlers/sitelinks_class.php b/e107_handlers/sitelinks_class.php index 1cdae79ba..909ea81d6 100644 --- a/e107_handlers/sitelinks_class.php +++ b/e107_handlers/sitelinks_class.php @@ -1072,7 +1072,8 @@ class e_navigation if (isset($e107_vars[$act]['divider'])) { - $text .= "<li class='divider'></li>"; //TODO add to Template. + // $text .= "<li class='divider'></li>"; + $text .= $tmpl['divider']; continue; } diff --git a/e107_themes/bootstrap/admin_template.php b/e107_themes/bootstrap/admin_template.php index eacef0f99..40d1e8c33 100644 --- a/e107_themes/bootstrap/admin_template.php +++ b/e107_themes/bootstrap/admin_template.php @@ -380,6 +380,9 @@ $E_ADMIN_MENU['end'] = ' </ul> '; +$E_ADMIN_MENU['divider'] = '<li class="divider"></li>'; + + /* NEW ADMIN SLIDE DOWN MENU TEMPLATE * see function admin_navigation() in e107_files/shortcodes/admin_navigation.php * TODO move it together with menu.css/menu.js to the theme templates/e107_files folder (default menu render)