diff options
-rw-r--r-- | start.php | 44 | ||||
-rw-r--r-- | views/default/n1_theme/css.php | 15 |
2 files changed, 58 insertions, 1 deletions
@@ -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('<?php echo elgg_get_site_url(); ?>mod/n1_theme/_graphics/privacy.png'); |