Sha256: 7778dc32e2b879f5048f52ebb08d1bfd8ecb622c371e0ded19e319835d32334d

Contents?: true

Size: 823 Bytes

Versions: 9

Compression:

Stored size: 823 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")},
    ] + @@extension_links
  end

  @@extension_links = []
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
spree_core-0.30.2 app/controllers/admin/configurations_controller.rb
spree_core-0.40.4 app/controllers/admin/configurations_controller.rb
spree_core-0.40.3 app/controllers/admin/configurations_controller.rb
spree_core-0.40.2 app/controllers/admin/configurations_controller.rb
spree_core-0.40.1 app/controllers/admin/configurations_controller.rb
spree_core-0.40.0 app/controllers/admin/configurations_controller.rb
spree_core-0.30.1 app/controllers/admin/configurations_controller.rb
spree_core-0.30.0 app/controllers/admin/configurations_controller.rb
spree_core-0.30.0.beta1 app/controllers/admin/configurations_controller.rb