erp_products 3.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/app/controllers/erp_products/erp_app/desktop/product_manager/base_controller.rb +1 -1
- data/app/models/product_type.rb +2 -2
- data/lib/erp_products/engine.rb +7 -1
- data/lib/erp_products/version.rb +7 -1
- data/lib/erp_products.rb +1 -0
- data/public/javascripts/erp_app/desktop/applications/product_manager/module.js +713 -718
- data/public/javascripts/erp_app/desktop/applications/product_manager/product_list_panel.js +127 -128
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/assets/javascripts/application.js +9 -0
- data/spec/dummy/app/assets/stylesheets/application.css +7 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/config/application.rb +49 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/database.yml +8 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/spec.rb +27 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/inflections.rb +10 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +12 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +3 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +26 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/models/prod_availability_status_type_spec.rb +11 -0
- data/spec/models/prod_instance_reln_spec.rb +11 -0
- data/spec/models/prod_instance_reln_type_spec.rb +11 -0
- data/spec/models/prod_instance_role_type_spec.rb +11 -0
- data/spec/models/prod_type_reln_spec.rb +11 -0
- data/spec/models/prod_type_reln_type_spec.rb +12 -0
- data/spec/models/prod_type_role_type_spec.rb +12 -0
- data/spec/models/product_instance_spec.rb +13 -0
- data/spec/models/product_offer_spec.rb +12 -0
- data/spec/models/product_package_spec.rb +12 -0
- data/spec/models/product_type_spec.rb +13 -0
- data/spec/models/simple_product_offer_spec.rb +14 -0
- data/spec/spec_helper.rb +60 -0
- metadata +110 -34
@@ -8,7 +8,7 @@ module ErpProducts
|
|
8
8
|
{
|
9
9
|
:id => product_type.id,
|
10
10
|
:title => product_type.description,
|
11
|
-
:imageUrl => product_type.images.empty? ? '/images/img_blank.png' : product_type.images.first.data.url,
|
11
|
+
:imageUrl => product_type.images.empty? ? '/images/img_blank.png' : product_type.images.first.data.url(nil, :escape => false),
|
12
12
|
:price => product_type.get_current_simple_amount_with_currency.nil? ? 'no price set' : product_type.get_current_simple_amount_with_currency,
|
13
13
|
:available => product_type.inventory_entries.first.number_available,
|
14
14
|
:sold => product_type.inventory_entries.first.number_sold,
|
data/app/models/product_type.rb
CHANGED
@@ -30,8 +30,8 @@ class ProductType < ActiveRecord::Base
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def images_path
|
33
|
-
file_support = ErpTechSvcs::FileSupport::Base.new(:storage =>
|
34
|
-
File.join(file_support.root,'products
|
33
|
+
file_support = ErpTechSvcs::FileSupport::Base.new(:storage => Rails.application.config.erp_tech_svcs.file_storage)
|
34
|
+
File.join(file_support.root,Rails.application.config.erp_tech_svcs.file_assets_location,'products','images',"#{self.description.underscore}_#{self.id}")
|
35
35
|
end
|
36
36
|
|
37
37
|
end
|
data/lib/erp_products/engine.rb
CHANGED
@@ -11,6 +11,12 @@ module ErpProducts
|
|
11
11
|
include ErpProducts::Extensions::ActiveRecord::ActsAsProductOffer
|
12
12
|
include ErpProducts::Extensions::ActiveRecord::ActsAsProductType
|
13
13
|
end
|
14
|
-
|
14
|
+
|
15
|
+
#TODO
|
16
|
+
#this will be removed once rails 3.2 adds the ability to set the order of engine loading
|
17
|
+
engine = self
|
18
|
+
config.to_prepare do
|
19
|
+
ErpBaseErpSvcs.register_compass_ae_engine(engine)
|
20
|
+
end
|
15
21
|
end
|
16
22
|
end
|
data/lib/erp_products/version.rb
CHANGED
data/lib/erp_products.rb
CHANGED