From 1a2ccfbb8fd0d5432fe09473af59ec0a1d3457c5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Thu, 1 Oct 2009 19:18:23 +0000 Subject: [PATCH] Set title on /blocks/:id and link to usernames --- app/views/user_blocks/show.html.erb | 14 ++++++++++---- config/locales/en.yml | 3 ++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/app/views/user_blocks/show.html.erb b/app/views/user_blocks/show.html.erb index a1123e21e..43b69d13c 100644 --- a/app/views/user_blocks/show.html.erb +++ b/app/views/user_blocks/show.html.erb @@ -1,7 +1,13 @@ -

<%= t('user_block.show.heading', - :block_on => @user_block.user.display_name, - :block_by => @user_block.creator.display_name) %>

- +<% @title = t('user_block.show.title', + :block_on => @user_block.user.display_name, + :block_by => @user_block.creator.display_name) %> +

<%= t('user_block.show.title', + :block_on => link_to( + h(@user_block.user.display_name), + {:controller => 'user', :action => 'view', :display_name => @user_block.user.display_name}), + :block_by => link_to( + h(@user_block.creator.display_name), + {:controller => 'user', :action => 'view', :display_name => @user_block.creator.display_name})) %>

<% if @user_block.revoker %>

<%= t'user_block.show.revoker' %> diff --git a/config/locales/en.yml b/config/locales/en.yml index f44b2d34d..fd6289962 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1096,7 +1096,8 @@ en: heading: "List of blocks by {{name}}" empty: "{{name}} has not been blocked yet." show: - heading: "Block on {{block_on}} by {{block_by}}" + title: "{{block_on}} blocked by {{block_by}}" + heading: "{{block_on}} blocked by {{block_by}}" time_future: "Ends in {{time}}" time_past: "Ended {{time}} ago" status: "Status" -- 2.39.5