]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/layouts/_inbox.html.erb
Improve styling of inbox counter in greeting bar
[rails.git] / app / views / layouts / _inbox.html.erb
index 18716618fa7e828958986542b5be73ba6f8766ea..2af76f9ed29e357ecbd6871c9f593e9fde0e43ec 100644 (file)
@@ -1,7 +1,7 @@
-<%
-inbox_attributes = {}
-inbox_attributes[:id] = "inboxanchor"
-inbox_attributes[:class] = 'greeting-bar-unread' if @user.new_messages.size > 0
-inbox_attributes[:title] = t 'layouts.inbox_tooltip', :count => @user.new_messages.size
-%>
-<%= link_to t('layouts.inbox', :count => @user.new_messages.size), {:controller => 'message', :action => 'inbox', :display_name => @user.display_name}, inbox_attributes %>
+<%= link_to raw(t('layouts.inbox',
+    :count => @user.new_messages.size > 0 ? "<span class='count-number'>#{@user.new_messages.size}</span>" : '')),
+    {
+        :action => 'inbox',
+        :display_name => @user.display_name,
+        :controller => 'message'
+    }, { :id => 'inboxanchor' } %>