solidus_backend 1.3.2 → 1.4.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of solidus_backend might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +38 -0
- data/app/assets/javascripts/spree/backend/components/tooltips.js +2 -0
- data/app/assets/javascripts/spree/backend/product_picker.js +2 -2
- data/app/assets/javascripts/spree/backend/routes.js +0 -1
- data/app/assets/javascripts/spree/backend/shipments.js +147 -118
- data/app/assets/javascripts/spree/backend/taxon_autocomplete.js +16 -14
- data/app/assets/javascripts/spree/backend/templates/orders/customer_details/autocomplete.hbs +1 -1
- data/app/assets/javascripts/spree/backend/templates/variants/autocomplete.hbs.erb +1 -1
- data/app/assets/javascripts/spree/backend/templates/variants/line_items_autocomplete_stock.hbs +1 -1
- data/app/assets/javascripts/spree/backend/templates/variants/split.hbs +25 -27
- data/app/assets/javascripts/spree/backend/user_picker.js +14 -8
- data/app/assets/stylesheets/spree/backend/_bootstrap_custom.scss +3 -3
- data/app/assets/stylesheets/spree/backend/components/_breadcrumb.scss +4 -0
- data/app/assets/stylesheets/spree/backend/components/_date-picker.scss +0 -1
- data/app/assets/stylesheets/spree/backend/components/_hint.scss +3 -0
- data/app/assets/stylesheets/spree/backend/components/_navigation.scss +0 -1
- data/app/assets/stylesheets/spree/backend/components/_progress.scss +5 -2
- data/app/assets/stylesheets/spree/backend/components/_sidebar.scss +14 -5
- data/app/assets/stylesheets/spree/backend/components/_states.scss +1 -2
- data/app/assets/stylesheets/spree/backend/globals/_mixins.css +2 -0
- data/app/assets/stylesheets/spree/backend/globals/mixins/_line_through.scss +22 -0
- data/app/assets/stylesheets/spree/backend/plugins/_select2.scss +12 -3
- data/app/assets/stylesheets/spree/backend/sections/_products.scss +25 -7
- data/app/assets/stylesheets/spree/backend/sections/_promotions.scss +0 -1
- data/app/assets/stylesheets/spree/backend/sections/_transfer_items.scss +0 -1
- data/app/assets/stylesheets/spree/backend/shared/_forms.scss +4 -6
- data/app/assets/stylesheets/spree/backend/shared/_header.scss +5 -2
- data/app/assets/stylesheets/spree/backend/shared/_layout.scss +36 -3
- data/app/assets/stylesheets/spree/backend/shared/_tables.scss +1 -3
- data/app/assets/stylesheets/spree/backend/shared/_typography.scss +0 -2
- data/app/assets/stylesheets/spree/backend/spree_admin.scss +3 -1
- data/app/controllers/spree/admin/cancellations_controller.rb +1 -1
- data/app/controllers/spree/admin/general_settings_controller.rb +0 -6
- data/app/controllers/spree/admin/orders/customer_details_controller.rb +7 -0
- data/app/controllers/spree/admin/orders_controller.rb +1 -1
- data/app/controllers/spree/admin/payment_methods_controller.rb +8 -3
- data/app/controllers/spree/admin/payments_controller.rb +12 -5
- data/app/controllers/spree/admin/products_controller.rb +1 -1
- data/app/controllers/spree/admin/refunds_controller.rb +1 -1
- data/app/controllers/spree/admin/reimbursements_controller.rb +1 -1
- data/app/controllers/spree/admin/root_controller.rb +1 -1
- data/app/controllers/spree/admin/stock_items_controller.rb +0 -8
- data/app/controllers/spree/admin/stock_transfers_controller.rb +6 -6
- data/app/controllers/spree/admin/users_controller.rb +7 -3
- data/app/helpers/spree/admin/base_helper.rb +11 -0
- data/app/helpers/spree/admin/navigation_helper.rb +46 -3
- data/app/helpers/spree/admin/orders_helper.rb +0 -1
- data/app/helpers/spree/admin/stock_locations_helper.rb +1 -5
- data/app/models/spree/backend_configuration.rb +100 -0
- data/app/views/spree/admin/adjustment_reasons/edit.html.erb +4 -7
- data/app/views/spree/admin/adjustment_reasons/index.html.erb +4 -4
- data/app/views/spree/admin/adjustment_reasons/new.html.erb +4 -4
- data/app/views/spree/admin/adjustments/edit.html.erb +4 -6
- data/app/views/spree/admin/adjustments/index.html.erb +3 -6
- data/app/views/spree/admin/adjustments/new.html.erb +5 -6
- data/app/views/spree/admin/cancellations/index.html.erb +4 -3
- data/app/views/spree/admin/countries/edit.html.erb +4 -6
- data/app/views/spree/admin/countries/index.html.erb +4 -4
- data/app/views/spree/admin/countries/new.html.erb +4 -4
- data/app/views/spree/admin/customer_returns/_return_item_decision.html.erb +1 -1
- data/app/views/spree/admin/customer_returns/edit.html.erb +4 -6
- data/app/views/spree/admin/customer_returns/index.html.erb +2 -5
- data/app/views/spree/admin/customer_returns/new.html.erb +5 -6
- data/app/views/spree/admin/general_settings/edit.html.erb +4 -28
- data/app/views/spree/admin/images/edit.html.erb +6 -2
- data/app/views/spree/admin/images/index.html.erb +3 -0
- data/app/views/spree/admin/images/new.html.erb +3 -3
- data/app/views/spree/admin/log_entries/index.html.erb +4 -8
- data/app/views/spree/admin/option_types/edit.html.erb +7 -9
- data/app/views/spree/admin/option_types/index.html.erb +4 -4
- data/app/views/spree/admin/orders/_shipment.html.erb +4 -1
- data/app/views/spree/admin/orders/_shipment_manifest.html.erb +4 -1
- data/app/views/spree/admin/orders/cart.html.erb +4 -8
- data/app/views/spree/admin/orders/confirm.html.erb +3 -4
- data/app/views/spree/admin/orders/confirm/_payments.html.erb +1 -1
- data/app/views/spree/admin/orders/confirm_advance.html.erb +3 -4
- data/app/views/spree/admin/orders/customer_details/_form.html.erb +1 -1
- data/app/views/spree/admin/orders/customer_details/edit.html.erb +2 -4
- data/app/views/spree/admin/orders/customer_details/show.html.erb +3 -5
- data/app/views/spree/admin/orders/edit.html.erb +1 -8
- data/app/views/spree/admin/orders/index.html.erb +11 -5
- data/app/views/spree/admin/payment_methods/edit.html.erb +5 -7
- data/app/views/spree/admin/payment_methods/index.html.erb +6 -5
- data/app/views/spree/admin/payment_methods/new.html.erb +6 -7
- data/app/views/spree/admin/payments/_capture_events.html.erb +1 -1
- data/app/views/spree/admin/payments/credit.html.erb +3 -3
- data/app/views/spree/admin/payments/index.html.erb +4 -7
- data/app/views/spree/admin/payments/new.html.erb +4 -5
- data/app/views/spree/admin/payments/show.html.erb +4 -7
- data/app/views/spree/admin/prices/_form.html.erb +1 -0
- data/app/views/spree/admin/prices/index.html.erb +2 -2
- data/app/views/spree/admin/product_properties/index.html.erb +3 -1
- data/app/views/spree/admin/products/_form.html.erb +11 -18
- data/app/views/spree/admin/products/_properties_form.erb +1 -1
- data/app/views/spree/admin/products/edit.html.erb +3 -2
- data/app/views/spree/admin/products/index.html.erb +19 -28
- data/app/views/spree/admin/products/new.html.erb +4 -2
- data/app/views/spree/admin/promotion_categories/edit.html.erb +4 -3
- data/app/views/spree/admin/promotion_categories/index.html.erb +4 -4
- data/app/views/spree/admin/promotion_categories/new.html.erb +4 -3
- data/app/views/spree/admin/promotion_rules/create.js.erb +1 -1
- data/app/views/spree/admin/promotions/_actions.html.erb +3 -3
- data/app/views/spree/admin/promotions/_rules.html.erb +2 -2
- data/app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb +1 -1
- data/app/views/spree/admin/promotions/calculators/tiered_percent/_fields.html.erb +1 -1
- data/app/views/spree/admin/promotions/edit.html.erb +4 -5
- data/app/views/spree/admin/promotions/index.html.erb +3 -5
- data/app/views/spree/admin/promotions/new.html.erb +3 -3
- data/app/views/spree/admin/promotions/rules/_option_value.html.erb +2 -2
- data/app/views/spree/admin/properties/edit.html.erb +3 -6
- data/app/views/spree/admin/properties/index.html.erb +5 -5
- data/app/views/spree/admin/prototypes/_form.html.erb +3 -3
- data/app/views/spree/admin/prototypes/_prototypes.html.erb +1 -1
- data/app/views/spree/admin/prototypes/edit.html.erb +3 -6
- data/app/views/spree/admin/prototypes/index.html.erb +4 -4
- data/app/views/spree/admin/prototypes/show.html.erb +2 -2
- data/app/views/spree/admin/refund_reasons/edit.html.erb +4 -4
- data/app/views/spree/admin/refund_reasons/index.html.erb +5 -4
- data/app/views/spree/admin/refund_reasons/new.html.erb +5 -4
- data/app/views/spree/admin/refunds/edit.html.erb +5 -6
- data/app/views/spree/admin/refunds/new.html.erb +6 -6
- data/app/views/spree/admin/reimbursement_types/index.html.erb +4 -3
- data/app/views/spree/admin/reimbursements/edit.html.erb +5 -6
- data/app/views/spree/admin/reimbursements/index.html.erb +2 -4
- data/app/views/spree/admin/reimbursements/show.html.erb +3 -4
- data/app/views/spree/admin/reports/index.html.erb +2 -3
- data/app/views/spree/admin/reports/sales_total.html.erb +2 -4
- data/app/views/spree/admin/return_authorizations/edit.html.erb +15 -16
- data/app/views/spree/admin/return_authorizations/index.html.erb +3 -5
- data/app/views/spree/admin/return_authorizations/new.html.erb +5 -6
- data/app/views/spree/admin/return_reasons/edit.html.erb +3 -2
- data/app/views/spree/admin/return_reasons/index.html.erb +3 -1
- data/app/views/spree/admin/return_reasons/new.html.erb +4 -2
- data/app/views/spree/admin/shared/_areas_tabs.html.erb +3 -3
- data/app/views/spree/admin/shared/_configuration_menu.html.erb +2 -2
- data/app/views/spree/admin/shared/_edit_resource_links.html.erb +2 -2
- data/app/views/spree/admin/shared/_head.html.erb +1 -8
- data/app/views/spree/admin/shared/_header.html.erb +8 -12
- data/app/views/spree/admin/shared/_new_resource_links.html.erb +2 -2
- data/app/views/spree/admin/shared/_no_objects_found.html.erb +1 -1
- data/app/views/spree/admin/shared/_order_submenu.html.erb +10 -10
- data/app/views/spree/admin/shared/_order_summary.html.erb +1 -1
- data/app/views/spree/admin/shared/_order_tabs.html.erb +3 -3
- data/app/views/spree/admin/shared/_payments_tabs.html.erb +1 -1
- data/app/views/spree/admin/shared/_product_sub_menu.html.erb +2 -2
- data/app/views/spree/admin/shared/_product_tabs.html.erb +8 -9
- data/app/views/spree/admin/shared/_report_criteria.html.erb +2 -2
- data/app/views/spree/admin/shared/_report_order_criteria.html.erb +2 -2
- data/app/views/spree/admin/shared/_settings_checkout_tabs.html.erb +4 -4
- data/app/views/spree/admin/shared/_settings_sub_menu.html.erb +5 -5
- data/app/views/spree/admin/shared/_shipping_tabs.html.erb +4 -3
- data/app/views/spree/admin/shared/_sidebar.html.erb +1 -1
- data/app/views/spree/admin/shared/_tabs.html.erb +12 -37
- data/app/views/spree/admin/shared/_taxes_tabs.html.erb +2 -2
- data/app/views/spree/admin/shared/_variant_search.html.erb +1 -1
- data/app/views/spree/admin/shared/named_types/_edit.html.erb +5 -5
- data/app/views/spree/admin/shared/named_types/_index.html.erb +5 -4
- data/app/views/spree/admin/shared/named_types/_new.html.erb +5 -4
- data/app/views/spree/admin/shipping_categories/edit.html.erb +5 -6
- data/app/views/spree/admin/shipping_categories/index.html.erb +5 -4
- data/app/views/spree/admin/shipping_categories/new.html.erb +5 -6
- data/app/views/spree/admin/shipping_methods/_form.html.erb +2 -2
- data/app/views/spree/admin/shipping_methods/edit.html.erb +5 -6
- data/app/views/spree/admin/shipping_methods/index.html.erb +5 -5
- data/app/views/spree/admin/shipping_methods/new.html.erb +5 -6
- data/app/views/spree/admin/states/edit.html.erb +5 -6
- data/app/views/spree/admin/states/index.html.erb +5 -4
- data/app/views/spree/admin/states/new.html.erb +5 -3
- data/app/views/spree/admin/stock_items/index.html.erb +4 -7
- data/app/views/spree/admin/stock_locations/_transfer_stock_form.html.erb +2 -2
- data/app/views/spree/admin/stock_locations/edit.html.erb +5 -5
- data/app/views/spree/admin/stock_locations/index.html.erb +16 -9
- data/app/views/spree/admin/stock_locations/new.html.erb +5 -4
- data/app/views/spree/admin/stock_movements/index.html.erb +3 -4
- data/app/views/spree/admin/stock_movements/new.html.erb +2 -3
- data/app/views/spree/admin/stock_transfers/_location.html.erb +7 -0
- data/app/views/spree/admin/stock_transfers/_transfer_item_table.html.erb +1 -1
- data/app/views/spree/admin/stock_transfers/edit.html.erb +5 -6
- data/app/views/spree/admin/stock_transfers/index.html.erb +5 -5
- data/app/views/spree/admin/stock_transfers/new.html.erb +6 -8
- data/app/views/spree/admin/stock_transfers/receive.html.erb +4 -12
- data/app/views/spree/admin/stock_transfers/show.html.erb +6 -12
- data/app/views/spree/admin/stock_transfers/tracking_info.html.erb +5 -13
- data/app/views/spree/admin/store_credits/edit_amount.html.erb +6 -4
- data/app/views/spree/admin/store_credits/edit_validity.html.erb +8 -6
- data/app/views/spree/admin/store_credits/index.html.erb +5 -5
- data/app/views/spree/admin/store_credits/new.html.erb +5 -4
- data/app/views/spree/admin/store_credits/show.html.erb +5 -4
- data/app/views/spree/admin/style_guide/topics/typography/_icons.html.erb +2 -2
- data/app/views/spree/admin/tax_categories/edit.html.erb +5 -4
- data/app/views/spree/admin/tax_categories/index.html.erb +5 -4
- data/app/views/spree/admin/tax_categories/new.html.erb +5 -4
- data/app/views/spree/admin/tax_rates/edit.html.erb +5 -6
- data/app/views/spree/admin/tax_rates/index.html.erb +5 -4
- data/app/views/spree/admin/tax_rates/new.html.erb +5 -6
- data/app/views/spree/admin/taxonomies/edit.erb +7 -9
- data/app/views/spree/admin/taxonomies/index.html.erb +4 -4
- data/app/views/spree/admin/taxonomies/new.html.erb +5 -7
- data/app/views/spree/admin/taxons/edit.html.erb +5 -6
- data/app/views/spree/admin/taxons/index.html.erb +2 -3
- data/app/views/spree/admin/trackers/edit.html.erb +5 -6
- data/app/views/spree/admin/trackers/index.html.erb +4 -4
- data/app/views/spree/admin/trackers/new.html.erb +4 -6
- data/app/views/spree/admin/users/_form.html.erb +2 -2
- data/app/views/spree/admin/users/_tabs.html.erb +5 -5
- data/app/views/spree/admin/users/_user_page_actions.html.erb +1 -4
- data/app/views/spree/admin/users/addresses.html.erb +5 -4
- data/app/views/spree/admin/users/edit.html.erb +6 -6
- data/app/views/spree/admin/users/index.html.erb +4 -5
- data/app/views/spree/admin/users/items.html.erb +4 -3
- data/app/views/spree/admin/users/new.html.erb +2 -9
- data/app/views/spree/admin/users/orders.html.erb +4 -3
- data/app/views/spree/admin/variants/_form.html.erb +1 -0
- data/app/views/spree/admin/variants/edit.html.erb +4 -3
- data/app/views/spree/admin/variants/index.html.erb +10 -8
- data/app/views/spree/admin/variants/new.html.erb +5 -0
- data/app/views/spree/admin/zones/_country_members.html.erb +2 -2
- data/app/views/spree/admin/zones/_state_members.html.erb +2 -2
- data/app/views/spree/admin/zones/edit.html.erb +5 -6
- data/app/views/spree/admin/zones/index.html.erb +5 -4
- data/app/views/spree/admin/zones/new.html.erb +6 -7
- data/app/views/spree/layouts/admin.html.erb +28 -15
- data/config/initializers/form_builder.rb +6 -0
- data/config/routes.rb +2 -6
- data/spec/controllers/spree/admin/cancellations_controller_spec.rb +3 -3
- data/spec/controllers/spree/admin/customer_returns_controller_spec.rb +4 -4
- data/spec/controllers/spree/admin/missing_products_controller_spec.rb +1 -1
- data/spec/controllers/spree/admin/orders/customer_details_controller_spec.rb +5 -5
- data/spec/controllers/spree/admin/orders_controller_spec.rb +28 -28
- data/spec/controllers/spree/admin/payment_methods_controller_spec.rb +5 -5
- data/spec/controllers/spree/admin/payments_controller_spec.rb +7 -7
- data/spec/controllers/spree/admin/prices_controller_spec.rb +2 -2
- data/spec/controllers/spree/admin/product_properties_controller_spec.rb +1 -1
- data/spec/controllers/spree/admin/products_controller_spec.rb +6 -6
- data/spec/controllers/spree/admin/promotion_actions_controller_spec.rb +2 -2
- data/spec/controllers/spree/admin/promotion_codes_controller_spec.rb +1 -1
- data/spec/controllers/spree/admin/promotion_rules_controller_spec.rb +2 -2
- data/spec/controllers/spree/admin/promotions_controller_spec.rb +7 -7
- data/spec/controllers/spree/admin/refunds_controller_spec.rb +1 -1
- data/spec/controllers/spree/admin/reimbursements_controller_spec.rb +5 -5
- data/spec/controllers/spree/admin/reports_controller_spec.rb +2 -2
- data/spec/controllers/spree/admin/resource_controller_spec.rb +6 -6
- data/spec/controllers/spree/admin/return_authorizations_controller_spec.rb +11 -11
- data/spec/controllers/spree/admin/return_items_controller_spec.rb +1 -1
- data/spec/controllers/spree/admin/search_controller_spec.rb +2 -2
- data/spec/controllers/spree/admin/shipping_methods_controller_spec.rb +1 -1
- data/spec/controllers/spree/admin/stock_items_controller_spec.rb +3 -3
- data/spec/controllers/spree/admin/stock_locations_controller_spec.rb +3 -3
- data/spec/controllers/spree/admin/stock_transfers_controller_spec.rb +10 -10
- data/spec/controllers/spree/admin/store_credits_controller_spec.rb +10 -10
- data/spec/controllers/spree/admin/users_controller_spec.rb +139 -141
- data/spec/controllers/spree/admin/variants_controller_spec.rb +2 -2
- data/spec/features/admin/configuration/general_settings_spec.rb +7 -16
- data/spec/features/admin/configuration/payment_methods_spec.rb +7 -7
- data/spec/features/admin/configuration/stock_locations_spec.rb +1 -1
- data/spec/features/admin/configuration/tax_categories_spec.rb +1 -1
- data/spec/features/admin/configuration/zones_spec.rb +1 -1
- data/spec/features/admin/homepage_spec.rb +2 -2
- data/spec/features/admin/orders/adjustments_spec.rb +1 -1
- data/spec/features/admin/orders/cancelling_inventory_spec.rb +8 -8
- data/spec/features/admin/orders/customer_details_spec.rb +20 -5
- data/spec/features/admin/orders/listing_spec.rb +97 -70
- data/spec/features/admin/orders/new_order_spec.rb +35 -6
- data/spec/features/admin/orders/order_details_spec.rb +37 -58
- data/spec/features/admin/orders/payments_spec.rb +57 -4
- data/spec/features/admin/orders/return_authorizations_spec.rb +25 -0
- data/spec/features/admin/orders/shipments_spec.rb +5 -5
- data/spec/features/admin/products/edit/products_spec.rb +1 -1
- data/spec/features/admin/products/edit/taxons_spec.rb +5 -5
- data/spec/features/admin/products/edit/variants_spec.rb +1 -1
- data/spec/features/admin/products/option_types_spec.rb +2 -2
- data/spec/features/admin/products/products_spec.rb +6 -6
- data/spec/features/admin/products/properties_spec.rb +6 -6
- data/spec/features/admin/products/prototypes_spec.rb +1 -1
- data/spec/features/admin/products/stock_management_spec.rb +5 -5
- data/spec/features/admin/promotion_adjustments_spec.rb +8 -8
- data/spec/features/admin/promotions/option_value_rule_spec.rb +4 -4
- data/spec/features/admin/promotions/product_rule_spec.rb +33 -0
- data/spec/features/admin/promotions/tiered_calculator_spec.rb +2 -2
- data/spec/features/admin/promotions/user_rule_spec.rb +15 -0
- data/spec/features/admin/reports_spec.rb +1 -1
- data/spec/features/admin/users_spec.rb +27 -2
- data/spec/helpers/admin/base_helper_spec.rb +30 -0
- data/spec/helpers/admin/navigation_helper_spec.rb +40 -2
- data/spec/spec_helper.rb +10 -8
- data/spec/support/feature/order_feature_helper.rb +17 -0
- metadata +18 -11
- data/app/assets/javascripts/spree/backend/general_settings.js.coffee +0 -13
- data/spec/controllers/spree/admin/general_settings_controller_spec.rb +0 -41
@@ -1,6 +1,6 @@
|
|
1
|
-
<%
|
2
|
-
|
3
|
-
|
1
|
+
<% admin_breadcrumb(link_to plural_resource_name(Spree::LegacyUser), spree.admin_users_path) %>
|
2
|
+
<% admin_breadcrumb(@user.email) %>
|
3
|
+
|
4
4
|
|
5
5
|
<%= render 'spree/admin/users/sidebar' %>
|
6
6
|
<%= render 'spree/admin/users/tabs', current: :account %>
|
@@ -36,11 +36,11 @@
|
|
36
36
|
</div>
|
37
37
|
<div class="filter-actions actions">
|
38
38
|
<%= form_tag spree.clear_api_key_admin_user_path(@user), :method => :put do %>
|
39
|
-
<%= button Spree.t('clear_key', :scope => 'api')
|
39
|
+
<%= button Spree.t('clear_key', :scope => 'api') %>
|
40
40
|
<% end %>
|
41
41
|
|
42
42
|
<%= form_tag spree.generate_api_key_admin_user_path(@user), :method => :put do %>
|
43
|
-
<%= button Spree.t('regenerate_key', :scope => 'api')
|
43
|
+
<%= button Spree.t('regenerate_key', :scope => 'api') %>
|
44
44
|
<% end %>
|
45
45
|
</div>
|
46
46
|
|
@@ -50,7 +50,7 @@
|
|
50
50
|
|
51
51
|
<div class="filter-actions actions">
|
52
52
|
<%= form_tag spree.generate_api_key_admin_user_path(@user), :method => :put do %>
|
53
|
-
<%= button Spree.t('generate_key', :scope => 'api')
|
53
|
+
<%= button Spree.t('generate_key', :scope => 'api') %>
|
54
54
|
<% end %>
|
55
55
|
</div>
|
56
56
|
<% end %>
|
@@ -1,11 +1,10 @@
|
|
1
|
-
<%
|
2
|
-
|
3
|
-
<% end %>
|
1
|
+
<% admin_breadcrumb(plural_resource_name(Spree::LegacyUser)) %>
|
2
|
+
|
4
3
|
|
5
4
|
<% content_for :page_actions do %>
|
6
5
|
<% if can?(:admin, Spree.user_class) && can?(:create, Spree.user_class) %>
|
7
6
|
<li>
|
8
|
-
<%= button_link_to Spree.t(:new_user), new_admin_user_url, :
|
7
|
+
<%= button_link_to Spree.t(:new_user), new_admin_user_url, :id => 'admin_new_user_link' %>
|
9
8
|
</li>
|
10
9
|
<% end %>
|
11
10
|
<% end %>
|
@@ -52,7 +51,7 @@
|
|
52
51
|
<%= f.text_field :email_cont, :class => 'fullwidth' %>
|
53
52
|
</div>
|
54
53
|
<div data-hook="admin_users_index_search_buttons">
|
55
|
-
<%= button Spree.t(:search)
|
54
|
+
<%= button Spree.t(:search) %>
|
56
55
|
</div>
|
57
56
|
<% end %>
|
58
57
|
</div>
|
@@ -1,6 +1,7 @@
|
|
1
|
-
<%
|
2
|
-
|
3
|
-
<%
|
1
|
+
<% admin_breadcrumb(link_to plural_resource_name(Spree::LegacyUser), spree.admin_users_path) %>
|
2
|
+
<% admin_breadcrumb(link_to @user.email, edit_admin_user_url(@user)) %>
|
3
|
+
<% admin_breadcrumb(Spree.t('admin.user.items_purchased')) %>
|
4
|
+
|
4
5
|
|
5
6
|
<%= render 'spree/admin/users/sidebar' %>
|
6
7
|
<%= render 'spree/admin/users/tabs', current: :items %>
|
@@ -1,12 +1,5 @@
|
|
1
|
-
<%
|
2
|
-
|
3
|
-
<% end %>
|
4
|
-
|
5
|
-
<% content_for :page_actions do %>
|
6
|
-
<li>
|
7
|
-
<%= button_link_to Spree.t(:back_to_users_list), spree.admin_users_path, :icon => 'arrow-left' %>
|
8
|
-
</li>
|
9
|
-
<% end %>
|
1
|
+
<% admin_breadcrumb(link_to plural_resource_name(Spree::LegacyUser), spree.admin_users_path) %>
|
2
|
+
<% admin_breadcrumb(Spree.t(:new_user)) %>
|
10
3
|
|
11
4
|
<div data-hook="admin_user_new_form_header">
|
12
5
|
<%= render :partial => 'spree/shared/error_messages', :locals => { :target => @user } %>
|
@@ -1,6 +1,7 @@
|
|
1
|
-
<%
|
2
|
-
|
3
|
-
<%
|
1
|
+
<% admin_breadcrumb(link_to plural_resource_name(Spree::LegacyUser), spree.admin_users_path) %>
|
2
|
+
<% admin_breadcrumb(link_to @user.email, edit_admin_user_url(@user)) %>
|
3
|
+
<% admin_breadcrumb(Spree.t('admin.user.order_history')) %>
|
4
|
+
|
4
5
|
|
5
6
|
<%= render 'spree/admin/users/sidebar' %>
|
6
7
|
<%= render 'spree/admin/users/tabs', current: :orders %>
|
@@ -1,11 +1,12 @@
|
|
1
1
|
<%= render :partial => 'spree/admin/shared/product_tabs', :locals => { :current => 'Variants' } %>
|
2
2
|
|
3
|
-
<%
|
4
|
-
|
5
|
-
|
3
|
+
<% admin_breadcrumb(link_to plural_resource_name(Spree::Variant), admin_product_variants_path(@product)) %>
|
4
|
+
<% admin_breadcrumb(@variant.options_text) %>
|
5
|
+
|
6
6
|
|
7
7
|
<%= render :partial => 'spree/shared/error_messages', :locals => { :target => @variant } %>
|
8
8
|
|
9
|
+
|
9
10
|
<%= form_for [:admin, @product, @variant] do |f| %>
|
10
11
|
<fieldset>
|
11
12
|
<legend><%= t('.edit_variant') %></legend>
|
@@ -1,5 +1,8 @@
|
|
1
1
|
<%= render 'spree/admin/shared/product_tabs', current: 'Variants' %>
|
2
2
|
|
3
|
+
<% admin_breadcrumb(plural_resource_name(Spree::Variant)) %>
|
4
|
+
|
5
|
+
|
3
6
|
<% if @variants.any? || @product.variants.only_deleted.any?%>
|
4
7
|
<%= render "table_filter", product: @product %>
|
5
8
|
<%= render "table", variants: @variants %>
|
@@ -8,9 +11,9 @@
|
|
8
11
|
<p class='first_add_option_types no-objects-found' data-hook="first_add_option_types">
|
9
12
|
<%= Spree.t(:to_add_variants_you_must_first_define) %>
|
10
13
|
<% if can?(:display, Spree::OptionType) %>
|
11
|
-
<%= link_to Spree::OptionType
|
14
|
+
<%= link_to plural_resource_name(Spree::OptionType), admin_option_types_path%>
|
12
15
|
<% else %>
|
13
|
-
<%= Spree::OptionType
|
16
|
+
<%= plural_resource_name(Spree::OptionType) %>
|
14
17
|
<% end %>
|
15
18
|
</p>
|
16
19
|
<% elsif @product.empty_option_values? %>
|
@@ -20,7 +23,7 @@
|
|
20
23
|
</div>
|
21
24
|
<% else %>
|
22
25
|
<div class="alpha twelve columns no-objects-found">
|
23
|
-
<%= Spree.t(:no_resource, resource: Spree::Variant
|
26
|
+
<%= Spree.t(:no_resource, resource: plural_resource_name(Spree::Variant)) %>
|
24
27
|
<% if can? :create, Spree::Variant %>
|
25
28
|
<%= link_to Spree.t(:create_one), new_object_url, remote: true %>
|
26
29
|
<% end %>
|
@@ -33,11 +36,10 @@
|
|
33
36
|
<ul class="inline-menu" data-hook="toolbar">
|
34
37
|
<% if can?(:create, Spree::Variant) %>
|
35
38
|
<li id="new_var_link" data-hook>
|
36
|
-
<%=
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
:class => 'button' %>
|
39
|
+
<%= link_to Spree.t(:new_variant),
|
40
|
+
new_admin_product_variant_url(@product),
|
41
|
+
remote: :true,
|
42
|
+
class: 'button' %>
|
41
43
|
</li>
|
42
44
|
<% end %>
|
43
45
|
</ul>
|
@@ -1,5 +1,10 @@
|
|
1
|
+
<%= render :partial => 'spree/admin/shared/product_tabs', :locals => { :current => 'Variants' } %>
|
1
2
|
<%= render :partial => 'spree/shared/error_messages', :locals => { :target => @variant } %>
|
2
3
|
|
4
|
+
<% admin_breadcrumb(link_to plural_resource_name(Spree::Variant), admin_product_variants_path(@product)) %>
|
5
|
+
<% admin_breadcrumb(Spree.t(:new_variant)) %>
|
6
|
+
|
7
|
+
|
3
8
|
<%= form_for [:admin, @product, @variant] do |f| %>
|
4
9
|
<fieldset data-hook="admin_variant_new_form">
|
5
10
|
<legend><%= t('.new_variant') %></legend>
|
@@ -1,9 +1,9 @@
|
|
1
1
|
<div id="country_members" data-hook="member" class="omega six columns">
|
2
2
|
<fieldset class="no-border-bottom">
|
3
|
-
<legend align="center"><%= Spree::Country
|
3
|
+
<legend align="center"><%= plural_resource_name(Spree::Country) %></legend>
|
4
4
|
|
5
5
|
<%= zone_form.field_container :country_ids do %>
|
6
|
-
<%= zone_form.label :country_ids, Spree::Country
|
6
|
+
<%= zone_form.label :country_ids, plural_resource_name(Spree::Country) %><br>
|
7
7
|
<%= zone_form.collection_select :country_ids, @countries, :id, :name, {}, { :multiple => true, :class => "select2 fullwidth" } %>
|
8
8
|
<% end %>
|
9
9
|
</fieldset>
|
@@ -1,9 +1,9 @@
|
|
1
1
|
<div id="state_members" data-hook="member" class="omega six columns">
|
2
2
|
<fieldset class="no-border-bottom">
|
3
|
-
<legend align="center"><%= Spree::State
|
3
|
+
<legend align="center"><%= plural_resource_name(Spree::State) %></legend>
|
4
4
|
|
5
5
|
<%= zone_form.field_container :state_ids do %>
|
6
|
-
<%= zone_form.label :state_ids, Spree::State
|
6
|
+
<%= zone_form.label :state_ids, plural_resource_name(Spree::State) %><br>
|
7
7
|
<%= zone_form.collection_select :state_ids, @states, :id, :name, {}, { :multiple => true, :class => "select2 fullwidth" } %>
|
8
8
|
<% end %>
|
9
9
|
</fieldset>
|
@@ -1,13 +1,12 @@
|
|
1
1
|
<%= render 'spree/admin/shared/areas_tabs' %>
|
2
2
|
|
3
|
-
<%
|
4
|
-
|
5
|
-
<%
|
3
|
+
<% admin_breadcrumb(Spree.t(:settings)) %>
|
4
|
+
<% admin_breadcrumb(Spree.t('admin.tab.areas')) %>
|
5
|
+
<% admin_breadcrumb(link_to plural_resource_name(Spree::Zone), spree.admin_zones_path) %>
|
6
|
+
<% admin_breadcrumb(@zone.name) %>
|
7
|
+
|
6
8
|
|
7
9
|
<% content_for :page_actions do %>
|
8
|
-
<li>
|
9
|
-
<%= button_link_to Spree.t(:back_to_zones_list), admin_zones_path, :icon => 'arrow-left' %>
|
10
|
-
</li>
|
11
10
|
<% end %>
|
12
11
|
|
13
12
|
<%= render :partial => 'spree/shared/error_messages', :locals => { :target => @zone } %>
|
@@ -1,13 +1,14 @@
|
|
1
1
|
<%= render 'spree/admin/shared/areas_tabs' %>
|
2
2
|
|
3
|
-
<%
|
4
|
-
|
5
|
-
<%
|
3
|
+
<% admin_breadcrumb(Spree.t(:settings)) %>
|
4
|
+
<% admin_breadcrumb(Spree.t('admin.tab.areas')) %>
|
5
|
+
<% admin_breadcrumb(plural_resource_name(Spree::Zone)) %>
|
6
|
+
|
6
7
|
|
7
8
|
<% content_for :page_actions do %>
|
8
9
|
<% if can?(:create, Spree::Zone) %>
|
9
10
|
<li>
|
10
|
-
<%= button_link_to Spree.t(:new_zone), new_object_url, :
|
11
|
+
<%= button_link_to Spree.t(:new_zone), new_object_url, :id => 'admin_new_zone_link' %>
|
11
12
|
</li>
|
12
13
|
<% end %>
|
13
14
|
<% end %>
|
@@ -1,13 +1,12 @@
|
|
1
1
|
<%= render 'spree/admin/shared/areas_tabs' %>
|
2
2
|
|
3
|
-
<%
|
4
|
-
|
5
|
-
<%
|
3
|
+
<% admin_breadcrumb(Spree.t(:settings)) %>
|
4
|
+
<% admin_breadcrumb(Spree.t('admin.tab.areas')) %>
|
5
|
+
<% admin_breadcrumb(link_to plural_resource_name(Spree::Zone), spree.admin_zones_path) %>
|
6
|
+
<% admin_breadcrumb(Spree.t(:new_zone)) %>
|
7
|
+
|
6
8
|
|
7
9
|
<% content_for :page_actions do %>
|
8
|
-
<li>
|
9
|
-
<%= button_link_to Spree.t(:back_to_zones_list), spree.admin_zones_path, :icon => 'arrow-left' %>
|
10
|
-
</li>
|
11
10
|
<% end %>
|
12
11
|
|
13
12
|
<%= render :partial => 'spree/shared/error_messages', :locals => { :target => @zone } %>
|
@@ -16,6 +15,6 @@
|
|
16
15
|
<%= render :partial => 'form', :locals => { :zone_form => zone_form } %>
|
17
16
|
|
18
17
|
<div class="clear"></div>
|
19
|
-
|
18
|
+
|
20
19
|
<%= render :partial => 'spree/admin/shared/new_resource_links' %>
|
21
20
|
<% end %>
|
@@ -4,30 +4,43 @@
|
|
4
4
|
<%= render 'spree/admin/shared/head' %>
|
5
5
|
</head>
|
6
6
|
|
7
|
-
<body class="admin">
|
7
|
+
<body class="admin <%= "new-layout" if @admin_layout %>">
|
8
8
|
<%= render "spree/admin/shared/navigation" %>
|
9
9
|
<%= render "spree/admin/shared/header" %>
|
10
10
|
<%= render "spree/admin/shared/flash" %>
|
11
11
|
<%= render "spree/admin/shared/spinner" %>
|
12
12
|
|
13
|
-
<div class="
|
14
|
-
|
15
|
-
<div class="
|
16
|
-
<div class="
|
17
|
-
|
18
|
-
|
19
|
-
|
13
|
+
<div class="content-wrapper <%= @admin_layout.presence %> <%= "has-sidebar" if content_for?(:sidebar) %>" id="wrapper" data-hook>
|
14
|
+
<% if @admin_layout %>
|
15
|
+
<div class="content">
|
16
|
+
<div class="content-main">
|
17
|
+
<%= yield :tabs %>
|
18
|
+
<%= render "spree/admin/shared/table_filter" %>
|
19
|
+
<%= yield %>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
<%= render "spree/admin/shared/sidebar" %>
|
23
|
+
</div>
|
24
|
+
<% else %>
|
25
|
+
<% # Legacy layout %>
|
26
|
+
<div class="container">
|
27
|
+
<div class="row">
|
28
|
+
<div class="<%= 'with-sidebar ' if content_for?(:sidebar) %>" id="content" data-hook>
|
29
|
+
<% if content_for?(:tabs) %>
|
30
|
+
<div class="sixteen columns">
|
31
|
+
<%= yield :tabs %>
|
32
|
+
</div>
|
33
|
+
<% end %>
|
34
|
+
<div class="js-content-below-tabs <%= if content_for?(:sidebar) then 'twelve' else 'sixteen' end %> columns">
|
35
|
+
<%= render :partial => 'spree/admin/shared/table_filter' %>
|
36
|
+
<%= yield %>
|
20
37
|
</div>
|
21
|
-
<% end %>
|
22
|
-
<div class="js-content-below-tabs <%= if content_for?(:sidebar) then 'twelve' else 'sixteen' end %> columns">
|
23
|
-
<%= render :partial => 'spree/admin/shared/table_filter' %>
|
24
|
-
<%= yield %>
|
25
|
-
</div>
|
26
38
|
|
27
|
-
|
39
|
+
<%= render 'spree/admin/shared/sidebar' %>
|
40
|
+
</div>
|
28
41
|
</div>
|
29
42
|
</div>
|
30
|
-
|
43
|
+
<% end %>
|
31
44
|
</div>
|
32
45
|
|
33
46
|
<div data-hook="admin_footer_scripts"></div>
|
@@ -9,6 +9,12 @@ class ActionView::Helpers::FormBuilder
|
|
9
9
|
def error_message_on(method, options = {})
|
10
10
|
@template.error_message_on(@object_name, method, objectify_options(options))
|
11
11
|
end
|
12
|
+
|
13
|
+
def field_hint(method, options = {})
|
14
|
+
title = options[:title] || @object.class.human_attribute_name(method)
|
15
|
+
text = options[:text] || I18n.t(method, scope: [:spree, :hints, @object.class.model_name.i18n_key])
|
16
|
+
@template.admin_hint(title, text)
|
17
|
+
end
|
12
18
|
end
|
13
19
|
|
14
20
|
ActionView::Base.field_error_proc = proc{ |html_tag, _instance| "<span class=\"field_with_errors\">#{html_tag}</span>".html_safe }
|
data/config/routes.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Spree::Core::Engine.
|
1
|
+
Spree::Core::Engine.routes.draw do
|
2
2
|
namespace :admin do
|
3
3
|
get '/search/users', to: "search#users", as: :search_users
|
4
4
|
get '/search/products', to: "search#products", as: :search_products
|
@@ -130,11 +130,7 @@ Spree::Core::Engine.add_routes do
|
|
130
130
|
end
|
131
131
|
end
|
132
132
|
|
133
|
-
resource :general_settings, only: [:edit, :update]
|
134
|
-
collection do
|
135
|
-
post :clear_cache
|
136
|
-
end
|
137
|
-
end
|
133
|
+
resource :general_settings, only: [:edit, :update]
|
138
134
|
|
139
135
|
resources :return_items, only: [:update]
|
140
136
|
|
@@ -4,7 +4,7 @@ describe Spree::Admin::CancellationsController do
|
|
4
4
|
stub_authorization!
|
5
5
|
|
6
6
|
describe "#index" do
|
7
|
-
subject {
|
7
|
+
subject { get :index, order_id: order.number }
|
8
8
|
|
9
9
|
let(:order) { create(:order_ready_to_ship, line_items_count: 1) }
|
10
10
|
|
@@ -18,13 +18,13 @@ describe Spree::Admin::CancellationsController do
|
|
18
18
|
end
|
19
19
|
|
20
20
|
describe "#cancel" do
|
21
|
-
subject {
|
21
|
+
subject { post :short_ship, order_id: order.number, inventory_unit_ids: inventory_units.map(&:id) }
|
22
22
|
|
23
23
|
let(:order) { create(:order_ready_to_ship, number: "R100", state: "complete", line_items_count: 1) }
|
24
24
|
let(:referer) { "order_admin_page" }
|
25
25
|
|
26
26
|
context "no inventory unit ids are provided" do
|
27
|
-
subject {
|
27
|
+
subject { post :short_ship, order_id: order.number }
|
28
28
|
|
29
29
|
it "redirects back" do
|
30
30
|
subject
|
@@ -10,7 +10,7 @@ module Spree
|
|
10
10
|
let(:customer_return) { create(:customer_return) }
|
11
11
|
|
12
12
|
subject do
|
13
|
-
|
13
|
+
get :index, { order_id: customer_return.order.to_param }
|
14
14
|
end
|
15
15
|
|
16
16
|
before { subject }
|
@@ -31,7 +31,7 @@ module Spree
|
|
31
31
|
let!(:second_active_reimbursement_type) { create(:reimbursement_type) }
|
32
32
|
|
33
33
|
subject do
|
34
|
-
|
34
|
+
get :new, { order_id: order.to_param }
|
35
35
|
end
|
36
36
|
|
37
37
|
it "loads the order" do
|
@@ -126,7 +126,7 @@ module Spree
|
|
126
126
|
let!(:manual_intervention_return_item) { customer_return.return_items.order('id').third.tap(&:require_manual_intervention!) }
|
127
127
|
|
128
128
|
subject do
|
129
|
-
|
129
|
+
get :edit, { order_id: order.to_param, id: customer_return.to_param }
|
130
130
|
end
|
131
131
|
|
132
132
|
it "loads the order" do
|
@@ -202,7 +202,7 @@ module Spree
|
|
202
202
|
}
|
203
203
|
end
|
204
204
|
|
205
|
-
subject {
|
205
|
+
subject { post :create, customer_return_params }
|
206
206
|
|
207
207
|
it { expect { subject }.to change { Spree::CustomerReturn.count }.by(1) }
|
208
208
|
it do
|
@@ -9,7 +9,7 @@ describe Spree::Admin::ProductsController, type: :controller do
|
|
9
9
|
|
10
10
|
# Regression test for GH https://github.com/spree/spree/issues/538
|
11
11
|
it "cannot find a non-existent product" do
|
12
|
-
|
12
|
+
get :edit, id: "non-existent-product"
|
13
13
|
expect(response).to redirect_to(spree.admin_products_path)
|
14
14
|
expect(flash[:error]).to eql("Product is not found")
|
15
15
|
end
|
@@ -15,13 +15,13 @@ describe Spree::Admin::Orders::CustomerDetailsController, type: :controller do
|
|
15
15
|
expect(order).to receive(:update_attributes) { true }
|
16
16
|
expect(order).to receive(:next) { false }
|
17
17
|
attributes = { order_id: order.number, order: { email: "" } }
|
18
|
-
|
18
|
+
put :update, attributes
|
19
19
|
end
|
20
20
|
|
21
21
|
it "does refresh the shipment rates with all shipping methods" do
|
22
22
|
expect(order).to receive(:refresh_shipment_rates)
|
23
23
|
attributes = { order_id: order.number, order: { email: "" } }
|
24
|
-
|
24
|
+
put :update, attributes
|
25
25
|
end
|
26
26
|
|
27
27
|
# Regression spec
|
@@ -37,7 +37,7 @@ describe Spree::Admin::Orders::CustomerDetailsController, type: :controller do
|
|
37
37
|
end
|
38
38
|
|
39
39
|
it 'allows the updating of an email address' do
|
40
|
-
expect {
|
40
|
+
expect { put :update, attributes }.to change { order.reload.email }.to eq 'foo@bar.com'
|
41
41
|
expect(response).to be_redirect
|
42
42
|
end
|
43
43
|
end
|
@@ -53,7 +53,7 @@ describe Spree::Admin::Orders::CustomerDetailsController, type: :controller do
|
|
53
53
|
}
|
54
54
|
|
55
55
|
expect {
|
56
|
-
|
56
|
+
put :update, attributes
|
57
57
|
}.to change{ order.reload.user }.to(assigned_user)
|
58
58
|
end
|
59
59
|
end
|
@@ -70,7 +70,7 @@ describe Spree::Admin::Orders::CustomerDetailsController, type: :controller do
|
|
70
70
|
}
|
71
71
|
|
72
72
|
expect {
|
73
|
-
|
73
|
+
put :update, attributes
|
74
74
|
}.not_to change{ order.reload.user }
|
75
75
|
end
|
76
76
|
end
|