module AbstractInterface module ViewHelper def b @b ||= AbstractInterface::ViewBuilder.new self end alias_method :builder, :b def themed_resource resource "/#{AbstractInterface.plugin_name.must_not_be.blank}/#{THEMES_DIR}/#{current_theme.name}/#{resource}" end def themed_partial partial themed_partial = "/#{THEMES_DIR}/#{current_theme.name}/#{partial}" if Crystal::Template.exist? themed_partial themed_partial else "/#{THEMES_DIR}/default/#{partial}" end end def current_theme controller.current_theme end # TODO1 # def build_layout layout = nil # # Configuring # current_theme.layout = layout # # # Rendering # current_theme.layout_definition['slots'].each do |slot_name, slots| # slots = Array(slots) # slots.each do |partial| # content_for slot_name do # render :partial => partial # end # end # end # end end end