forgeos_commerce 1.9.0
Sign up to get free protection for your applications and to get access to all the features.
- data/COPYING +339 -0
- data/COPYING.LESSER +165 -0
- data/Gemfile +2 -0
- data/LICENSE +2 -0
- data/MIT-LICENSE +20 -0
- data/README.textile +27 -0
- data/app/assets/images/forgeos/admin/favicon.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/association_product/bubble-quantity-products.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/association_product/check-checked.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/association_product/check-unchecked.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/association_product/context.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/association_product/create.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/association_product/dark-blue-minus.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/association_product/dark-blue-plus.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/association_product/dot.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/association_product/f.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/association_product/fminus.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/association_product/fminus_rtl.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/association_product/folder.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/association_product/fplus.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/association_product/fplus_rtl.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/association_product/lastli.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/association_product/lastli_rtl.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/association_product/li.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/association_product/remove.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/association_product/rename.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/association_product/throbber.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/bubble-quantity-products.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/check-checked.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/check-unchecked.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/context.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/create.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/dark-blue-minus.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/dark-blue-plus.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/dot.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/drag-drop.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/f.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/fminus.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/fminus_rtl.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/folder.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/fplus.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/fplus_rtl.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/grey-drag-drop.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/lastli.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/lastli_rtl.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/li.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/remove.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/rename.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/product-types/throbber.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/product_category/brown-minus.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/product_category/brown-plus.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/product_category/bubble-quantity-products.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/product_category/context.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/product_category/create.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/product_category/dot.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/product_category/f.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/product_category/fminus.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/product_category/fminus_rtl.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/product_category/fplus.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/product_category/fplus_rtl.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/product_category/lastli.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/product_category/lastli_rtl.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/product_category/li.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/product_category/remove.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/product_category/rename.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/product_category/throbber.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/zone-tree/bubble-quantity-products.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/zone-tree/check-checked.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/zone-tree/check-unchecked.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/zone-tree/context.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/zone-tree/create.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/zone-tree/dark-blue-minus.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/zone-tree/dark-blue-plus.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/zone-tree/dot.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/zone-tree/f.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/zone-tree/fminus.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/zone-tree/fminus_rtl.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/zone-tree/folder.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/zone-tree/fplus.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/zone-tree/fplus_rtl.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/zone-tree/lastli.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/zone-tree/lastli_rtl.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/zone-tree/li.gif +0 -0
- data/app/assets/images/forgeos/jstree/themes/zone-tree/remove.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/zone-tree/rename.png +0 -0
- data/app/assets/images/forgeos/jstree/themes/zone-tree/throbber.gif +0 -0
- data/app/assets/javascripts/forgeos/admin/functions.js +3 -0
- data/app/assets/javascripts/forgeos/admin/functions/forgeos_commerce/all.js +1 -0
- data/app/assets/javascripts/forgeos/admin/functions/forgeos_commerce/attributes.js +18 -0
- data/app/assets/javascripts/forgeos/admin/functions/forgeos_commerce/cross-sellings.js +18 -0
- data/app/assets/javascripts/forgeos/admin/functions/forgeos_commerce/orders.js +88 -0
- data/app/assets/javascripts/forgeos/admin/functions/forgeos_commerce/products.js +46 -0
- data/app/assets/javascripts/forgeos/admin/functions/forgeos_commerce/rules.js +98 -0
- data/app/assets/javascripts/forgeos/admin/functions/forgeos_commerce/transporters.js +60 -0
- data/app/assets/javascripts/forgeos/admin/functions/forgeos_commerce/trees.js +35 -0
- data/app/assets/javascripts/forgeos/admin/functions/forgeos_commerce/uploads.js +10 -0
- data/app/assets/javascripts/forgeos/admin/inits.js +3 -0
- data/app/assets/javascripts/forgeos/admin/inits/forgeos_commerce/all.js +1 -0
- data/app/assets/javascripts/forgeos/admin/inits/forgeos_commerce/clicks.js +25 -0
- data/app/assets/javascripts/forgeos/admin/inits/forgeos_commerce/cross-sellings.js +69 -0
- data/app/assets/javascripts/forgeos/admin/inits/forgeos_commerce/customer.js +64 -0
- data/app/assets/javascripts/forgeos/admin/inits/forgeos_commerce/orders.js +83 -0
- data/app/assets/javascripts/forgeos/admin/inits/forgeos_commerce/overlays.js +45 -0
- data/app/assets/javascripts/forgeos/admin/inits/forgeos_commerce/products.js +103 -0
- data/app/assets/javascripts/forgeos/admin/inits/forgeos_commerce/settings.js +15 -0
- data/app/assets/javascripts/forgeos/admin/inits/forgeos_commerce/special-offers.js +23 -0
- data/app/assets/javascripts/forgeos/admin/inits/forgeos_commerce/trees.js +71 -0
- data/app/assets/stylesheets/forgeos/admin/base.css.sass +3 -0
- data/app/assets/stylesheets/forgeos/admin/forgeos_commerce/_all.css.sass +9 -0
- data/app/assets/stylesheets/forgeos/admin/forgeos_commerce/_attributes.css.sass +59 -0
- data/app/assets/stylesheets/forgeos/admin/forgeos_commerce/_customer.css.sass +84 -0
- data/app/assets/stylesheets/forgeos/admin/forgeos_commerce/_delivery.css.sass +81 -0
- data/app/assets/stylesheets/forgeos/admin/forgeos_commerce/_dropdowns.css.sass +171 -0
- data/app/assets/stylesheets/forgeos/admin/forgeos_commerce/_order.css.sass +208 -0
- data/app/assets/stylesheets/forgeos/admin/forgeos_commerce/_payment.css.sass +34 -0
- data/app/assets/stylesheets/forgeos/admin/forgeos_commerce/_products.css.sass +341 -0
- data/app/assets/stylesheets/forgeos/admin/forgeos_commerce/_special_offers.css.sass +198 -0
- data/app/assets/stylesheets/forgeos/admin/forgeos_commerce/_transporters.css.sass +5 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/association_product/style.css.sass +50 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/product-types/style.css.sass +129 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/product_category/style.css.sass +109 -0
- data/app/assets/stylesheets/forgeos/jstree/themes/zone-tree/style.css.sass +103 -0
- data/app/controllers/addresses_controller.rb +51 -0
- data/app/controllers/admin/attributes_controller.rb +161 -0
- data/app/controllers/admin/base_controller.rb +5 -0
- data/app/controllers/admin/brands_controller.rb +119 -0
- data/app/controllers/admin/forms_controller.rb +66 -0
- data/app/controllers/admin/geo_zones_controller.rb +74 -0
- data/app/controllers/admin/import_controller.rb +50 -0
- data/app/controllers/admin/orders_controller.rb +248 -0
- data/app/controllers/admin/product_types_controller.rb +122 -0
- data/app/controllers/admin/products_controller.rb +204 -0
- data/app/controllers/admin/special_offers_controller.rb +236 -0
- data/app/controllers/admin/statistics_controller.rb +64 -0
- data/app/controllers/admin/transporter_rules_controller.rb +307 -0
- data/app/controllers/admin/users_controller.rb +100 -0
- data/app/controllers/admin/vouchers_controller.rb +207 -0
- data/app/controllers/application_controller.rb +75 -0
- data/app/controllers/order_controller.rb +229 -0
- data/app/helpers/admin/payment_fields_helper.rb +31 -0
- data/app/helpers/application_helper.rb +7 -0
- data/app/helpers/cart_helper.rb +40 -0
- data/app/helpers/category_helper.rb +36 -0
- data/app/helpers/product_helper.rb +118 -0
- data/app/helpers/routes_helper.rb +60 -0
- data/app/helpers/wishlist_helper.rb +142 -0
- data/app/models/address_delivery.rb +2 -0
- data/app/models/address_invoice.rb +2 -0
- data/app/models/attribute.rb +38 -0
- data/app/models/attribute_category.rb +3 -0
- data/app/models/attribute_value.rb +10 -0
- data/app/models/brand.rb +22 -0
- data/app/models/brand_category.rb +3 -0
- data/app/models/cart.rb +190 -0
- data/app/models/cart_item.rb +21 -0
- data/app/models/checkbox_attribute.rb +2 -0
- data/app/models/country.rb +4 -0
- data/app/models/cross_sellings_product.rb +4 -0
- data/app/models/currencies_exchanges_rate.rb +2 -0
- data/app/models/currency.rb +13 -0
- data/app/models/date_attribute.rb +2 -0
- data/app/models/dynamic_attribute.rb +6 -0
- data/app/models/dynamic_attribute_value.rb +5 -0
- data/app/models/form.rb +7 -0
- data/app/models/form_attribute.rb +3 -0
- data/app/models/geo_zone.rb +6 -0
- data/app/models/longtext_attribute.rb +2 -0
- data/app/models/number_attribute.rb +2 -0
- data/app/models/order.rb +483 -0
- data/app/models/order_detail.rb +129 -0
- data/app/models/order_shipping.rb +25 -0
- data/app/models/pack.rb +9 -0
- data/app/models/picklist_attribute.rb +2 -0
- data/app/models/product.rb +294 -0
- data/app/models/product_attribute.rb +4 -0
- data/app/models/product_category.rb +9 -0
- data/app/models/product_link.rb +9 -0
- data/app/models/product_price_variation.rb +3 -0
- data/app/models/product_sold_counter.rb +2 -0
- data/app/models/product_sweeper.rb +30 -0
- data/app/models/product_type.rb +27 -0
- data/app/models/product_type_category.rb +3 -0
- data/app/models/product_viewed_counter.rb +2 -0
- data/app/models/products_wishlist.rb +25 -0
- data/app/models/radio_attribute.rb +2 -0
- data/app/models/radiobutton_attribute.rb +2 -0
- data/app/models/setting.rb +46 -0
- data/app/models/size.rb +5 -0
- data/app/models/special_offer_category.rb +3 -0
- data/app/models/special_offer_rule.rb +21 -0
- data/app/models/text_attribute.rb +2 -0
- data/app/models/text_field_attribute.rb +2 -0
- data/app/models/transporter_category.rb +3 -0
- data/app/models/transporter_rule.rb +3 -0
- data/app/models/url_attribute.rb +2 -0
- data/app/models/user.rb +45 -0
- data/app/models/user_address.rb +6 -0
- data/app/models/voucher_category.rb +3 -0
- data/app/models/voucher_rule.rb +3 -0
- data/app/models/wishlist.rb +134 -0
- data/app/views/admin/addresses/_form.html.haml +42 -0
- data/app/views/admin/attributes/_categories.html.haml +7 -0
- data/app/views/admin/attributes/_choice.html.haml +24 -0
- data/app/views/admin/attributes/_date.html.haml +5 -0
- data/app/views/admin/attributes/_form.html.haml +36 -0
- data/app/views/admin/attributes/_longtext.html.haml +5 -0
- data/app/views/admin/attributes/_number.html.haml +5 -0
- data/app/views/admin/attributes/_tabs.html.haml +6 -0
- data/app/views/admin/attributes/_text.html.haml +5 -0
- data/app/views/admin/attributes/_url.html.haml +5 -0
- data/app/views/admin/attributes/destroy.js.erb +1 -0
- data/app/views/admin/attributes/edit.html.haml +2 -0
- data/app/views/admin/attributes/index.html.haml +33 -0
- data/app/views/admin/attributes/index.json.erb +24 -0
- data/app/views/admin/attributes/new.html.haml +2 -0
- data/app/views/admin/attributes/show.html.haml +51 -0
- data/app/views/admin/brands/_form.html.haml +29 -0
- data/app/views/admin/brands/_tabs.html.haml +6 -0
- data/app/views/admin/brands/destroy.js.erb +1 -0
- data/app/views/admin/brands/edit.html.haml +2 -0
- data/app/views/admin/brands/index.html.haml +15 -0
- data/app/views/admin/brands/index.json.erb +23 -0
- data/app/views/admin/brands/new.html.haml +2 -0
- data/app/views/admin/dashboard/index.html.haml +230 -0
- data/app/views/admin/forms/_form.html.haml +38 -0
- data/app/views/admin/forms/_tabs.html.haml +6 -0
- data/app/views/admin/forms/destroy.js.erb +1 -0
- data/app/views/admin/forms/edit.html.haml +2 -0
- data/app/views/admin/forms/index.html.haml +11 -0
- data/app/views/admin/forms/index.json.erb +20 -0
- data/app/views/admin/forms/new.html.haml +2 -0
- data/app/views/admin/geo_zones/_form.html.haml +20 -0
- data/app/views/admin/geo_zones/_list.html.haml +9 -0
- data/app/views/admin/geo_zones/edit.html.haml +3 -0
- data/app/views/admin/geo_zones/index.html.haml +49 -0
- data/app/views/admin/geo_zones/new.html.haml +3 -0
- data/app/views/admin/geo_zones/show.html.haml +4 -0
- data/app/views/admin/import/create_product.html.haml +2 -0
- data/app/views/admin/menus/_types_popups.html.haml +22 -0
- data/app/views/admin/orders/_address_form.html.haml +29 -0
- data/app/views/admin/orders/_form.html.haml +198 -0
- data/app/views/admin/orders/_list.html.haml +29 -0
- data/app/views/admin/orders/_products_popup.html.haml +15 -0
- data/app/views/admin/orders/create.html.haml +1 -0
- data/app/views/admin/orders/destroy.js.erb +1 -0
- data/app/views/admin/orders/edit.html.haml +1 -0
- data/app/views/admin/orders/index.html.haml +24 -0
- data/app/views/admin/orders/index.json.erb +48 -0
- data/app/views/admin/orders/show.html.haml +130 -0
- data/app/views/admin/product_types/_form.html.haml +46 -0
- data/app/views/admin/product_types/_list.html.haml +6 -0
- data/app/views/admin/product_types/_options_categories.html.haml +19 -0
- data/app/views/admin/product_types/_tabs.html.haml +6 -0
- data/app/views/admin/product_types/destroy.js.erb +1 -0
- data/app/views/admin/product_types/edit.html.haml +3 -0
- data/app/views/admin/product_types/index.html.haml +14 -0
- data/app/views/admin/product_types/index.json.erb +24 -0
- data/app/views/admin/product_types/new.html.haml +3 -0
- data/app/views/admin/product_types/show.html.haml +23 -0
- data/app/views/admin/products/_attributes.html.haml +37 -0
- data/app/views/admin/products/_cross_popup.html.haml +56 -0
- data/app/views/admin/products/_cross_sell_tr.html.haml +13 -0
- data/app/views/admin/products/_cross_sells.html.haml +1 -0
- data/app/views/admin/products/_form.html.haml +26 -0
- data/app/views/admin/products/_general.html.haml +153 -0
- data/app/views/admin/products/_list.html.haml +18 -0
- data/app/views/admin/products/_prices.html.haml +17 -0
- data/app/views/admin/products/_products_popup.html.haml +41 -0
- data/app/views/admin/products/_seo.html.haml +75 -0
- data/app/views/admin/products/_shippings.html.haml +0 -0
- data/app/views/admin/products/_sizes.html.haml +23 -0
- data/app/views/admin/products/_tabs.html.haml +2 -0
- data/app/views/admin/products/activate.js.erb +1 -0
- data/app/views/admin/products/destroy.js.erb +1 -0
- data/app/views/admin/products/edit.html.haml +1 -0
- data/app/views/admin/products/index.html.haml +20 -0
- data/app/views/admin/products/index.json.erb +65 -0
- data/app/views/admin/products/new.html.haml +1 -0
- data/app/views/admin/products/show.html.haml +158 -0
- data/app/views/admin/settings/_colissimo.html.haml +7 -0
- data/app/views/admin/settings/_godfather.html.haml +11 -0
- data/app/views/admin/settings/_google_shopping.html.haml +5 -0
- data/app/views/admin/settings/_payment.html.haml +63 -0
- data/app/views/admin/settings/_tabs.html.haml +5 -0
- data/app/views/admin/settings/edit.html.haml +33 -0
- data/app/views/admin/special_offers/_form.html.haml +88 -0
- data/app/views/admin/special_offers/_patterns.html.haml +151 -0
- data/app/views/admin/special_offers/_tabs.html.haml +5 -0
- data/app/views/admin/special_offers/_top_links.html.haml +6 -0
- data/app/views/admin/special_offers/activate.js.erb +1 -0
- data/app/views/admin/special_offers/destroy.js.erb +1 -0
- data/app/views/admin/special_offers/edit.html.haml +4 -0
- data/app/views/admin/special_offers/index.html.haml +15 -0
- data/app/views/admin/special_offers/index.json.erb +28 -0
- data/app/views/admin/special_offers/new.html.haml +2 -0
- data/app/views/admin/special_offers/show.html.haml +28 -0
- data/app/views/admin/special_offers/special_offer.html.haml +166 -0
- data/app/views/admin/statistics/index.html.haml +158 -0
- data/app/views/admin/transporter_rules/_delivery_rules.html.haml +83 -0
- data/app/views/admin/transporter_rules/_form.html.haml +90 -0
- data/app/views/admin/transporter_rules/_left_sidebar.html.haml +9 -0
- data/app/views/admin/transporter_rules/_sidebar.html.haml +10 -0
- data/app/views/admin/transporter_rules/_tabs.html.haml +8 -0
- data/app/views/admin/transporter_rules/activate.js.erb +1 -0
- data/app/views/admin/transporter_rules/destroy.js.erb +1 -0
- data/app/views/admin/transporter_rules/edit.html.haml +1 -0
- data/app/views/admin/transporter_rules/index.html.haml +13 -0
- data/app/views/admin/transporter_rules/index.json.erb +30 -0
- data/app/views/admin/transporter_rules/new.html.haml +1 -0
- data/app/views/admin/transporter_rules/show.html.haml +30 -0
- data/app/views/admin/users/_fields_for_addresses_deliveries.html.haml +38 -0
- data/app/views/admin/users/_fields_for_addresses_invoices.html.haml +34 -0
- data/app/views/admin/users/_form.html.haml +88 -0
- data/app/views/admin/users/edit.json.erb +35 -0
- data/app/views/admin/users/index.html.haml +12 -0
- data/app/views/admin/users/index.json.erb +32 -0
- data/app/views/admin/users/index2.html.haml +33 -0
- data/app/views/admin/users/show.html.haml +72 -0
- data/app/views/admin/vouchers/_form.html.haml +92 -0
- data/app/views/admin/vouchers/_tabs.html.haml +3 -0
- data/app/views/admin/vouchers/activate.js.erb +1 -0
- data/app/views/admin/vouchers/destroy.js.erb +1 -0
- data/app/views/admin/vouchers/index.html.haml +15 -0
- data/app/views/admin/vouchers/index.json.erb +28 -0
- data/app/views/admin/vouchers/new.html.haml +2 -0
- data/config/locales/activerecord/en.yml +6 -0
- data/config/locales/activerecord/fr.yml +18 -0
- data/config/locales/admin/address/en.yml +3 -0
- data/config/locales/admin/address/fr.yml +3 -0
- data/config/locales/admin/attribute/en.yml +76 -0
- data/config/locales/admin/attribute/fr.yml +75 -0
- data/config/locales/admin/brands/en.yml +24 -0
- data/config/locales/admin/brands/fr.yml +27 -0
- data/config/locales/admin/dashboard/en.yml +6 -0
- data/config/locales/admin/dashboard/fr.yml +6 -0
- data/config/locales/admin/order/en.yml +54 -0
- data/config/locales/admin/order/fr.yml +54 -0
- data/config/locales/admin/product/en.yml +105 -0
- data/config/locales/admin/product/fr.yml +106 -0
- data/config/locales/admin/settings/en.yml +90 -0
- data/config/locales/admin/settings/fr.yml +87 -0
- data/config/locales/admin/special_offer/en.yml +59 -0
- data/config/locales/admin/special_offer/fr.yml +60 -0
- data/config/locales/admin/transporter/en.yml +36 -0
- data/config/locales/admin/transporter/fr.yml +36 -0
- data/config/locales/admin/voucher/en.yml +3 -0
- data/config/locales/admin/voucher/fr.yml +3 -0
- data/config/locales/admin/wishlist/en.yml +89 -0
- data/config/locales/admin/wishlist/fr.yml +89 -0
- data/config/locales/common/en.yml +424 -0
- data/config/locales/common/fr.yml +422 -0
- data/config/routes.rb +109 -0
- data/config/search.example.yml +8 -0
- data/db/fixtures/currencies.yml +10 -0
- data/db/fixtures/currencies_exchanges_rates.yml +9 -0
- data/db/fixtures/page_translations.yml +11 -0
- data/db/fixtures/pages.yml +5 -0
- data/db/fixtures/people.yml +11 -0
- data/db/fixtures/product_type_translations.yml +11 -0
- data/db/fixtures/product_types.yml +2 -0
- data/db/migrate/20091009134433_create_attribute_values.rb +15 -0
- data/db/migrate/20091009134440_create_attribute_values_products.rb +14 -0
- data/db/migrate/20091009134448_create_attributes.rb +17 -0
- data/db/migrate/20091009134455_create_attributes_product_types.rb +14 -0
- data/db/migrate/20091009134525_create_carts.rb +15 -0
- data/db/migrate/20091009134532_create_cart_items.rb +14 -0
- data/db/migrate/20091009134609_create_cross_sellings_products.rb +11 -0
- data/db/migrate/20091009134616_create_currencies.rb +15 -0
- data/db/migrate/20091009134624_create_currencies_exchanges_rates.rb +13 -0
- data/db/migrate/20091009134631_create_dynamic_attribute_values.rb +17 -0
- data/db/migrate/20091009134659_create_order_details.rb +24 -0
- data/db/migrate/20091009134706_create_order_shippings.rb +16 -0
- data/db/migrate/20091009134714_create_orders.rb +21 -0
- data/db/migrate/20091009134721_create_packs_products.rb +13 -0
- data/db/migrate/20091009134805_create_product_types.rb +11 -0
- data/db/migrate/20091009134813_create_products.rb +37 -0
- data/db/migrate/20091009134821_create_products_wishlists.rb +13 -0
- data/db/migrate/20091009134947_create_wishlists.rb +12 -0
- data/db/migrate/20100323143123_create_geo_zones_transporter_rules.rb +12 -0
- data/db/migrate/20100414090950_create_brands.rb +15 -0
- data/db/migrate/20100414091706_create_sizes.rb +15 -0
- data/db/migrate/20100928123009_add_patronage_to_people.rb +20 -0
- data/db/migrate/20101007074306_create_product_price_variations.rb +13 -0
- data/db/migrate/20110311111210_create_forms.rb +13 -0
- data/db/migrate/20110311112646_attributes_forms.rb +13 -0
- data/db/migrate/20110322165950_add_payment_methods_to_settings.rb +13 -0
- data/db/migrate/20110405084454_add_colissimo_methods_to_settings.rb +13 -0
- data/db/migrate/20110516075553_add_google_infos_to_settings.rb +11 -0
- data/db/migrate/20110831164213_add_order_fields_to_addresses.rb +9 -0
- data/lib/CMCIC_Config.rb +16 -0
- data/lib/CMCIC_Tpe.rb +227 -0
- data/lib/forgeos/commerce.rb +9 -0
- data/lib/forgeos/commerce/admin_menu.rb +28 -0
- data/lib/forgeos/commerce/engine.rb +11 -0
- data/lib/forgeos/commerce/float.rb +10 -0
- data/lib/forgeos/commerce/statistics.rb +62 -0
- data/lib/forgeos/commerce/version.rb +5 -0
- data/lib/forgeos_commerce.rb +1 -0
- data/lib/special_offer.rb +61 -0
- data/lib/tasks/install.rake +9 -0
- data/lib/transporter.rb +26 -0
- data/lib/voucher.rb +41 -0
- data/recipes/deploy.rb +15 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +9 -0
- data/test/dummy/app/assets/stylesheets/application.css +7 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +42 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +27 -0
- data/test/dummy/config/environments/production.rb +51 -0
- data/test/dummy/config/environments/test.rb +39 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +10 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +58 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +26 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/forgeos_commerce_test.rb +7 -0
- data/test/test_helper.rb +10 -0
- metadata +539 -0
@@ -0,0 +1,29 @@
|
|
1
|
+
= display_standard_flashes
|
2
|
+
%table
|
3
|
+
%thead
|
4
|
+
%tr
|
5
|
+
%th
|
6
|
+
= I18n.t('status', :count => 1).capitalize
|
7
|
+
%th
|
8
|
+
= I18n.t('user', :count => 1).capitalize
|
9
|
+
%th
|
10
|
+
= I18n.t('shipping_method', :count => 2).capitalize
|
11
|
+
%th
|
12
|
+
= I18n.t('action', :count => 2).capitalize
|
13
|
+
%tbody
|
14
|
+
- @orders.each do |order|
|
15
|
+
%tr
|
16
|
+
%td
|
17
|
+
= t order.status
|
18
|
+
%td
|
19
|
+
= order.user.fullname
|
20
|
+
%td
|
21
|
+
= order.transporter
|
22
|
+
%td
|
23
|
+
= link_to(I18n.t('pay').capitalize, :url => [forgeos_commerce, :pay, :admin, order], :update => 'orders', :remote => true ) + ' -' if order.aasm_current_state == :unpaid
|
24
|
+
= link_to(I18n.t('accept').capitalize, :url => [forgeos_commerce, :accept, :admin, order], :update => 'orders', :remote => true ) + ' -' if order.aasm_current_state == :paid
|
25
|
+
= link_to(I18n.t('send').capitalize, :url => [forgeos_commerce, :sent, :admin, order], :update => 'orders', :remote => true ) + ' -' if order.aasm_current_state == :accepted
|
26
|
+
= link_to I18n.t('edit').capitalize, [forgeos_commerce, :edit, :admin, order]
|
27
|
+
\-
|
28
|
+
= link_to(I18n.t('destroy').capitalize, :url => [forgeos_commerce, :admin, order], :remote => true, :method => :delete, :update => 'orders', :confirm => I18n.t('order.destroy.confirm').capitalize)
|
29
|
+
- content_for :tools, link_to(I18n.t('order.create.action').capitalize, [forgeos_commerce, :new, :admin, :order], :class => 'add' )
|
@@ -0,0 +1,15 @@
|
|
1
|
+
#productSelectDialog.media-hoverlay
|
2
|
+
.media-hoverlay-header
|
3
|
+
= I18n.t('order.product.select').capitalize
|
4
|
+
#search.right.files
|
5
|
+
= fg_search
|
6
|
+
.backgrounds.search-form-files
|
7
|
+
.media-hoverlay-sidebar.grid_3.omega.alpha
|
8
|
+
.sidebar-content
|
9
|
+
%h2{ :class => 'small-icons products'}
|
10
|
+
= link_to_function I18n.t('product.all').capitalize, "select_all_elements_without_category()"
|
11
|
+
#product-tree.init-tree.a-tree
|
12
|
+
.media-hoverlay-content
|
13
|
+
%table#table-products.datatable.media.selectable_rows
|
14
|
+
|
15
|
+
= dataTables_tag :id => 'table-products', :url => forgeos_commerce.admin_products_path(:format => :json, :mode => 'selection'), :columns => ["{'sClass':'th-checkbox-container th_product_popup','bSearchable':false,'bSortable':false}","{'sTitle':'#{I18n.t(:name)}'}","{'sTitle':'#{I18n.t(:sku)}'}","{'sTitle':'#{I18n.t(:price, :count => 1)}'}","{'sTitle':'#{I18n.t(:stock, :count => 1)}'}","{'sTitle':'#{I18n.t(:product_type, :count => 1)}'}","{ 'bVisible': false}","{ 'bVisible': false}","{ 'bVisible': false}","{ 'bVisible': false}","{ 'bVisible': false}","{ 'bVisible': false}"], :autostart => false
|
@@ -0,0 +1 @@
|
|
1
|
+
= render :partial => 'form', :locals => { :order => @order, :civilities => @civilities, :countries => @countries }
|
@@ -0,0 +1 @@
|
|
1
|
+
removedataTablesRow('#<%= polymorphic_html_id @order, 'destroy' -%>');
|
@@ -0,0 +1 @@
|
|
1
|
+
= render :partial => 'form', :locals => { :order => @order, :civilities => @civilities, :countries => @countries }
|
@@ -0,0 +1,24 @@
|
|
1
|
+
#sidebar.grid_4.omega.alpha
|
2
|
+
.backgrounds.header
|
3
|
+
.backgrounds.sidebar-background
|
4
|
+
.sidebar-content
|
5
|
+
%h2.small-icons.orders= link_to_function I18n.t('order.all').capitalize, "select_all_elements_by_url('/admin/orders.json')"
|
6
|
+
#orders-tree.a-tree.init-tree
|
7
|
+
%ul
|
8
|
+
- Order.aasm_states.each do |state|
|
9
|
+
- state_name = state.name.to_s
|
10
|
+
%li
|
11
|
+
%span{ :class => ['colours', state_name] }
|
12
|
+
= link_to_function I18n.t(state_name, :scope => [:order, :status]).html_safe + content_tag(:span, Order.count(:conditions => { :status => state_name })), "select_all_elements_by_url('/admin/orders.json?filter=status&status=#{state_name}')"
|
13
|
+
|
14
|
+
#content.grid_12.alpha.omega
|
15
|
+
.backgrounds.header
|
16
|
+
= link_to [forgeos_commerce, :new, :admin, :order], :class=>'backgrounds action-button' do
|
17
|
+
%span.big-icons.create-order= I18n.t('order.create.action').capitalize
|
18
|
+
= link_to content_tag(:span,'Exportez la liste en csv'), forgeos_commerce.admin_orders_path(:format => 'csv'), :class => 'backgrounds action-button'
|
19
|
+
#search.right= fg_search
|
20
|
+
.backgrounds.search-form
|
21
|
+
.content-background
|
22
|
+
%table#table.datatable
|
23
|
+
|
24
|
+
= dataTables_tag :url => forgeos_commerce.admin_orders_path(:format => :json), :columns => ["{'bSearchable':false, 'bSortable':false}","{'sTitle':'#{I18n.t(:id)}'}","{'sTitle':'#{I18n.t(:total)}'}","{'sTitle':'#{I18n.t(:product, :count => 1)}'}","{'sTitle':'#{I18n.t(:created_on)}'}","{'sTitle':'#{I18n.t(:customer, :count => 1)}'}","{'sTitle':'#{I18n.t(:status, :count => 1)}'}","{'sClass':'actions-td','bSearchable':false, 'bSortable':false}"]
|
@@ -0,0 +1,48 @@
|
|
1
|
+
<%
|
2
|
+
order_states_for_select = Order.aasm_states.collect{ |state| [t(state.name, :scope => [:order,:status]),state.name.to_s] }
|
3
|
+
select_class = (params[:skin] == 'read_only' ? 'customize order-change-status disabled' : 'customize order-change-status')
|
4
|
+
output = {
|
5
|
+
:sEcho => params[:sEcho],
|
6
|
+
:iTotalRecords => @orders.total_entries || 0,
|
7
|
+
:iTotalDisplayRecords => @orders.count,
|
8
|
+
:aaData => @orders.collect do |order|
|
9
|
+
details_count = order.order_details.count
|
10
|
+
product_names = details_count > 1 ? content_tag(:p,order.order_details.all(:group => 'product_id').collect{|detail| content_tag(:span,"#{detail.name} x #{detail.quantity}", :class=>cycle('even', 'odd'))}.join(''), :class=>'product-name') : ''
|
11
|
+
[
|
12
|
+
(
|
13
|
+
details_count > 1 ?
|
14
|
+
content_tag(:div,
|
15
|
+
content_tag(:div, ' ', :class=> 'image'),
|
16
|
+
:id => polymorphic_html_id(order), :class => 'some-variants plus') : content_tag(:div, '', :id => polymorphic_html_id(order))
|
17
|
+
),
|
18
|
+
order.reference,
|
19
|
+
price_with_currency(order.total),
|
20
|
+
content_tag(:div,
|
21
|
+
link_to(
|
22
|
+
details_count != 1 ? "#{details_count} #{t('product', :count => details_count)}" : order.order_details.first.name.capitalize,
|
23
|
+
[forgeos_commerce, :admin,order]
|
24
|
+
),
|
25
|
+
:class => 'product-name')+product_names,
|
26
|
+
order.created_at.to_s(:short),
|
27
|
+
content_tag(:div, order.user ? link_to(order.user.fullname, [forgeos_core,:admin, order.user]) : '', :class => 'username'),
|
28
|
+
(
|
29
|
+
params[:skin] != 'read_only' ?
|
30
|
+
select('order_status',order.id,
|
31
|
+
options_for_select(order_states_for_select, order.status),
|
32
|
+
{}, { :class => select_class }
|
33
|
+
) :
|
34
|
+
content_tag(:dl, content_tag(:dt, link_to(content_tag(:span, order.status),'#', :class => 'dropdown_toggle'), :class => "dropdown #{order.status} disabled"))
|
35
|
+
),
|
36
|
+
link_to('', [forgeos_commerce, :edit, :admin, order], :class => 'small-icons edit-link') +
|
37
|
+
link_to('', [forgeos_commerce, :admin, order],
|
38
|
+
:remote => true,
|
39
|
+
:method => :delete,
|
40
|
+
:confirm => t('order.destroy.confirm').capitalize,
|
41
|
+
:class => 'small-icons destroy-link',
|
42
|
+
:id => polymorphic_html_id(order, 'destroy')
|
43
|
+
)
|
44
|
+
]
|
45
|
+
end
|
46
|
+
}
|
47
|
+
-%>
|
48
|
+
<%= raw output.to_json %>
|
@@ -0,0 +1,130 @@
|
|
1
|
+
.backgrounds.big-header
|
2
|
+
%span.order-price= price_with_currency @order.total
|
3
|
+
%span.header-separator
|
4
|
+
%span
|
5
|
+
= t('order',:count =>1).capitalize
|
6
|
+
n°
|
7
|
+
= @order.reference
|
8
|
+
%span.header-separator
|
9
|
+
%span= @order.created_at.to_s(:format => :default)
|
10
|
+
.interact-links
|
11
|
+
= link_to t('order.update.action').capitalize, [forgeos_commerce, :edit, :admin, @order], :class => 'backgrounds interact-button'
|
12
|
+
= t('or')
|
13
|
+
= link_to t('back').capitalize, [forgeos_commerce, :admin, :orders], :class => 'back-link'
|
14
|
+
#content.grid_16.alpha.omega
|
15
|
+
#order-see.grid_12.alpha
|
16
|
+
.order-see-wrap
|
17
|
+
.fieldset
|
18
|
+
%h3= t('order.main_infos')
|
19
|
+
.main-infos
|
20
|
+
- user = @order.user
|
21
|
+
.main-infos-cutomer
|
22
|
+
%h4.small-icons= t('user', :count => 1).capitalize
|
23
|
+
= link_to h(user.fullname), [forgeos_core, :admin, user]
|
24
|
+
%p= "#{user.orders.count} #{t('order', :count => user.orders.count)} #{t('since')} #{user.orders.first.created_at.to_date.to_s(:long)}"
|
25
|
+
%p=h user.phone
|
26
|
+
%p.customer-email=h user.email
|
27
|
+
.main-info-separation
|
28
|
+
.main-infos-note
|
29
|
+
%h4.small-icons= t('order.user_note').capitalize
|
30
|
+
.clear
|
31
|
+
%table.datatable
|
32
|
+
%thead
|
33
|
+
%tr
|
34
|
+
%th
|
35
|
+
%th.product-th= t('product', :count => 1).capitalize
|
36
|
+
%th= t('sku').capitalize
|
37
|
+
%th= t('price', :count => 1).capitalize
|
38
|
+
%th= t('quantity', :count => 1).capitalize
|
39
|
+
%th= t('order.total').capitalize
|
40
|
+
%tbody
|
41
|
+
- @order.order_details.each do |detail|
|
42
|
+
%tr
|
43
|
+
- product = detail.product
|
44
|
+
- if product && picture = product.pictures.first
|
45
|
+
%td= image_tag(picture.public_filename(:thumb))
|
46
|
+
- else
|
47
|
+
%td= image_tag('forgeos/admin/no-image.png')
|
48
|
+
%td.product-name
|
49
|
+
- if product
|
50
|
+
= link_to detail.name, [forgeos_commerce, :admin, detail.product]
|
51
|
+
- else
|
52
|
+
= detail.name
|
53
|
+
%td= detail.sku
|
54
|
+
%td= price_with_currency(detail.price)
|
55
|
+
%td= detail.quantity
|
56
|
+
%td.total= price_with_currency(detail.total)
|
57
|
+
|
58
|
+
.order-totals
|
59
|
+
.order-subtotal= t('order.subtotal').capitalize
|
60
|
+
%span.order-subtotal
|
61
|
+
= price_with_currency(@order.total(:tax => false, :with_shipping => false, :with_special_offer => false, :with_shipping => false))
|
62
|
+
- if @order.order_shipping
|
63
|
+
%div= t('shipping').capitalize
|
64
|
+
%span.order_shipping= price_with_currency @order.order_shipping.price
|
65
|
+
.order-totals
|
66
|
+
%div= t('special_offer', :count => 2).capitalize
|
67
|
+
%br
|
68
|
+
- if @order.special_offer_discount
|
69
|
+
%div= t('order.total_discount').capitalize
|
70
|
+
%span= "- #{price_with_currency @order.special_offer_discount}"
|
71
|
+
%br
|
72
|
+
- @order.special_offer_discount_products.each do |product|
|
73
|
+
%div= "#{product.name}"
|
74
|
+
%span= "- #{price_with_currency product.special_offer_discount_price}"
|
75
|
+
%br
|
76
|
+
%div= t('voucher', :count => 1).capitalize
|
77
|
+
%br
|
78
|
+
- if @order.voucher_discount
|
79
|
+
%div= t('order.total_discount').capitalize
|
80
|
+
%span= "- #{price_with_currency @order.voucher_discount}"
|
81
|
+
%br
|
82
|
+
- @order.voucher_discount_products.each do |product|
|
83
|
+
%div= "#{product.name}"
|
84
|
+
%span= "- #{price_with_currency product.voucher_discount_price}"
|
85
|
+
%br
|
86
|
+
-#.order-totals
|
87
|
+
%div= t('tax', :count => 2).capitalize
|
88
|
+
%span= "#{@order.taxes} #{current_currency.html}"
|
89
|
+
.order-totals.total-block
|
90
|
+
.order-total= t('order.total').capitalize
|
91
|
+
%span.order-total= price_with_currency @order.total
|
92
|
+
.fieldset
|
93
|
+
%h3= t('order.delivery')
|
94
|
+
.order-delivery
|
95
|
+
.order-delivery-adress
|
96
|
+
%h4.small-icons= t('address.delivery', :count => 1).capitalize
|
97
|
+
%p=h @order.address_delivery.address
|
98
|
+
%p
|
99
|
+
=h @order.address_delivery.zip_code
|
100
|
+
=h @order.address_delivery.city
|
101
|
+
%p= @order.address_delivery.country.name
|
102
|
+
.main-info-separation
|
103
|
+
.order-billing-adress
|
104
|
+
%h4.small-icons= t('address.invoice', :count => 1).capitalize
|
105
|
+
%p=h @order.address_invoice.address
|
106
|
+
%p
|
107
|
+
=h @order.address_invoice.zip_code
|
108
|
+
=h @order.address_invoice.city
|
109
|
+
%p= @order.address_invoice.country.name
|
110
|
+
.main-info-separation
|
111
|
+
.order-delivery-method
|
112
|
+
%h4.small-icons= t('shipping_method', :count => 1).capitalize
|
113
|
+
- if @order.order_shipping
|
114
|
+
%p= @order.order_shipping.name
|
115
|
+
%p= price_with_currency @order.order_shipping.price
|
116
|
+
%p= @order.order_shipping.track_number
|
117
|
+
.clear
|
118
|
+
#right-sidebar.grid_4.omega
|
119
|
+
.step.status.open
|
120
|
+
%div
|
121
|
+
%dl{ :class => "dropdown #{@order.status} disabled"}
|
122
|
+
%dt
|
123
|
+
%a.dropdown_toggle{ :href => '#'}
|
124
|
+
%span= @order.status
|
125
|
+
.clear
|
126
|
+
.step
|
127
|
+
-#= link_to t('order.invoice.show'), [:bill, :admin, @order], :class => 'small-icons preview'
|
128
|
+
= content_tag :span, t('order.invoice.show').capitalize, :class => 'small-icons preview disabled'
|
129
|
+
= link_to t('order.destroy.action'), [forgeos_commerce, :admin, @order], :method => :delete, :confirm => t('order.destroy.confirm'), :class => 'small-icons delete'
|
130
|
+
.clear
|
@@ -0,0 +1,46 @@
|
|
1
|
+
= form_for [forgeos_commerce, :admin , product_type], :html => { :id => 'wrap' , "data-object_name" => product_type.class.model_name.singular} do |f|
|
2
|
+
.backgrounds.big-header
|
3
|
+
= f.text_field :name, :class => 'field_name'
|
4
|
+
= Forgeos_save_buttons [forgeos_commerce, :admin, :product_types]
|
5
|
+
|
6
|
+
#content.grid_12.alpha.omega
|
7
|
+
.inner-content
|
8
|
+
.fieldset.open
|
9
|
+
%h2= t(:attribute,:count=>2)
|
10
|
+
.option-panel-content
|
11
|
+
= hidden_field_tag 'product_type[product_attribute_ids][]'
|
12
|
+
#product-types-selected-tree.jstree-drop
|
13
|
+
%ul
|
14
|
+
%li
|
15
|
+
= link_to t('drag_attributes').capitalize, '#'
|
16
|
+
%ul
|
17
|
+
- product_type.product_attributes.each do |attribute|
|
18
|
+
%li{ :id => "attribute_#{attribute.id}", :rel => 'attribute' }
|
19
|
+
= hidden_field_tag 'product_type[product_attribute_ids][]', attribute.id, :id => "product_type_product_attribute_ids_#{attribute.id}"
|
20
|
+
= link_to '#' do
|
21
|
+
= attribute.name
|
22
|
+
%em.small-icons.edit-link{ :onclick => "window.open('#{url_for [forgeos_commerce, :edit, :admin, attribute]}'); return false;" }
|
23
|
+
%span.big-icons.gray-destroy-attribute.gray-destroy
|
24
|
+
.clear
|
25
|
+
%h2.permalink
|
26
|
+
= t('permalink').capitalize
|
27
|
+
\:
|
28
|
+
= seo_product_type_path(ProductType.new(:url=>''))
|
29
|
+
= f.text_field :url
|
30
|
+
.clear
|
31
|
+
= f.label :description, t('description').capitalize
|
32
|
+
%div{ :style => 'clear: left;'}
|
33
|
+
= f.text_area :description, :cols => 80, :class => 'mceEditor'
|
34
|
+
#yellow-sidebar.grid_4.alpha.omega.yellow
|
35
|
+
#product-types-all-tree.jstree-drop
|
36
|
+
%ul
|
37
|
+
- Attribute.all.each do |attribute|
|
38
|
+
- unless attribute.product_types.include? @product_type
|
39
|
+
%li{ :rel => 'attribute', :id => "attribute_#{attribute.id}" }
|
40
|
+
= link_to '#' do
|
41
|
+
= attribute.name.html_safe
|
42
|
+
%em.small-icons.edit-link{ :onclick => "window.open('#{url_for [forgeos_commerce, :edit, :admin, attribute]}'); return false;" }
|
43
|
+
%span.big-icons.gray-destroy-attribute.gray-destroy
|
44
|
+
.clear
|
45
|
+
= link_to t('attribute.create.action').capitalize, [forgeos_commerce, :admin, :attributes], :class => 'small-icons small-icons-verti-small-blue-plus attribute-new'
|
46
|
+
.clear
|
@@ -0,0 +1,19 @@
|
|
1
|
+
- unless defined?(level)
|
2
|
+
- level = 0
|
3
|
+
|
4
|
+
- unless categories.nil? or categories.blank?
|
5
|
+
- categories.each do |category|
|
6
|
+
%li{ :rel => 'attribute-category', :id => "category_#{category.id}" }
|
7
|
+
= link_to((category.name + content_tag(:span, ' ', :class => 'big-icons gray-destroy')), '#')
|
8
|
+
- unless category.elements.empty?
|
9
|
+
%ul
|
10
|
+
- category.elements.each do |attribute|
|
11
|
+
- unless attribute.product_types.include? @product_type
|
12
|
+
%li{ :rel => 'attribute', :id => "attribute_#{attribute.id}" }
|
13
|
+
= link_to((attribute.name + content_tag(:span, ' ', :class => 'big-icons gray-destroy-attribute')), '#')
|
14
|
+
- unless category.children.empty?
|
15
|
+
%ul
|
16
|
+
- category.children.each do |child|
|
17
|
+
- unless child.attribute.empty?
|
18
|
+
= render :partial => 'categories', :locals => { :categories => [child], :level => (level + 1) }
|
19
|
+
|
@@ -0,0 +1,6 @@
|
|
1
|
+
%ul.ui-tabs-nav.ui-helper-reset.ui-helper-clearfix.ui-widget-header.ui-corner-all
|
2
|
+
%li.ui-state-default.ui-corner-top.ui-tabs-selected.ui-state-active= link_to I18n.t('product_type', :count => 2).capitalize, '#content'
|
3
|
+
%li.ui-state-default.ui-corner-top= link_to I18n.t('brand.other').capitalize, [forgeos_commerce, :admin, :brands]
|
4
|
+
%li.ui-state-default.ui-corner-top= link_to I18n.t('attribute', :count => 2).capitalize, [forgeos_commerce, :admin, :attributes]
|
5
|
+
%li.ui-state-default.ui-corner-top= link_to I18n.t('graphic_template', :count => 2).capitalize, ''
|
6
|
+
%li.ui-state-default.ui-corner-top= link_to "Formulaires", [forgeos_commerce, :admin, :forms]
|
@@ -0,0 +1 @@
|
|
1
|
+
removedataTablesRow('#<%= polymorphic_html_id @product_type, 'destroy' -%>');
|
@@ -0,0 +1,14 @@
|
|
1
|
+
= render :partial => 'admin/menus/lang_switcher'
|
2
|
+
= render :partial => 'tabs'
|
3
|
+
= render :partial => 'admin/sidebars/left_sidebar', :locals => { :icon_class => 'product-types', :sidebar_title => 'product_type.all', :tree_id =>'product-type-tree' }
|
4
|
+
|
5
|
+
#content.grid_12.alpha.omega
|
6
|
+
.backgrounds.header
|
7
|
+
= link_to content_tag(:span,I18n.t('product_type.create.action').capitalize, :class=>'big-icons create-product-type'), [forgeos_commerce, :new, :admin, :product_type], :class=>'backgrounds action-button'
|
8
|
+
#search.right
|
9
|
+
= link_to content_tag(:span, I18n.t('search').capitalize, :class => 'small-icons search-span'), '#', :class => 'small-icons left search-link'
|
10
|
+
.backgrounds.search-form
|
11
|
+
.content-background
|
12
|
+
%table#table.datatable.draggable_rows
|
13
|
+
|
14
|
+
= dataTables_tag :url => forgeos_commerce.admin_product_types_path(:format => :json), :columns => ["{'bSearchable':false,'bSortable':false}","{'sTitle':'#{I18n.t :name}'}","{'sTitle':'#{I18n.t :product, :count => 2}'}","{'sClass':'actions-td','bSearchable':false,'bSortable':false}"]
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<%
|
2
|
+
output = {
|
3
|
+
:sEcho => params[:sEcho],
|
4
|
+
:iTotalRecords => @product_types.total_entries || 0,
|
5
|
+
:iTotalDisplayRecords => @product_types.size,
|
6
|
+
:aaData => @product_types.collect do |product_type|
|
7
|
+
products_count = product_type.products.count
|
8
|
+
[
|
9
|
+
content_tag(:div, content_tag(:div, '', :class=>'handler') + content_tag(:div, '', :class => 'small-icons product-types'), :id => polymorphic_html_id(product_type), :class => 'handler_container'),
|
10
|
+
content_tag(:div, link_to(product_type.name, [forgeos_commerce, :edit, :admin, product_type]), :class => 'product-name'),
|
11
|
+
"#{products_count} #{t :product, :count => products_count}",
|
12
|
+
link_to('', [forgeos_commerce, :edit, :admin, product_type], :class => 'small-icons edit-link') +
|
13
|
+
link_to('', [forgeos_commerce, :admin, product_type],
|
14
|
+
:remote => true,
|
15
|
+
:method => :delete,
|
16
|
+
:confirm => t('product_type.destroy.confirm').capitalize,
|
17
|
+
:class => 'small-icons destroy-link',
|
18
|
+
:id => polymorphic_html_id(product_type, 'destroy')
|
19
|
+
)
|
20
|
+
]
|
21
|
+
end
|
22
|
+
}
|
23
|
+
-%>
|
24
|
+
<%= raw output.to_json -%>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
= render :partial => 'admin/menus/lang_switcher'
|
2
|
+
= render :partial => 'tabs'
|
3
|
+
#wrap
|
4
|
+
.backgrounds.big-header
|
5
|
+
%h1= @product_type.name
|
6
|
+
.interact-links
|
7
|
+
= link_to I18n.t('product_type.update.action').capitalize, [forgeos_commerce, :edit, :admin, @product_type ], :class => 'backgrounds interact-button'
|
8
|
+
= I18n.t('or')
|
9
|
+
= link_to I18n.t('product_type.back').capitalize, [forgeos_commerce, :admin, :product_types], :class => 'back-link'
|
10
|
+
|
11
|
+
#content.grid_12.alpha.omega
|
12
|
+
.grid_12.alpha
|
13
|
+
#product-types-options-tree.a-tree.init-tree
|
14
|
+
= I18n.t('attribute', :count => 2).capitalize
|
15
|
+
%ul
|
16
|
+
- @product_type.product_attributes.each do |attribute|
|
17
|
+
- id = "attribute_#{attribute.id}"
|
18
|
+
%li{ :id => id, :rel => 'attribute' }
|
19
|
+
%a{ :href => '#' }
|
20
|
+
= attribute.name
|
21
|
+
.clear
|
22
|
+
.clear
|
23
|
+
|
@@ -0,0 +1,37 @@
|
|
1
|
+
- unless product_type.nil?
|
2
|
+
- product_type.product_attributes.uniq.each do |attribute|
|
3
|
+
.fake-hr
|
4
|
+
%span.option-second-title
|
5
|
+
= attribute.name
|
6
|
+
- if attribute.dynamic?
|
7
|
+
- dynamic_attribute_value = product.dynamic_attribute_values.find_by_attribute_id(attribute.id) if product
|
8
|
+
- case attribute
|
9
|
+
- when TextAttribute
|
10
|
+
= text_field "dynamic_attribute_values[#{attribute.id}]", 'value', :value => (dynamic_attribute_value.value unless dynamic_attribute_value.nil?), :id => "attribute_#{attribute.id}"
|
11
|
+
- when NumberAttribute
|
12
|
+
= text_field "dynamic_attribute_values[#{attribute.id}]", 'value', :value => (dynamic_attribute_value.value unless dynamic_attribute_value.nil?), :id => "attribute_#{attribute.id}"
|
13
|
+
- when DateAttribute
|
14
|
+
= text_field "dynamic_attribute_values[#{attribute.id}]", 'value', :value => (dynamic_attribute_value.value unless dynamic_attribute_value.nil?), :id => "attribute_#{attribute.id}", :class => 'date-picker'
|
15
|
+
- when UrlAttribute
|
16
|
+
= text_field "dynamic_attribute_values[#{attribute.id}]", 'value', :value => (dynamic_attribute_value.value unless dynamic_attribute_value.nil?), :id => "attribute_#{attribute.id}"
|
17
|
+
- when LongtextAttribute
|
18
|
+
= text_area "dynamic_attribute_values[#{attribute.id}]", 'value', :value => (dynamic_attribute_value.value unless dynamic_attribute_value.nil?), :id => "attribute_#{attribute.id}", :class => 'mceEditor'
|
19
|
+
- else
|
20
|
+
- case attribute
|
21
|
+
- when CheckboxAttribute
|
22
|
+
= hidden_field_tag 'product[attribute_value_ids][]'
|
23
|
+
- attribute.attribute_values.each do |value|
|
24
|
+
.grid_3.omega
|
25
|
+
= check_box_tag 'product[attribute_value_ids][]', value.id, product ? product.attribute_value_ids.include?(value.id) : false, :id => "attribute_value_#{value.id}"
|
26
|
+
= value.name
|
27
|
+
- when RadioAttribute, RadiobuttonAttribute
|
28
|
+
- attribute.attribute_values.each do |value|
|
29
|
+
.grid_3.omega
|
30
|
+
= radio_button_tag "product[radiobutton][#{attribute.id}]", value.id, product ? product.attribute_value_ids.include?(value.id) : false, :id => "attribute_value_#{value.id}"
|
31
|
+
= value.name
|
32
|
+
- when PicklistAttribute
|
33
|
+
- value = product.attribute_values.find_by_attribute_id(attribute.id)
|
34
|
+
.select_attribute
|
35
|
+
= select_tag 'product[attribute_value_ids][]', options_for_select(attribute.attribute_values.collect{ |v| [v.name, v.id] }, value ? value.id : nil), { :prompt => I18n.t('please_select') }
|
36
|
+
.clear
|
37
|
+
.clear
|