Improve styling of inbox counter in greeting bar
This commit is contained in:
parent
5baa6a15e6
commit
f08259a529
3 changed files with 17 additions and 8 deletions
|
@ -309,6 +309,15 @@ h2 {
|
||||||
text-decoration: none;
|
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 */
|
/* Rules for greeting bar in the top right corner */
|
||||||
|
|
||||||
#greeting {
|
#greeting {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<%
|
<%= link_to raw(t('layouts.inbox',
|
||||||
inbox_attributes = {}
|
:count => @user.new_messages.size > 0 ? "<span class='count-number'>#{@user.new_messages.size}</span>" : '')),
|
||||||
inbox_attributes[:id] = "inboxanchor"
|
{
|
||||||
inbox_attributes[:class] = 'greeting-bar-unread' if @user.new_messages.size > 0
|
:action => 'inbox',
|
||||||
inbox_attributes[:title] = t 'layouts.inbox_tooltip', :count => @user.new_messages.size
|
:display_name => @user.display_name,
|
||||||
%>
|
:controller => 'message'
|
||||||
<%= link_to t('layouts.inbox', :count => @user.new_messages.size), {:controller => 'message', :action => 'inbox', :display_name => @user.display_name}, inbox_attributes %>
|
}, { :id => 'inboxanchor' } %>
|
||||||
|
|
|
@ -948,7 +948,7 @@ en:
|
||||||
welcome_user_link_tooltip: Your user page
|
welcome_user_link_tooltip: Your user page
|
||||||
home: home
|
home: home
|
||||||
home_tooltip: Go to home location
|
home_tooltip: Go to home location
|
||||||
inbox: "inbox (%{count})"
|
inbox: "inbox %{count}"
|
||||||
inbox_tooltip:
|
inbox_tooltip:
|
||||||
zero: Your inbox contains no unread messages
|
zero: Your inbox contains no unread messages
|
||||||
one: Your inbox contains 1 unread message
|
one: Your inbox contains 1 unread message
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue