Sha256: 8f0c0a147ea36bcef3e1f2ca401647b2b98aa20c25f30ddf4985e1da372293d3

Contents?: true

Size: 817 Bytes

Versions: 17

Compression:

Stored size: 817 Bytes

Contents

# This is a module, not a helper, that is meant to be included
# into controllers that want to use page templates for their layout
module Cms
  module TemplateSupport
    def self.included(controller)
      controller.class_eval do
        include Cms::Authentication::Controller
        include Cms::ErrorHandling
        
        helper Cms::PageHelper
        helper Cms::MenuHelper
        helper Cms::RenderingHelper
        helper do
          def cms_toolbar
            if current_user.able_to?(:administrate, :edit_content, :publish_content)
              %Q{<iframe src="#{cms.toolbar_path(:page_toolbar => 0)}" width="100%" height="100px" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" name="cms_toolbar"></iframe>}
            end
          end
        end
      end
    end
  end
  
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
browsercms-3.5.7 app/helpers/cms/template_support.rb
browsercms-3.5.6 app/helpers/cms/template_support.rb
browsercms-3.5.5 app/helpers/cms/template_support.rb
browsercms-3.5.4 app/helpers/cms/template_support.rb
browsercms-3.5.3 app/helpers/cms/template_support.rb
browsercms-3.5.2 app/helpers/cms/template_support.rb
browsercms-3.5.1 app/helpers/cms/template_support.rb
browsercms-3.5.0 app/helpers/cms/template_support.rb
browsercms-3.5.0.rc3 app/helpers/cms/template_support.rb
browsercms-3.5.0.rc2 app/helpers/cms/template_support.rb
browsercms-3.5.0.rc1 app/helpers/cms/template_support.rb
browsercms-3.4.2 app/helpers/cms/template_support.rb
browsercms-3.4.2.rc1 app/helpers/cms/template_support.rb
browsercms-3.4.1 app/helpers/cms/template_support.rb
browsercms-3.4.0 app/helpers/cms/template_support.rb
browsercms-3.4.0.rc2 app/helpers/cms/template_support.rb
browsercms-3.4.0.rc1 app/helpers/cms/template_support.rb