Commit 5cc6808924cca8f5af071ae9e82e01252944c65b
1 parent
b8470e3c
Exists in
master
and in
22 other branches
ActionItem310: displaying the owner name in the tags blocks
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1703 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
2 changed files
with
5 additions
and
1 deletions
Show diff stats
app/models/tags_block.rb
| @@ -14,7 +14,7 @@ class TagsBlock < Block | @@ -14,7 +14,7 @@ class TagsBlock < Block | ||
| 14 | end | 14 | end |
| 15 | 15 | ||
| 16 | def content | 16 | def content |
| 17 | - block_title(_('Tags')) + | 17 | + block_title(_("%s's tags") % owner.name) + |
| 18 | "\n<div class='tag_cloud'>\n"+ | 18 | "\n<div class='tag_cloud'>\n"+ |
| 19 | tag_cloud( owner.tags, :id, | 19 | tag_cloud( owner.tags, :id, |
| 20 | owner.generate_url(:controller => 'profile', :action => 'tag'), | 20 | owner.generate_url(:controller => 'profile', :action => 'tag'), |
test/unit/tags_block_test.rb
| @@ -23,4 +23,8 @@ class TagsBlockTest < Test::Unit::TestCase | @@ -23,4 +23,8 @@ class TagsBlockTest < Test::Unit::TestCase | ||
| 23 | assert_match /profile\/testinguser\/tag\/third-tag/, block.content | 23 | assert_match /profile\/testinguser\/tag\/third-tag/, block.content |
| 24 | end | 24 | end |
| 25 | 25 | ||
| 26 | + should 'display owner name in tags' do | ||
| 27 | + assert_match "testinguser's tags", block.content | ||
| 28 | + end | ||
| 29 | + | ||
| 26 | end | 30 | end |