Sha256: 09c470e16223c37ab4f49c9dee570ce1c16773dc0cbeae02fcb4a66890a1cb6d

Contents?: true

Size: 516 Bytes

Versions: 13

Compression:

Stored size: 516 Bytes

Contents

module Curate::ThemedLayoutController
  extend ActiveSupport::Concern

  included do
    class_attribute :theme
    self.theme = 'curate_nd'
    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

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
curate-0.6.6 app/controllers/concerns/curate/themed_layout_controller.rb
curate-0.6.5 app/controllers/concerns/curate/themed_layout_controller.rb
curate-0.6.4 app/controllers/concerns/curate/themed_layout_controller.rb
curate-0.6.3 app/controllers/concerns/curate/themed_layout_controller.rb
curate-0.6.1 app/controllers/concerns/curate/themed_layout_controller.rb
curate-0.6.0 app/controllers/concerns/curate/themed_layout_controller.rb
curate-0.5.6 app/controllers/concerns/curate/themed_layout_controller.rb
curate-0.5.5 app/controllers/concerns/curate/themed_layout_controller.rb
curate-0.5.4 app/controllers/concerns/curate/themed_layout_controller.rb
curate-0.5.2 app/controllers/concerns/curate/themed_layout_controller.rb
curate-0.5.1 app/controllers/concerns/curate/themed_layout_controller.rb
curate-0.5.0 app/controllers/concerns/curate/themed_layout_controller.rb
curate-0.4.2 app/controllers/concerns/curate/themed_layout_controller.rb