Module: GakuHelpers::ViewHelpers::ModalHelper

Defined in:
lib/gaku_helpers/view_helpers/modal_helper.rb

Instance Method Summary collapse

Instance Method Details

#close_buttonObject



5
6
7
8
9
# File 'lib/gaku_helpers/view_helpers/modal_helper.rb', line 5

def close_button
   :button, :class => 'close', :'data-dismiss' => 'modal' do
    "&times".html_safe
  end
end


17
18
19
20
21
22
23
24
25
# File 'lib/gaku_helpers/view_helpers/modal_helper.rb', line 17

def modal_body(&block)
   :div, class: "modal-body" do
     :div, class: "row-fluid" do
       :div, class: "span12 well" do
        block.call
      end
    end
  end
end


11
12
13
14
15
# File 'lib/gaku_helpers/view_helpers/modal_helper.rb', line 11

def modal_for(id, &block)
   :div, class: "modal hide", id: id, wmode: "opaque" do
    block.call
  end
end


34
35
36
# File 'lib/gaku_helpers/view_helpers/modal_helper.rb', line 34

def modal_form_error(id)
   :div, nil, :id => id
end


27
28
29
30
31
32
# File 'lib/gaku_helpers/view_helpers/modal_helper.rb', line 27

def modal_header(text)
   :div, class: "modal-header" do
    concat close_button
    concat (:h3) { text }
  end
end