From 1e503286839742e72c01a6357c4293b7bf390d56 Mon Sep 17 00:00:00 2001 From: Sem Date: Tue, 23 Oct 2012 06:20:08 +0200 Subject: Overrided topbar icons with tooltips. --- start.php | 44 +++++++++++++++++++++++++++++++++++++++++- views/default/n1_theme/css.php | 15 ++++++++++++++ 2 files changed, 58 insertions(+), 1 deletion(-) diff --git a/start.php b/start.php index 43d175f..eb25a82 100644 --- a/start.php +++ b/start.php @@ -28,7 +28,49 @@ function n1_theme_init() { } function n1_theme_topbar_menu($hook, $type, $returnvalue, $params){ - //var_dump($returnvalue);exit(); + $user = elgg_get_logged_in_user_entity(); + + if (elgg_is_admin_logged_in()) { + $returnvalue[] = ElggMenuItem::factory(array( + 'name' => 'administration', + 'href' => "admin", + 'text' => elgg_view_icon('settings'), + 'title' => elgg_echo('admin'), + 'priority' => 100, + 'section' => 'alt', + )); + } + + if (elgg_is_active_plugin('dashboard')) { + $returnvalue[] = ElggMenuItem::factory(array( + 'name' => 'dashboard', + 'href' => "dashboard", + 'text' => elgg_view_icon('home'), + 'title' => elgg_echo('dashboard'), + 'priority' => 200, + 'section' => 'alt', + )); + } + + $returnvalue[] = ElggMenuItem::factory(array( + 'name' => 'usersettings', + 'href' => "settings/user/{$user->username}", + 'text' => elgg_view_icon('settings-alt'), + 'title' => elgg_echo('settings'), + 'priority' => 500, + 'section' => 'alt', + )); + + $returnvalue[] = ElggMenuItem::factory(array( + 'name' => 'logout', + 'href' => "action/logout", + 'text' => elgg_echo('logout'), + 'title' => elgg_echo('logout'), + 'is_action' => TRUE, + 'priority' => 1000, + 'section' => 'alt', + )); + return $returnvalue; } /** diff --git a/views/default/n1_theme/css.php b/views/default/n1_theme/css.php index db9fa46..be935d4 100644 --- a/views/default/n1_theme/css.php +++ b/views/default/n1_theme/css.php @@ -26,6 +26,21 @@ font-weight: bold; } +.messages-new { + background-color: #FF4C12; + border-radius: 10px; + box-shadow: -2px 2px 4px rgba(0, 0, 0, 0.5); + color: black; + font-size: 10px; + font-weight: bold; + height: 16px; + left: 20px; + min-width: 16px; + position: absolute; + text-align: center; + top: 12px; +} + .elgg-access, .elgg-input-access > option { padding-left: 19px; background-image: url('mod/n1_theme/_graphics/privacy.png'); -- cgit v1.2.3