Sha256: 32ea4d21a5d6f26a2a8aff474b613cb06fb52ab90e2dd8ac0af20b32f532721f

Contents?: true

Size: 695 Bytes

Versions: 185

Compression:

Stored size: 695 Bytes

Contents

module Bastion
  module LayoutHelper
    def include_plugin_js(plugin)
      return unless plugin[:javascript]

      if plugin[:javascript].is_a?(Proc)
        js = instance_eval(&plugin[:javascript])
        js = js.join("\n") if js.is_a?(Array)
        js.html_safe
      else
        javascript_include_tag(plugin[:javascript])
      end
    end

    def include_plugin_styles(plugin)
      return unless plugin[:stylesheet]

      if plugin[:stylesheet].is_a?(Proc)
        styles = instance_eval(&plugin[:stylesheet])
        styles = styles.join("\n") if styles.is_a?(Array)
        styles.html_safe
      else
        stylesheet_link_tag(plugin[:stylesheet])
      end
    end
  end
end

Version data entries

185 entries across 185 versions & 2 rubygems

Version Path
katello-4.0.0.rc3 engines/bastion/app/helpers/bastion/layout_helper.rb
katello-3.18.2.1 engines/bastion/app/helpers/bastion/layout_helper.rb
katello-3.18.2 engines/bastion/app/helpers/bastion/layout_helper.rb
katello-3.17.3 engines/bastion/app/helpers/bastion/layout_helper.rb
katello-4.0.0.rc2 engines/bastion/app/helpers/bastion/layout_helper.rb
katello-3.18.1.1 engines/bastion/app/helpers/bastion/layout_helper.rb
katello-3.17.2 engines/bastion/app/helpers/bastion/layout_helper.rb
katello-4.0.0.rc1 engines/bastion/app/helpers/bastion/layout_helper.rb
katello-3.18.1 engines/bastion/app/helpers/bastion/layout_helper.rb
katello-3.18.0 engines/bastion/app/helpers/bastion/layout_helper.rb
katello-3.17.1 engines/bastion/app/helpers/bastion/layout_helper.rb
katello-3.16.2 engines/bastion/app/helpers/bastion/layout_helper.rb
katello-3.18.0.rc2.1 engines/bastion/app/helpers/bastion/layout_helper.rb
katello-3.18.0.rc2 engines/bastion/app/helpers/bastion/layout_helper.rb
katello-3.17.0 engines/bastion/app/helpers/bastion/layout_helper.rb
katello-3.18.0.rc1 engines/bastion/app/helpers/bastion/layout_helper.rb
katello-3.17.0.rc2.2 engines/bastion/app/helpers/bastion/layout_helper.rb
katello-3.17.0.rc2.1 engines/bastion/app/helpers/bastion/layout_helper.rb
katello-3.16.1.2 engines/bastion/app/helpers/bastion/layout_helper.rb
katello-3.16.1.1 engines/bastion/app/helpers/bastion/layout_helper.rb