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)
content_tag :div, :class => 'block-container ui-corner-all' do
content_tag(:span, :class => 'block-type') do
content_tag(:span, content_tag(:span, ' ', :class => 'inner'), :class => 'handler') +
block.model_name.human
end +
content_tag(: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
|