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