From: Sem Date: Tue, 30 Oct 2012 01:32:04 +0000 (+0100) Subject: Added groups icon in topbar. X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=b4ad2436f397f5f9f155a723f4a07bb3cc7eb32a;p=lorea%2Fsaravea_theme.git Added groups icon in topbar. --- diff --git a/_graphics/elgg_sprites.png b/_graphics/elgg_sprites.png index b8b9b2b..461799c 100644 Binary files a/_graphics/elgg_sprites.png and b/_graphics/elgg_sprites.png differ diff --git a/start.php b/start.php index eb25a82..ae5f3d6 100644 --- a/start.php +++ b/start.php @@ -29,7 +29,17 @@ function n1_theme_init() { function n1_theme_topbar_menu($hook, $type, $returnvalue, $params){ $user = elgg_get_logged_in_user_entity(); - + + if (elgg_is_active_plugin('groups')) { + $returnvalue[] = ElggMenuItem::factory(array( + 'name' => 'groups', + 'href' => $user ? "groups/member/$user->username" : "groups/all", + 'text' => elgg_view_icon('groups'), + 'title' => elgg_echo('groups'), + 'priority' => 500, + )); + } + if (elgg_is_admin_logged_in()) { $returnvalue[] = ElggMenuItem::factory(array( 'name' => 'administration', diff --git a/views/default/css/elements/icons.php b/views/default/css/elements/icons.php index ba62a66..2d6db62 100644 --- a/views/default/css/elements/icons.php +++ b/views/default/css/elements/icons.php @@ -281,6 +281,12 @@ .elgg-icon-logout:hover, .elgg-menu-item-logout:hover a { background-position: 0 -1542px; } +.elgg-icon-groups { + background-position: 0 -1577px; +} +.elgg-icon-groups:hover { + background-position: 0 -1560px; +} .elgg-avatar > .elgg-icon-hover-menu {