Sha256: dc0997bf5d207582a69c956efa270d8f4e53cd7a5e20f7a0afabae6c4c6c3ea7

Contents?: true

Size: 951 Bytes

Versions: 15

Compression:

Stored size: 951 Bytes

Contents

class Admin::ConfigurationsController < Admin::BaseController
  before_filter :initialize_extension_links, :only => :index
  
  class << self
    def add_link(text, path, description)
      unless @@extension_links.any?{|link| link[:link_text] == text}
        @@extension_links << {
          :link => path,
          :link_text => text,
          :description => description,
        }
      end
    end
  end

  protected

  def initialize_extension_links
    @extension_links = [
      {:link => admin_shipping_methods_path, :link_text => t("shipping_methods"), :description => t("shipping_methods_description")},
      {:link => admin_shipping_categories_path, :link_text => t("shipping_categories"), :description => t("shipping_categories_description")},
      {:link => admin_shipping_rates_path, :link_text => t("shipping_rates"), :description => t("shipping_rates_description")},
    ] + @@extension_links
  end

  @@extension_links = []
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
spree-0.11.4 app/controllers/admin/configurations_controller.rb
spree-0.11.3 app/controllers/admin/configurations_controller.rb
spree-0.11.2 app/controllers/admin/configurations_controller.rb
spree-0.11.1 app/controllers/admin/configurations_controller.rb
spree-0.11.0 app/controllers/admin/configurations_controller.rb
spree-0.10.2 app/controllers/admin/configurations_controller.rb
spree-0.10.1 app/controllers/admin/configurations_controller.rb
spree-0.10.0 app/controllers/admin/configurations_controller.rb
spree-0.10.0.beta app/controllers/admin/configurations_controller.rb
spree-enriquez-0.9.4 app/controllers/admin/configurations_controller.rb
spree-0.9.4 app/controllers/admin/configurations_controller.rb
spree-0.9.3 app/controllers/admin/configurations_controller.rb
spree-0.9.2 app/controllers/admin/configurations_controller.rb
spree-0.9.1 app/controllers/admin/configurations_controller.rb
spree-0.9.0 app/controllers/admin/configurations_controller.rb