diff options
Diffstat (limited to 'views/default')
-rw-r--r-- | views/default/admin/overview/statistics.php (renamed from views/default/admin/overview.php) | 0 | ||||
-rw-r--r-- | views/default/css/admin.php | 53 | ||||
-rw-r--r-- | views/default/css/elements/navigation.php | 64 | ||||
-rw-r--r-- | views/default/layout/elements/sidebar.php | 5 | ||||
-rw-r--r-- | views/default/navigation/menu/elements/group.php | 19 | ||||
-rw-r--r-- | views/default/navigation/menu/elements/item.php | 17 | ||||
-rw-r--r-- | views/default/navigation/menu/page.php | 29 |
7 files changed, 101 insertions, 86 deletions
diff --git a/views/default/admin/overview.php b/views/default/admin/overview/statistics.php index 1785864e7..1785864e7 100644 --- a/views/default/admin/overview.php +++ b/views/default/admin/overview/statistics.php diff --git a/views/default/css/admin.php b/views/default/css/admin.php index c73bbfe42..ce31a0036 100644 --- a/views/default/css/admin.php +++ b/views/default/css/admin.php @@ -106,48 +106,27 @@ table.mceLayout { .elgg-admin h6 { color:#666666; } -.elgg-admin .elgg-sidebar .submenu { - margin:0; - padding:0; - list-style: none; - background-color: transparent; - background-image: none; - -webkit-box-shadow: none; - -moz-box-shadow: none; - -webkit-border-radius: 0; - -moz-border-radius: 0; -} -.elgg-admin .submenu li.selected a, -.elgg-admin .submenu li.selected li.selected a, -.elgg-admin .submenu li.selected li.selected li.selected a { - background-color: black; - color:white; -} -.elgg-admin .submenu li a { - display:block; + +.elgg-page-menu a { + display: block; -webkit-border-radius: 8px; -moz-border-radius: 8px; - background-color:white; - margin:0 0 3px 0; - padding:2px 4px 2px 8px; - color:#333333; -} -.elgg-admin .submenu li a:hover { - background-color:black; - color:white; - text-decoration:none; + background-color: white; + margin: 0 0 3px 0; + padding: 2px 4px 2px 8px; + color: #333333; } -.elgg-admin .submenu ul.child { - margin-bottom:10px; +.elgg-page-menu a:hover { + background-color: black; + color: white; + text-decoration: none; } -.elgg-admin .submenu .child li a { - margin-left:15px; - background-color:#dedede; - color:#333333; +.elgg-page-menu li.selected > a { + background-color: black; + color: white; } -.elgg-admin .submenu .child li a:hover { - background-color:black; - color:white; +.elgg-page-menu li.selected > ul { + display: block; } .admin_settings h3 { diff --git a/views/default/css/elements/navigation.php b/views/default/css/elements/navigation.php index 7975dde25..359e10be4 100644 --- a/views/default/css/elements/navigation.php +++ b/views/default/css/elements/navigation.php @@ -223,57 +223,27 @@ color: white; text-decoration: none; } -.elgg-page-menu .selected a { +.elgg-page-menu li.selected > a { background-color: #4690D6; color: white; } - -.submenu { - margin:0; - padding:0; - list-style: none; +.elgg-page-menu .elgg-child-menu { + display: none; + margin-left: 15px; } -.submenu ul { - margin-bottom:0; - padding-left:0; - list-style: none; +.elgg-menu-closed:before, .elgg-menu-opened:before { + display: inline-block; + padding-right: 4px; } -.submenu li.selected a, -.submenu li.selected li.selected a, -.submenu li.selected li.selected li.selected a { - background: #4690D6; - color:white; +.elgg-menu-closed:before { + content: "\002B"; } -.submenu li a { - display:block; - -webkit-border-radius: 8px; - -moz-border-radius: 8px; - background-color:white; - margin:0 0 3px 0; - padding:2px 4px 2px 8px; -} -.submenu li a:hover { - background:#0054A7; - color:white; - text-decoration:none; -} -.submenu .child li a { - margin-left:15px; - background-color:white; - color:#4690D6; -} -.submenu .child li a:hover { - background:#0054A7; - color:white; - text-decoration:none; +.elgg-menu-opened:before { + content: "\002D"; } - -.elgg-owner-block-menu li { - float: left; - width: 50%; - font-size: 90%; -} - +/* *************************************** + HOVER MENU +*************************************** */ .elgg-hover-menu { display: none; position: absolute; @@ -309,3 +279,9 @@ color: white; background-color: red; } + +.elgg-owner-block-menu li { + float: left; + width: 50%; + font-size: 90%; +} diff --git a/views/default/layout/elements/sidebar.php b/views/default/layout/elements/sidebar.php index c03700c8a..f2071adb5 100644 --- a/views/default/layout/elements/sidebar.php +++ b/views/default/layout/elements/sidebar.php @@ -24,10 +24,7 @@ END; echo elgg_view('layout/elements/owner_block'); echo elgg_view('navigation/sidebar_menu'); -echo elgg_view_menu('page', array( - 'sort_by' => 'name', - 'class' => 'elgg-page-menu', -)); +echo elgg_view_menu('page', array('sort_by' => 'name')); // optional 'sidebar' parameter if (isset($vars['sidebar'])) { diff --git a/views/default/navigation/menu/elements/group.php b/views/default/navigation/menu/elements/group.php new file mode 100644 index 000000000..09474ea67 --- /dev/null +++ b/views/default/navigation/menu/elements/group.php @@ -0,0 +1,19 @@ +<?php +/** + * Menu group + * + * @uses $vars['items'] + * @uses $vars['class'] + * @uses $vars['section'] + */ + +$class = elgg_get_array_value('class', $vars, ''); +if (isset($vars['section'])) { + $class = "$class elgg-section-{$vars['section']}"; +} + +echo "<ul class=\"$class\">"; +foreach ($vars['items'] as $menu_item) { + echo elgg_view('navigation/menu/elements/item', array('item' => $menu_item)); +} +echo '</ul>'; diff --git a/views/default/navigation/menu/elements/item.php b/views/default/navigation/menu/elements/item.php index f6959b2f4..7903dbdc0 100644 --- a/views/default/navigation/menu/elements/item.php +++ b/views/default/navigation/menu/elements/item.php @@ -7,4 +7,19 @@ if ($item->getSelected()) { $class = 'class="selected"'; } -echo "<li $class>{$item->getLink()}</li>"; +$link_vars = array(); + +$children = $item->getChildren(); +if ($children) { + $link_vars['class'] = 'elgg-menu-parent elgg-menu-closed'; +} + +echo "<li $class>"; +echo $item->getLink($link_vars); +if ($children) { + echo elgg_view('navigation/menu/elements/group', array( + 'items' => $children, + 'class' => 'elgg-menu elgg-child-menu', + )); +} +echo '</li>'; diff --git a/views/default/navigation/menu/page.php b/views/default/navigation/menu/page.php new file mode 100644 index 000000000..00fa1ef51 --- /dev/null +++ b/views/default/navigation/menu/page.php @@ -0,0 +1,29 @@ +<?php +/** + * Page menu + * + * @uses $vars['menu'] + * @uses $vars['selected_item'] + * @uses $vars['class'] + */ + +$class = 'elgg-menu elgg-page-menu'; +if (isset($vars['class'])) { + $class = "$class {$vars['class']}"; +} + +if (isset($vars['selected_item'])) { + $parent = $vars['selected_item']->getParent(); + while ($parent) { + $parent->setSelected(); + $parent = $parent->getParent(); + } +} + +foreach ($vars['menu'] as $section => $menu_items) { + echo elgg_view('navigation/menu/elements/group', array( + 'items' => $menu_items, + 'section' => $section, + 'class' => $class, + )); +} |