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.15.0.rc2 engines/bastion/app/helpers/bastion/layout_helper.rb
katello-4.15.0.rc1 engines/bastion/app/helpers/bastion/layout_helper.rb
katello-4.14.1 engines/bastion/app/helpers/bastion/layout_helper.rb
katello-4.14.0 engines/bastion/app/helpers/bastion/layout_helper.rb
katello-4.14.0.rc3 engines/bastion/app/helpers/bastion/layout_helper.rb
katello-4.14.0.rc2 engines/bastion/app/helpers/bastion/layout_helper.rb
katello-4.14.0.rc1.1 engines/bastion/app/helpers/bastion/layout_helper.rb
katello-4.14.0.rc1 engines/bastion/app/helpers/bastion/layout_helper.rb
katello-4.13.1 engines/bastion/app/helpers/bastion/layout_helper.rb
katello-4.13.0 engines/bastion/app/helpers/bastion/layout_helper.rb
katello-4.12.1 engines/bastion/app/helpers/bastion/layout_helper.rb
katello-4.13.0.rc1 engines/bastion/app/helpers/bastion/layout_helper.rb
katello-4.12.0 engines/bastion/app/helpers/bastion/layout_helper.rb
katello-4.12.0.rc3 engines/bastion/app/helpers/bastion/layout_helper.rb
katello-4.12.0.rc2 engines/bastion/app/helpers/bastion/layout_helper.rb
katello-4.12.0.rc1 engines/bastion/app/helpers/bastion/layout_helper.rb
katello-4.11.1 engines/bastion/app/helpers/bastion/layout_helper.rb
katello-4.11.0 engines/bastion/app/helpers/bastion/layout_helper.rb
katello-4.11.0.rc2 engines/bastion/app/helpers/bastion/layout_helper.rb
katello-4.11.0.rc1 engines/bastion/app/helpers/bastion/layout_helper.rb