summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2012-10-23 06:20:08 +0200
committerSem <sembrestels@riseup.net>2012-10-23 06:20:08 +0200
commit1e503286839742e72c01a6357c4293b7bf390d56 (patch)
tree270a4dcca0f4ddd26c7e641f050b2a720d6734c6
parent771ba0de021f67de6dd6eb0a7916fe5e10dc679f (diff)
downloadsaravea_theme-1e503286839742e72c01a6357c4293b7bf390d56.tar.gz
saravea_theme-1e503286839742e72c01a6357c4293b7bf390d56.tar.bz2
Overrided topbar icons with tooltips.
-rw-r--r--start.php44
-rw-r--r--views/default/n1_theme/css.php15
2 files changed, 58 insertions, 1 deletions
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('<?php echo elgg_get_site_url(); ?>mod/n1_theme/_graphics/privacy.png');