summaryrefslogtreecommitdiff
path: root/modules/toolbar
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-12-16 19:41:22 +0000
committerDries Buytaert <dries@buytaert.net>2009-12-16 19:41:22 +0000
commitc655cda6f31f4f423ff6b6efba12dcc1bd15376b (patch)
tree81f2f36bd6d19b92b70a9b95c4021b6e1b2603bb /modules/toolbar
parent775b4561fec7aef0eae71172559f4c000a25d458 (diff)
downloadbrdo-c655cda6f31f4f423ff6b6efba12dcc1bd15376b.tar.gz
brdo-c655cda6f31f4f423ff6b6efba12dcc1bd15376b.tar.bz2
- Patch #658726 by bleen18: better home link.
Diffstat (limited to 'modules/toolbar')
-rw-r--r--modules/toolbar/toolbar.css10
-rw-r--r--modules/toolbar/toolbar.module17
-rw-r--r--modules/toolbar/toolbar.pngbin590 -> 746 bytes
-rw-r--r--modules/toolbar/toolbar.tpl.php1
4 files changed, 27 insertions, 1 deletions
diff --git a/modules/toolbar/toolbar.css b/modules/toolbar/toolbar.css
index b90bbbf57..f3844a1d1 100644
--- a/modules/toolbar/toolbar.css
+++ b/modules/toolbar/toolbar.css
@@ -73,6 +73,16 @@ body.toolbar-drawer {
position: relative;
}
+#toolbar-home a span {
+ vertical-align: text-bottom;
+ width: 15px;
+ height: 14px;
+ display: block;
+ background: url(toolbar.png) no-repeat 0px -61px;
+ text-indent: -9999px;
+ margin: 3px 0px;
+}
+
#toolbar-user {
float: right;
}
diff --git a/modules/toolbar/toolbar.module b/modules/toolbar/toolbar.module
index 49b8102eb..5b8527128 100644
--- a/modules/toolbar/toolbar.module
+++ b/modules/toolbar/toolbar.module
@@ -197,7 +197,7 @@ function toolbar_build() {
'#heading' => array('text' => t($system_menus['management']), 'level' => 'h2', 'class' => 'element-invisible'),
);
- // Add logout & user account links or login link
+ // Add logout & user account links or login link.
if ($user->uid) {
$links = array(
'account' => array(
@@ -224,6 +224,20 @@ function toolbar_build() {
'#links' => $links,
'#attributes' => array('id' => 'toolbar-user'),
);
+
+ // Add a "home" link.
+ $link = array(
+ 'home' => array(
+ 'title' => '<span class="home-link">Home</span>',
+ 'href' => '<front>',
+ 'html' => TRUE,
+ ),
+ );
+ $build['toolbar_home'] = array(
+ '#theme' => 'links',
+ '#links' => $link,
+ '#attributes' => array('id' => 'toolbar-home'),
+ );
// Add an anchor to be able to toggle the visibility of the drawer.
$build['toolbar_toggle'] = array(
@@ -259,6 +273,7 @@ function toolbar_get_menu_tree() {
$admin_link = array_pop($tree);
$tree = $admin_link['below'] ? $admin_link['below'] : array();
}
+
return $tree;
}
diff --git a/modules/toolbar/toolbar.png b/modules/toolbar/toolbar.png
index 17ce9409b..1f5226442 100644
--- a/modules/toolbar/toolbar.png
+++ b/modules/toolbar/toolbar.png
Binary files differ
diff --git a/modules/toolbar/toolbar.tpl.php b/modules/toolbar/toolbar.tpl.php
index 1ea36a3a2..5e4c3dc1f 100644
--- a/modules/toolbar/toolbar.tpl.php
+++ b/modules/toolbar/toolbar.tpl.php
@@ -24,6 +24,7 @@
?>
<div id="toolbar" class="<?php print $classes; ?> clearfix">
<div class="toolbar-menu clearfix">
+ <?php print render($toolbar['toolbar_home']); ?>
<?php print render($toolbar['toolbar_user']); ?>
<?php print render($toolbar['toolbar_menu']); ?>
<?php if ($toolbar['toolbar_drawer']):?>