Module: GakuHelpers::ViewHelpers::ModalHelper
- Defined in:
- lib/gaku_helpers/view_helpers/modal_helper.rb
Instance Method Summary collapse
- #close_button ⇒ Object
- #modal_body(&block) ⇒ Object
- #modal_for(id, &block) ⇒ Object
- #modal_form_error(id) ⇒ Object
- #modal_header(text) ⇒ Object
Instance Method Details
#close_button ⇒ Object
5 6 7 8 9 |
# File 'lib/gaku_helpers/view_helpers/modal_helper.rb', line 5 def content_tag :button, :class => 'close', :'data-dismiss' => 'modal' do "×".html_safe end end |
#modal_body(&block) ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/gaku_helpers/view_helpers/modal_helper.rb', line 17 def modal_body(&block) content_tag :div, class: "modal-body" do content_tag :div, class: "row-fluid" do content_tag :div, class: "span12 well" do block.call end end end end |
#modal_for(id, &block) ⇒ Object
11 12 13 14 15 |
# File 'lib/gaku_helpers/view_helpers/modal_helper.rb', line 11 def modal_for(id, &block) content_tag :div, class: "modal hide", id: id, wmode: "opaque" do block.call end end |
#modal_form_error(id) ⇒ Object
34 35 36 |
# File 'lib/gaku_helpers/view_helpers/modal_helper.rb', line 34 def modal_form_error(id) content_tag :div, nil, :id => id end |
#modal_header(text) ⇒ Object
27 28 29 30 31 32 |
# File 'lib/gaku_helpers/view_helpers/modal_helper.rb', line 27 def modal_header(text) content_tag :div, class: "modal-header" do concat concat content_tag(:h3) { text } end end |