Class: Bootstrap::ViewHelpers::Components::Modal
- Inherits:
-
Bootstrap::ViewHelpers::Component
show all
- Defined in:
- lib/bootstrap/view_helpers/components/modal.rb,
lib/bootstrap/view_helpers/components/modal/body.rb,
lib/bootstrap/view_helpers/components/modal/footer.rb,
lib/bootstrap/view_helpers/components/modal/header.rb
Defined Under Namespace
Classes: Body, Footer, Header
Instance Attribute Summary
#block, #options, #style, #view
Instance Method Summary
collapse
#initialize
Instance Method Details
#body(body_options = {}, &block) ⇒ Object
27
28
29
|
# File 'lib/bootstrap/view_helpers/components/modal.rb', line 27
def body(body_options = {}, &block)
Body.new(view, body_options, &block).to_html
end
|
31
32
33
|
# File 'lib/bootstrap/view_helpers/components/modal.rb', line 31
def ( = {}, &block)
Footer.new(view, , &block).to_html
end
|
19
20
21
22
23
24
25
|
# File 'lib/bootstrap/view_helpers/components/modal.rb', line 19
def (title_or_options = nil, = {}, &block)
= title_or_options || {} if block.present?
title_or_options = nil if block.blank?
[:title] ||= title_or_options || title_text
[:dismiss] ||= dismiss
Header.new(view, , &block).to_html
end
|
#to_html ⇒ Object
11
12
13
14
15
16
17
|
# File 'lib/bootstrap/view_helpers/components/modal.rb', line 11
def to_html
content_tag(:div, modal_options) do
content_tag(:div, dialog_options) do
content_tag(:div, content_options) { content_to_html(&block) }
end
end
end
|