Method: MyHelper#render_block
- Defined in:
- app/helpers/my_helper.rb
#render_block(block, user) ⇒ Object
Renders a single block
34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'app/helpers/my_helper.rb', line 34 def render_block(block, user) content = render_block_content(block, user) if content.present? handle = content_tag('span', sprite_icon('reorder', ''), :class => 'icon-only icon-sort-handle sort-handle', :title => l(:button_move)) close = link_to(sprite_icon('close', l(:button_delete)), {:action => "remove_block", :block => block}, :remote => true, :method => 'post', :class => "icon-only icon-close", :title => l(:button_delete)) content = content_tag('div', handle + close, :class => 'contextual') + content content_tag('div', content, :class => "mypage-box", :id => "block-#{block}") end end |