Sha256: eb98b7497ceb6c5494ff94905d9975d58c259e98e1393f15f7cdc06fe53b8aa8

Contents?: true

Size: 1.37 KB

Versions: 303

Compression:

Stored size: 1.37 KB

Contents

module Caboose
  class BlockTypeStoreController < ApplicationController
        
    # @route GET /admin/block-types/store
    def admin_index
      return unless user_is_allowed('blocktypestore', 'add')
      @pager = PageBarGenerator.new(params, {
    		  'block_type_source_id' => '',
    		  'name_like'	           => '',
    		  'description_like'	   => ''    		  
    		},{
    		  'model'          => 'Caboose::BlockTypeSummary',
    	    'sort'			     => 'block_type_source_id, name',
    		  'desc'			     => false,
    		  'base_url'		   => '/admin/block-types/store',
    		  'use_url_params' => false
    	})
    	@block_type_summaries = @pager.items
    	render :layout => 'caboose/admin'
    end
    
    # @route GET /admin/block-types/store/:block_type_summary_id/download
    def admin_download
      return unless user_is_allowed('blocktypestore', 'add')

      bts = BlockTypeSummary::find(params[:block_type_summary_id])
      bts.source.refresh(bts.name)

      resp = StdClass.new('success' => 'The block type has been downloaded successfully.')
      render :json => resp
    end
    
    # @route GET /admin/block-types/store/:block_type_summary_id
    def admin_details
      return unless user_is_allowed('blocktypestore', 'add')
      @block_type_summary = BlockTypeSummary::find(params[:block_type_summary_id])
      render :layout => 'caboose/admin'
    end
    
  end  
end

Version data entries

303 entries across 303 versions & 1 rubygems

Version Path
caboose-cms-0.7.52 app/controllers/caboose/block_type_store_controller.rb
caboose-cms-0.7.51 app/controllers/caboose/block_type_store_controller.rb
caboose-cms-0.7.50 app/controllers/caboose/block_type_store_controller.rb
caboose-cms-0.7.49 app/controllers/caboose/block_type_store_controller.rb
caboose-cms-0.7.48 app/controllers/caboose/block_type_store_controller.rb
caboose-cms-0.7.47 app/controllers/caboose/block_type_store_controller.rb
caboose-cms-0.7.46 app/controllers/caboose/block_type_store_controller.rb
caboose-cms-0.7.45 app/controllers/caboose/block_type_store_controller.rb
caboose-cms-0.7.44 app/controllers/caboose/block_type_store_controller.rb
caboose-cms-0.7.43 app/controllers/caboose/block_type_store_controller.rb
caboose-cms-0.7.42 app/controllers/caboose/block_type_store_controller.rb
caboose-cms-0.7.41 app/controllers/caboose/block_type_store_controller.rb
caboose-cms-0.7.40 app/controllers/caboose/block_type_store_controller.rb
caboose-cms-0.7.39 app/controllers/caboose/block_type_store_controller.rb
caboose-cms-0.7.38 app/controllers/caboose/block_type_store_controller.rb
caboose-cms-0.7.36 app/controllers/caboose/block_type_store_controller.rb
caboose-cms-0.7.35 app/controllers/caboose/block_type_store_controller.rb
caboose-cms-0.7.34 app/controllers/caboose/block_type_store_controller.rb
caboose-cms-0.7.33 app/controllers/caboose/block_type_store_controller.rb
caboose-cms-0.7.32 app/controllers/caboose/block_type_store_controller.rb