Sha256: 4fb8463f62f42d5b4ab82f31cef002a74a606dcc11e4b460020a7c22d7ec4ed4

Contents?: true

Size: 877 Bytes

Versions: 20

Compression:

Stored size: 877 Bytes

Contents

class Cms::PortletsController < Cms::ContentBlockController
  
  protected
    def load_blocks
      @blocks = Portlet.paginate(
        :page => params[:page],
        :order => params[:order] || "name",
        :conditions => ["deleted = ?", false]
      )
    end
  
    def build_block
      if params[:type].blank?
        @block = model_class.new
      else
        @block = params[:type].classify.constantize.new(params[params[:type]])
      end
    end
    
    def update_block
      load_block
      @block.update_attributes(params[@block.class.name.underscore])
    end    
    
    def block_form
      "portlets/portlets/form"
    end
    
    def new_block_path
      new_cms_portlet_path
    end
  
    def block_path(action=nil)
      send("#{action ? "#{action}_" : ""}cms_portlet_path", @block)
    end

    def blocks_path
      cms_portlets_path
    end
end

Version data entries

20 entries across 20 versions & 7 rubygems

Version Path
SFEley-browsercms-3.0.2 app/controllers/cms/portlets_controller.rb
buzzware-browsercms-3.0.2 app/controllers/cms/portlets_controller.rb
coredumplings-browsercms-3.0.0 app/controllers/cms/portlets_controller.rb
we5-browsercms-3.0.1.1 app/controllers/cms/portlets_controller.rb
webficient-browsercms-3.0.1 app/controllers/cms/portlets_controller.rb
webficient-browsercms-3.0.2 app/controllers/cms/portlets_controller.rb
webficient-browsercms-3.0.3 app/controllers/cms/portlets_controller.rb
webficient-browsercms-3.0.4 app/controllers/cms/portlets_controller.rb
browsercms-3.0.5 app/controllers/cms/portlets_controller.rb
we5-browsercms-3.0.5.1 app/controllers/cms/portlets_controller.rb
we5-browsercms-3.0.5 app/controllers/cms/portlets_controller.rb
browsercms_s3-3.0.5 app/controllers/cms/portlets_controller.rb
browsercms-3.0.4 app/controllers/cms/portlets_controller.rb
browsercms-3.0.3 app/controllers/cms/portlets_controller.rb
browsercms_s3-3.0.4 app/controllers/cms/portlets_controller.rb
browsercms_s3-3.0.3 app/controllers/cms/portlets_controller.rb
we5-browsercms-3.0.2 app/controllers/cms/portlets_controller.rb
browsercms-3.0.2 app/controllers/cms/portlets_controller.rb
browsercms-3.0.1 app/controllers/cms/portlets_controller.rb
browsercms-3.0.0 app/controllers/cms/portlets_controller.rb