Module: Admin::BaseHelper

Defined in:
app/helpers/admin/base_helper.rb

Instance Method Summary collapse

Instance Method Details

#block_container(model_name, block_name, block, &proc) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
# File 'app/helpers/admin/base_helper.rb', line 4

def block_container(model_name, block_name, block, &proc)
   :div, :class => 'block-container ui-corner-all' do
    (:span, :class => 'block-type') do
      (:span, (:span, ' ', :class => 'inner'), :class => 'handler') +
      block.model_name.human
    end +
    (:span, capture(&proc), :class => 'block-name') +
    link_to('', [:edit, :admin, block], :class => 'small-icons edit-link', :popup => true) +
    link_to('', '#', :class => 'big-icons gray-destroy') +
    hidden_field_tag("#{model_name}[#{block_name}_ids][]", block.id, :class => 'block-selected')
  end
end