Sha256: a5d0c718f8e7828d4b83f06fb3aa55ddbeb3af8fe914e027c63bcad56b79879d

Contents?: true

Size: 570 Bytes

Versions: 22

Compression:

Stored size: 570 Bytes

Contents

module Hyrax
  module ThemedLayoutController
    extend ActiveSupport::Concern

    included do
      class_attribute :theme
      self.theme = 'hyrax'
      helper_method :theme
      helper_method :show_site_actions?
      helper_method :show_site_search?
    end

    module ClassMethods
      def with_themed_layout(view_name = nil)
        if view_name
          layout("#{theme}/#{view_name}")
        else
          layout(theme)
        end
      end
    end

    def show_site_actions?
      true
    end

    def show_site_search?
      true
    end
  end
end

Version data entries

22 entries across 22 versions & 2 rubygems

Version Path
hyrax-1.1.1 app/controllers/concerns/hyrax/themed_layout_controller.rb
hyrax-2.0.3 app/controllers/concerns/hyrax/themed_layout_controller.rb
hyrax-1.1.0 app/controllers/concerns/hyrax/themed_layout_controller.rb
hyrax-2.0.2 app/controllers/concerns/hyrax/themed_layout_controller.rb
hyrax-2.0.1 app/controllers/concerns/hyrax/themed_layout_controller.rb
hyrax-2.0.0 app/controllers/concerns/hyrax/themed_layout_controller.rb
hyrax-2.0.0.rc3 app/controllers/concerns/hyrax/themed_layout_controller.rb
hyrax-2.0.0.rc2 app/controllers/concerns/hyrax/themed_layout_controller.rb
hyrax-2.0.0.rc1 app/controllers/concerns/hyrax/themed_layout_controller.rb
hyrax-1.0.5 app/controllers/concerns/hyrax/themed_layout_controller.rb
hyrax-2.0.0.beta5 app/controllers/concerns/hyrax/themed_layout_controller.rb
hyrax-2.0.0.beta4 app/controllers/concerns/hyrax/themed_layout_controller.rb
hyrax-2.0.0.beta3 app/controllers/concerns/hyrax/themed_layout_controller.rb
hyrax-2.0.0.beta2 app/controllers/concerns/hyrax/themed_layout_controller.rb
hyrax-2.0.0.beta1 app/controllers/concerns/hyrax/themed_layout_controller.rb
hyrax-1.0.4 app/controllers/concerns/hyrax/themed_layout_controller.rb
hyrax-1.0.3 app/controllers/concerns/hyrax/themed_layout_controller.rb
hyrax-1.0.2 app/controllers/concerns/hyrax/themed_layout_controller.rb
hyrax-1.0.1 app/controllers/concerns/hyrax/themed_layout_controller.rb
hyrax-1.0.0.rc2 app/controllers/concerns/hyrax/themed_layout_controller.rb