Commit 8aef78e043a574e9515160e6a3e4a15530cc4919
1 parent
2a404521
Exists in
master
and in
29 other branches
ActionItem154: properly displaying footer for blocks
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1401 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
1 changed file
with
5 additions
and
2 deletions
Show diff stats
app/helpers/boxes_helper.rb
@@ -42,7 +42,10 @@ module BoxesHelper | @@ -42,7 +42,10 @@ module BoxesHelper | ||
42 | def display_block(block, main_content = nil) | 42 | def display_block(block, main_content = nil) |
43 | content = block.main? ? main_content : block.content | 43 | content = block.main? ? main_content : block.content |
44 | result = extract_block_content(content) | 44 | result = extract_block_content(content) |
45 | - footer = extract_block_content(footer) | 45 | + footer_content = extract_block_content(block.footer) |
46 | + unless footer_content.blank? | ||
47 | + footer_content = content_tag('div', footer_content, :class => 'block-footer-content' ) | ||
48 | + end | ||
46 | 49 | ||
47 | options = { | 50 | options = { |
48 | :class => classes = ['block', block.css_class_name ].uniq.join(' '), | 51 | :class => classes = ['block', block.css_class_name ].uniq.join(' '), |
@@ -53,7 +56,7 @@ module BoxesHelper | @@ -53,7 +56,7 @@ module BoxesHelper | ||
53 | end | 56 | end |
54 | 57 | ||
55 | box_decorator.block_target(block.box, block) + | 58 | box_decorator.block_target(block.box, block) + |
56 | - content_tag('div', result + footer + box_decorator.block_edit_buttons(block), | 59 | + content_tag('div', result + footer_content + box_decorator.block_edit_buttons(block), |
57 | options) + | 60 | options) + |
58 | box_decorator.block_handle(block) | 61 | box_decorator.block_handle(block) |
59 | end | 62 | end |