Module: ForemanVirtWhoConfigure::CompatibilityHelper
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/helpers/foreman_virt_who_configure/compatibility_helper.rb
Instance Method Summary collapse
- #help_button_or_path ⇒ Object
- #inline_help_popover(message) ⇒ Object
- #new_config_link(options = {}, html_options = {}) ⇒ Object
Instance Method Details
#help_button_or_path ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'app/helpers/foreman_virt_who_configure/compatibility_helper.rb', line 13 def if ApplicationHelper.instance_methods.include?(:help_button) # help_button does not support plugins link_to(_("Help"), { :action => "welcome" }, { :class => 'btn btn-default' }) else help_path end end |
#inline_help_popover(message) ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'app/helpers/foreman_virt_who_configure/compatibility_helper.rb', line 22 def inline_help_popover() version = Foreman::Version.new if version.major.to_i >= 1 && version.minor.to_i >= 15 { :label_help => .html_safe } else { :help_inline => popover('', ).html_safe } end end |
#new_config_link(options = {}, html_options = {}) ⇒ Object
5 6 7 8 9 10 11 |
# File 'app/helpers/foreman_virt_who_configure/compatibility_helper.rb', line 5 def new_config_link( = {}, = {}) if ApplicationHelper.instance_methods.include?(:new_link) new_link(_("Create Config"), .merge(:permission => 'create_virt_who_config'), ) else (_("New Config"), hash_for_new_foreman_virt_who_configure_config_path.merge(:permission => 'create_virt_who_config'), ) end end |