From: Tom Hughes Date: Tue, 7 Aug 2012 21:57:13 +0000 (+0100) Subject: Make things a bit more readable X-Git-Tag: live~5447 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/7f661ec55e3cf054a1f6ef99df090617e7d71b89 Make things a bit more readable --- diff --git a/app/views/layouts/_inbox.html.erb b/app/views/layouts/_inbox.html.erb index 2af76f9ed..fcaa5ae64 100644 --- a/app/views/layouts/_inbox.html.erb +++ b/app/views/layouts/_inbox.html.erb @@ -1,7 +1,13 @@ -<%= link_to raw(t('layouts.inbox', - :count => @user.new_messages.size > 0 ? "#{@user.new_messages.size}" : '')), - { - :action => 'inbox', - :display_name => @user.display_name, - :controller => 'message' - }, { :id => 'inboxanchor' } %> +<%= + link_to( + t("layouts.inbox_html", + :count => @user.new_messages.size > 0 ? + content_tag( + :span, @user.new_messages.size, :class => "count-number" + ) : + "" + ), + inbox_path(:display_name => @user.display_name), + :id => "inboxanchor" + ) +%> diff --git a/config/locales/en.yml b/config/locales/en.yml index 76beb030a..a48093cf8 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -948,7 +948,7 @@ en: welcome_user_link_tooltip: Your user page home: home home_tooltip: Go to home location - inbox: "inbox %{count}" + inbox_html: "inbox %{count}" inbox_tooltip: zero: Your inbox contains no unread messages one: Your inbox contains 1 unread message