Set title on /blocks/:id and link to usernames
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Thu, 1 Oct 2009 19:18:23 +0000 (19:18 +0000)
committerÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Thu, 1 Oct 2009 19:18:23 +0000 (19:18 +0000)
app/views/user_blocks/show.html.erb
config/locales/en.yml

index a1123e21e269a6c29a33b529af49ed6319c5d889..43b69d13c0de79941e39d6343df3c25f61f22c35 100644 (file)
@@ -1,7 +1,13 @@
-<h1><%= t('user_block.show.heading', 
-       :block_on => @user_block.user.display_name, 
-        :block_by => @user_block.creator.display_name) %></h1>
-
+<% @title = t('user_block.show.title',
+              :block_on => @user_block.user.display_name,
+              :block_by => @user_block.creator.display_name) %>
+<h1><%= 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})) %></h1>
 <% if @user_block.revoker %>
 <p>
   <b><%= t'user_block.show.revoker' %></b>
index f44b2d34dfa68f418e0297778b136d4ae3bcb06e..fd6289962caaf3ff65bc7f586afa408149323edf 100644 (file)
@@ -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"