-<%= 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' } %>
+<% if current_user.new_messages.size > 0 %>
+<span id="inboxanchor" class="count-number"><%= current_user.new_messages.size %></span>
+<% end %>