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.9.166 app/controllers/caboose/block_type_store_controller.rb
caboose-cms-0.9.165 app/controllers/caboose/block_type_store_controller.rb
caboose-cms-0.9.164 app/controllers/caboose/block_type_store_controller.rb
caboose-cms-0.9.163 app/controllers/caboose/block_type_store_controller.rb
caboose-cms-0.9.162 app/controllers/caboose/block_type_store_controller.rb
caboose-cms-0.9.161 app/controllers/caboose/block_type_store_controller.rb
caboose-cms-0.9.160 app/controllers/caboose/block_type_store_controller.rb
caboose-cms-0.9.159 app/controllers/caboose/block_type_store_controller.rb
caboose-cms-0.9.158 app/controllers/caboose/block_type_store_controller.rb
caboose-cms-0.9.157 app/controllers/caboose/block_type_store_controller.rb
caboose-cms-0.9.156 app/controllers/caboose/block_type_store_controller.rb
caboose-cms-0.9.155 app/controllers/caboose/block_type_store_controller.rb
caboose-cms-0.9.154 app/controllers/caboose/block_type_store_controller.rb
caboose-cms-0.9.153 app/controllers/caboose/block_type_store_controller.rb
caboose-cms-0.9.152 app/controllers/caboose/block_type_store_controller.rb
caboose-cms-0.9.151 app/controllers/caboose/block_type_store_controller.rb
caboose-cms-0.9.150 app/controllers/caboose/block_type_store_controller.rb
caboose-cms-0.9.149 app/controllers/caboose/block_type_store_controller.rb
caboose-cms-0.9.148 app/controllers/caboose/block_type_store_controller.rb
caboose-cms-0.9.147 app/controllers/caboose/block_type_store_controller.rb