aboutsummaryrefslogtreecommitdiff
path: root/mod/messages
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2011-12-01 19:08:49 -0800
committerCash Costello <cash.costello@gmail.com>2011-12-01 19:08:49 -0800
commita11763fa453c1771fd76091ce01fee8cd34773ca (patch)
tree21dedf56b18472743910ee306736fb0e6651e245 /mod/messages
parent153cb18bbbdfc2343f494413cb234f2940c69a08 (diff)
parent5c97bc699ff62259a15ec9fe37278aab12d4b2b1 (diff)
downloadelgg-a11763fa453c1771fd76091ce01fee8cd34773ca.tar.gz
elgg-a11763fa453c1771fd76091ce01fee8cd34773ca.tar.bz2
Merge pull request #99 from ashward/ticket_4170
Fixes #4170: Messages icon on top bar doesn't have a title attribute
Diffstat (limited to 'mod/messages')
-rw-r--r--mod/messages/languages/en.php1
-rw-r--r--mod/messages/start.php5
2 files changed, 5 insertions, 1 deletions
diff --git a/mod/messages/languages/en.php b/mod/messages/languages/en.php
index 308c3d519..7732a9dce 100644
--- a/mod/messages/languages/en.php
+++ b/mod/messages/languages/en.php
@@ -11,6 +11,7 @@ $english = array(
*/
'messages' => "Messages",
+ 'messages:unreadcount' => "%s unread",
'messages:back' => "back to messages",
'messages:user' => "%s's inbox",
'messages:posttitle' => "%s's messages: %s",
diff --git a/mod/messages/start.php b/mod/messages/start.php
index e4ef4d43a..1a2709324 100644
--- a/mod/messages/start.php
+++ b/mod/messages/start.php
@@ -125,11 +125,13 @@ function messages_notifier() {
if (elgg_is_logged_in()) {
$class = "elgg-icon elgg-icon-mail";
$text = "<span class='$class'></span>";
-
+ $tooltip = elgg_echo("messages");
+
// get unread messages
$num_messages = (int)messages_count_unread();
if ($num_messages != 0) {
$text .= "<span class=\"messages-new\">$num_messages</span>";
+ $tooltip .= " (" . elgg_echo("messages:unreadcount", array($num_messages)) . ")";
}
elgg_register_menu_item('topbar', array(
@@ -137,6 +139,7 @@ function messages_notifier() {
'href' => 'messages/inbox/' . elgg_get_logged_in_user_entity()->username,
'text' => $text,
'priority' => 600,
+ 'title' => $tooltip,
));
}
}