Improve styling of inbox counter in greeting bar

This commit is contained in:
Tom MacWright 2012-08-07 13:03:36 -04:00 committed by Tom Hughes
parent 5baa6a15e6
commit f08259a529
3 changed files with 17 additions and 8 deletions

View file

@ -309,6 +309,15 @@ h2 {
text-decoration: none;
}
.count-number {
padding: 2px 5px;
border-radius: 3px;
background: #eee;
margin: 0 2px;
font-size: 11px;
color: #333;
}
/* Rules for greeting bar in the top right corner */
#greeting {

View 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' } %>

View file

@ -948,7 +948,7 @@ en:
welcome_user_link_tooltip: Your user page
home: home
home_tooltip: Go to home location
inbox: "inbox (%{count})"
inbox: "inbox %{count}"
inbox_tooltip:
zero: Your inbox contains no unread messages
one: Your inbox contains 1 unread message