nimbleshop_core 0.0.1.rc1
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/README.md +13 -0
- data/Rakefile +15 -0
- data/app/assets/images/engines/nimbleshop_authorizedotnet/american_express.png +0 -0
- data/app/assets/images/engines/nimbleshop_authorizedotnet/authorize_net_big.png +0 -0
- data/app/assets/images/engines/nimbleshop_authorizedotnet/authorizedotnet_big.png +0 -0
- data/app/assets/images/engines/nimbleshop_authorizedotnet/discover.png +0 -0
- data/app/assets/images/engines/nimbleshop_authorizedotnet/mastercard.png +0 -0
- data/app/assets/images/engines/nimbleshop_authorizedotnet/visa.png +0 -0
- data/app/assets/images/engines/nimbleshop_cod/cod_small.png +0 -0
- data/app/assets/images/engines/nimbleshop_paypalwp/paypal_big.png +0 -0
- data/app/assets/images/engines/nimbleshop_paypalwp/paypal_small.png +0 -0
- data/app/assets/images/engines/nimbleshop_splitable/splitable.png +0 -0
- data/app/assets/images/engines/nimbleshop_splitable/splitable_big.png +0 -0
- data/app/assets/images/engines/nimbleshop_splitable/splitable_small.png +0 -0
- data/app/assets/javascripts/admin/products/edit.js.coffee +19 -0
- data/app/assets/javascripts/admin/shipping_methods/edit.js.coffee +6 -0
- data/app/assets/javascripts/admin.js +25 -0
- data/app/assets/javascripts/fadeout_success.js.coffee +2 -0
- data/app/assets/javascripts/payment_method.js.coffee +19 -0
- data/app/assets/javascripts/product-group-condition.js.coffee +33 -0
- data/app/assets/javascripts/remove_deletion_of_product_pictures.js.coffee +5 -0
- data/app/assets/javascripts/shipit.js.coffee +10 -0
- data/app/assets/javascripts/twitter_bootstrap.js.coffee +4 -0
- data/app/assets/stylesheets/admin.css +9 -0
- data/app/assets/stylesheets/admin_bootstrap_and_overrides.css.less +38 -0
- data/app/assets/stylesheets/admin_custom.css +104 -0
- data/app/assets/twitter/bootstrap/glyphicons-halflings-white.png +0 -0
- data/app/assets/twitter/bootstrap/glyphicons-halflings.png +0 -0
- data/app/controllers/admin/custom_fields_controller.rb +56 -0
- data/app/controllers/admin/link_groups_controller.rb +76 -0
- data/app/controllers/admin/main_controller.rb +9 -0
- data/app/controllers/admin/navigations_controller.rb +49 -0
- data/app/controllers/admin/orders_controller.rb +47 -0
- data/app/controllers/admin/payment_methods_controller.rb +26 -0
- data/app/controllers/admin/product_groups_controller.rb +70 -0
- data/app/controllers/admin/products_controller.rb +71 -0
- data/app/controllers/admin/shipments_controller.rb +19 -0
- data/app/controllers/admin/shipping_methods_controller.rb +93 -0
- data/app/controllers/admin/shipping_zones_controller.rb +62 -0
- data/app/controllers/admin/shops_controller.rb +33 -0
- data/app/controllers/admin_controller.rb +38 -0
- data/app/helpers/admin_helper.rb +83 -0
- data/app/helpers/nimbleshop_helper.rb +43 -0
- data/app/helpers/payment_method_helper.rb +52 -0
- data/app/mailers/admin_mailer.rb +22 -0
- data/app/mailers/mailer.rb +31 -0
- data/app/models/address.rb +69 -0
- data/app/models/country_shipping_zone.rb +36 -0
- data/app/models/creditcard.rb +95 -0
- data/app/models/custom_field.rb +8 -0
- data/app/models/custom_field_answer/field.rb +101 -0
- data/app/models/custom_field_answer.rb +17 -0
- data/app/models/line_item.rb +48 -0
- data/app/models/link.rb +3 -0
- data/app/models/link_group.rb +8 -0
- data/app/models/navigation.rb +7 -0
- data/app/models/order.rb +158 -0
- data/app/models/payment_method.rb +20 -0
- data/app/models/payment_transaction.rb +11 -0
- data/app/models/picture.rb +30 -0
- data/app/models/product.rb +76 -0
- data/app/models/product_group.rb +65 -0
- data/app/models/product_group_condition.rb +8 -0
- data/app/models/regional_shipping_zone.rb +25 -0
- data/app/models/shipment.rb +19 -0
- data/app/models/shipment_carrier.rb +3 -0
- data/app/models/shipping_cost_calculator.rb +9 -0
- data/app/models/shipping_method.rb +103 -0
- data/app/models/shipping_zone.rb +9 -0
- data/app/models/shop.rb +26 -0
- data/app/models/tax_calculator.rb +18 -0
- data/app/observers/order_observer.rb +53 -0
- data/app/uploaders/picture_uploader.rb +65 -0
- data/app/views/admin/custom_fields/_form.html.erb +45 -0
- data/app/views/admin/custom_fields/edit.html.erb +7 -0
- data/app/views/admin/custom_fields/index.html.erb +31 -0
- data/app/views/admin/custom_fields/new.html.erb +7 -0
- data/app/views/admin/link_groups/_form.html.erb +31 -0
- data/app/views/admin/link_groups/_link_group.html.erb +50 -0
- data/app/views/admin/link_groups/_link_group_title.html.erb +5 -0
- data/app/views/admin/link_groups/edit.html.erb +8 -0
- data/app/views/admin/link_groups/index.html.erb +29 -0
- data/app/views/admin/link_groups/new.html.erb +9 -0
- data/app/views/admin/mailer/new_order_notification.text.erb +31 -0
- data/app/views/admin/main/index.html.erb +5 -0
- data/app/views/admin/navigations/new.html.erb +29 -0
- data/app/views/admin/orders/_line_item.html.erb +11 -0
- data/app/views/admin/orders/_line_items.html.erb +39 -0
- data/app/views/admin/orders/_payment_info.html.erb +20 -0
- data/app/views/admin/orders/_shipping_info.html.erb +40 -0
- data/app/views/admin/orders/index.html.erb +33 -0
- data/app/views/admin/orders/show.html.erb +40 -0
- data/app/views/admin/payment_methods/index.html.erb +6 -0
- data/app/views/admin/product_groups/_condition.html.mustache +20 -0
- data/app/views/admin/product_groups/_form.html.erb +72 -0
- data/app/views/admin/product_groups/edit.html.erb +7 -0
- data/app/views/admin/product_groups/index.html.erb +30 -0
- data/app/views/admin/product_groups/new.html.erb +7 -0
- data/app/views/admin/product_groups/show.html.erb +9 -0
- data/app/views/admin/products/_custom_field_answer.html.erb +9 -0
- data/app/views/admin/products/_form.html.erb +69 -0
- data/app/views/admin/products/_handle_pictures.html.erb +32 -0
- data/app/views/admin/products/_pictures.html.erb +33 -0
- data/app/views/admin/products/edit.html.erb +26 -0
- data/app/views/admin/products/index.html.erb +34 -0
- data/app/views/admin/products/new.html.erb +9 -0
- data/app/views/admin/shipping_methods/_form.html.erb +58 -0
- data/app/views/admin/shipping_methods/_shipping_method.html.erb +31 -0
- data/app/views/admin/shipping_methods/edit.html.erb +18 -0
- data/app/views/admin/shipping_methods/new.html.erb +7 -0
- data/app/views/admin/shipping_zones/_form.html.erb +31 -0
- data/app/views/admin/shipping_zones/_shipping_method.html.erb +13 -0
- data/app/views/admin/shipping_zones/_shipping_zone.html.erb +47 -0
- data/app/views/admin/shipping_zones/edit.html.erb +8 -0
- data/app/views/admin/shipping_zones/index.html.erb +16 -0
- data/app/views/admin/shipping_zones/new.html.erb +8 -0
- data/app/views/admin/shops/edit.html.erb +119 -0
- data/app/views/layouts/_admin_footer.html.erb +23 -0
- data/app/views/layouts/_admin_sidebar.html.erb +0 -0
- data/app/views/layouts/_container.html.erb +33 -0
- data/app/views/layouts/_top_nav_bar.html.erb +30 -0
- data/app/views/layouts/admin.html.erb +35 -0
- data/app/views/layouts/payment_method.html.erb +12 -0
- data/app/views/mailer/order_notification_to_buyer.text.erb +31 -0
- data/app/views/mailer/shipment_notification_to_buyer.text.erb +34 -0
- data/config/initializers/001_settings_application.rb +10 -0
- data/config/initializers/002_load_core_extensions.rb +8 -0
- data/config/initializers/field_with_error.rb +2 -0
- data/config/initializers/strip_and_nullify.rb +13 -0
- data/config/initializers/time_formats.rb +1 -0
- data/config/locales/en.yml +61 -0
- data/config/routes.rb +56 -0
- data/db/development.sqlite3 +0 -0
- data/db/migrate/20111022144421_create_product_groups.rb +12 -0
- data/db/migrate/20111022144426_create_products.rb +16 -0
- data/db/migrate/20111022144653_create_orders.rb +21 -0
- data/db/migrate/20111022144725_create_line_items.rb +15 -0
- data/db/migrate/20111022234951_create_shops.rb +20 -0
- data/db/migrate/20111026193227_create_link_groups.rb +12 -0
- data/db/migrate/20111026193435_create_navigations.rb +10 -0
- data/db/migrate/20111031135810_create_links.rb +10 -0
- data/db/migrate/20111106193938_create_custom_fields.rb +10 -0
- data/db/migrate/20111106195112_create_custom_field_answers.rb +14 -0
- data/db/migrate/20111106201548_create_product_group_conditions.rb +12 -0
- data/db/migrate/20111107035350_create_creditcard_transactions.rb +15 -0
- data/db/migrate/20111109190754_create_addresses.rb +24 -0
- data/db/migrate/20111125173344_create_pictures.rb +16 -0
- data/db/migrate/20111201024408_create_shipping_methods.rb +16 -0
- data/db/migrate/20111202143154_create_shipping_zones.rb +17 -0
- data/db/migrate/20111203034020_create_payment_methods.rb +14 -0
- data/db/migrate/20111221190000_create_preferences.rb +14 -0
- data/db/migrate/20120105234047_create_shipments.rb +11 -0
- data/db/migrate/20120105234553_create_shipment_carriers.rb +11 -0
- data/db/migrate/20120606165355_create_delayed_jobs.rb +22 -0
- data/db/production.sqlite3 +0 -0
- data/db/schema.rb +265 -0
- data/db/seeds.rb +1 -0
- data/db/test.sqlite3 +0 -0
- data/lib/assets/javascripts/loading_state_for_buttons.js.coffee +3 -0
- data/lib/assets/javascripts/show_help_on_hover.js.coffee +2 -0
- data/lib/assets/javascripts/utils/autoresize.js.coffee +3 -0
- data/lib/assets/javascripts/utils/focus.js.coffee +3 -0
- data/lib/assets/javascripts/utils/formatNumber.js.coffee +25 -0
- data/lib/assets/javascripts/utils/formatPrice.js.coffee +24 -0
- data/lib/generators/nimbleshop/app/app_generator.rb +84 -0
- data/lib/generators/nimbleshop/app/templates/config/application.yml +61 -0
- data/lib/generators/nimbleshop/app/templates/config/initializers/airbrake.rb +3 -0
- data/lib/generators/nimbleshop/app/templates/config/initializers/cache_images.rb +4 -0
- data/lib/generators/nimbleshop/app/templates/config/initializers/carrierwave.rb +36 -0
- data/lib/generators/nimbleshop/app/templates/config/initializers/delayed_job.rb +15 -0
- data/lib/generators/nimbleshop/app/templates/config/initializers/setup_email.rb +24 -0
- data/lib/nimbleshop/core_ext/activerecord_base.rb +18 -0
- data/lib/nimbleshop/core_ext/filelessio.rb +4 -0
- data/lib/nimbleshop/core_ext/force_ssl.rb +26 -0
- data/lib/nimbleshop/core_ext/mustache_templater_handler.rb +10 -0
- data/lib/nimbleshop/engine.rb +23 -0
- data/lib/nimbleshop/permalink/builder.rb +46 -0
- data/lib/nimbleshop/processor/base.rb +51 -0
- data/lib/nimbleshop/processor.rb +3 -0
- data/lib/nimbleshop/product_group_search/base_field.rb +19 -0
- data/lib/nimbleshop/product_group_search/core_field_strategy.rb +31 -0
- data/lib/nimbleshop/product_group_search/custom_field_strategy.rb +39 -0
- data/lib/nimbleshop/product_group_search/date_field.rb +16 -0
- data/lib/nimbleshop/product_group_search/extension.rb +46 -0
- data/lib/nimbleshop/product_group_search/number_field.rb +17 -0
- data/lib/nimbleshop/product_group_search/text_field.rb +33 -0
- data/lib/nimbleshop/product_group_search.rb +74 -0
- data/lib/nimbleshop/sampledata/data.rb +246 -0
- data/lib/nimbleshop/sampledata/pictures/product1/pic1.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product2/pic1.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product2/pic2.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product3/pic1.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product3/pic2.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product3/pic3.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product3/pic4.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product3/pic5.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product4/pic1.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product4/pic2.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product5/pic1.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product5/pic2.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product6/pic1.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product6/pic10.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product6/pic11.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product6/pic12.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product6/pic13.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product6/pic14.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product6/pic15.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product6/pic16.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product6/pic17.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product6/pic2.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product6/pic3.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product6/pic4.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product6/pic5.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product6/pic6.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product6/pic7.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product6/pic8.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product6/pic9.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product7/pic1.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product7/pic2.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product7/pic3.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product8/pic1.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product8/pic2.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product8/pic3.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product8/pic4.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product8/pic5.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product8/pic6.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product8/pic7.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product8/pic8.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product9/pic1.jpg +0 -0
- data/lib/nimbleshop/sampledata/pictures/product9/pic2.jpg +0 -0
- data/lib/nimbleshop/util.rb +60 -0
- data/lib/nimbleshop/version.rb +18 -0
- data/lib/nimbleshop_core.rb +23 -0
- data/lib/tasks/localhost2public.rake +8 -0
- data/lib/tasks/setup.rake +26 -0
- data/test/factories/address_factory.rb +31 -0
- data/test/factories/creditcard_factory.rb +30 -0
- data/test/factories/custom_field_answer_factory.rb +6 -0
- data/test/factories/custom_field_factory.rb +21 -0
- data/test/factories/line_item_factory.rb +7 -0
- data/test/factories/link_factory.rb +6 -0
- data/test/factories/link_group_factory.rb +5 -0
- data/test/factories/navigation_factory.rb +6 -0
- data/test/factories/order_factory.rb +49 -0
- data/test/factories/payment_method_factory.rb +6 -0
- data/test/factories/payment_transaction_factory.rb +42 -0
- data/test/factories/picture_factory.rb +11 -0
- data/test/factories/product_group_condition_factory.rb +40 -0
- data/test/factories/product_group_factory.rb +5 -0
- data/test/factories/products_factory.rb +11 -0
- data/test/factories/shipment_carrier_factory.rb +6 -0
- data/test/factories/shipment_factory.rb +6 -0
- data/test/factories/shipping_method_factory.rb +15 -0
- data/test/factories/shipping_zone_factory.rb +5 -0
- data/test/factories/shop_factory.rb +8 -0
- data/test/fixtures/files/avatar.png +0 -0
- data/test/fixtures/link_groups.yml +13 -0
- data/test/fixtures/payment_methods.yml +39 -0
- data/test/fixtures/shops.yml +15 -0
- data/test/helpers/admin_helper_test.rb +37 -0
- data/test/helpers/nimbleshop_helper_test.rb +17 -0
- data/test/integration/admin/link_groups_acceptance_test.rb +39 -0
- data/test/integration/admin/orders_acceptance_test.rb +63 -0
- data/test/integration/admin/payment_methods_acceptance_test.rb +13 -0
- data/test/integration/admin/product_groups_acceptance_test.rb +89 -0
- data/test/integration/admin/products_acceptance_test.rb +105 -0
- data/test/integration/admin/shipping_methods_acceptance_test.rb +63 -0
- data/test/integration/admin/shipping_zones_acceptance_test.rb +16 -0
- data/test/integration/admin/shops_acceptance_test.rb +44 -0
- data/test/integration/checkout/cart_acceptance_test.rb +113 -0
- data/test/integration/checkout/payment_confirmation_acceptance_test.rb +24 -0
- data/test/integration/checkout/paypal_acceptance_test.rb +34 -0
- data/test/integration/checkout/shipping_address_acceptance_test.rb +91 -0
- data/test/integration/checkout/shipping_method_acceptance_test.rb +51 -0
- data/test/integration/homepage_acceptance_test.rb +24 -0
- data/test/integration/products_acceptance_test.rb +12 -0
- data/test/integration/static_pages_acceptance_test.rb +13 -0
- data/test/mailers/mailer_test.rb +25 -0
- data/test/rails_app/Gemfile +27 -0
- data/test/rails_app/Gemfile.lock +218 -0
- data/test/rails_app/Rakefile +10 -0
- data/test/rails_app/app/controllers/application_controller.rb +6 -0
- data/test/rails_app/app/helpers/application_helper.rb +3 -0
- data/test/rails_app/app/views/layouts/application.html.erb +10 -0
- data/test/rails_app/config/application.rb +25 -0
- data/test/rails_app/config/application.yml +61 -0
- data/test/rails_app/config/boot.rb +5 -0
- data/test/rails_app/config/database.yml +18 -0
- data/test/rails_app/config/environment.rb +5 -0
- data/test/rails_app/config/environments/development.rb +18 -0
- data/test/rails_app/config/environments/production.rb +33 -0
- data/test/rails_app/config/environments/test.rb +33 -0
- data/test/rails_app/config/initializers/backtrace_silencers.rb +7 -0
- data/test/rails_app/config/initializers/inflections.rb +2 -0
- data/test/rails_app/config/initializers/secret_token.rb +2 -0
- data/test/rails_app/config/routes.rb +10 -0
- data/test/rails_app/config.ru +4 -0
- data/test/rails_app/db/development.sqlite3 +0 -0
- data/test/rails_app/db/migrate/20100401102949_create_tables.rb +74 -0
- data/test/rails_app/db/schema.rb +52 -0
- data/test/rails_app/log/development.log +94 -0
- data/test/rails_app/log/test.log +0 -0
- data/test/rails_app/public/404.html +26 -0
- data/test/rails_app/public/422.html +26 -0
- data/test/rails_app/public/500.html +26 -0
- data/test/rails_app/public/favicon.ico +0 -0
- data/test/rails_app/script/rails +10 -0
- data/test/support/address_test_helper.rb +24 -0
- data/test/support/checkout_test_helper.rb +40 -0
- data/test/support/dbify_sql_helper.rb +12 -0
- data/test/support/images/cookware.jpg +0 -0
- data/test/support/must_be_like.rb +24 -0
- data/test/support/shipping_method_test_helper.rb +5 -0
- data/test/support/wait_for_ajax.rb +4 -0
- data/test/test_helper.rb +65 -0
- data/test/unit/address_test.rb +33 -0
- data/test/unit/country_shipping_zone_test.rb +17 -0
- data/test/unit/creditcard_test.rb +33 -0
- data/test/unit/custom_field_answer/field_test.rb +93 -0
- data/test/unit/order_test.rb +70 -0
- data/test/unit/payment_method/authorizedotnet_test.rb +21 -0
- data/test/unit/payment_method/paypalwp_test.rb +17 -0
- data/test/unit/payment_method/splitable_test.rb +18 -0
- data/test/unit/picture_test.rb +24 -0
- data/test/unit/processor/authorize_net_test.rb +236 -0
- data/test/unit/processor/paypal_test.rb +40 -0
- data/test/unit/processor/splitable_test.rb +123 -0
- data/test/unit/product_group_condition_test.rb +188 -0
- data/test/unit/product_group_test.rb +109 -0
- data/test/unit/product_test.rb +60 -0
- data/test/unit/shipping_cost_calculator_test.rb +19 -0
- data/test/unit/shipping_method_test.rb +197 -0
- data/test/unit/shop_test.rb +11 -0
- data/test/unit/tax_calculator_test.rb +13 -0
- data/test/vcr_cassettes/authorize_net/authorize-failure.yml +38 -0
- data/test/vcr_cassettes/authorize_net/authorize-success.yml +38 -0
- data/test/vcr_cassettes/authorize_net/capture-failure.yml +38 -0
- data/test/vcr_cassettes/authorize_net/capture-success.yml +38 -0
- data/test/vcr_cassettes/authorize_net/purchase-failure.yml +38 -0
- data/test/vcr_cassettes/authorize_net/purchase-success.yml +38 -0
- data/test/vcr_cassettes/authorize_net/refund-failure.yml +38 -0
- data/test/vcr_cassettes/authorize_net/refund-success.yml +38 -0
- data/test/vcr_cassettes/authorize_net/void-authorize.yml +38 -0
- data/test/vcr_cassettes/authorize_net/void-failure.yml +38 -0
- data/test/vcr_cassettes/authorize_net/void-success.yml +38 -0
- data/test/vcr_cassettes/splitable/split-create-failure.yml +48 -0
- data/test/vcr_cassettes/splitable/split-create-success.yml +50 -0
- data/test/vcr_cassettes/splitable/split-draft-create-failure.yml +50 -0
- data/test/vcr_cassettes/splitable/split-draft-create-success.yml +50 -0
- data/vendor/assets/javascripts/accounting.js +406 -0
- data/vendor/assets/javascripts/autoresize.js +275 -0
- data/vendor/assets/javascripts/jquery-1.7.1.js +9267 -0
- data/vendor/assets/javascripts/jquery-form.js +980 -0
- data/vendor/assets/javascripts/jquery-json.js +193 -0
- data/vendor/assets/javascripts/jquery-ui-1.8.16.js +11768 -0
- data/vendor/assets/javascripts/jquery-ujs.js +374 -0
- data/vendor/assets/javascripts/mustache.js +436 -0
- data/vendor/assets/javascripts/nested_form.js +51 -0
- metadata +740 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<% page_title "edit #{@shipping_method.name}" %>
|
|
2
|
+
|
|
3
|
+
<div>
|
|
4
|
+
<h1>Edit shipping method</h1>
|
|
5
|
+
</div>
|
|
6
|
+
|
|
7
|
+
<%= render 'form' %>
|
|
8
|
+
|
|
9
|
+
<table class="table table-striped table-bordered">
|
|
10
|
+
<thead>
|
|
11
|
+
<th>State/Province name</th>
|
|
12
|
+
<th>Change in shipping cost</th>
|
|
13
|
+
<th> </th>
|
|
14
|
+
</thead>
|
|
15
|
+
<tbody>
|
|
16
|
+
<%= render @shipping_method.regions %>
|
|
17
|
+
</tbody>
|
|
18
|
+
</table>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<div class='well'>
|
|
2
|
+
<%= form_for([:admin, @shipping_zone], html: {class: 'form-horizontal'}) do |f| %>
|
|
3
|
+
|
|
4
|
+
<% if @shipping_zone.errors.any? %>
|
|
5
|
+
<div class="alert alert-error">
|
|
6
|
+
<p> <%= t(:error_bang) %> </p>
|
|
7
|
+
<ul>
|
|
8
|
+
<% @shipping_zone.errors.full_messages.each do |message| %>
|
|
9
|
+
<li><%= message %></li>
|
|
10
|
+
<% end %>
|
|
11
|
+
</ul>
|
|
12
|
+
</div>
|
|
13
|
+
<% end %>
|
|
14
|
+
|
|
15
|
+
<fieldset>
|
|
16
|
+
<div class="control-group">
|
|
17
|
+
<%= f.label :country_code, "Country name", class: 'control-label' %>
|
|
18
|
+
<div class="controls">
|
|
19
|
+
<%= f.select :country_code, Util.unconfigured_shipping_zone_countries, class: 'xlarge focus', size: 30 %>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
</fieldset>
|
|
23
|
+
|
|
24
|
+
<div class="form-actions">
|
|
25
|
+
<%= f.submit 'Submit', class: 'btn btn-primary', 'data-loading-text' => 'processing ...' %>
|
|
26
|
+
|
|
27
|
+
<%= link_to 'Cancel', admin_shipping_zones_path, class: 'btn' %>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<% end %>
|
|
31
|
+
</div>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<tr>
|
|
2
|
+
<td> <%= shipping_method.name %> </td>
|
|
3
|
+
<td> <%= shipping_method_condition_in_english(shipping_method) %> </td>
|
|
4
|
+
<td> <%= number_to_currency(shipping_method.base_price) %> </td>
|
|
5
|
+
<td>
|
|
6
|
+
<%= link_to t(:edit), [:edit, :admin, shipping_method.shipping_zone, shipping_method ], title: 'Edit' %>
|
|
7
|
+
|
|
|
8
|
+
<%= link_to admin_shipping_zone_shipping_method_path(shipping_method.shipping_zone, shipping_method),
|
|
9
|
+
data: { confirm: t(:delete_confirmation_for_shipping_method) }, class: 'delete', title: 'Delete', method: 'delete' do %>
|
|
10
|
+
<%= delete_icon %>
|
|
11
|
+
<% end %>
|
|
12
|
+
</td>
|
|
13
|
+
</tr>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<div class='well'>
|
|
2
|
+
<table class="table table-striped">
|
|
3
|
+
<thead>
|
|
4
|
+
<tr>
|
|
5
|
+
<th colspan='5'>
|
|
6
|
+
|
|
7
|
+
<div class='link_group_name'>
|
|
8
|
+
<h3><%= shipping_zone.name %></h3>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<div class='link_group_edit'>
|
|
12
|
+
<%= link_to [:admin, shipping_zone], data: { confirm: t(:delete_confirmation_for_shipping_zone) }, method: 'delete', class: 'delete', title: 'Delete' do %>
|
|
13
|
+
<i class='icon-remove icon-white'></i>
|
|
14
|
+
<% end %>
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
<div style='float:right'>
|
|
18
|
+
<%= link_to new_admin_shipping_zone_shipping_method_path(shipping_zone), class: 'btn btn-success' do %>
|
|
19
|
+
<i class='icon-plus'></i> Add new shipping method
|
|
20
|
+
<% end %>
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
<div style='clear:both;'></div>
|
|
24
|
+
|
|
25
|
+
</th>
|
|
26
|
+
</tr>
|
|
27
|
+
|
|
28
|
+
<% if shipping_zone.shipping_methods.any? %>
|
|
29
|
+
<tr>
|
|
30
|
+
<th> Shipping method name </th>
|
|
31
|
+
<th> Condition </th>
|
|
32
|
+
<th> Shipping price </th>
|
|
33
|
+
<th> </th>
|
|
34
|
+
<th> </th>
|
|
35
|
+
</tr>
|
|
36
|
+
<% end %>
|
|
37
|
+
|
|
38
|
+
</thead>
|
|
39
|
+
<tbody>
|
|
40
|
+
<% shipping_zone.shipping_methods.each do |shipping_method| %>
|
|
41
|
+
<%= render 'shipping_method', shipping_method: shipping_method %>
|
|
42
|
+
<% end %>
|
|
43
|
+
</tbody>
|
|
44
|
+
</table>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<br />
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<% page_title 'shipping zones' %>
|
|
2
|
+
|
|
3
|
+
<div>
|
|
4
|
+
<h1 class='ns-page-title'><%= t(:shipping_zones) %></h1>
|
|
5
|
+
|
|
6
|
+
<%= link_to(new_admin_shipping_zone_path, class: 'btn btn-success new-action', id: 'add_new_shipping_zone') do %>
|
|
7
|
+
<i class="icon-plus"></i> <%= t(:add_new_shipping_zone) %>
|
|
8
|
+
<% end %>
|
|
9
|
+
<div class='clear'></div>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
<br />
|
|
13
|
+
|
|
14
|
+
<% @shipping_zones.each do |shipping_zone| %>
|
|
15
|
+
<%= render 'shipping_zone', shipping_zone: shipping_zone %>
|
|
16
|
+
<% end %>
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
<% page_title 'shop configuration' %>
|
|
2
|
+
|
|
3
|
+
<div>
|
|
4
|
+
<h1 class='ns-page-title'>Shop configuration</h1>
|
|
5
|
+
<div class='clear'></div>
|
|
6
|
+
</div>
|
|
7
|
+
|
|
8
|
+
<br />
|
|
9
|
+
|
|
10
|
+
<div class='well'>
|
|
11
|
+
<%= form_for([:admin, @shop], html: {class: 'form-horizontal'}, url: admin_shop_path) do |f| %>
|
|
12
|
+
|
|
13
|
+
<% if @shop.errors.any? %>
|
|
14
|
+
<div class="alert alert-error">
|
|
15
|
+
<p> <%= t(:error_bang) %> </p>
|
|
16
|
+
<ul>
|
|
17
|
+
<% @shop.errors.full_messages.each do |message| %>
|
|
18
|
+
<li><%= message %></li>
|
|
19
|
+
<% end %>
|
|
20
|
+
</ul>
|
|
21
|
+
</div>
|
|
22
|
+
<% end %>
|
|
23
|
+
|
|
24
|
+
<fieldset>
|
|
25
|
+
<div class="control-group">
|
|
26
|
+
<%= f.label :name, class: 'control-label' %>
|
|
27
|
+
<div class="controls">
|
|
28
|
+
<%= f.text_field :name, class: 'span8' %>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
<div class="control-group">
|
|
33
|
+
<%= f.label :theme, class: 'control-label' %>
|
|
34
|
+
<div class="controls">
|
|
35
|
+
<%= f.text_field :theme, class: 'span8' %>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
<div class="control-group">
|
|
40
|
+
<%= f.label :author_name, class: 'control-label' %>
|
|
41
|
+
<%= link_to '?', '#', 'data-content' => "Author name that is displayed on page's meta tag. This for search engine optimization.",
|
|
42
|
+
'data-original-title' => 'Author name for meta tag' %>
|
|
43
|
+
<div class="controls">
|
|
44
|
+
<%= f.text_field :author_name, class: 'span8' %>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
<div class="control-group">
|
|
50
|
+
<%= f.label :description, class: 'control-label' %>
|
|
51
|
+
<%= link_to '?', '#', 'data-content' => "Site description that is displayed on page's description tag. This for search engine optimization.",
|
|
52
|
+
'data-original-title' => 'Site description for meta tag' %>
|
|
53
|
+
<div class="controls">
|
|
54
|
+
<%= f.text_field :description, class: 'span8' %>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
<div class="control-group">
|
|
59
|
+
<%= f.label :time_zone, class: 'control-label' %>
|
|
60
|
+
<div class="controls">
|
|
61
|
+
<%= f.collection_select :time_zone, ActiveSupport::TimeZone.all, :name, :to_s %>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
<div class="control-group">
|
|
66
|
+
<%= f.label :twitter_handle, class: 'control-label' %>
|
|
67
|
+
<div class="controls">
|
|
68
|
+
<%= f.text_field :twitter_handle, class: 'span8' %>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
|
|
72
|
+
<div class="control-group">
|
|
73
|
+
<%= f.label :facebook_url, class: 'control-label' %>
|
|
74
|
+
<div class="controls">
|
|
75
|
+
<%= f.text_field :facebook_url, class: 'span8' %>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
|
|
79
|
+
<div class="control-group">
|
|
80
|
+
<%= f.label :from_email, class: 'control-label' %>
|
|
81
|
+
<div class="controls">
|
|
82
|
+
<%= f.text_field :from_email, class: 'span8' %>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
|
|
86
|
+
<div class="control-group">
|
|
87
|
+
<%= f.label :google_analytics_tracking_id, 'Google analytics tracking id', class: 'control-label' %>
|
|
88
|
+
<div class="controls">
|
|
89
|
+
<%= f.text_field :google_analytics_tracking_id, class: 'span8' %>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
|
|
93
|
+
<div class="control-group">
|
|
94
|
+
<%= f.label :tax_percentage, class: 'control-label' %>
|
|
95
|
+
<div class="controls">
|
|
96
|
+
<%= f.text_field :tax_percentage, class: 'span8', 'data-behavior' => 'number-formatted', 'data-behavior-precision' => 2 %>
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
|
|
100
|
+
<div class="control-group">
|
|
101
|
+
<%= f.label :aaa, 'How to process credit card', class: 'control-label' %>
|
|
102
|
+
<div class='controls'>
|
|
103
|
+
<label class='radio'>
|
|
104
|
+
<%= f.radio_button :default_creditcard_action, 'authorize' %>
|
|
105
|
+
Authorize the credit card for the total amount of the order .
|
|
106
|
+
</label>
|
|
107
|
+
<label class='radio'>
|
|
108
|
+
<%= f.radio_button :default_creditcard_action, 'purchase' %>
|
|
109
|
+
Authorize and capture the credit card for the total amount of the order .
|
|
110
|
+
</label>
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
</fieldset>
|
|
114
|
+
|
|
115
|
+
<div class="form-actions">
|
|
116
|
+
<%= f.submit 'Submit', class: 'btn btn-primary', 'data-loading-text' => 'processing ...' %>
|
|
117
|
+
</div>
|
|
118
|
+
<% end %>
|
|
119
|
+
</div>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<footer class="row">
|
|
2
|
+
<p class='content'>
|
|
3
|
+
nimbleShop is a
|
|
4
|
+
<%= link_to 'BigBinary', 'http://www.bigbinary.com' %>
|
|
5
|
+
product
|
|
6
|
+
</p>
|
|
7
|
+
<div class='clear'></div>
|
|
8
|
+
</footer>
|
|
9
|
+
|
|
10
|
+
<script type="text/javascript">
|
|
11
|
+
|
|
12
|
+
var _gaq = _gaq || [];
|
|
13
|
+
_gaq.push(['_setAccount', '<%= current_shop.google_analytics_tracking_id %>']);
|
|
14
|
+
_gaq.push(['_trackPageview']);
|
|
15
|
+
|
|
16
|
+
(function() {
|
|
17
|
+
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
|
18
|
+
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
|
19
|
+
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
|
20
|
+
})();
|
|
21
|
+
|
|
22
|
+
</script>
|
|
23
|
+
|
|
File without changes
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<div class="container">
|
|
2
|
+
<div class="row">
|
|
3
|
+
|
|
4
|
+
<div class="span3">
|
|
5
|
+
<%= render 'layouts/admin_sidebar' %>
|
|
6
|
+
</div>
|
|
7
|
+
|
|
8
|
+
<div class="span9">
|
|
9
|
+
<div class="row">
|
|
10
|
+
<div class="span12">
|
|
11
|
+
<% if flash[:notice] %>
|
|
12
|
+
<div class='alert alert-success'>
|
|
13
|
+
<%= flash[:notice] %>
|
|
14
|
+
</div>
|
|
15
|
+
<% end %>
|
|
16
|
+
<% if flash[:error] %>
|
|
17
|
+
<div class='alert alert-error'>
|
|
18
|
+
<%= flash[:error] %>
|
|
19
|
+
</div>
|
|
20
|
+
<% end %>
|
|
21
|
+
<p>
|
|
22
|
+
<%= yield %>
|
|
23
|
+
</p>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<hr />
|
|
30
|
+
|
|
31
|
+
<%= render '/layouts/admin_footer' %>
|
|
32
|
+
|
|
33
|
+
</div>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<div class="navbar navbar-fixed-top">
|
|
2
|
+
<div class="navbar-inner">
|
|
3
|
+
<div class="container">
|
|
4
|
+
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
|
|
5
|
+
<span class="icon-bar"></span>
|
|
6
|
+
<span class="icon-bar"></span>
|
|
7
|
+
<span class="icon-bar"></span>
|
|
8
|
+
</a>
|
|
9
|
+
<div class="nav-collapse">
|
|
10
|
+
<ul class="nav">
|
|
11
|
+
<%= admin_topbar( "Admin" , main_app.admin_path, 'admin_path') %>
|
|
12
|
+
<%= admin_topbar('Orders', main_app.admin_orders_path, 'admin_orders_path') %>
|
|
13
|
+
<%= admin_topbar('Products', main_app.admin_products_path, 'admin_products_path') %>
|
|
14
|
+
<%= admin_topbar('Custom fields', main_app.admin_custom_fields_path, 'admin_custom_fields_path') %>
|
|
15
|
+
<%= admin_topbar('Product groups', main_app.admin_product_groups_path, 'admin_product_groups_path') %>
|
|
16
|
+
<%= admin_topbar('Link groups', main_app.admin_link_groups_path, 'admin_link_groups_path') %>
|
|
17
|
+
<%= admin_topbar('Shipping zones', main_app.admin_shipping_zones_path, 'admin_shipping_zones_path') %>
|
|
18
|
+
<%= admin_topbar('Payment methods', main_app.admin_payment_methods_path, 'admin_payment_methods_path') %>
|
|
19
|
+
<%= admin_topbar('Shop configuration', main_app.edit_admin_shop_path, 'edit_admin_shop_path') %>
|
|
20
|
+
</ul>
|
|
21
|
+
<ul class='nav pull-right'>
|
|
22
|
+
<li><a href="http://nimbleshop.org/docsindex">Documentation</a></li>
|
|
23
|
+
<li>
|
|
24
|
+
<%= link_to 'Go to shop →', main_app.root_url, class: 'go-to-shop' %>
|
|
25
|
+
</li>
|
|
26
|
+
</ul>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<title> <%= @page_title %> — <%= @shop.name %> admin</title>
|
|
6
|
+
<meta name="description" content="">
|
|
7
|
+
<meta name="author" content="">
|
|
8
|
+
|
|
9
|
+
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
|
|
10
|
+
<!--[if lt IE 9]>
|
|
11
|
+
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
|
12
|
+
<![endif]-->
|
|
13
|
+
|
|
14
|
+
<!-- Le styles -->
|
|
15
|
+
<%= stylesheet_link_tag 'admin' %>
|
|
16
|
+
<style type="text/css">
|
|
17
|
+
body {
|
|
18
|
+
padding-top: 60px;
|
|
19
|
+
}
|
|
20
|
+
</style>
|
|
21
|
+
|
|
22
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
23
|
+
|
|
24
|
+
<%= javascript_include_tag 'admin' %>
|
|
25
|
+
|
|
26
|
+
</head>
|
|
27
|
+
|
|
28
|
+
<body id=<%=body_id%>>
|
|
29
|
+
|
|
30
|
+
<%= render 'layouts/top_nav_bar' %>
|
|
31
|
+
|
|
32
|
+
<%= render 'layouts/container' %>
|
|
33
|
+
|
|
34
|
+
</body>
|
|
35
|
+
</html>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
Here is receipt for your purchase at <%= @shop.name %> . When items are shipped you will get an email with tracking number.
|
|
2
|
+
|
|
3
|
+
Payment date: <%= @payment_date %>
|
|
4
|
+
|
|
5
|
+
Shipping address:
|
|
6
|
+
<% @order.shipping_address.full_address_array.each do |line| %>
|
|
7
|
+
<%= line %>
|
|
8
|
+
<% end %>
|
|
9
|
+
|
|
10
|
+
<% unless @order.shipping_address.use_for_billing %>
|
|
11
|
+
Billing address :
|
|
12
|
+
<% @order.billing_address.full_address_array.each do |line| %>
|
|
13
|
+
<%= line %>
|
|
14
|
+
<% end %>
|
|
15
|
+
<% end %>
|
|
16
|
+
|
|
17
|
+
Items purchased:
|
|
18
|
+
|
|
19
|
+
<% @order.line_items.each do |line_item| %>
|
|
20
|
+
Name: <%= truncate(sanitize(line_item.product_name), length: 90) %>
|
|
21
|
+
Item price: <%= number_to_currency(line_item.product_price) %>
|
|
22
|
+
Item quantity: <%= line_item.quantity %>
|
|
23
|
+
Item total price: <%= number_to_currency(line_item.price) %>
|
|
24
|
+
<%# the below empty line is intentional %>
|
|
25
|
+
|
|
26
|
+
<% end %>
|
|
27
|
+
|
|
28
|
+
Shipping method: <%= @order.shipping_method.name %>
|
|
29
|
+
Shipping cost: <%= number_to_currency(@order.shipping_method.shipping_cost) %>
|
|
30
|
+
|
|
31
|
+
Total amount: <%= number_to_currency(@order.total_amount) %>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
Hi <%= @order.final_billing_address.name%> ,
|
|
2
|
+
|
|
3
|
+
All items regarding order #<%= @order.number %> have been shipped.
|
|
4
|
+
|
|
5
|
+
<% if @shipment.tracking_number.present? %>
|
|
6
|
+
Items have been shipped using <%= @order.shipments.first.shipment_carrier.name %> and the tracking number is <%= @order.shipments.first.tracking_number %>. Use the URL given below to track your shipment.
|
|
7
|
+
|
|
8
|
+
<%= @shipment.tracking_url %>
|
|
9
|
+
|
|
10
|
+
Sometimes it takes upto 12 hours for a tracking number to show up in the system.
|
|
11
|
+
|
|
12
|
+
<% else %>
|
|
13
|
+
Items have been shipped using <%= @shipment.shipment_carrier.name %> .
|
|
14
|
+
<% end %>
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
Items are being shipped to the following address:
|
|
18
|
+
|
|
19
|
+
<% @order.shipping_address.full_address_array.each do |line| %>
|
|
20
|
+
<%= line %>
|
|
21
|
+
<% end %>
|
|
22
|
+
|
|
23
|
+
Here are the contents of the shipment.
|
|
24
|
+
|
|
25
|
+
<% @order.line_items.each do |line_item| %>
|
|
26
|
+
Name: <%= truncate(sanitize(line_item.name), length: 90) %>
|
|
27
|
+
Item price: <%= number_to_currency(line_item.product_price) %>
|
|
28
|
+
Item quantity: <%= line_item.quantity %>
|
|
29
|
+
Item total price: <%= number_to_currency(line_item.price) %>
|
|
30
|
+
<% end %>
|
|
31
|
+
|
|
32
|
+
<% if @order.payment_method.permalink == 'authorize-net' %>
|
|
33
|
+
Your credit card has been charged <%= number_to_currency(@order.total_amount) %> .This charge will appear on your credit card statement as "<%= @order.payment_method.company_name_on_creditcard_statement%>".
|
|
34
|
+
<% end %>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#
|
|
2
|
+
# empty spaces should be saved as NULL in database
|
|
3
|
+
# before values are saved string values should undergo strip
|
|
4
|
+
#
|
|
5
|
+
module ActiveRecord
|
|
6
|
+
class Base
|
|
7
|
+
before_validation do |record|
|
|
8
|
+
record.attributes.each do |attr, value|
|
|
9
|
+
record[attr] = value.blank? ? nil : value.strip if value.respond_to?(:strip)
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Time::DATE_FORMATS[:long] = "%B %d, %Y at %I:%M %P"
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Sample localization file for English. Add more files in this directory for other locales.
|
|
2
|
+
# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
|
|
3
|
+
|
|
4
|
+
en:
|
|
5
|
+
error_bang: 'Error!'
|
|
6
|
+
cancel: 'Cancel'
|
|
7
|
+
edit: 'Edit'
|
|
8
|
+
delete: 'Delete'
|
|
9
|
+
welcome_admin: 'Welcome admin'
|
|
10
|
+
paypal_image_alt: 'Make payments with PayPal'
|
|
11
|
+
credit_card_declined_message: 'Credit card was declined. Please try again.'
|
|
12
|
+
|
|
13
|
+
successfully_added: 'Successfully added'
|
|
14
|
+
successfully_created: 'Successfully created'
|
|
15
|
+
successfully_updated: 'Successfully updated'
|
|
16
|
+
successfully_deleted: 'Successfully deleted'
|
|
17
|
+
could_not_delete: 'Could not delete'
|
|
18
|
+
|
|
19
|
+
delete_confirmation_for_shipping_method: 'Do you really want to delete the shipping method ?'
|
|
20
|
+
|
|
21
|
+
orders: 'Orders'
|
|
22
|
+
|
|
23
|
+
products: 'Products'
|
|
24
|
+
edit_product: 'Edit product'
|
|
25
|
+
add_new_product: 'Add new product'
|
|
26
|
+
delete_confirmation_for_product: 'Do you really want to delete the product ?'
|
|
27
|
+
|
|
28
|
+
edit_custom_field: 'Edit custom field'
|
|
29
|
+
custom_fields: 'Custom fields'
|
|
30
|
+
add_new_custom_field: 'Add new custom field'
|
|
31
|
+
delete_confirmation_for_custom_field: 'Do you really want to delete the custom field ?'
|
|
32
|
+
|
|
33
|
+
shipping_zones: 'Shipping zones'
|
|
34
|
+
add_new_shipping_zone: 'Add new shipping zone'
|
|
35
|
+
edit_shipping_zone: 'Edit shipping zone'
|
|
36
|
+
delete_confirmation_for_shipping_zone: 'Do you really want to delete the shipping zone ? Deleting a shipping zone will also delete all the associated shipping methods'
|
|
37
|
+
|
|
38
|
+
link_groups: 'Link groups'
|
|
39
|
+
add_new_link_group: 'Add new link group'
|
|
40
|
+
delete_confirmation_for_link_group: 'Do you really want to delete the link group ?'
|
|
41
|
+
delete_confirmation_for_link: 'Do you really want to delete the link ?'
|
|
42
|
+
|
|
43
|
+
edit_product_group: 'Edit product group'
|
|
44
|
+
product_groups: 'Product groups'
|
|
45
|
+
delete_confirmation_for_product_group: 'Do you really want to delete the product group ?'
|
|
46
|
+
|
|
47
|
+
eq: '%{field} is equal to %{value}'
|
|
48
|
+
gt: '%{field} is greater than %{value}'
|
|
49
|
+
lt: '%{field} is less than %{value}'
|
|
50
|
+
lteq: '%{field} less than equal to %{value}'
|
|
51
|
+
gteq: '%{field} is greater than equal to %{value}'
|
|
52
|
+
ends: "%{field} ends with '%{value}'"
|
|
53
|
+
starts: "%{field} starts with '%{value}'"
|
|
54
|
+
contains: "%{field} contains '%{value}'"
|
|
55
|
+
|
|
56
|
+
helpers:
|
|
57
|
+
label:
|
|
58
|
+
product:
|
|
59
|
+
name: name
|
|
60
|
+
description: description
|
|
61
|
+
|
data/config/routes.rb
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
Rails.application.routes.draw do
|
|
2
|
+
|
|
3
|
+
root to: 'nimbleshop_simply/products#index'
|
|
4
|
+
|
|
5
|
+
get '/admin', to: 'admin/main#index'
|
|
6
|
+
|
|
7
|
+
namespace :admin do
|
|
8
|
+
|
|
9
|
+
resource :shop, only: [:update, :edit]
|
|
10
|
+
|
|
11
|
+
resource :payment_gateway
|
|
12
|
+
resources :payment_methods
|
|
13
|
+
|
|
14
|
+
resources :products, except: [:show]
|
|
15
|
+
resources :product_groups
|
|
16
|
+
resources :custom_fields
|
|
17
|
+
|
|
18
|
+
resources :orders do
|
|
19
|
+
resources :shipments, except: [:edit, :update]
|
|
20
|
+
member do
|
|
21
|
+
put :capture_payment
|
|
22
|
+
put :purchase_payment
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
resources :country_shipping_zones, controller: :shipping_zones do
|
|
27
|
+
resources :shipping_methods
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
resources :regional_shipping_zones, controller: :shipping_zones do
|
|
31
|
+
resources :shipping_methods do
|
|
32
|
+
member do
|
|
33
|
+
put :update_offset
|
|
34
|
+
put :disable
|
|
35
|
+
put :enable
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
resources :shipping_zones do
|
|
41
|
+
resources :shipping_methods
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
resources :link_groups do
|
|
45
|
+
resources :navigations, only: [:create, :new, :destroy]
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
mount NimbleshopAuthorizedotnet::Engine, at: '/nimbleshop_authorizedotnet'
|
|
51
|
+
mount NimbleshopPaypalwp::Engine, at: '/nimbleshop_paypalwp'
|
|
52
|
+
mount NimbleshopSplitable::Engine, at: '/nimbleshop_splitable'
|
|
53
|
+
mount NimbleshopCod::Engine, at: '/nimbleshop_cod'
|
|
54
|
+
mount NimbleshopSimply::Engine, at: '/'
|
|
55
|
+
|
|
56
|
+
end
|
|
Binary file
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
class CreateProductGroups < ActiveRecord::Migration
|
|
2
|
+
def change
|
|
3
|
+
create_table :product_groups do |t|
|
|
4
|
+
t.string :name, null: false
|
|
5
|
+
t.string :permalink, null: false
|
|
6
|
+
|
|
7
|
+
t.timestamps
|
|
8
|
+
end
|
|
9
|
+
add_index :product_groups, :name, unique: true
|
|
10
|
+
add_index :product_groups, :permalink, unique: true
|
|
11
|
+
end
|
|
12
|
+
end
|