spree_backend 2.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/app/assets/images/admin/bg/spree_50.png +0 -0
- data/app/assets/images/admin/payment_banner.png +0 -0
- data/app/assets/images/admin/progress.gif +0 -0
- data/app/assets/javascripts/admin/address_states.js +27 -0
- data/app/assets/javascripts/admin/admin.js.erb +283 -0
- data/app/assets/javascripts/admin/calculator.js +16 -0
- data/app/assets/javascripts/admin/checkouts/edit.js +94 -0
- data/app/assets/javascripts/admin/gateway.js +13 -0
- data/app/assets/javascripts/admin/image_settings.js.erb +62 -0
- data/app/assets/javascripts/admin/images/index.js.coffee +15 -0
- data/app/assets/javascripts/admin/images/new.js.coffee +7 -0
- data/app/assets/javascripts/admin/nested-attribute.js +23 -0
- data/app/assets/javascripts/admin/option_type_autocomplete.js.erb +35 -0
- data/app/assets/javascripts/admin/orders/edit.js +17 -0
- data/app/assets/javascripts/admin/orders/edit_form.js +16 -0
- data/app/assets/javascripts/admin/payments/new.js +16 -0
- data/app/assets/javascripts/admin/product_picker.js +37 -0
- data/app/assets/javascripts/admin/progress.coffee +27 -0
- data/app/assets/javascripts/admin/promotions.js +98 -0
- data/app/assets/javascripts/admin/shipments.js.erb +66 -0
- data/app/assets/javascripts/admin/spree-select2.js.erb +22 -0
- data/app/assets/javascripts/admin/spree_backend.js +19 -0
- data/app/assets/javascripts/admin/states.js +9 -0
- data/app/assets/javascripts/admin/stock_management.js.coffee +9 -0
- data/app/assets/javascripts/admin/stock_transfer.js.coffee +181 -0
- data/app/assets/javascripts/admin/taxon_autocomplete.js.erb +32 -0
- data/app/assets/javascripts/admin/taxon_tree_menu.js.coffee +22 -0
- data/app/assets/javascripts/admin/taxonomy.js.coffee +127 -0
- data/app/assets/javascripts/admin/underscore-min.js +1227 -0
- data/app/assets/javascripts/admin/user_picker.js +31 -0
- data/app/assets/javascripts/admin/variant_autocomplete.js.erb +180 -0
- data/app/assets/javascripts/admin/zone.js.coffee +39 -0
- data/app/assets/javascripts/store/backend.js +1 -0
- data/app/assets/stylesheets/admin/components/_actions.scss +31 -0
- data/app/assets/stylesheets/admin/components/_date-picker.scss +154 -0
- data/app/assets/stylesheets/admin/components/_messages.scss +43 -0
- data/app/assets/stylesheets/admin/components/_navigation.scss +150 -0
- data/app/assets/stylesheets/admin/components/_pagination.scss +17 -0
- data/app/assets/stylesheets/admin/components/_product_autocomplete.scss +29 -0
- data/app/assets/stylesheets/admin/components/_progress.scss +35 -0
- data/app/assets/stylesheets/admin/components/_sidebar.scss +24 -0
- data/app/assets/stylesheets/admin/components/_states.scss +34 -0
- data/app/assets/stylesheets/admin/components/_table-filter.scss +14 -0
- data/app/assets/stylesheets/admin/globals/_functions.scss +25 -0
- data/app/assets/stylesheets/admin/globals/_mixins.scss +25 -0
- data/app/assets/stylesheets/admin/globals/_variables.scss +142 -0
- data/app/assets/stylesheets/admin/globals/_variables_override.scss +7 -0
- data/app/assets/stylesheets/admin/hacks/_ie.scss +73 -0
- data/app/assets/stylesheets/admin/hacks/_mozilla.scss +32 -0
- data/app/assets/stylesheets/admin/hacks/_opera.scss +17 -0
- data/app/assets/stylesheets/admin/plugins/_jstree.scss +132 -0
- data/app/assets/stylesheets/admin/plugins/_powertip.scss +86 -0
- data/app/assets/stylesheets/admin/plugins/_select2.scss +176 -0
- data/app/assets/stylesheets/admin/plugins/_token-input.scss +110 -0
- data/app/assets/stylesheets/admin/plugins/font-awesome.scss +303 -0
- data/app/assets/stylesheets/admin/sections/_bulk_transfer.scss +8 -0
- data/app/assets/stylesheets/admin/sections/_edit_checkouts.scss +72 -0
- data/app/assets/stylesheets/admin/sections/_image_settings.scss +3 -0
- data/app/assets/stylesheets/admin/sections/_orders.scss +54 -0
- data/app/assets/stylesheets/admin/sections/_overview.scss +86 -0
- data/app/assets/stylesheets/admin/sections/_products.scss +113 -0
- data/app/assets/stylesheets/admin/sections/_promotions.scss +100 -0
- data/app/assets/stylesheets/admin/shared/_forms.scss +262 -0
- data/app/assets/stylesheets/admin/shared/_icons.scss +22 -0
- data/app/assets/stylesheets/admin/shared/_layout.scss +91 -0
- data/app/assets/stylesheets/admin/shared/_tables.scss +198 -0
- data/app/assets/stylesheets/admin/shared/_typography.scss +132 -0
- data/app/assets/stylesheets/admin/spree_admin.scss +39 -0
- data/app/assets/stylesheets/admin/spree_backend.css +16 -0
- data/app/assets/stylesheets/store/backend.css +1 -0
- data/app/controllers/spree/admin/adjustments_controller.rb +30 -0
- data/app/controllers/spree/admin/banners_controller.rb +14 -0
- data/app/controllers/spree/admin/base_controller.rb +92 -0
- data/app/controllers/spree/admin/countries_controller.rb +11 -0
- data/app/controllers/spree/admin/general_settings_controller.rb +34 -0
- data/app/controllers/spree/admin/image_settings_controller.rb +66 -0
- data/app/controllers/spree/admin/images_controller.rb +35 -0
- data/app/controllers/spree/admin/inventory_units_controller.rb +6 -0
- data/app/controllers/spree/admin/line_items_controller.rb +49 -0
- data/app/controllers/spree/admin/mail_methods_controller.rb +38 -0
- data/app/controllers/spree/admin/option_types_controller.rb +46 -0
- data/app/controllers/spree/admin/option_values_controller.rb +11 -0
- data/app/controllers/spree/admin/orders/customer_details_controller.rb +40 -0
- data/app/controllers/spree/admin/orders_controller.rb +133 -0
- data/app/controllers/spree/admin/overview_controller.rb +13 -0
- data/app/controllers/spree/admin/payment_methods_controller.rb +65 -0
- data/app/controllers/spree/admin/payments_controller.rb +111 -0
- data/app/controllers/spree/admin/product_properties_controller.rb +18 -0
- data/app/controllers/spree/admin/products_controller.rb +115 -0
- data/app/controllers/spree/admin/promotion_actions_controller.rb +45 -0
- data/app/controllers/spree/admin/promotion_rules_controller.rb +50 -0
- data/app/controllers/spree/admin/promotions_controller.rb +23 -0
- data/app/controllers/spree/admin/properties_controller.rb +12 -0
- data/app/controllers/spree/admin/prototypes_controller.rb +27 -0
- data/app/controllers/spree/admin/reports_controller.rb +55 -0
- data/app/controllers/spree/admin/resource_controller.rb +261 -0
- data/app/controllers/spree/admin/return_authorizations_controller.rb +21 -0
- data/app/controllers/spree/admin/search_controller.rb +27 -0
- data/app/controllers/spree/admin/shipping_categories_controller.rb +6 -0
- data/app/controllers/spree/admin/shipping_methods_controller.rb +45 -0
- data/app/controllers/spree/admin/states_controller.rb +29 -0
- data/app/controllers/spree/admin/stock_items_controller.rb +24 -0
- data/app/controllers/spree/admin/stock_locations_controller.rb +7 -0
- data/app/controllers/spree/admin/stock_movements_controller.rb +60 -0
- data/app/controllers/spree/admin/stock_transfers_controller.rb +53 -0
- data/app/controllers/spree/admin/tax_categories_controller.rb +19 -0
- data/app/controllers/spree/admin/tax_rates_controller.rb +26 -0
- data/app/controllers/spree/admin/tax_settings_controller.rb +17 -0
- data/app/controllers/spree/admin/taxonomies_controller.rb +21 -0
- data/app/controllers/spree/admin/taxons_controller.rb +112 -0
- data/app/controllers/spree/admin/trackers_controller.rb +6 -0
- data/app/controllers/spree/admin/variants_controller.rb +44 -0
- data/app/controllers/spree/admin/zones_controller.rb +26 -0
- data/app/helpers/spree/admin/base_helper.rb +168 -0
- data/app/helpers/spree/admin/general_settings_helper.rb +13 -0
- data/app/helpers/spree/admin/inventory_settings_helper.rb +9 -0
- data/app/helpers/spree/admin/navigation_helper.rb +154 -0
- data/app/helpers/spree/admin/orders_helper.rb +19 -0
- data/app/helpers/spree/admin/payments_helper.rb +11 -0
- data/app/helpers/spree/admin/products_helper.rb +27 -0
- data/app/helpers/spree/admin/stock_movements_helper.rb +13 -0
- data/app/helpers/spree/admin/tables_helper.rb +15 -0
- data/app/helpers/spree/admin/taxons_helper.rb +9 -0
- data/app/helpers/spree/promotion_rules_helper.rb +13 -0
- data/app/models/spree/backend_configuration.rb +5 -0
- data/app/views/spree/admin/adjustments/_adjustments_table.html.erb +36 -0
- data/app/views/spree/admin/adjustments/_form.html.erb +16 -0
- data/app/views/spree/admin/adjustments/edit.html.erb +22 -0
- data/app/views/spree/admin/adjustments/index.html.erb +14 -0
- data/app/views/spree/admin/adjustments/new.html.erb +23 -0
- data/app/views/spree/admin/banners/_gateway.html.erb +16 -0
- data/app/views/spree/admin/countries/_form.html.erb +22 -0
- data/app/views/spree/admin/countries/edit.html.erb +21 -0
- data/app/views/spree/admin/countries/index.html.erb +34 -0
- data/app/views/spree/admin/general_settings/edit.html.erb +92 -0
- data/app/views/spree/admin/image_settings/edit.html.erb +126 -0
- data/app/views/spree/admin/images/_form.html.erb +18 -0
- data/app/views/spree/admin/images/edit.html.erb +28 -0
- data/app/views/spree/admin/images/index.html.erb +58 -0
- data/app/views/spree/admin/images/new.html.erb +15 -0
- data/app/views/spree/admin/inventory_units/adjust.html.erb +31 -0
- data/app/views/spree/admin/line_items/create.js.erb +1 -0
- data/app/views/spree/admin/line_items/destroy.js.erb +1 -0
- data/app/views/spree/admin/mail_methods/_form.html.erb +80 -0
- data/app/views/spree/admin/mail_methods/edit.html.erb +21 -0
- data/app/views/spree/admin/option_types/_form.html.erb +17 -0
- data/app/views/spree/admin/option_types/_option_value_fields.html.erb +9 -0
- data/app/views/spree/admin/option_types/edit.html.erb +50 -0
- data/app/views/spree/admin/option_types/index.html.erb +40 -0
- data/app/views/spree/admin/option_types/new.html.erb +11 -0
- data/app/views/spree/admin/option_types/new.js.erb +2 -0
- data/app/views/spree/admin/orders/_add_product.html.erb +15 -0
- data/app/views/spree/admin/orders/_form.html.erb +45 -0
- data/app/views/spree/admin/orders/_line_item.html.erb +9 -0
- data/app/views/spree/admin/orders/_shipment.html.erb +148 -0
- data/app/views/spree/admin/orders/customer_details/_form.html.erb +66 -0
- data/app/views/spree/admin/orders/customer_details/edit.html.erb +27 -0
- data/app/views/spree/admin/orders/edit.html.erb +30 -0
- data/app/views/spree/admin/orders/index.html.erb +134 -0
- data/app/views/spree/admin/payment_methods/_form.html.erb +57 -0
- data/app/views/spree/admin/payment_methods/edit.html.erb +23 -0
- data/app/views/spree/admin/payment_methods/index.html.erb +52 -0
- data/app/views/spree/admin/payment_methods/new.html.erb +22 -0
- data/app/views/spree/admin/payments/_bill_address_form.html.erb +9 -0
- data/app/views/spree/admin/payments/_form.html.erb +28 -0
- data/app/views/spree/admin/payments/_list.html.erb +26 -0
- data/app/views/spree/admin/payments/credit.html.erb +18 -0
- data/app/views/spree/admin/payments/index.html.erb +24 -0
- data/app/views/spree/admin/payments/new.html.erb +26 -0
- data/app/views/spree/admin/payments/show.html.erb +18 -0
- data/app/views/spree/admin/payments/source_forms/_check.html.erb +0 -0
- data/app/views/spree/admin/payments/source_forms/_gateway.html.erb +50 -0
- data/app/views/spree/admin/payments/source_views/_check.html.erb +0 -0
- data/app/views/spree/admin/payments/source_views/_gateway.html.erb +29 -0
- data/app/views/spree/admin/product_properties/_product_property_fields.html.erb +17 -0
- data/app/views/spree/admin/product_properties/index.html.erb +59 -0
- data/app/views/spree/admin/products/_add_stock_form.html.erb +6 -0
- data/app/views/spree/admin/products/_form.html.erb +128 -0
- data/app/views/spree/admin/products/_properties_form.erb +10 -0
- data/app/views/spree/admin/products/edit.html.erb +18 -0
- data/app/views/spree/admin/products/index.html.erb +102 -0
- data/app/views/spree/admin/products/new.html.erb +81 -0
- data/app/views/spree/admin/products/new.js.erb +7 -0
- data/app/views/spree/admin/products/stock.html.erb +79 -0
- data/app/views/spree/admin/promotion_actions/create.js.erb +13 -0
- data/app/views/spree/admin/promotion_actions/destroy.js.erb +1 -0
- data/app/views/spree/admin/promotion_rules/create.js.erb +7 -0
- data/app/views/spree/admin/promotion_rules/destroy.js.erb +3 -0
- data/app/views/spree/admin/promotions/_actions.html.erb +32 -0
- data/app/views/spree/admin/promotions/_form.html.erb +56 -0
- data/app/views/spree/admin/promotions/_promotion_action.html.erb +11 -0
- data/app/views/spree/admin/promotions/_promotion_rule.html.erb +9 -0
- data/app/views/spree/admin/promotions/_rules.html.erb +45 -0
- data/app/views/spree/admin/promotions/_tab.html.erb +1 -0
- data/app/views/spree/admin/promotions/actions/_create_adjustment.html.erb +26 -0
- data/app/views/spree/admin/promotions/actions/_create_line_items.html.erb +22 -0
- data/app/views/spree/admin/promotions/edit.html.erb +28 -0
- data/app/views/spree/admin/promotions/index.html.erb +52 -0
- data/app/views/spree/admin/promotions/new.html.erb +16 -0
- data/app/views/spree/admin/promotions/rules/_first_order.html.erb +0 -0
- data/app/views/spree/admin/promotions/rules/_item_total.html.erb +6 -0
- data/app/views/spree/admin/promotions/rules/_landing_page.html.erb +5 -0
- data/app/views/spree/admin/promotions/rules/_product.html.erb +9 -0
- data/app/views/spree/admin/promotions/rules/_user.html.erb +4 -0
- data/app/views/spree/admin/promotions/rules/_user_logged_in.html.erb +0 -0
- data/app/views/spree/admin/properties/_form.html.erb +16 -0
- data/app/views/spree/admin/properties/edit.html.erb +18 -0
- data/app/views/spree/admin/properties/filtered.html.erb +1 -0
- data/app/views/spree/admin/properties/index.html.erb +41 -0
- data/app/views/spree/admin/properties/new.html.erb +13 -0
- data/app/views/spree/admin/properties/new.js.erb +2 -0
- data/app/views/spree/admin/prototypes/_form.html.erb +25 -0
- data/app/views/spree/admin/prototypes/_prototypes.html.erb +25 -0
- data/app/views/spree/admin/prototypes/available.js.erb +2 -0
- data/app/views/spree/admin/prototypes/edit.html.erb +20 -0
- data/app/views/spree/admin/prototypes/index.html.erb +40 -0
- data/app/views/spree/admin/prototypes/new.html.erb +11 -0
- data/app/views/spree/admin/prototypes/new.js.erb +5 -0
- data/app/views/spree/admin/prototypes/select.js.erb +4 -0
- data/app/views/spree/admin/prototypes/show.html.erb +42 -0
- data/app/views/spree/admin/reports/index.html.erb +21 -0
- data/app/views/spree/admin/reports/sales_total.html.erb +37 -0
- data/app/views/spree/admin/return_authorizations/_form.html.erb +78 -0
- data/app/views/spree/admin/return_authorizations/edit.html.erb +32 -0
- data/app/views/spree/admin/return_authorizations/index.html.erb +52 -0
- data/app/views/spree/admin/return_authorizations/new.html.erb +22 -0
- data/app/views/spree/admin/search/users.rabl +30 -0
- data/app/views/spree/admin/shared/_address.html.erb +6 -0
- data/app/views/spree/admin/shared/_address_form.html.erb +72 -0
- data/app/views/spree/admin/shared/_alert.html.erb +5 -0
- data/app/views/spree/admin/shared/_calculator_fields.html.erb +22 -0
- data/app/views/spree/admin/shared/_configuration_menu.html.erb +30 -0
- data/app/views/spree/admin/shared/_destroy.js.erb +16 -0
- data/app/views/spree/admin/shared/_edit_resource_links.html.erb +5 -0
- data/app/views/spree/admin/shared/_head.html.erb +25 -0
- data/app/views/spree/admin/shared/_new_resource_links.html.erb +5 -0
- data/app/views/spree/admin/shared/_order_details.html.erb +56 -0
- data/app/views/spree/admin/shared/_order_tabs.html.erb +75 -0
- data/app/views/spree/admin/shared/_product_sub_menu.html.erb +8 -0
- data/app/views/spree/admin/shared/_product_tabs.html.erb +30 -0
- data/app/views/spree/admin/shared/_report_criteria.html.erb +17 -0
- data/app/views/spree/admin/shared/_routes.html.erb +8 -0
- data/app/views/spree/admin/shared/_show_resource_links.html.erb +5 -0
- data/app/views/spree/admin/shared/_stock_movement_form.html.erb +30 -0
- data/app/views/spree/admin/shared/_tabs.html.erb +14 -0
- data/app/views/spree/admin/shared/_translations.html.erb +32 -0
- data/app/views/spree/admin/shared/_update_order_state.js +7 -0
- data/app/views/spree/admin/shipping_categories/_form.html.erb +6 -0
- data/app/views/spree/admin/shipping_categories/edit.html.erb +20 -0
- data/app/views/spree/admin/shipping_categories/index.html.erb +35 -0
- data/app/views/spree/admin/shipping_categories/new.html.erb +20 -0
- data/app/views/spree/admin/shipping_methods/_form.html.erb +58 -0
- data/app/views/spree/admin/shipping_methods/edit.html.erb +29 -0
- data/app/views/spree/admin/shipping_methods/index.html.erb +48 -0
- data/app/views/spree/admin/shipping_methods/new.html.erb +29 -0
- data/app/views/spree/admin/states/_form.html.erb +14 -0
- data/app/views/spree/admin/states/_state_list.html.erb +31 -0
- data/app/views/spree/admin/states/edit.html.erb +20 -0
- data/app/views/spree/admin/states/index.html.erb +24 -0
- data/app/views/spree/admin/states/new.html.erb +15 -0
- data/app/views/spree/admin/states/new.js.erb +2 -0
- data/app/views/spree/admin/stock_locations/_form.html.erb +87 -0
- data/app/views/spree/admin/stock_locations/_transfer_stock_form.html.erb +39 -0
- data/app/views/spree/admin/stock_locations/edit.html.erb +17 -0
- data/app/views/spree/admin/stock_locations/index.html.erb +49 -0
- data/app/views/spree/admin/stock_locations/new.html.erb +16 -0
- data/app/views/spree/admin/stock_movements/_form.html.erb +13 -0
- data/app/views/spree/admin/stock_movements/edit.html.erb +16 -0
- data/app/views/spree/admin/stock_movements/index.html.erb +43 -0
- data/app/views/spree/admin/stock_movements/new.html.erb +16 -0
- data/app/views/spree/admin/stock_transfers/_stock_movements.html.erb +27 -0
- data/app/views/spree/admin/stock_transfers/index.html.erb +94 -0
- data/app/views/spree/admin/stock_transfers/new.html.erb +108 -0
- data/app/views/spree/admin/stock_transfers/show.html.erb +48 -0
- data/app/views/spree/admin/tax_categories/_form.html.erb +24 -0
- data/app/views/spree/admin/tax_categories/edit.html.erb +18 -0
- data/app/views/spree/admin/tax_categories/index.html.erb +48 -0
- data/app/views/spree/admin/tax_categories/new.html.erb +19 -0
- data/app/views/spree/admin/tax_categories/show.html.erb +1 -0
- data/app/views/spree/admin/tax_rates/_form.html.erb +42 -0
- data/app/views/spree/admin/tax_rates/edit.html.erb +21 -0
- data/app/views/spree/admin/tax_rates/index.html.erb +59 -0
- data/app/views/spree/admin/tax_rates/new.html.erb +25 -0
- data/app/views/spree/admin/tax_settings/edit.html.erb +18 -0
- data/app/views/spree/admin/taxonomies/_form.html.erb +7 -0
- data/app/views/spree/admin/taxonomies/_js_head.html.erb +13 -0
- data/app/views/spree/admin/taxonomies/_list.html.erb +26 -0
- data/app/views/spree/admin/taxonomies/_taxon.html.erb +12 -0
- data/app/views/spree/admin/taxonomies/edit.erb +42 -0
- data/app/views/spree/admin/taxonomies/index.html.erb +15 -0
- data/app/views/spree/admin/taxonomies/new.html.erb +22 -0
- data/app/views/spree/admin/taxons/_form.html.erb +44 -0
- data/app/views/spree/admin/taxons/_taxon_table.html.erb +23 -0
- data/app/views/spree/admin/taxons/edit.html.erb +23 -0
- data/app/views/spree/admin/taxons/search.rabl +5 -0
- data/app/views/spree/admin/trackers/_form.html.erb +34 -0
- data/app/views/spree/admin/trackers/edit.html.erb +20 -0
- data/app/views/spree/admin/trackers/index.html.erb +48 -0
- data/app/views/spree/admin/trackers/new.html.erb +20 -0
- data/app/views/spree/admin/variants/_autocomplete.js.erb +67 -0
- data/app/views/spree/admin/variants/_form.html.erb +37 -0
- data/app/views/spree/admin/variants/edit.html.erb +15 -0
- data/app/views/spree/admin/variants/index.html.erb +74 -0
- data/app/views/spree/admin/variants/new.html.erb +9 -0
- data/app/views/spree/admin/variants/new.js.erb +3 -0
- data/app/views/spree/admin/zones/_country_member.html.erb +5 -0
- data/app/views/spree/admin/zones/_form.html.erb +34 -0
- data/app/views/spree/admin/zones/_member_type.html.erb +19 -0
- data/app/views/spree/admin/zones/_state_member.html.erb +5 -0
- data/app/views/spree/admin/zones/edit.html.erb +23 -0
- data/app/views/spree/admin/zones/index.html.erb +53 -0
- data/app/views/spree/admin/zones/new.html.erb +21 -0
- data/app/views/spree/layouts/admin.html.erb +135 -0
- data/app/views/spree/test_mailer/test_email.text.erb +4 -0
- data/config/initializers/form_builder.rb +15 -0
- data/config/routes.rb +159 -0
- data/lib/spree/backend.rb +21 -0
- data/lib/spree/backend/action_callbacks.rb +26 -0
- data/lib/spree/backend/engine.rb +41 -0
- data/lib/spree_backend.rb +1 -0
- data/vendor/assets/fonts/fontawesome-webfont.eot +0 -0
- data/vendor/assets/fonts/fontawesome-webfont.svg +255 -0
- data/vendor/assets/fonts/fontawesome-webfont.ttf +0 -0
- data/vendor/assets/fonts/fontawesome-webfont.woff +0 -0
- data/vendor/assets/images/jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-bg_flat_0_eeeeee_40x100.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-bg_flat_55_ffffff_40x100.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-bg_highlight-soft_100_f6f6f6_1x100.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-bg_highlight-soft_25_0073ea_1x100.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-bg_highlight-soft_50_dddddd_1x100.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-icons_0073ea_256x240.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-icons_454545_256x240.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-icons_666666_256x240.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-icons_ff0084_256x240.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-icons_ffffff_256x240.png +0 -0
- data/vendor/assets/images/jquery.alerts/images/help.gif +0 -0
- data/vendor/assets/images/jquery.alerts/images/important.gif +0 -0
- data/vendor/assets/images/jquery.alerts/images/info.gif +0 -0
- data/vendor/assets/images/jquery.alerts/images/title.gif +0 -0
- data/vendor/assets/javascripts/css_browser_selector_dev.js +156 -0
- data/vendor/assets/javascripts/equalize.js +41 -0
- data/vendor/assets/javascripts/handlebars.js +1920 -0
- data/vendor/assets/javascripts/jquery.adaptivemenu.js +60 -0
- data/vendor/assets/javascripts/jquery.alerts/jquery.alerts.js +235 -0
- data/vendor/assets/javascripts/jquery.cookie.js +41 -0
- data/vendor/assets/javascripts/jquery.delayedobserver.js +35 -0
- data/vendor/assets/javascripts/jquery.horizontalNav.js +141 -0
- data/vendor/assets/javascripts/jquery.jstree/jquery.jstree.js +4540 -0
- data/vendor/assets/javascripts/jquery.jstree/themes/apple/bg.jpg +0 -0
- data/vendor/assets/javascripts/jquery.jstree/themes/apple/d.png +0 -0
- data/vendor/assets/javascripts/jquery.jstree/themes/apple/dot_for_ie.gif +0 -0
- data/vendor/assets/javascripts/jquery.jstree/themes/apple/style.css +61 -0
- data/vendor/assets/javascripts/jquery.jstree/themes/apple/throbber.gif +0 -0
- data/vendor/assets/javascripts/jquery.powertip.js +796 -0
- data/vendor/assets/javascripts/jquery.vAlign.js +11 -0
- data/vendor/assets/javascripts/modernizr.js +4 -0
- data/vendor/assets/javascripts/responsive-tables.js +42 -0
- data/vendor/assets/javascripts/spin.js +319 -0
- data/vendor/assets/javascripts/trunk8.js +233 -0
- data/vendor/assets/stylesheets/font-awesome-ie7.css +645 -0
- data/vendor/assets/stylesheets/font-awesome.css.erb +303 -0
- data/vendor/assets/stylesheets/jquery-ui.datepicker.css.erb +357 -0
- data/vendor/assets/stylesheets/jquery.alerts/jquery.alerts.css.erb +57 -0
- data/vendor/assets/stylesheets/jquery.alerts/jquery.alerts.spree.css +29 -0
- data/vendor/assets/stylesheets/jquery.powertip.css +85 -0
- data/vendor/assets/stylesheets/responsive-tables.css +21 -0
- metadata +509 -0
@@ -0,0 +1,45 @@
|
|
1
|
+
class Spree::Admin::PromotionActionsController < Spree::Admin::BaseController
|
2
|
+
before_filter :load_promotion, :only => [:create, :destroy]
|
3
|
+
before_filter :validate_promotion_action_type, :only => :create
|
4
|
+
|
5
|
+
def create
|
6
|
+
@calculators = Spree::Promotion::Actions::CreateAdjustment.calculators
|
7
|
+
@promotion_action = params[:action_type].constantize.new(params[:promotion_action])
|
8
|
+
@promotion_action.promotion = @promotion
|
9
|
+
if @promotion_action.save
|
10
|
+
flash[:success] = Spree.t(:successfully_created, :resource => Spree.t(:promotion_action))
|
11
|
+
end
|
12
|
+
respond_to do |format|
|
13
|
+
format.html { redirect_to spree.edit_admin_promotion_path(@promotion)}
|
14
|
+
format.js { render :layout => false }
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def destroy
|
19
|
+
@promotion_action = @promotion.promotion_actions.find(params[:id])
|
20
|
+
if @promotion_action.destroy
|
21
|
+
flash[:success] = Spree.t(:successfully_removed, :resource => Spree.t(:promotion_action))
|
22
|
+
end
|
23
|
+
respond_to do |format|
|
24
|
+
format.html { redirect_to spree.edit_admin_promotion_path(@promotion)}
|
25
|
+
format.js { render :layout => false }
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
private
|
30
|
+
|
31
|
+
def load_promotion
|
32
|
+
@promotion = Spree::Promotion.find(params[:promotion_id])
|
33
|
+
end
|
34
|
+
|
35
|
+
def validate_promotion_action_type
|
36
|
+
valid_promotion_action_types = Rails.application.config.spree.promotions.actions.map(&:to_s)
|
37
|
+
if !valid_promotion_action_types.include?(params[:action_type])
|
38
|
+
flash[:error] = Spree.t(:invalid_promotion_action)
|
39
|
+
respond_to do |format|
|
40
|
+
format.html { redirect_to spree.edit_admin_promotion_path(@promotion)}
|
41
|
+
format.js { render :layout => false }
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
class Spree::Admin::PromotionRulesController < Spree::Admin::BaseController
|
2
|
+
helper 'spree/promotion_rules'
|
3
|
+
|
4
|
+
before_filter :load_promotion, :only => [:create, :destroy]
|
5
|
+
before_filter :validate_promotion_rule_type, :only => :create
|
6
|
+
|
7
|
+
def create
|
8
|
+
# Remove type key from this hash so that we don't attempt
|
9
|
+
# to set it when creating a new record, as this is raises
|
10
|
+
# an error in ActiveRecord 3.2.
|
11
|
+
promotion_rule_type = params[:promotion_rule].delete(:type)
|
12
|
+
@promotion_rule = promotion_rule_type.constantize.new(params[:promotion_rule])
|
13
|
+
@promotion_rule.promotion = @promotion
|
14
|
+
if @promotion_rule.save
|
15
|
+
flash[:success] = Spree.t(:successfully_created, :resource => Spree.t(:promotion_rule))
|
16
|
+
end
|
17
|
+
respond_to do |format|
|
18
|
+
format.html { redirect_to spree.edit_admin_promotion_path(@promotion)}
|
19
|
+
format.js { render :layout => false }
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def destroy
|
24
|
+
@promotion_rule = @promotion.promotion_rules.find(params[:id])
|
25
|
+
if @promotion_rule.destroy
|
26
|
+
flash[:success] = Spree.t(:successfully_removed, :resource => Spree.t(:promotion_rule))
|
27
|
+
end
|
28
|
+
respond_to do |format|
|
29
|
+
format.html { redirect_to spree.edit_admin_promotion_path(@promotion)}
|
30
|
+
format.js { render :layout => false }
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
private
|
35
|
+
|
36
|
+
def load_promotion
|
37
|
+
@promotion = Spree::Promotion.find(params[:promotion_id])
|
38
|
+
end
|
39
|
+
|
40
|
+
def validate_promotion_rule_type
|
41
|
+
valid_promotion_rule_types = Rails.application.config.spree.promotions.rules.map(&:to_s)
|
42
|
+
if !valid_promotion_rule_types.include?(params[:promotion_rule][:type])
|
43
|
+
flash[:error] = Spree.t(:invalid_promotion_rule)
|
44
|
+
respond_to do |format|
|
45
|
+
format.html { redirect_to spree.edit_admin_promotion_path(@promotion)}
|
46
|
+
format.js { render :layout => false }
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module Spree
|
2
|
+
module Admin
|
3
|
+
class PromotionsController < ResourceController
|
4
|
+
before_filter :load_data
|
5
|
+
before_filter :load_event_names
|
6
|
+
|
7
|
+
helper 'spree/promotion_rules'
|
8
|
+
|
9
|
+
protected
|
10
|
+
def location_after_save
|
11
|
+
spree.edit_admin_promotion_url(@promotion)
|
12
|
+
end
|
13
|
+
|
14
|
+
def load_data
|
15
|
+
@calculators = Rails.application.config.spree.calculators.promotion_actions_create_adjustments
|
16
|
+
end
|
17
|
+
|
18
|
+
def load_event_names
|
19
|
+
@event_names = Spree::Activator.event_names.map { |name| [Spree.t("events.#{name}"), name] }
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module Spree
|
2
|
+
module Admin
|
3
|
+
class PropertiesController < ResourceController
|
4
|
+
|
5
|
+
# Looks like this action is unused
|
6
|
+
def filtered
|
7
|
+
@properties = Property.where('lower(name) LIKE ?', "%#{params[:q].mb_chars.downcase}%").order(:name)
|
8
|
+
render :template => "spree/admin/properties/filtered", :layout => false
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Spree
|
2
|
+
module Admin
|
3
|
+
class PrototypesController < ResourceController
|
4
|
+
def show
|
5
|
+
if request.xhr?
|
6
|
+
render :layout => false
|
7
|
+
else
|
8
|
+
redirect_to admin_prototypes_path
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
def available
|
13
|
+
@prototypes = Prototype.order('name asc')
|
14
|
+
respond_with(@prototypes) do |format|
|
15
|
+
format.html { render :layout => !request.xhr? }
|
16
|
+
format.js
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def select
|
21
|
+
@prototype ||= Prototype.find(params[:id])
|
22
|
+
@prototype_properties = @prototype.properties
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
module Spree
|
2
|
+
module Admin
|
3
|
+
class ReportsController < Spree::Admin::BaseController
|
4
|
+
respond_to :html
|
5
|
+
|
6
|
+
AVAILABLE_REPORTS = {
|
7
|
+
:sales_total => { :name => Spree.t(:sales_total), :description => Spree.t(:sales_total_description) }
|
8
|
+
}
|
9
|
+
|
10
|
+
def index
|
11
|
+
@reports = AVAILABLE_REPORTS
|
12
|
+
end
|
13
|
+
|
14
|
+
def sales_total
|
15
|
+
params[:q] = {} unless params[:q]
|
16
|
+
|
17
|
+
if params[:q][:created_at_gt].blank?
|
18
|
+
params[:q][:created_at_gt] = Time.zone.now.beginning_of_month
|
19
|
+
else
|
20
|
+
params[:q][:created_at_gt] = Time.zone.parse(params[:q][:created_at_gt]).beginning_of_day rescue Time.zone.now.beginning_of_month
|
21
|
+
end
|
22
|
+
|
23
|
+
if params[:q] && !params[:q][:created_at_lt].blank?
|
24
|
+
params[:q][:created_at_lt] = Time.zone.parse(params[:q][:created_at_lt]).end_of_day rescue ""
|
25
|
+
end
|
26
|
+
|
27
|
+
if params[:q].delete(:completed_at_not_null) == "1"
|
28
|
+
params[:q][:completed_at_not_null] = true
|
29
|
+
else
|
30
|
+
params[:q][:completed_at_not_null] = false
|
31
|
+
end
|
32
|
+
|
33
|
+
params[:q][:s] ||= "created_at desc"
|
34
|
+
|
35
|
+
@search = Order.complete.ransack(params[:q])
|
36
|
+
@orders = @search.result
|
37
|
+
|
38
|
+
@totals = {}
|
39
|
+
@orders.each do |order|
|
40
|
+
@totals[order.currency] = { :item_total => ::Money.new(0, order.currency), :adjustment_total => ::Money.new(0, order.currency), :sales_total => ::Money.new(0, order.currency) } unless @totals[order.currency]
|
41
|
+
@totals[order.currency][:item_total] += order.display_item_total.money
|
42
|
+
@totals[order.currency][:adjustment_total] += order.display_adjustment_total.money
|
43
|
+
@totals[order.currency][:sales_total] += order.display_total.money
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
private
|
48
|
+
|
49
|
+
def model_class
|
50
|
+
Spree::Admin::ReportsController
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,261 @@
|
|
1
|
+
require 'spree/backend/action_callbacks'
|
2
|
+
|
3
|
+
class Spree::Admin::ResourceController < Spree::Admin::BaseController
|
4
|
+
helper_method :new_object_url, :edit_object_url, :object_url, :collection_url
|
5
|
+
before_filter :load_resource, :except => [:update_positions]
|
6
|
+
rescue_from ActiveRecord::RecordNotFound, :with => :resource_not_found
|
7
|
+
|
8
|
+
respond_to :html
|
9
|
+
respond_to :js, :except => [:show, :index]
|
10
|
+
|
11
|
+
def new
|
12
|
+
invoke_callbacks(:new_action, :before)
|
13
|
+
respond_with(@object) do |format|
|
14
|
+
format.html { render :layout => !request.xhr? }
|
15
|
+
format.js { render :layout => false }
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def edit
|
20
|
+
respond_with(@object) do |format|
|
21
|
+
format.html { render :layout => !request.xhr? }
|
22
|
+
format.js { render :layout => false }
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def update
|
27
|
+
invoke_callbacks(:update, :before)
|
28
|
+
if @object.update_attributes(params[object_name])
|
29
|
+
invoke_callbacks(:update, :after)
|
30
|
+
flash[:success] = flash_message_for(@object, :successfully_updated)
|
31
|
+
respond_with(@object) do |format|
|
32
|
+
format.html { redirect_to location_after_save }
|
33
|
+
format.js { render :layout => false }
|
34
|
+
end
|
35
|
+
else
|
36
|
+
invoke_callbacks(:update, :fails)
|
37
|
+
respond_with(@object)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def create
|
42
|
+
invoke_callbacks(:create, :before)
|
43
|
+
@object.attributes = params[object_name]
|
44
|
+
if @object.save
|
45
|
+
invoke_callbacks(:create, :after)
|
46
|
+
flash[:success] = flash_message_for(@object, :successfully_created)
|
47
|
+
respond_with(@object) do |format|
|
48
|
+
format.html { redirect_to location_after_save }
|
49
|
+
format.js { render :layout => false }
|
50
|
+
end
|
51
|
+
else
|
52
|
+
invoke_callbacks(:create, :fails)
|
53
|
+
respond_with(@object)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
def update_positions
|
58
|
+
params[:positions].each do |id, index|
|
59
|
+
model_class.where(:id => id).update_all(:position => index)
|
60
|
+
end
|
61
|
+
|
62
|
+
respond_to do |format|
|
63
|
+
format.js { render :text => 'Ok' }
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
def destroy
|
68
|
+
invoke_callbacks(:destroy, :before)
|
69
|
+
if @object.destroy
|
70
|
+
invoke_callbacks(:destroy, :after)
|
71
|
+
flash[:success] = flash_message_for(@object, :successfully_removed)
|
72
|
+
respond_with(@object) do |format|
|
73
|
+
format.html { redirect_to collection_url }
|
74
|
+
format.js { render :partial => "spree/admin/shared/destroy" }
|
75
|
+
end
|
76
|
+
else
|
77
|
+
invoke_callbacks(:destroy, :fails)
|
78
|
+
respond_with(@object) do |format|
|
79
|
+
format.html { redirect_to collection_url }
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
protected
|
85
|
+
|
86
|
+
def resource_not_found
|
87
|
+
flash[:error] = flash_message_for(model_class.new, :not_found)
|
88
|
+
redirect_to collection_url
|
89
|
+
end
|
90
|
+
|
91
|
+
class << self
|
92
|
+
attr_accessor :parent_data
|
93
|
+
attr_accessor :callbacks
|
94
|
+
|
95
|
+
def belongs_to(model_name, options = {})
|
96
|
+
@parent_data ||= {}
|
97
|
+
@parent_data[:model_name] = model_name
|
98
|
+
@parent_data[:model_class] = model_name.to_s.classify.constantize
|
99
|
+
@parent_data[:find_by] = options[:find_by] || :id
|
100
|
+
end
|
101
|
+
|
102
|
+
def new_action
|
103
|
+
@callbacks ||= {}
|
104
|
+
@callbacks[:new_action] ||= Spree::ActionCallbacks.new
|
105
|
+
end
|
106
|
+
|
107
|
+
def create
|
108
|
+
@callbacks ||= {}
|
109
|
+
@callbacks[:create] ||= Spree::ActionCallbacks.new
|
110
|
+
end
|
111
|
+
|
112
|
+
def update
|
113
|
+
@callbacks ||= {}
|
114
|
+
@callbacks[:update] ||= Spree::ActionCallbacks.new
|
115
|
+
end
|
116
|
+
|
117
|
+
def destroy
|
118
|
+
@callbacks ||= {}
|
119
|
+
@callbacks[:destroy] ||= Spree::ActionCallbacks.new
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
def model_class
|
124
|
+
"Spree::#{controller_name.classify}".constantize
|
125
|
+
end
|
126
|
+
|
127
|
+
def model_name
|
128
|
+
parent_data[:model_name].gsub('spree/', '')
|
129
|
+
end
|
130
|
+
|
131
|
+
def object_name
|
132
|
+
controller_name.singularize
|
133
|
+
end
|
134
|
+
|
135
|
+
def load_resource
|
136
|
+
if member_action?
|
137
|
+
@object ||= load_resource_instance
|
138
|
+
|
139
|
+
# call authorize! a third time (called twice already in Admin::BaseController)
|
140
|
+
# this time we pass the actual instance so fine-grained abilities can control
|
141
|
+
# access to individual records, not just entire models.
|
142
|
+
authorize! action, @object
|
143
|
+
|
144
|
+
instance_variable_set("@#{object_name}", @object)
|
145
|
+
else
|
146
|
+
@collection ||= collection
|
147
|
+
|
148
|
+
# note: we don't call authorize here as the collection method should use
|
149
|
+
# CanCan's accessible_by method to restrict the actual records returned
|
150
|
+
|
151
|
+
instance_variable_set("@#{controller_name}", @collection)
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
def load_resource_instance
|
156
|
+
if new_actions.include?(action)
|
157
|
+
build_resource
|
158
|
+
elsif params[:id]
|
159
|
+
find_resource
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
163
|
+
def parent_data
|
164
|
+
self.class.parent_data
|
165
|
+
end
|
166
|
+
|
167
|
+
def parent
|
168
|
+
if parent_data.present?
|
169
|
+
@parent ||= parent_data[:model_class].send("find_by_#{parent_data[:find_by]}", params["#{model_name}_id"])
|
170
|
+
instance_variable_set("@#{model_name}", @parent)
|
171
|
+
else
|
172
|
+
nil
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
176
|
+
def find_resource
|
177
|
+
if parent_data.present?
|
178
|
+
parent.send(controller_name).find(params[:id])
|
179
|
+
else
|
180
|
+
model_class.find(params[:id])
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
184
|
+
def build_resource
|
185
|
+
if parent_data.present?
|
186
|
+
parent.send(controller_name).build
|
187
|
+
else
|
188
|
+
model_class.new
|
189
|
+
end
|
190
|
+
end
|
191
|
+
|
192
|
+
def collection
|
193
|
+
return parent.send(controller_name) if parent_data.present?
|
194
|
+
if model_class.respond_to?(:accessible_by) && !current_ability.has_block?(params[:action], model_class)
|
195
|
+
model_class.accessible_by(current_ability, action)
|
196
|
+
else
|
197
|
+
model_class.scoped
|
198
|
+
end
|
199
|
+
end
|
200
|
+
|
201
|
+
def location_after_save
|
202
|
+
collection_url
|
203
|
+
end
|
204
|
+
|
205
|
+
def invoke_callbacks(action, callback_type)
|
206
|
+
callbacks = self.class.callbacks || {}
|
207
|
+
return if callbacks[action].nil?
|
208
|
+
case callback_type.to_sym
|
209
|
+
when :before then callbacks[action].before_methods.each {|method| send method }
|
210
|
+
when :after then callbacks[action].after_methods.each {|method| send method }
|
211
|
+
when :fails then callbacks[action].fails_methods.each {|method| send method }
|
212
|
+
end
|
213
|
+
end
|
214
|
+
|
215
|
+
# URL helpers
|
216
|
+
|
217
|
+
def new_object_url(options = {})
|
218
|
+
if parent_data.present?
|
219
|
+
spree.new_polymorphic_url([:admin, parent, model_class], options)
|
220
|
+
else
|
221
|
+
spree.new_polymorphic_url([:admin, model_class], options)
|
222
|
+
end
|
223
|
+
end
|
224
|
+
|
225
|
+
def edit_object_url(object, options = {})
|
226
|
+
if parent_data.present?
|
227
|
+
spree.send "edit_admin_#{model_name}_#{object_name}_url", parent, object, options
|
228
|
+
else
|
229
|
+
spree.send "edit_admin_#{object_name}_url", object, options
|
230
|
+
end
|
231
|
+
end
|
232
|
+
|
233
|
+
def object_url(object = nil, options = {})
|
234
|
+
target = object ? object : @object
|
235
|
+
if parent_data.present?
|
236
|
+
spree.send "admin_#{model_name}_#{object_name}_url", parent, target, options
|
237
|
+
else
|
238
|
+
spree.send "admin_#{object_name}_url", target, options
|
239
|
+
end
|
240
|
+
end
|
241
|
+
|
242
|
+
def collection_url(options = {})
|
243
|
+
if parent_data.present?
|
244
|
+
spree.polymorphic_url([:admin, parent, model_class], options)
|
245
|
+
else
|
246
|
+
spree.polymorphic_url([:admin, model_class], options)
|
247
|
+
end
|
248
|
+
end
|
249
|
+
|
250
|
+
def collection_actions
|
251
|
+
[:index]
|
252
|
+
end
|
253
|
+
|
254
|
+
def member_action?
|
255
|
+
!collection_actions.include? action
|
256
|
+
end
|
257
|
+
|
258
|
+
def new_actions
|
259
|
+
[:new, :create]
|
260
|
+
end
|
261
|
+
end
|