Module: SimpleFormExtension::Components::Popovers
- Defined in:
- lib/simple_form_extension/components/popovers.rb
Instance Method Summary collapse
- #popover(wrapper_options) ⇒ Object
- #popover_content ⇒ Object
- #popover_position ⇒ Object
- #popover_tigger ⇒ Object
- #popover_title ⇒ Object
Instance Method Details
#popover(wrapper_options) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/simple_form_extension/components/popovers.rb', line 5 def popover() return nil unless [:popover] = { class: 'btn-popover fa fa-question-circle', :rel => 'popover', :'data-toggle' => 'popover', :'data-container' => 'body', :'data-title' => popover_title, :'data-content' => popover_content, :'data-placement' => popover_position, :'data-trigger' => popover_tigger } template.content_tag(:i, '', ) end |
#popover_content ⇒ Object
27 28 29 |
# File 'lib/simple_form_extension/components/popovers.rb', line 27 def popover_content [:content] end |
#popover_position ⇒ Object
31 32 33 |
# File 'lib/simple_form_extension/components/popovers.rb', line 31 def popover_position [:position] ||= "auto" end |
#popover_tigger ⇒ Object
35 36 37 |
# File 'lib/simple_form_extension/components/popovers.rb', line 35 def popover_tigger [:trigger] ||= "click" end |
#popover_title ⇒ Object
23 24 25 |
# File 'lib/simple_form_extension/components/popovers.rb', line 23 def popover_title [:title] end |