From 165fa6558c1bfd0a7261bdd51b027b54a46961b6 Mon Sep 17 00:00:00 2001 From: ewinslow Date: Tue, 1 Mar 2011 18:54:37 +0000 Subject: Refs #3021: elgg-section-$section => elgg-menu-$menu-$section Added elgg-menu-hz for horizontal menus git-svn-id: http://code.elgg.org/elgg/trunk@8535 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/navigation/menu/default.php | 8 ++--- views/default/navigation/menu/elements/group.php | 19 ------------ views/default/navigation/menu/elements/item.php | 2 +- views/default/navigation/menu/elements/section.php | 15 +++++++++ views/default/navigation/menu/metadata.php | 2 +- views/default/navigation/menu/page.php | 5 ++- views/default/navigation/menu/site.php | 7 ++--- views/default/navigation/menu/user_hover.php | 36 ++++++++++++++-------- 8 files changed, 49 insertions(+), 45 deletions(-) delete mode 100644 views/default/navigation/menu/elements/group.php create mode 100644 views/default/navigation/menu/elements/section.php (limited to 'views/default/navigation/menu') diff --git a/views/default/navigation/menu/default.php b/views/default/navigation/menu/default.php index 52049f6e0..1a7f292b8 100644 --- a/views/default/navigation/menu/default.php +++ b/views/default/navigation/menu/default.php @@ -2,19 +2,19 @@ /** * Default menu * + * @uses $vars['name'] * @uses $vars['menu'] * @uses $vars['class'] */ $class = "elgg-menu elgg-menu-{$vars['name']}"; if (isset($vars['class'])) { - $class = "$class {$vars['class']}"; + $class .= " {$vars['class']}"; } foreach ($vars['menu'] as $section => $menu_items) { - echo elgg_view('navigation/menu/elements/group', array( - 'section' => $section, + echo elgg_view('navigation/menu/elements/section', array( 'items' => $menu_items, - 'class' => $class, + 'class' => "$class elgg-menu-{$vars['name']}-$section", )); } diff --git a/views/default/navigation/menu/elements/group.php b/views/default/navigation/menu/elements/group.php deleted file mode 100644 index b0c0f54d4..000000000 --- a/views/default/navigation/menu/elements/group.php +++ /dev/null @@ -1,19 +0,0 @@ -"; -foreach ($vars['items'] as $menu_item) { - echo elgg_view('navigation/menu/elements/item', array('item' => $menu_item)); -} -echo ''; diff --git a/views/default/navigation/menu/elements/item.php b/views/default/navigation/menu/elements/item.php index e11b01bbf..893bbd205 100644 --- a/views/default/navigation/menu/elements/item.php +++ b/views/default/navigation/menu/elements/item.php @@ -28,7 +28,7 @@ if ($item_class) { echo "
  • "; echo $item->getContent(); if ($children) { - echo elgg_view('navigation/menu/elements/group', array( + echo elgg_view('navigation/menu/elements/section', array( 'items' => $children, 'class' => 'elgg-menu elgg-child-menu', )); diff --git a/views/default/navigation/menu/elements/section.php b/views/default/navigation/menu/elements/section.php new file mode 100644 index 000000000..f72db847f --- /dev/null +++ b/views/default/navigation/menu/elements/section.php @@ -0,0 +1,15 @@ +"; +foreach ($vars['items'] as $menu_item) { + echo elgg_view('navigation/menu/elements/item', array('item' => $menu_item)); +} +echo ''; diff --git a/views/default/navigation/menu/metadata.php b/views/default/navigation/menu/metadata.php index ae6a9bebb..742aee3ad 100644 --- a/views/default/navigation/menu/metadata.php +++ b/views/default/navigation/menu/metadata.php @@ -11,7 +11,7 @@ $entity = $vars['entity']; $handler = elgg_extract('handler', $vars, ''); ?> -