Sha256: b95fb89e6b696a5f1924ac723790251ccd89fb290b570211e93e5b3658bf1192
Contents?: true
Size: 1.05 KB
Versions: 42
Compression:
Stored size: 1.05 KB
Contents
module ForemanVirtWhoConfigure module CompatibilityHelper extend ActiveSupport::Concern def new_config_link(options = {}, html_options = {}) if ApplicationHelper.instance_methods.include?(:new_link) new_link(_("Create Config"), options.merge(:permission => 'create_virt_who_config'), html_options) else display_link_if_authorized(_("New Config"), hash_for_new_foreman_virt_who_configure_config_path.merge(:permission => 'create_virt_who_config'), html_options) end end def help_button_or_path 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 def inline_help_popover(message) version = Foreman::Version.new if version.major.to_i >= 1 && version.minor.to_i >= 15 { :label_help => message.html_safe } else { :help_inline => popover('', message).html_safe } end end end end
Version data entries
42 entries across 42 versions & 1 rubygems