Sha256: 764128e0f4b74f47289c9e1b450977c6ddbbde5d9bb8864790ac585fa601c597

Contents?: true

Size: 1.05 KB

Versions: 5

Compression:

Stored size: 1.05 KB

Contents

class Admin::Shop::VariantsController < Admin::ResourceController
  
  model_class ShopVariant

  before_filter :config_global
  before_filter :config_index,  :only => [ :index ]
  before_filter :config_new,    :only => [ :new, :create ]
  before_filter :config_edit,   :only => [ :edit, :update ]
  before_filter :assets_global
  before_filter :assets_index,  :only => [ :index ]
  before_filter :assets_edit,   :only => [ :edit, :update ]
  
  private
  
    def config_global
      @inputs   ||= []
      @meta     ||= []
      @buttons  ||= []
      @parts    ||= []
      @popups   ||= []
      
      @inputs   << 'name'
      @inputs   << 'options'
    end
    
    def config_index
      @buttons  << 'packages'
      @buttons  << 'variants'
      @buttons  << 'discounts'
    end
    
    def config_new
    end
    
    def config_edit
    end
    
    def assets_global
      include_stylesheet 'admin/extensions/shop/edit'
      include_stylesheet 'admin/extensions/shop/index'
    end
    
    def assets_index
    end
    
    def assets_edit
    end
    
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
radiant-shop-extension-0.11.5 app/controllers/admin/shop/variants_controller.rb
radiant-shop-extension-0.11.4 app/controllers/admin/shop/variants_controller.rb
radiant-shop-extension-0.11.3 app/controllers/admin/shop/variants_controller.rb
radiant-shop-extension-0.11.1 app/controllers/admin/shop/variants_controller.rb
radiant-shop-extension-0.11.0 app/controllers/admin/shop/variants_controller.rb