From c655cda6f31f4f423ff6b6efba12dcc1bd15376b Mon Sep 17 00:00:00 2001
From: Dries Buytaert <dries@buytaert.net>
Date: Wed, 16 Dec 2009 19:41:22 +0000
Subject: [PATCH] - Patch #658726 by bleen18: better home link.

---
 modules/toolbar/toolbar.css     | 10 ++++++++++
 modules/toolbar/toolbar.module  | 17 ++++++++++++++++-
 modules/toolbar/toolbar.png     |  9 +++++----
 modules/toolbar/toolbar.tpl.php |  1 +
 4 files changed, 32 insertions(+), 5 deletions(-)

diff --git a/modules/toolbar/toolbar.css b/modules/toolbar/toolbar.css
index b90bbbf57635..f3844a1d1aa7 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 49b8102eb715..5b8527128781 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 17ce9409b532..1f5226442c7f 100644
--- a/modules/toolbar/toolbar.png
+++ b/modules/toolbar/toolbar.png
@@ -1,7 +1,8 @@
 ‰PNG
 
-���
IHDR���2���<���$5éÁ���sBIT|dˆ���	pHYs��
+���
IHDR���2���K���2Ô¸���sBIT|dˆ���	pHYs��
 ð��
-ðB¬4˜���tEXtSoftware�Adobe Fireworks CS4²Ó ��ÈIDAThíš!nã@†?[‚ܺԬ0X`bæ#,Ü#ä!é¬%	0Xà,J`-rŠ†4 ‰šHé¶Jâj\ÏŽæC#GóÞÿå,[²7™L,@ì÷û¾3hA4±h"Öˆ¸£en"¦aˆ;Z†á&böˆ¸£en"¦aˆw\H)GÀOàNCÝ%ð8G§»ìáI)oßÀ½†âÿòøqXwÚC�5àP÷ádÝY£H—t]"77éº>Àÿ
M¾'bNÄ4¬m7ÔuÍp8ÔB)EQl6›¿
ò<'‚³5ZMd±XPóù¼]ÒA@–eñþBeÙE	h!²Z­¨ª
-€ªªX.—-ãž'CÒ4Å÷ß"ù¾Oš¦„axÕþ«DÖë5eYr|äoš†²,©ëú‹±?'Š"’$ I¢(ºzïE¥Óé”ívûîún·c6›¡”j÷<q“ç9q·ÚçI)­x×µæöëDLɘ†1
kD<àWß!t €¿}‡Ð�žú¡<÷Bxé;„ðñýò?ÄMÄ4¬šˆ5"îh™„›ˆix¶|ùð
-̱¨?ïR!™����IEND®B`‚
\ No newline at end of file
+ðB¬4˜���tEXtSoftware�Adobe Fireworks CS4²Ó ��dIDAThíš1ŽÚ@FŸ­)¨XS’”t¹�ÅF¢qç#¤r½Gà[Ӑ# 4P …‚¤‚2 T&r
+àO±X1¬pd¯‡Ñ<É’e{f¾Ç?0²3P‡Ã¡ê… DŒ(ˆA1FÄN-Í°Ñ
sDìÔÒ[Ý0GÄN-Í°Ñ
cDœd'ÃðøP@¿Kàk¿ß稜9††a˜Ÿ
+èüœÀãq¿Ô1ðTÒ�û}Jí—6F"R&e÷G‘‡’)»€÷y¬ˆnXÝ0FDåmEÍf³Ðq3Ùn·¯ÎÕj5‚  ^¯_ì#WE‹Ãáù|ž/éêõ:¾ï£Ôé窔Â÷ý«CdµZ1›Í�˜Íf,—Ëœq/ãyÝn×}‰äº.ÝnÏónj“Èz½f2™üä&“	QýgìlZ­N€N§C«Õº¹íU‘8ŽFìv»“ãûýžñxLÇ9ã^¦Ýnív;W;'C#žuY~­ˆnXÝ°"ºaŒˆ|«:D(àWÕ!Š@?«Q
+ø]uˆ"PÀŸªC^?_Þ!¶"ºaTEŒ±SK'lEtù~‰Þ$on8¦¼Âá:ŽCÖ4€Ð8;~?ˆÈ£ˆl䅍ˆ<¦Îi¹eIô$›Þ]ˆˆÈG™¾!‘0=^WyðL	äßTºÆæx}åáODDäùFsž«ŸÞIÝÈÀ÷Ö‚Ï©ýéëG霬§"r~û§C'’Z®ÁEœÔG꜖"ÆüÓhEtãâ›7¿¶dÝ̹ÚéÂ_¬Ì°è÷”¯����IEND®B`‚
\ No newline at end of file
diff --git a/modules/toolbar/toolbar.tpl.php b/modules/toolbar/toolbar.tpl.php
index 1ea36a3a2b17..5e4c3dc1f8d4 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']):?>
-- 
GitLab