module SimpleFormExtension::Components::Popovers
Public Instance Methods
Source
# File lib/simple_form_extension/components/popovers.rb, line 5 def popover(wrapper_options) return nil unless options[:popover] options = { 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, '', options) end
Source
# File lib/simple_form_extension/components/popovers.rb, line 27 def popover_content popover_options[:content] end
Source
# File lib/simple_form_extension/components/popovers.rb, line 31 def popover_position popover_options[:position] ||= "auto" end
Source
# File lib/simple_form_extension/components/popovers.rb, line 35 def popover_tigger popover_options[:trigger] ||= "click" end
Source
# File lib/simple_form_extension/components/popovers.rb, line 23 def popover_title popover_options[:title] end
Private Instance Methods
Source
# File lib/simple_form_extension/components/popovers.rb, line 41 def popover_options options[:popover] ||= {} end