diff options
author | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-25 22:11:38 +0000 |
---|---|---|
committer | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-25 22:11:38 +0000 |
commit | 754f98d1859398928160b4a7a589e439589fab82 (patch) | |
tree | 4710cb9377698085d989b03abff28a08a69d5f8d | |
parent | 119017304ba7669c6596ccb3f6020959e0d629fd (diff) | |
download | elgg-754f98d1859398928160b4a7a589e439589fab82.tar.gz elgg-754f98d1859398928160b4a7a589e439589fab82.tar.bz2 |
Refs #2895: Converted topbar to one menu (felt dirty using two). Fixed styles.
git-svn-id: http://code.elgg.org/elgg/trunk@8476 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | engine/lib/admin.php | 3 | ||||
-rw-r--r-- | engine/lib/elgglib.php | 8 | ||||
-rw-r--r-- | engine/lib/users.php | 8 | ||||
-rw-r--r-- | views/default/css/elements/navigation.php | 30 | ||||
-rw-r--r-- | views/default/css/elements/page_layout.php | 18 | ||||
-rw-r--r-- | views/default/page/elements/topbar.php | 10 |
6 files changed, 48 insertions, 29 deletions
diff --git a/engine/lib/admin.php b/engine/lib/admin.php index 81403a6be..4e9f202c0 100644 --- a/engine/lib/admin.php +++ b/engine/lib/admin.php @@ -210,11 +210,12 @@ function admin_init() { 'weight' => 10, )); - elgg_register_menu_item('topbar_alt', array( + elgg_register_menu_item('topbar', array( 'name' => 'administration', 'href' => 'pg/admin', 'text' => elgg_view_icon('settings') . elgg_echo('admin'), 'weight' => 100, + 'section' => 'alt', )); // widgets diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index 8b8cc16df..12e9bdcf9 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -1813,6 +1813,14 @@ function elgg_init() { // Trigger the shutdown:system event upon PHP shutdown. register_shutdown_function('_elgg_shutdown_hook'); + $logo_url = elgg_get_site_url() . "_graphics/elgg_toolbar_logo.gif"; + elgg_register_menu_item('topbar', array( + 'name' => 'elgg_logo', + 'href' => 'http://www.elgg.org/', + 'text' => "<img src=\"$logo_url\" alt=\"Elgg logo\" />", + 'weight' => 1, + )); + // Sets a blacklist of words in the current language. // This is a comma separated list in word:blacklist. // @todo possibly deprecate diff --git a/engine/lib/users.php b/engine/lib/users.php index c12f8d00d..fd68ef276 100644 --- a/engine/lib/users.php +++ b/engine/lib/users.php @@ -1537,19 +1537,21 @@ function users_init() { 'weight' => 300, )); - elgg_register_menu_item('topbar_alt', array( + elgg_register_menu_item('topbar', array( 'name' => 'usersettings', 'href' => "pg/settings/user/{$user->username}", 'text' => elgg_view_icon('settings') . elgg_echo('settings'), - 'weight' => 500 + 'weight' => 500, + 'section' => 'alt', )); - elgg_register_menu_item('topbar_alt', array( + elgg_register_menu_item('topbar', array( 'name' => 'logout', 'href' => "action/logout", 'text' => elgg_echo('logout'), 'is_action' => TRUE, 'weight' => 1000, + 'section' => 'alt', )); } diff --git a/views/default/css/elements/navigation.php b/views/default/css/elements/navigation.php index e6a324a75..003faeac5 100644 --- a/views/default/css/elements/navigation.php +++ b/views/default/css/elements/navigation.php @@ -118,6 +118,36 @@ left: 0; } + + +/* *************************************** + TOPBAR MENU +*************************************** */ +.elgg-menu-topbar { + float: left; +} + +.elgg-menu-topbar > li { + float:left; +} + +.elgg-menu-topbar > li > a { + padding: 2px 15px; + color: #eeeeee; + margin-top: 2px; + line-height: 1.1em; + display: block; +} + +.elgg-menu-topbar > li > a:hover { + color: #71cbff; + text-decoration: none; +} + +.elgg-menu-topbar.elgg-section-alt { + float:right; +} + /* *************************************** SITE MENU *************************************** */ diff --git a/views/default/css/elements/page_layout.php b/views/default/css/elements/page_layout.php index f7e07ca71..d2be769fa 100644 --- a/views/default/css/elements/page_layout.php +++ b/views/default/css/elements/page_layout.php @@ -41,23 +41,9 @@ z-index: 9000; } .elgg-page-topbar > .elgg-inner { - padding: 2px 10px 2px 8px; -} -<?php //@todo location-dependent styles ?> -.elgg-page-topbar a { - color: #eeeeee; - float: left; - margin: 2px 30px 0 0; - line-height: 1.1em; -} -.elgg-page-topbar a.elgg-alt { - float: right; - margin: 2px 0 0 30px; -} -.elgg-page-topbar a:hover { - color: #71cbff; - text-decoration: none; + padding: 0 10px; } + <?php // elgg logo and user avatar need to be adjusted slightly ?> .elgg-page-topbar img { margin-top: -1px; diff --git a/views/default/page/elements/topbar.php b/views/default/page/elements/topbar.php index cac7cb360..ffb74010e 100644 --- a/views/default/page/elements/topbar.php +++ b/views/default/page/elements/topbar.php @@ -7,15 +7,7 @@ // Elgg logo -$image = '<img src="' . elgg_get_site_url() . '_graphics/elgg_toolbar_logo.gif" alt="Elgg logo" />'; -echo elgg_view('output/url', array( - 'href' => 'http://www.elgg.org/', - 'text' => $image, -)); - -echo elgg_view_menu('topbar', array('sort_by' => 'weight')); - -echo elgg_view_menu('topbar_alt', array('sort_by' => 'weight')); +echo elgg_view_menu('topbar', array('sort_by' => 'weight', 'class' => 'elgg-menu-topbar')); // elgg tools menu // need to echo this empty view for backward compatibility. |