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,44 @@
|
|
1
|
+
module Spree
|
2
|
+
module Admin
|
3
|
+
class VariantsController < ResourceController
|
4
|
+
belongs_to 'spree/product', :find_by => :permalink
|
5
|
+
new_action.before :new_before
|
6
|
+
|
7
|
+
# override the destory method to set deleted_at value
|
8
|
+
# instead of actually deleting the product.
|
9
|
+
def destroy
|
10
|
+
@variant = Variant.find(params[:id])
|
11
|
+
@variant.deleted_at = Time.now()
|
12
|
+
if @variant.save
|
13
|
+
flash[:success] = Spree.t('notice_messages.variant_deleted')
|
14
|
+
else
|
15
|
+
flash[:success] = Spree.t('notice_messages.variant_not_deleted')
|
16
|
+
end
|
17
|
+
|
18
|
+
respond_with(@variant) do |format|
|
19
|
+
format.html { redirect_to admin_product_variants_url(params[:product_id]) }
|
20
|
+
format.js { render_js_for_destroy }
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
protected
|
25
|
+
def new_before
|
26
|
+
@object.attributes = @object.product.master.attributes.except('id', 'created_at', 'deleted_at',
|
27
|
+
'sku', 'is_master')
|
28
|
+
# Shallow Clone of the default price to populate the price field.
|
29
|
+
@object.default_price = @object.product.master.default_price.clone
|
30
|
+
end
|
31
|
+
|
32
|
+
def collection
|
33
|
+
@deleted = (params.key?(:deleted) && params[:deleted] == "on") ? "checked" : ""
|
34
|
+
|
35
|
+
if @deleted.blank?
|
36
|
+
@collection ||= super
|
37
|
+
else
|
38
|
+
@collection ||= Variant.where(:product_id => parent.id).deleted
|
39
|
+
end
|
40
|
+
@collection
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module Spree
|
2
|
+
module Admin
|
3
|
+
class ZonesController < ResourceController
|
4
|
+
before_filter :load_data, :except => [:index]
|
5
|
+
|
6
|
+
def new
|
7
|
+
@zone.zone_members.build
|
8
|
+
end
|
9
|
+
|
10
|
+
protected
|
11
|
+
|
12
|
+
def collection
|
13
|
+
params[:q] ||= {}
|
14
|
+
params[:q][:s] ||= "ascend_by_name"
|
15
|
+
@search = super.ransack(params[:q])
|
16
|
+
@zones = @search.result.page(params[:page]).per(Spree::Config[:orders_per_page])
|
17
|
+
end
|
18
|
+
|
19
|
+
def load_data
|
20
|
+
@countries = Country.order(:name)
|
21
|
+
@states = State.order(:name)
|
22
|
+
@zones = Zone.order(:name)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,168 @@
|
|
1
|
+
module Spree
|
2
|
+
module Admin
|
3
|
+
module BaseHelper
|
4
|
+
def field_container(model, method, options = {}, &block)
|
5
|
+
css_classes = options[:class].to_a
|
6
|
+
css_classes << 'field'
|
7
|
+
if error_message_on(model, method).present?
|
8
|
+
css_classes << 'withError'
|
9
|
+
end
|
10
|
+
content_tag(:div, capture(&block), :class => css_classes.join(' '), :id => "#{model}_#{method}_field")
|
11
|
+
end
|
12
|
+
|
13
|
+
def error_message_on(object, method, options = {})
|
14
|
+
object = convert_to_model(object)
|
15
|
+
obj = object.respond_to?(:errors) ? object : instance_variable_get("@#{object}")
|
16
|
+
|
17
|
+
if obj && obj.errors[method].present?
|
18
|
+
errors = obj.errors[method].map { |err| h(err) }.join('<br />').html_safe
|
19
|
+
content_tag(:span, errors, :class => 'formError')
|
20
|
+
else
|
21
|
+
''
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def datepicker_field_value(date)
|
26
|
+
unless date.blank?
|
27
|
+
l(date, :format => Spree.t('date_picker.format'))
|
28
|
+
else
|
29
|
+
nil
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
# This method demonstrates the use of the :child_index option to render a
|
34
|
+
# form partial for, for instance, client side addition of new nested
|
35
|
+
# records.
|
36
|
+
#
|
37
|
+
# This specific example creates a link which uses javascript to add a new
|
38
|
+
# form partial to the DOM.
|
39
|
+
#
|
40
|
+
# <%= form_for @project do |project_form| %>
|
41
|
+
# <div id="tasks">
|
42
|
+
# <%= project_form.fields_for :tasks do |task_form| %>
|
43
|
+
# <%= render :partial => 'task', :locals => { :f => task_form } %>
|
44
|
+
# <% end %>
|
45
|
+
# </div>
|
46
|
+
# <% end %>
|
47
|
+
def generate_html(form_builder, method, options = {})
|
48
|
+
options[:object] ||= form_builder.object.class.reflect_on_association(method).klass.new
|
49
|
+
options[:partial] ||= method.to_s.singularize
|
50
|
+
options[:form_builder_local] ||= :f
|
51
|
+
|
52
|
+
form_builder.fields_for(method, options[:object], :child_index => 'NEW_RECORD') do |f|
|
53
|
+
render(:partial => options[:partial], :locals => { options[:form_builder_local] => f })
|
54
|
+
end
|
55
|
+
|
56
|
+
end
|
57
|
+
|
58
|
+
def generate_template(form_builder, method, options = {})
|
59
|
+
escape_javascript generate_html(form_builder, method, options)
|
60
|
+
end
|
61
|
+
|
62
|
+
def remove_nested(fields)
|
63
|
+
out = ''
|
64
|
+
out << fields.hidden_field(:_destroy) unless fields.object.new_record?
|
65
|
+
out << (link_to icon('icon-remove'), "#", :class => 'remove')
|
66
|
+
out.html_safe
|
67
|
+
end
|
68
|
+
|
69
|
+
def preference_field_tag(name, value, options)
|
70
|
+
case options[:type]
|
71
|
+
when :integer
|
72
|
+
text_field_tag(name, value, preference_field_options(options))
|
73
|
+
when :boolean
|
74
|
+
hidden_field_tag(name, 0) +
|
75
|
+
check_box_tag(name, 1, value, preference_field_options(options))
|
76
|
+
when :string
|
77
|
+
text_field_tag(name, value, preference_field_options(options))
|
78
|
+
when :password
|
79
|
+
password_field_tag(name, value, preference_field_options(options))
|
80
|
+
when :text
|
81
|
+
text_area_tag(name, value, preference_field_options(options))
|
82
|
+
else
|
83
|
+
text_field_tag(name, value, preference_field_options(options))
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
def preference_field_for(form, field, options)
|
88
|
+
case options[:type]
|
89
|
+
when :integer
|
90
|
+
form.text_field(field, preference_field_options(options))
|
91
|
+
when :boolean
|
92
|
+
form.check_box(field, preference_field_options(options))
|
93
|
+
when :string
|
94
|
+
form.text_field(field, preference_field_options(options))
|
95
|
+
when :password
|
96
|
+
form.password_field(field, preference_field_options(options))
|
97
|
+
when :text
|
98
|
+
form.text_area(field, preference_field_options(options))
|
99
|
+
else
|
100
|
+
form.text_field(field, preference_field_options(options))
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
def preference_field_options(options)
|
105
|
+
field_options = case options[:type]
|
106
|
+
when :integer
|
107
|
+
{ :size => 10,
|
108
|
+
:class => 'input_integer' }
|
109
|
+
when :boolean
|
110
|
+
{}
|
111
|
+
when :string
|
112
|
+
{ :size => 10,
|
113
|
+
:class => 'input_string fullwidth' }
|
114
|
+
when :password
|
115
|
+
{ :size => 10,
|
116
|
+
:class => 'password_string fullwidth' }
|
117
|
+
when :text
|
118
|
+
{ :rows => 15,
|
119
|
+
:cols => 85,
|
120
|
+
:class => 'fullwidth' }
|
121
|
+
else
|
122
|
+
{ :size => 10,
|
123
|
+
:class => 'input_string fullwidth' }
|
124
|
+
end
|
125
|
+
|
126
|
+
field_options.merge!({
|
127
|
+
:readonly => options[:readonly],
|
128
|
+
:disabled => options[:disabled],
|
129
|
+
:size => options[:size]
|
130
|
+
})
|
131
|
+
end
|
132
|
+
|
133
|
+
def preference_fields(object, form)
|
134
|
+
return unless object.respond_to?(:preferences)
|
135
|
+
object.preferences.keys.map{ |key|
|
136
|
+
|
137
|
+
form.label("preferred_#{key}", Spree.t(key) + ": ") +
|
138
|
+
preference_field_for(form, "preferred_#{key}", :type => object.preference_type(key))
|
139
|
+
|
140
|
+
}.join("<br />").html_safe
|
141
|
+
end
|
142
|
+
|
143
|
+
def link_to_add_fields(name, target, options = {})
|
144
|
+
name = '' if options[:no_text]
|
145
|
+
css_classes = options[:class] ? options[:class] + " spree_add_fields" : "spree_add_fields"
|
146
|
+
link_to_with_icon('icon-plus', name, 'javascript:', :data => { :target => target }, :class => css_classes)
|
147
|
+
end
|
148
|
+
|
149
|
+
# renders hidden field and link to remove record using nested_attributes
|
150
|
+
def link_to_remove_fields(name, f, options = {})
|
151
|
+
name = '' if options[:no_text]
|
152
|
+
options[:class] = '' unless options[:class]
|
153
|
+
options[:class] += 'no-text with-tip' if options[:no_text]
|
154
|
+
url = f.object.persisted? ? [:admin, f.object] : '#'
|
155
|
+
link_to_with_icon('icon-trash', name, url, :class => "spree_remove_fields #{options[:class]}", :data => {:action => 'remove'}, :title => Spree.t(:remove)) + f.hidden_field(:_destroy)
|
156
|
+
end
|
157
|
+
|
158
|
+
def spree_dom_id(record)
|
159
|
+
dom_id(record, 'spree')
|
160
|
+
end
|
161
|
+
|
162
|
+
private
|
163
|
+
def attribute_name_for(field_name)
|
164
|
+
field_name.gsub(' ', '_').downcase
|
165
|
+
end
|
166
|
+
end
|
167
|
+
end
|
168
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Spree
|
2
|
+
module Admin
|
3
|
+
module GeneralSettingsHelper
|
4
|
+
def currency_options
|
5
|
+
currencies = ::Money::Currency.table.map do |code, details|
|
6
|
+
iso = details[:iso_code]
|
7
|
+
[iso, "#{details[:name]} (#{iso})"]
|
8
|
+
end
|
9
|
+
options_from_collection_for_select(currencies, :first, :last, Spree::Config[:currency])
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,154 @@
|
|
1
|
+
module Spree
|
2
|
+
module Admin
|
3
|
+
module NavigationHelper
|
4
|
+
# Make an admin tab that coveres one or more resources supplied by symbols
|
5
|
+
# Option hash may follow. Valid options are
|
6
|
+
# * :label to override link text, otherwise based on the first resource name (translated)
|
7
|
+
# * :route to override automatically determining the default route
|
8
|
+
# * :match_path as an alternative way to control when the tab is active, /products would match /admin/products, /admin/products/5/variants etc.
|
9
|
+
def tab(*args)
|
10
|
+
options = {:label => args.first.to_s}
|
11
|
+
|
12
|
+
# Return if resource is found and user is not allowed to :admin
|
13
|
+
return '' if klass = klass_for(options[:label]) and cannot?(:admin, klass)
|
14
|
+
|
15
|
+
if args.last.is_a?(Hash)
|
16
|
+
options = options.merge(args.pop)
|
17
|
+
end
|
18
|
+
options[:route] ||= "admin_#{args.first}"
|
19
|
+
|
20
|
+
destination_url = options[:url] || spree.send("#{options[:route]}_path")
|
21
|
+
|
22
|
+
titleized_label = Spree.t(options[:label], :default => options[:label]).titleize
|
23
|
+
|
24
|
+
css_classes = []
|
25
|
+
|
26
|
+
if options[:icon]
|
27
|
+
link = link_to_with_icon(options[:icon], titleized_label, destination_url)
|
28
|
+
css_classes << 'tab-with-icon'
|
29
|
+
else
|
30
|
+
link = link_to(titleized_label, destination_url)
|
31
|
+
end
|
32
|
+
|
33
|
+
selected = if options[:match_path]
|
34
|
+
request.fullpath.starts_with?("#{spree.root_path}admin#{options[:match_path]}")
|
35
|
+
else
|
36
|
+
args.include?(controller.controller_name.to_sym)
|
37
|
+
end
|
38
|
+
css_classes << 'selected' if selected
|
39
|
+
|
40
|
+
if options[:css_class]
|
41
|
+
css_classes << options[:css_class]
|
42
|
+
end
|
43
|
+
content_tag('li', link, :class => css_classes.join(' '))
|
44
|
+
end
|
45
|
+
|
46
|
+
# finds class for a given symbol / string
|
47
|
+
#
|
48
|
+
# Example :
|
49
|
+
# :products returns Spree::Product
|
50
|
+
# :my_products returns MyProduct if MyProduct is defined
|
51
|
+
# :my_products returns My::Product if My::Product is defined
|
52
|
+
# if cannot constantize it returns nil
|
53
|
+
# This will allow us to use cancan abilities on tab
|
54
|
+
def klass_for(name)
|
55
|
+
model_name = name.to_s
|
56
|
+
|
57
|
+
["Spree::#{model_name.classify}", model_name.classify, model_name.gsub('_', '/').classify].find do |t|
|
58
|
+
t.safe_constantize
|
59
|
+
end.try(:safe_constantize)
|
60
|
+
end
|
61
|
+
|
62
|
+
def link_to_clone(resource, options={})
|
63
|
+
options[:data] = {:action => 'clone'}
|
64
|
+
link_to_with_icon('icon-copy', Spree.t(:clone), clone_admin_product_url(resource), options)
|
65
|
+
end
|
66
|
+
|
67
|
+
def link_to_new(resource)
|
68
|
+
options[:data] = {:action => 'new'}
|
69
|
+
link_to_with_icon('icon-plus', Spree.t(:new), edit_object_url(resource))
|
70
|
+
end
|
71
|
+
|
72
|
+
def link_to_edit(resource, options={})
|
73
|
+
options[:data] = {:action => 'edit'}
|
74
|
+
link_to_with_icon('icon-edit', Spree.t(:edit), edit_object_url(resource), options)
|
75
|
+
end
|
76
|
+
|
77
|
+
def link_to_edit_url(url, options={})
|
78
|
+
options[:data] = {:action => 'edit'}
|
79
|
+
link_to_with_icon('icon-edit', Spree.t(:edit), url, options)
|
80
|
+
end
|
81
|
+
|
82
|
+
def link_to_delete(resource, options={})
|
83
|
+
url = options[:url] || object_url(resource)
|
84
|
+
name = options[:name] || Spree.t(:delete)
|
85
|
+
options[:class] = "delete-resource"
|
86
|
+
options[:data] = { :confirm => Spree.t(:are_you_sure), :action => 'remove' }
|
87
|
+
link_to_with_icon 'icon-trash', name, url, options
|
88
|
+
end
|
89
|
+
|
90
|
+
def link_to_with_icon(icon_name, text, url, options = {})
|
91
|
+
options[:class] = (options[:class].to_s + " icon_link with-tip #{icon_name}").strip
|
92
|
+
options[:class] += ' no-text' if options[:no_text]
|
93
|
+
options[:title] = text if options[:no_text]
|
94
|
+
text = options[:no_text] ? '' : raw("<span class='text'>#{text}</span>")
|
95
|
+
options.delete(:no_text)
|
96
|
+
link_to(text, url, options)
|
97
|
+
end
|
98
|
+
|
99
|
+
def icon(icon_name)
|
100
|
+
icon_name ? content_tag(:i, '', :class => icon_name) : ''
|
101
|
+
end
|
102
|
+
|
103
|
+
def button(text, icon_name = nil, button_type = 'submit', options={})
|
104
|
+
button_tag(text, options.merge(:type => button_type, :class => "#{icon_name} button"))
|
105
|
+
end
|
106
|
+
|
107
|
+
def button_link_to(text, url, html_options = {})
|
108
|
+
if (html_options[:method] &&
|
109
|
+
html_options[:method].to_s.downcase != 'get' &&
|
110
|
+
!html_options[:remote])
|
111
|
+
form_tag(url, :method => html_options.delete(:method)) do
|
112
|
+
button(text, html_options.delete(:icon), nil, html_options)
|
113
|
+
end
|
114
|
+
else
|
115
|
+
if html_options['data-update'].nil? && html_options[:remote]
|
116
|
+
object_name, action = url.split('/')[-2..-1]
|
117
|
+
html_options['data-update'] = [action, object_name.singularize].join('_')
|
118
|
+
end
|
119
|
+
|
120
|
+
html_options.delete('data-update') unless html_options['data-update']
|
121
|
+
|
122
|
+
html_options[:class] = 'button'
|
123
|
+
|
124
|
+
if html_options[:icon]
|
125
|
+
html_options[:class] += " #{html_options[:icon]}"
|
126
|
+
end
|
127
|
+
link_to(text_for_button_link(text, html_options), url, html_options)
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
def text_for_button_link(text, html_options)
|
132
|
+
s = ''
|
133
|
+
s << text
|
134
|
+
raw(s)
|
135
|
+
end
|
136
|
+
|
137
|
+
def configurations_menu_item(link_text, url, description = '')
|
138
|
+
%(<tr>
|
139
|
+
<td>#{link_to(link_text, url)}</td>
|
140
|
+
<td>#{description}</td>
|
141
|
+
</tr>
|
142
|
+
).html_safe
|
143
|
+
end
|
144
|
+
|
145
|
+
def configurations_sidebar_menu_item(link_text, url, options = {})
|
146
|
+
is_active = url.ends_with?(controller.controller_name) || url.ends_with?( "#{controller.controller_name}/edit")
|
147
|
+
options.merge!(:class => is_active ? 'active' : nil)
|
148
|
+
content_tag(:li, options) do
|
149
|
+
link_to(link_text, url)
|
150
|
+
end
|
151
|
+
end
|
152
|
+
end
|
153
|
+
end
|
154
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Spree
|
2
|
+
module Admin
|
3
|
+
module OrdersHelper
|
4
|
+
# Renders all the extension partials that may have been specified in the extensions
|
5
|
+
def event_links
|
6
|
+
links = []
|
7
|
+
@order_events.sort.each do |event|
|
8
|
+
if @order.send("can_#{event}?")
|
9
|
+
links << button_link_to(Spree.t(event), fire_admin_order_url(@order, :e => event),
|
10
|
+
:method => :put,
|
11
|
+
:icon => "icon-#{event}",
|
12
|
+
:data => { :confirm => Spree.t(:order_sure_want_to, :event => Spree.t(event)) })
|
13
|
+
end
|
14
|
+
end
|
15
|
+
links.join(' ').html_safe
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|