Sha256: 00fdb14d40e91a0e066f82ef7209903a5a9b2a8e1cdb14b651d3c6d305938314
Contents?: true
Size: 678 Bytes
Versions: 36
Compression:
Stored size: 678 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) case view_name when Symbol layout proc { |controller| controller.send(view_name) } when String 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
36 entries across 36 versions & 1 rubygems