From ee96319346a3aa00ef6a24db51e9f9ab7b21e480 Mon Sep 17 00:00:00 2001 From: Daniela Soares Feitosa Date: Thu, 4 Jun 2009 20:36:25 -0300 Subject: [PATCH] ActionItem1078: ProfileImageBlock was not displaying block title --- app/models/profile_image_block.rb | 4 ---- app/views/blocks/profile_image.rhtml | 4 +++- test/unit/profile_image_block_test.rb | 3 +-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/app/models/profile_image_block.rb b/app/models/profile_image_block.rb index b67a641..ec83fc5 100644 --- a/app/models/profile_image_block.rb +++ b/app/models/profile_image_block.rb @@ -10,10 +10,6 @@ class ProfileImageBlock < Block _('This block presents the profile image.') end - def default_title - owner.name - end - def content block = self s = show_name diff --git a/app/views/blocks/profile_image.rhtml b/app/views/blocks/profile_image.rhtml index 7df7592..3829964 100644 --- a/app/views/blocks/profile_image.rhtml +++ b/app/views/blocks/profile_image.rhtml @@ -1,5 +1,7 @@
+

<%= block.title %>

+
@@ -11,7 +13,7 @@
<% if show_name %> -

<%= block.owner.name %>

+

<%= block.owner.short_name %>

<% end %> <% if !user.nil? and user.has_permission?('edit_profile', profile) %> diff --git a/test/unit/profile_image_block_test.rb b/test/unit/profile_image_block_test.rb index deb11ea..ed19b87 100644 --- a/test/unit/profile_image_block_test.rb +++ b/test/unit/profile_image_block_test.rb @@ -13,8 +13,7 @@ class ProfileImageBlockTest < Test::Unit::TestCase instance_eval(& block.content) end - should 'not be editable' do + should 'be editable' do assert ProfileImageBlock.new.editable? end - end -- libgit2 0.21.2