spree_backend 3.1.14 → 3.2.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/images/admin/logo.png +0 -0
- data/app/assets/javascripts/spree/backend/admin.js +2 -25
- data/app/assets/javascripts/spree/backend/checkouts/edit.js +2 -1
- data/app/assets/javascripts/spree/backend/line_items.js.coffee +2 -2
- data/app/assets/javascripts/spree/backend/line_items_on_order_edit.js +5 -2
- data/app/assets/javascripts/spree/backend/option_type_autocomplete.js +2 -2
- data/app/assets/javascripts/spree/backend/option_value_picker.js +2 -2
- data/app/assets/javascripts/spree/backend/payments/edit.js.coffee +10 -8
- data/app/assets/javascripts/spree/backend/product_picker.js +3 -2
- data/app/assets/javascripts/spree/backend/{shipments.js.erb → shipments.js} +1 -1
- data/app/assets/javascripts/spree/backend/states.js +9 -7
- data/app/assets/javascripts/spree/backend/stock_location.js +3 -0
- data/app/assets/javascripts/spree/backend/tag_picker.js +52 -0
- data/app/assets/javascripts/spree/backend/taxon_autocomplete.js +2 -2
- data/app/assets/javascripts/spree/backend/taxon_permalink_preview.js +12 -0
- data/app/assets/javascripts/spree/backend/taxonomy.js.coffee +2 -2
- data/app/assets/javascripts/spree/backend/taxons.js.coffee +1 -1
- data/app/assets/javascripts/spree/backend/user_picker.js +4 -3
- data/app/assets/javascripts/spree/backend.js +8 -7
- data/app/assets/stylesheets/spree/backend/components/_main.scss +5 -1
- data/app/assets/stylesheets/spree/backend/components/_sidebar.scss +7 -0
- data/app/assets/stylesheets/spree/backend/shared/_forms.scss +1 -1
- data/app/assets/stylesheets/spree/backend/spree_admin.css.scss +0 -1
- data/app/controllers/spree/admin/base_controller.rb +0 -11
- data/app/controllers/spree/admin/option_types_controller.rb +2 -14
- data/app/controllers/spree/admin/option_values_controller.rb +1 -1
- data/app/controllers/spree/admin/orders_controller.rb +7 -7
- data/app/controllers/spree/admin/payment_methods_controller.rb +4 -0
- data/app/controllers/spree/admin/product_properties_controller.rb +1 -1
- data/app/controllers/spree/admin/products_controller.rb +1 -1
- data/app/controllers/spree/admin/promotion_actions_controller.rb +5 -5
- data/app/controllers/spree/admin/promotion_rules_controller.rb +6 -6
- data/app/controllers/spree/admin/promotions_controller.rb +2 -2
- data/app/controllers/spree/admin/properties_controller.rb +1 -1
- data/app/controllers/spree/admin/prototypes_controller.rb +2 -2
- data/app/controllers/spree/admin/refunds_controller.rb +1 -1
- data/app/controllers/spree/admin/reimbursement_types_controller.rb +26 -0
- data/app/controllers/spree/admin/reimbursements_controller.rb +1 -1
- data/app/controllers/spree/admin/reports_controller.rb +1 -1
- data/app/controllers/spree/admin/resource_controller.rb +8 -8
- data/app/controllers/spree/admin/return_authorizations_controller.rb +3 -3
- data/app/controllers/spree/admin/return_index_controller.rb +1 -1
- data/app/controllers/spree/admin/shipping_methods_controller.rb +2 -2
- data/app/controllers/spree/admin/states_controller.rb +1 -1
- data/app/controllers/spree/admin/stock_items_controller.rb +2 -2
- data/app/controllers/spree/admin/stock_movements_controller.rb +1 -5
- data/app/controllers/spree/admin/store_credits_controller.rb +1 -1
- data/app/controllers/spree/admin/taxons_controller.rb +1 -10
- data/app/controllers/spree/admin/users_controller.rb +5 -41
- data/app/controllers/spree/admin/variants_controller.rb +3 -1
- data/app/helpers/spree/admin/base_helper.rb +1 -6
- data/app/helpers/spree/admin/navigation_helper.rb +9 -31
- data/app/helpers/spree/admin/promotion_rules_helper.rb +12 -0
- data/app/views/kaminari/_first_page.html.erb +1 -1
- data/app/views/kaminari/_last_page.html.erb +1 -1
- data/app/views/kaminari/_next_page.html.erb +1 -1
- data/app/views/kaminari/_page.html.erb +1 -1
- data/app/views/kaminari/_paginator.html.erb +2 -4
- data/app/views/kaminari/_prev_page.html.erb +1 -1
- data/app/views/spree/admin/adjustments/_adjustments_table.html.erb +1 -1
- data/app/views/spree/admin/adjustments/_form.html.erb +4 -4
- data/app/views/spree/admin/countries/_form.html.erb +2 -2
- data/app/views/spree/admin/countries/edit.html.erb +3 -3
- data/app/views/spree/admin/countries/index.html.erb +3 -3
- data/app/views/spree/admin/countries/new.html.erb +3 -3
- data/app/views/spree/admin/customer_returns/new.html.erb +1 -1
- data/app/views/spree/admin/images/_form.html.erb +2 -2
- data/app/views/spree/admin/option_types/_form.html.erb +2 -2
- data/app/views/spree/admin/option_types/edit.html.erb +5 -5
- data/app/views/spree/admin/option_types/new.html.erb +3 -3
- data/app/views/spree/admin/orders/_adjustments.html.erb +6 -4
- data/app/views/spree/admin/orders/_form.html.erb +1 -1
- data/app/views/spree/admin/orders/_line_items.html.erb +8 -6
- data/app/views/spree/admin/orders/_line_items_edit_form.html.erb +1 -1
- data/app/views/spree/admin/orders/_shipment.html.erb +9 -7
- data/app/views/spree/admin/orders/cart.html.erb +0 -4
- data/app/views/spree/admin/orders/edit.html.erb +0 -4
- data/app/views/spree/admin/orders/index.html.erb +20 -20
- data/app/views/spree/admin/payment_methods/_form.html.erb +5 -5
- data/app/views/spree/admin/payment_methods/index.html.erb +3 -3
- data/app/views/spree/admin/payments/_form.html.erb +6 -6
- data/app/views/spree/admin/payments/source_forms/_gateway.html.erb +6 -6
- data/app/views/spree/admin/products/_form.html.erb +14 -8
- data/app/views/spree/admin/products/_properties_form.erb +1 -1
- data/app/views/spree/admin/products/index.html.erb +6 -6
- data/app/views/spree/admin/products/new.html.erb +16 -16
- data/app/views/spree/admin/promotion_categories/_form.html.erb +3 -3
- data/app/views/spree/admin/promotion_categories/edit.html.erb +3 -3
- data/app/views/spree/admin/promotion_categories/index.html.erb +3 -3
- data/app/views/spree/admin/promotion_categories/new.html.erb +3 -3
- data/app/views/spree/admin/promotions/_actions.html.erb +4 -4
- data/app/views/spree/admin/promotions/_form.html.erb +10 -10
- data/app/views/spree/admin/promotions/_promotion_rule.html.erb +1 -1
- data/app/views/spree/admin/promotions/_rules.html.erb +4 -4
- data/app/views/spree/admin/promotions/actions/_create_adjustment.html.erb +1 -1
- data/app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb +2 -2
- data/app/views/spree/admin/promotions/actions/_create_line_items.html.erb +1 -1
- data/app/views/spree/admin/promotions/edit.html.erb +6 -6
- data/app/views/spree/admin/promotions/index.html.erb +5 -5
- data/app/views/spree/admin/promotions/new.html.erb +3 -3
- data/app/views/spree/admin/promotions/rules/_country.html.erb +6 -0
- data/app/views/spree/admin/promotions/rules/_landing_page.html.erb +1 -1
- data/app/views/spree/admin/promotions/rules/_product.html.erb +2 -2
- data/app/views/spree/admin/promotions/rules/_taxon.html.erb +2 -2
- data/app/views/spree/admin/properties/_form.html.erb +2 -2
- data/app/views/spree/admin/properties/edit.html.erb +3 -3
- data/app/views/spree/admin/properties/index.html.erb +6 -6
- data/app/views/spree/admin/prototypes/_prototypes.html.erb +1 -1
- data/app/views/spree/admin/prototypes/available.js.erb +1 -1
- data/app/views/spree/admin/prototypes/edit.html.erb +3 -3
- data/app/views/spree/admin/prototypes/index.html.erb +3 -3
- data/app/views/spree/admin/prototypes/new.html.erb +3 -3
- data/app/views/spree/admin/prototypes/show.html.erb +1 -1
- data/app/views/spree/admin/refunds/edit.html.erb +2 -0
- data/app/views/spree/admin/refunds/new.html.erb +2 -0
- data/app/views/spree/admin/reimbursement_types/_form.html.erb +32 -0
- data/app/views/spree/admin/reimbursement_types/edit.html.erb +11 -0
- data/app/views/spree/admin/reimbursement_types/index.html.erb +9 -0
- data/app/views/spree/admin/reimbursement_types/new.html.erb +11 -0
- data/app/views/spree/admin/reimbursements/edit.html.erb +1 -1
- data/app/views/spree/admin/reports/sales_total.html.erb +1 -1
- data/app/views/spree/admin/return_authorizations/_form.html.erb +4 -4
- data/app/views/spree/admin/return_index/customer_returns.html.erb +1 -2
- data/app/views/spree/admin/return_index/return_authorizations.html.erb +4 -4
- data/app/views/spree/admin/roles/edit.html.erb +1 -1
- data/app/views/spree/admin/roles/new.html.erb +1 -1
- data/app/views/spree/admin/shared/_calculator_fields.html.erb +2 -2
- data/app/views/spree/admin/shared/_destroy.js.erb +1 -1
- data/app/views/spree/admin/shared/_edit_resource_links.html.erb +2 -2
- data/app/views/spree/admin/shared/_head.html.erb +2 -1
- data/app/views/spree/admin/shared/_header.html.erb +4 -11
- data/app/views/spree/admin/shared/_index_table_options.html.erb +1 -1
- data/app/views/spree/admin/shared/_main_menu.html.erb +6 -0
- data/app/views/spree/admin/shared/_new_resource_links.html.erb +2 -2
- data/app/views/spree/admin/shared/_order_summary.html.erb +3 -3
- data/app/views/spree/admin/shared/_refunds.html.erb +1 -1
- data/app/views/spree/admin/shared/_report_order_criteria.html.erb +3 -3
- data/app/views/spree/admin/shared/_translations.html.erb +38 -38
- data/app/views/spree/admin/shared/{_update_order_state.js → _update_order_state.js.erb} +3 -3
- data/app/views/spree/admin/shared/named_types/_index.html.erb +2 -2
- data/app/views/spree/admin/shipping_categories/edit.html.erb +3 -3
- data/app/views/spree/admin/shipping_categories/index.html.erb +3 -3
- data/app/views/spree/admin/shipping_categories/new.html.erb +3 -3
- data/app/views/spree/admin/shipping_methods/_form.html.erb +14 -14
- data/app/views/spree/admin/shipping_methods/edit.html.erb +3 -3
- data/app/views/spree/admin/shipping_methods/index.html.erb +3 -3
- data/app/views/spree/admin/shipping_methods/new.html.erb +3 -3
- data/app/views/spree/admin/states/_form.html.erb +2 -2
- data/app/views/spree/admin/states/_state_list.html.erb +2 -2
- data/app/views/spree/admin/states/edit.html.erb +3 -3
- data/app/views/spree/admin/states/index.html.erb +3 -3
- data/app/views/spree/admin/states/new.html.erb +3 -3
- data/app/views/spree/admin/stock_locations/_form.html.erb +0 -8
- data/app/views/spree/admin/stock_locations/_transfer_stock_form.html.erb +1 -1
- data/app/views/spree/admin/stock_locations/edit.html.erb +3 -3
- data/app/views/spree/admin/stock_locations/index.html.erb +4 -4
- data/app/views/spree/admin/stock_locations/new.html.erb +3 -3
- data/app/views/spree/admin/stock_transfers/index.html.erb +3 -3
- data/app/views/spree/admin/stock_transfers/new.html.erb +1 -1
- data/app/views/spree/admin/stock_transfers/show.html.erb +3 -3
- data/app/views/spree/admin/tax_categories/_form.html.erb +7 -7
- data/app/views/spree/admin/tax_categories/edit.html.erb +3 -3
- data/app/views/spree/admin/tax_categories/new.html.erb +3 -3
- data/app/views/spree/admin/tax_rates/_form.html.erb +5 -5
- data/app/views/spree/admin/tax_rates/edit.html.erb +3 -3
- data/app/views/spree/admin/tax_rates/new.html.erb +3 -3
- data/app/views/spree/admin/taxonomies/_form.html.erb +2 -2
- data/app/views/spree/admin/taxonomies/_js_head.html.erb +0 -5
- data/app/views/spree/admin/taxonomies/new.html.erb +1 -1
- data/app/views/spree/admin/taxons/_form.html.erb +7 -7
- data/app/views/spree/admin/taxons/_taxon_table.html.erb +1 -1
- data/app/views/spree/admin/taxons/edit.html.erb +0 -15
- data/app/views/spree/admin/taxons/index.html.erb +1 -1
- data/app/views/spree/admin/trackers/_form.html.erb +1 -1
- data/app/views/spree/admin/trackers/edit.html.erb +3 -3
- data/app/views/spree/admin/trackers/index.html.erb +3 -3
- data/app/views/spree/admin/trackers/new.html.erb +3 -3
- data/app/views/spree/admin/users/_addresses_form.html.erb +2 -2
- data/app/views/spree/admin/users/_form.html.erb +3 -3
- data/app/views/spree/admin/users/index.html.erb +7 -7
- data/app/views/spree/admin/users/items.html.erb +2 -2
- data/app/views/spree/admin/users/new.html.erb +3 -3
- data/app/views/spree/admin/variants/_autocomplete_line_items_stock.js.erb +24 -7
- data/app/views/spree/admin/variants/_autocomplete_stock.js.erb +1 -0
- data/app/views/spree/admin/variants/_form.html.erb +7 -7
- data/app/views/spree/admin/variants/new.html.erb +3 -3
- data/app/views/spree/admin/zones/_country_members.html.erb +1 -1
- data/app/views/spree/admin/zones/_form.html.erb +6 -6
- data/app/views/spree/admin/zones/_state_members.html.erb +1 -1
- data/app/views/spree/admin/zones/edit.html.erb +3 -3
- data/app/views/spree/admin/zones/index.html.erb +5 -5
- data/app/views/spree/admin/zones/new.html.erb +3 -3
- data/config/routes.rb +4 -12
- data/lib/spree/backend/engine.rb +2 -6
- data/spec/controllers/spree/admin/base_controller_spec.rb +46 -0
- data/spec/controllers/spree/admin/customer_returns_controller_spec.rb +185 -0
- data/spec/controllers/spree/admin/general_settings_controller_spec.rb +41 -0
- data/spec/controllers/spree/admin/missing_products_controller_spec.rb +18 -0
- data/spec/controllers/spree/admin/orders/customer_details_controller_spec.rb +197 -0
- data/spec/controllers/spree/admin/orders_controller_spec.rb +296 -0
- data/spec/controllers/spree/admin/payment_methods_controller_spec.rb +49 -0
- data/spec/controllers/spree/admin/payments_controller_spec.rb +97 -0
- data/spec/controllers/spree/admin/products_controller_spec.rb +99 -0
- data/spec/controllers/spree/admin/promotion_actions_controller_spec.rb +21 -0
- data/spec/controllers/spree/admin/promotion_rules_controller_spec.rb +21 -0
- data/spec/controllers/spree/admin/promotions_controller_spec.rb +44 -0
- data/spec/controllers/spree/admin/refunds_controller_spec.rb +32 -0
- data/spec/controllers/spree/admin/reimbursements_controller_spec.rb +74 -0
- data/spec/controllers/spree/admin/reports_controller_spec.rb +42 -0
- data/spec/controllers/spree/admin/resource_controller_spec.rb +252 -0
- data/spec/controllers/spree/admin/return_authorizations_controller_spec.rb +225 -0
- data/spec/controllers/spree/admin/return_index_controller_spec.rb +37 -0
- data/spec/controllers/spree/admin/return_items_controller_spec.rb +27 -0
- data/spec/controllers/spree/admin/shipping_methods_controller_spec.rb +14 -0
- data/spec/controllers/spree/admin/stock_items_controller_spec.rb +19 -0
- data/spec/controllers/spree/admin/stock_locations_controller_spec.rb +41 -0
- data/spec/controllers/spree/admin/stock_transfers_controller_spec.rb +41 -0
- data/spec/controllers/spree/admin/tax_categories_controller_spec.rb +34 -0
- data/spec/controllers/spree/admin/users_controller_spec.rb +161 -0
- data/spec/controllers/spree/admin/variants_controller_spec.rb +32 -0
- data/spec/features/admin/configuration/analytics_tracker_spec.rb +47 -0
- data/spec/features/admin/configuration/countries_spec.rb +24 -0
- data/spec/features/admin/configuration/general_settings_spec.rb +44 -0
- data/spec/features/admin/configuration/payment_methods_spec.rb +63 -0
- data/spec/features/admin/configuration/roles_spec.rb +47 -0
- data/spec/features/admin/configuration/shipping_methods_spec.rb +62 -0
- data/spec/features/admin/configuration/states_spec.rb +68 -0
- data/spec/features/admin/configuration/stock_locations_spec.rb +48 -0
- data/spec/features/admin/configuration/store_credit_categories_spec.rb +50 -0
- data/spec/features/admin/configuration/tax_categories_spec.rb +56 -0
- data/spec/features/admin/configuration/tax_rates_spec.rb +18 -0
- data/spec/features/admin/configuration/zones_spec.rb +39 -0
- data/spec/features/admin/homepage_spec.rb +89 -0
- data/spec/features/admin/locale_spec.rb +31 -0
- data/spec/features/admin/orders/adjustments_promotions_spec.rb +53 -0
- data/spec/features/admin/orders/adjustments_spec.rb +129 -0
- data/spec/features/admin/orders/cancelling_and_resuming_spec.rb +47 -0
- data/spec/features/admin/orders/customer_details_spec.rb +154 -0
- data/spec/features/admin/orders/line_items_spec.rb +51 -0
- data/spec/features/admin/orders/listing_spec.rb +224 -0
- data/spec/features/admin/orders/log_entries_spec.rb +55 -0
- data/spec/features/admin/orders/new_order_spec.rb +186 -0
- data/spec/features/admin/orders/order_details_spec.rb +662 -0
- data/spec/features/admin/orders/payments_spec.rb +231 -0
- data/spec/features/admin/orders/risk_analysis_spec.rb +48 -0
- data/spec/features/admin/orders/shipments_spec.rb +64 -0
- data/spec/features/admin/orders/state_changes_spec.rb +21 -0
- data/spec/features/admin/products/edit/images_spec.rb +86 -0
- data/spec/features/admin/products/edit/products_spec.rb +64 -0
- data/spec/features/admin/products/edit/taxons_spec.rb +41 -0
- data/spec/features/admin/products/edit/variants_spec.rb +56 -0
- data/spec/features/admin/products/option_types_spec.rb +114 -0
- data/spec/features/admin/products/products_spec.rb +445 -0
- data/spec/features/admin/products/properties_spec.rb +147 -0
- data/spec/features/admin/products/prototypes_spec.rb +112 -0
- data/spec/features/admin/products/stock_management_spec.rb +124 -0
- data/spec/features/admin/products/taxonomies_spec.rb +52 -0
- data/spec/features/admin/products/variant_spec.rb +50 -0
- data/spec/features/admin/promotions/adjustments_spec.rb +259 -0
- data/spec/features/admin/promotions/option_value_rule_spec.rb +70 -0
- data/spec/features/admin/promotions/tiered_calculator_spec.rb +70 -0
- data/spec/features/admin/refund_reasons/refund_reasons_spec.rb +57 -0
- data/spec/features/admin/reimbursement_type/edit_reimbursement_type_spec.rb +36 -0
- data/spec/features/admin/reimbursement_type/new_reimbursement_type_spec.rb +62 -0
- data/spec/features/admin/reports_spec.rb +61 -0
- data/spec/features/admin/return_authorization_reasons/return_authorization_reasons_spec.rb +63 -0
- data/spec/features/admin/returns/customer_returns_spec.rb +80 -0
- data/spec/features/admin/returns/return_authorizations_spec.rb +152 -0
- data/spec/features/admin/stock_transfer_spec.rb +75 -0
- data/spec/features/admin/store_credits_spec.rb +93 -0
- data/spec/features/admin/taxons_spec.rb +47 -0
- data/spec/features/admin/users_spec.rb +286 -0
- data/spec/helpers/admin/base_helper_spec.rb +30 -0
- data/spec/helpers/admin/navigation_helper_spec.rb +111 -0
- data/spec/helpers/admin/promotion_rules_helper_spec.rb +12 -0
- data/spec/helpers/admin/stock_movements_helper_spec.rb +30 -0
- data/spec/models/spree/resource_spec.rb +48 -0
- data/spec/routing/admin_path_spec.rb +22 -0
- data/spec/spec_helper.rb +144 -0
- data/spec/support/appear_before_matcher.rb +8 -0
- data/spec/support/ror_ringer.jpeg +0 -0
- data/spec/test_views/spree/admin/submodule/posts/edit.html.erb +1 -0
- data/spec/test_views/spree/admin/submodule/posts/new.html.erb +1 -0
- data/spec/test_views/spree/admin/widgets/edit.html.erb +1 -0
- data/spec/test_views/spree/admin/widgets/new.html.erb +1 -0
- data/spree_backend.gemspec +4 -3
- data/vendor/assets/javascripts/jquery.jstree/jquery.jstree.js +130 -154
- metadata +114 -34
- data/app/assets/images/admin/payment_banner.png +0 -0
- data/app/assets/images/admin/progress.gif +0 -0
- data/app/assets/javascripts/spree/backend/nested-attribute.js +0 -27
- data/app/assets/javascripts/spree/backend/orders/edit_form.js +0 -21
- data/app/assets/stylesheets/spree/backend/components/_variables.scss +0 -12
- data/app/assets/stylesheets/spree/backend/plugins/_js_tree.scss +0 -0
- data/app/assets/stylesheets/spree/backend/shared/_typography.scss +0 -5
- data/app/controllers/spree/admin/root_controller.rb +0 -18
- data/app/controllers/spree/admin/search_controller.rb +0 -41
- data/app/helpers/spree/admin/inventory_settings_helper.rb +0 -9
- data/app/helpers/spree/admin/products_helper.rb +0 -29
- data/app/helpers/spree/admin/tables_helper.rb +0 -15
- data/app/helpers/spree/promotion_rules_helper.rb +0 -13
- data/app/views/spree/admin/inventory_units/adjust.html.erb +0 -29
- data/app/views/spree/admin/orders/_line_item.html.erb +0 -21
- data/app/views/spree/admin/refund_reasons/destroy.js.erb +0 -1
- data/app/views/spree/admin/return_authorization_reasons/destroy.js.erb +0 -1
- data/app/views/spree/admin/search/products.rabl +0 -9
- data/app/views/spree/admin/search/users.rabl +0 -30
- data/app/views/spree/admin/stock_movements/edit.html.erb +0 -17
@@ -69,14 +69,6 @@
|
|
69
69
|
<% end %>
|
70
70
|
</div>
|
71
71
|
|
72
|
-
<div data-hook="admin_product_form_promotionable">
|
73
|
-
<%= f.field_container :promotionable, class: ['form-group'] do %>
|
74
|
-
<%= f.label :promotionable, Spree.t(:promotionable) %>
|
75
|
-
<%= f.error_message_on :promotionable %>
|
76
|
-
<%= f.check_box :promotionable, class: 'form-control' %>
|
77
|
-
<% end %>
|
78
|
-
</div>
|
79
|
-
|
80
72
|
<% if @product.has_variants? %>
|
81
73
|
<div data-hook="admin_product_form_multiple_variants" class="well">
|
82
74
|
<%= f.label :skus, Spree.t(:sku).pluralize %>
|
@@ -107,6 +99,14 @@
|
|
107
99
|
<% end %>
|
108
100
|
</div>
|
109
101
|
|
102
|
+
<div data-hook="admin_product_form_promotionable">
|
103
|
+
<%= f.field_container :promotionable, class: ['form-group'] do %>
|
104
|
+
<%= f.label :promotionable, Spree.t(:promotionable) %>
|
105
|
+
<%= f.error_message_on :promotionable %>
|
106
|
+
<%= f.check_box :promotionable, class: 'form-control' %>
|
107
|
+
<% end %>
|
108
|
+
</div>
|
109
|
+
|
110
110
|
<div id="shipping_specs" class="row">
|
111
111
|
<div class="col-md-6">
|
112
112
|
<div id="shipping_specs_weight_field" data-hook="admin_product_form_weight" class="form-group">
|
@@ -195,6 +195,12 @@
|
|
195
195
|
<% end %>
|
196
196
|
</div>
|
197
197
|
|
198
|
+
<div data-hook="admin_product_form_tag_list">
|
199
|
+
<%= f.field_container :tag_list, class: ['form-group'] do %>
|
200
|
+
<%= f.label :tag_list, Spree.t(:tags) %>
|
201
|
+
<%= f.hidden_field :tag_list, value: @product.tag_list.join(','), class: 'tag_picker' %>
|
202
|
+
<% end %>
|
203
|
+
</div>
|
198
204
|
|
199
205
|
<div data-hook="admin_product_form_meta">
|
200
206
|
<div data-hook="admin_product_form_meta_title">
|
@@ -5,6 +5,6 @@
|
|
5
5
|
<% f.fields_for :product_properties do |properties_form| %>
|
6
6
|
<div data-hook="value">
|
7
7
|
<%= properties_form.label :value, properties_form.object.property.presentation %>
|
8
|
-
<%= properties_form.text_field :value, :
|
8
|
+
<%= properties_form.text_field :value, class: "form-control" %>
|
9
9
|
</div>
|
10
10
|
<% end %>
|
@@ -3,38 +3,38 @@
|
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<% content_for :page_actions do %>
|
6
|
-
<%= button_link_to Spree.t(:new_product), new_object_url, { :
|
6
|
+
<%= button_link_to Spree.t(:new_product), new_object_url, { class: "btn-success", icon: 'add', id: 'admin_new_product' } %>
|
7
7
|
<% end if can?(:create, Spree::Product) %>
|
8
8
|
|
9
9
|
<% content_for :table_filter do %>
|
10
10
|
<div data-hook="admin_products_sidebar">
|
11
11
|
|
12
12
|
<%= search_form_for [:admin, @search] do |f| %>
|
13
|
-
<%- locals = {:
|
13
|
+
<%- locals = {f: f} %>
|
14
14
|
<div data-hook="admin_products_index_search" class="row">
|
15
15
|
<div class="col-md-6">
|
16
16
|
<div class="form-group">
|
17
17
|
<%= f.label :name_cont, Spree.t(:name) %>
|
18
|
-
<%= f.text_field :name_cont, :
|
18
|
+
<%= f.text_field :name_cont, size: 15, class: "form-control js-quick-search-target" %>
|
19
19
|
</div>
|
20
20
|
</div>
|
21
21
|
<div class="col-md-6">
|
22
22
|
<div class="form-group">
|
23
23
|
<%= f.label :variants_including_master_sku_cont, Spree.t(:sku) %>
|
24
|
-
<%= f.text_field :variants_including_master_sku_cont, :
|
24
|
+
<%= f.text_field :variants_including_master_sku_cont, size: 15, class: "form-control" %>
|
25
25
|
</div>
|
26
26
|
</div>
|
27
27
|
<div class="col-md-12">
|
28
28
|
<div class="field checkbox">
|
29
29
|
<label>
|
30
|
-
<%= f.check_box :deleted_at_null, {:
|
30
|
+
<%= f.check_box :deleted_at_null, {checked: params[:q][:deleted_at_null] == '0'}, '0', '1' %>
|
31
31
|
<%= Spree.t(:show_deleted) %>
|
32
32
|
</label>
|
33
33
|
</div>
|
34
34
|
|
35
35
|
<div class="field checkbox">
|
36
36
|
<label>
|
37
|
-
<%= f.check_box :
|
37
|
+
<%= f.check_box :discontinue_on_null, {checked: params[:q][:discontinue_on_null] == '0'}, '0', '1' %>
|
38
38
|
<%= Spree.t(:show_discontinued ) %>
|
39
39
|
</label>
|
40
40
|
</div>
|
@@ -1,56 +1,56 @@
|
|
1
|
-
<%= render :
|
1
|
+
<%= render partial: 'spree/admin/shared/error_messages', locals: { target: @product } %>
|
2
2
|
|
3
3
|
<% content_for :page_title do %>
|
4
4
|
<%= link_to Spree.t(:products), spree.admin_products_url %> /
|
5
5
|
<%= Spree.t(:new_product) %>
|
6
6
|
<% end %>
|
7
7
|
|
8
|
-
<%= form_for [:admin, @product], :
|
8
|
+
<%= form_for [:admin, @product], html: { multipart: true } do |f| %>
|
9
9
|
<fieldset data-hook="new_product">
|
10
|
-
<%= f.field_container :name, :
|
10
|
+
<%= f.field_container :name, class: ['form-group'] do %>
|
11
11
|
<%= f.label :name, Spree.t(:name) %> <span class="required">*</span>
|
12
|
-
<%= f.text_field :name, :
|
12
|
+
<%= f.text_field :name, class: 'form-control title' %>
|
13
13
|
<%= f.error_message_on :name %>
|
14
14
|
<% end %>
|
15
15
|
|
16
16
|
<div data-hook="new_product_attrs" class="row">
|
17
17
|
<% unless @product.has_variants? %>
|
18
18
|
<div data-hook="new_product_sku" class="col-md-4">
|
19
|
-
<%= f.field_container :sku, :
|
19
|
+
<%= f.field_container :sku, class: ['form-group'] do %>
|
20
20
|
<%= f.label :sku, Spree.t(:sku) %>
|
21
|
-
<%= f.text_field :sku, :
|
21
|
+
<%= f.text_field :sku, size: 16, class: 'form-control' %>
|
22
22
|
<%= f.error_message_on :sku %>
|
23
23
|
<% end %>
|
24
24
|
</div>
|
25
25
|
<% end %>
|
26
26
|
|
27
27
|
<div data-hook="new_product_prototype" class="col-md-4">
|
28
|
-
<%= f.field_container :prototype, :
|
28
|
+
<%= f.field_container :prototype, class: ['form-group'] do %>
|
29
29
|
<%= f.label :prototype_id, Spree.t(:prototype) %>
|
30
|
-
<%= f.collection_select :prototype_id, Spree::Prototype.all, :id, :name, {:
|
30
|
+
<%= f.collection_select :prototype_id, Spree::Prototype.all, :id, :name, {include_blank: true}, {class: 'select2'} %>
|
31
31
|
<% end %>
|
32
32
|
</div>
|
33
33
|
|
34
34
|
<div data-hook="new_product_price" class="col-md-4">
|
35
|
-
<%= f.field_container :price, :
|
35
|
+
<%= f.field_container :price, class: ['form-group'] do %>
|
36
36
|
<%= f.label :price, Spree.t(:master_price) %> <span class="required">*</span>
|
37
|
-
<%= f.text_field :price, :
|
37
|
+
<%= f.text_field :price, value: number_to_currency(@product.price, unit: ''), class: 'form-control' %>
|
38
38
|
<%= f.error_message_on :price %>
|
39
39
|
<% end %>
|
40
40
|
</div>
|
41
41
|
|
42
42
|
<div data-hook="new_product_available_on" class="col-md-4">
|
43
|
-
<%= f.field_container :available_on, :
|
43
|
+
<%= f.field_container :available_on, class: ['form-group'] do %>
|
44
44
|
<%= f.label :available_on, Spree.t(:available_on) %>
|
45
45
|
<%= f.error_message_on :available_on %>
|
46
|
-
<%= f.text_field :available_on, :
|
46
|
+
<%= f.text_field :available_on, class: 'datepicker form-control' %>
|
47
47
|
<% end %>
|
48
48
|
</div>
|
49
49
|
|
50
50
|
<div data-hook="new_product_shipping_category" class="col-md-4">
|
51
|
-
<%= f.field_container :shipping_category, :
|
51
|
+
<%= f.field_container :shipping_category, class: ['form-group'] do %>
|
52
52
|
<%= f.label :shipping_category_id, Spree.t(:shipping_categories) %><span class="required">*</span>
|
53
|
-
<%= f.collection_select(:shipping_category_id, @shipping_categories, :id, :name, { :
|
53
|
+
<%= f.collection_select(:shipping_category_id, @shipping_categories, :id, :name, { include_blank: Spree.t('match_choices.none') }, { class: 'select2' }) %>
|
54
54
|
<%= f.error_message_on :shipping_category_id %>
|
55
55
|
<% end %>
|
56
56
|
</div>
|
@@ -58,10 +58,10 @@
|
|
58
58
|
</div>
|
59
59
|
|
60
60
|
<div data-hook="product-from-prototype" id="product-from-prototype">
|
61
|
-
<%= render :
|
61
|
+
<%= render file: 'spree/admin/prototypes/show' if @prototype %>
|
62
62
|
</div>
|
63
63
|
|
64
|
-
<%= render :
|
64
|
+
<%= render partial: 'spree/admin/shared/new_resource_links' %>
|
65
65
|
|
66
66
|
</fieldset>
|
67
67
|
<% end %>
|
@@ -1,11 +1,11 @@
|
|
1
|
-
<%= render :
|
1
|
+
<%= render partial: 'spree/admin/shared/error_messages', locals: { target: @promotion_category } %>
|
2
2
|
|
3
3
|
<%= f.field_container :name, class: ['form-group'] do %>
|
4
4
|
<%= f.label :name %>
|
5
|
-
<%= f.text_field :name, :
|
5
|
+
<%= f.text_field :name, class: 'form-control' %>
|
6
6
|
<%= f.error_message_on :name %>
|
7
7
|
<% end %>
|
8
8
|
<%= f.field_container :code, class: ['form-group'] do %>
|
9
9
|
<%= f.label :code %>
|
10
|
-
<%= f.text_field :code, :
|
10
|
+
<%= f.text_field :code, class: 'form-control' %>
|
11
11
|
<% end %>
|
@@ -3,9 +3,9 @@
|
|
3
3
|
<%= @promotion_category.name %>
|
4
4
|
<% end %>
|
5
5
|
|
6
|
-
<%= form_for @promotion_category, :
|
6
|
+
<%= form_for @promotion_category, url: object_url, method: :put do |f| %>
|
7
7
|
<fieldset>
|
8
|
-
<%= render :
|
9
|
-
<%= render :
|
8
|
+
<%= render partial: 'form', locals: { f: f } %>
|
9
|
+
<%= render partial: 'spree/admin/shared/edit_resource_links' %>
|
10
10
|
</fieldset>
|
11
11
|
<% end %>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<% content_for :page_actions do %>
|
6
|
-
<%= button_link_to Spree.t(:new_promotion_category), new_object_url, :
|
6
|
+
<%= button_link_to Spree.t(:new_promotion_category), new_object_url, icon: 'add', class: 'btn-success' %>
|
7
7
|
<% end %>
|
8
8
|
|
9
9
|
<% if @promotion_categories.any? %>
|
@@ -19,8 +19,8 @@
|
|
19
19
|
<td><%= promotion_category.name %></td>
|
20
20
|
<td><%= promotion_category.code %></td>
|
21
21
|
<td class="actions actions-2 text-right">
|
22
|
-
<%= link_to_edit promotion_category, :
|
23
|
-
<%= link_to_delete promotion_category, :
|
22
|
+
<%= link_to_edit promotion_category, no_text: true %>
|
23
|
+
<%= link_to_delete promotion_category, no_text: true %>
|
24
24
|
</td>
|
25
25
|
</tr>
|
26
26
|
<% end %>
|
@@ -3,9 +3,9 @@
|
|
3
3
|
<%= Spree.t(:new_promotion_category) %>
|
4
4
|
<% end %>
|
5
5
|
|
6
|
-
<%= form_for :promotion_category, :
|
6
|
+
<%= form_for :promotion_category, url: collection_url do |f| %>
|
7
7
|
<fieldset>
|
8
|
-
<%= render :
|
9
|
-
<%= render :
|
8
|
+
<%= render partial: 'form', locals: { f: f } %>
|
9
|
+
<%= render partial: 'spree/admin/shared/new_resource_links' %>
|
10
10
|
</fieldset>
|
11
11
|
<% end %>
|
@@ -4,12 +4,12 @@
|
|
4
4
|
</h1>
|
5
5
|
</div>
|
6
6
|
<div id="action_fields" class="panel-body">
|
7
|
-
<%= form_tag spree.admin_promotion_promotion_actions_path(@promotion), :
|
7
|
+
<%= form_tag spree.admin_promotion_promotion_actions_path(@promotion), remote: true, id: 'new_promotion_action_form' do %>
|
8
8
|
<% options = options_for_select( Rails.application.config.spree.promotions.actions.map(&:name).map {|name| [ Spree.t("promotion_action_types.#{name.demodulize.underscore}.name"), name] } ) %>
|
9
9
|
|
10
10
|
<div class="form-group">
|
11
11
|
<%= label_tag :action_type, Spree.t(:add_action_of_type)%>
|
12
|
-
<%= select_tag 'action_type', options, :
|
12
|
+
<%= select_tag 'action_type', options, class: 'select2' %>
|
13
13
|
</div>
|
14
14
|
<div class="form-actions">
|
15
15
|
<%= button Spree.t(:add), 'plus', 'submit', class: "btn-success" %>
|
@@ -17,10 +17,10 @@
|
|
17
17
|
|
18
18
|
<% end %>
|
19
19
|
|
20
|
-
<%= form_for @promotion, :
|
20
|
+
<%= form_for @promotion, url: spree.admin_promotion_path(@promotion), method: :put do |f| %>
|
21
21
|
<div id="actions" class="filter_list margint">
|
22
22
|
<% if @promotion.actions.any? %>
|
23
|
-
<%= render :
|
23
|
+
<%= render partial: 'promotion_action', collection: @promotion.actions %>
|
24
24
|
<% else %>
|
25
25
|
<div class="alert alert-warning">
|
26
26
|
<%= Spree.t(:no_actions_added) %>
|
@@ -1,21 +1,21 @@
|
|
1
|
-
<%= render :
|
1
|
+
<%= render partial: 'spree/admin/shared/error_messages', locals: { target: @promotion } %>
|
2
2
|
|
3
3
|
<div class="row" id="general_fields" >
|
4
4
|
<div class="col-md-3">
|
5
5
|
<%= f.field_container :name, class: ['form-group'] do %>
|
6
6
|
<%= f.label :name %>
|
7
|
-
<%= f.text_field :name, :
|
7
|
+
<%= f.text_field :name, class: 'form-control' %>
|
8
8
|
<%= f.error_message_on :name %>
|
9
9
|
<% end %>
|
10
10
|
|
11
11
|
<%= f.field_container :code, class: ['form-group'] do %>
|
12
12
|
<%= f.label :code %>
|
13
|
-
<%= f.text_field :code, :
|
13
|
+
<%= f.text_field :code, class: 'form-control' %>
|
14
14
|
<% end %>
|
15
15
|
|
16
16
|
<%= f.field_container :path, class: ['form-group'] do %>
|
17
17
|
<%= f.label :path %>
|
18
|
-
<%= f.text_field :path, :
|
18
|
+
<%= f.text_field :path, class: 'form-control' %>
|
19
19
|
<% end %>
|
20
20
|
|
21
21
|
<%= f.field_container :advertise, class: ['checkbox'] do %>
|
@@ -29,32 +29,32 @@
|
|
29
29
|
<div class="col-md-6">
|
30
30
|
<%= f.field_container :description, class: ['form-group'] do %>
|
31
31
|
<%= f.label :description %>
|
32
|
-
<%= f.text_area :description, :
|
32
|
+
<%= f.text_area :description, rows: 7, class: 'form-control' %>
|
33
33
|
<% end %>
|
34
34
|
|
35
35
|
<%= f.field_container :category, class: ['form-group'] do %>
|
36
36
|
<%= f.label :promotion_category %>
|
37
|
-
<%= f.collection_select(:promotion_category_id, @promotion_categories, :id, :name, { :
|
37
|
+
<%= f.collection_select(:promotion_category_id, @promotion_categories, :id, :name, { include_blank: Spree.t('match_choices.none') }, { class: 'select2' }) %>
|
38
38
|
<% end %>
|
39
39
|
</div>
|
40
40
|
|
41
41
|
<div id="expiry_fields" class="col-md-3">
|
42
42
|
<%= f.field_container :usage_limit do %>
|
43
43
|
<%= f.label :usage_limit %>
|
44
|
-
<%= f.number_field :usage_limit, :
|
44
|
+
<%= f.number_field :usage_limit, min: 0, class: 'form-control' %>
|
45
45
|
<p class="help-block">
|
46
|
-
<%= Spree.t(:current_promotion_usage, :
|
46
|
+
<%= Spree.t(:current_promotion_usage, count: @promotion.credits_count) %>
|
47
47
|
</p>
|
48
48
|
<% end %>
|
49
49
|
|
50
50
|
<div id="starts_at_field" class="form-group">
|
51
51
|
<%= f.label :starts_at %>
|
52
|
-
<%= f.text_field :starts_at, :
|
52
|
+
<%= f.text_field :starts_at, value: datepicker_field_value(@promotion.starts_at), class: 'datepicker datepicker-from form-control' %>
|
53
53
|
</div>
|
54
54
|
|
55
55
|
<div id="expires_at_field" class="form-group">
|
56
56
|
<%= f.label :expires_at %>
|
57
|
-
<%= f.text_field :expires_at, :
|
57
|
+
<%= f.text_field :expires_at, value: datepicker_field_value(@promotion.expires_at), class: 'datepicker datepicker-to form-control' %>
|
58
58
|
</div>
|
59
59
|
</div>
|
60
60
|
</div>
|
@@ -7,5 +7,5 @@
|
|
7
7
|
<% param_prefix = "promotion[promotion_rules_attributes][#{promotion_rule.id}]" %>
|
8
8
|
<%= hidden_field_tag "#{param_prefix}[id]", promotion_rule.id %>
|
9
9
|
|
10
|
-
<%= render partial: "spree/admin/promotions/rules/#{type_name}", locals: { promotion_rule: promotion_rule, param_prefix: param_prefix }
|
10
|
+
<%= render partial: "spree/admin/promotions/rules/#{type_name}", locals: { promotion_rule: promotion_rule, param_prefix: param_prefix } %>
|
11
11
|
</div>
|
@@ -5,11 +5,11 @@
|
|
5
5
|
</div>
|
6
6
|
<div id="rule_fields" class="panel-body">
|
7
7
|
|
8
|
-
<%= form_tag spree.admin_promotion_promotion_rules_path(@promotion), :
|
8
|
+
<%= form_tag spree.admin_promotion_promotion_rules_path(@promotion), remote: true, id: 'new_product_rule_form' do %>
|
9
9
|
|
10
10
|
<div class="form-group">
|
11
11
|
<%= label_tag :promotion_rule_type, Spree.t(:add_rule_of_type) %>
|
12
|
-
<%= select_tag('promotion_rule[type]', options_for_promotion_rule_types(@promotion), :
|
12
|
+
<%= select_tag('promotion_rule[type]', options_for_promotion_rule_types(@promotion), class: 'select2') %>
|
13
13
|
</div>
|
14
14
|
<div class="form-actions">
|
15
15
|
<%= button Spree.t(:add), 'plus', 'submit', class: "btn-success" %>
|
@@ -17,7 +17,7 @@
|
|
17
17
|
|
18
18
|
<% end %>
|
19
19
|
|
20
|
-
<%= form_for @promotion, :
|
20
|
+
<%= form_for @promotion, url: object_url, method: :put do |f| %>
|
21
21
|
<div id="promotion-policy-select">
|
22
22
|
<% Spree::Promotion::MATCH_POLICIES.each do |policy| %>
|
23
23
|
<div class="radio">
|
@@ -31,7 +31,7 @@
|
|
31
31
|
|
32
32
|
<div id="rules" class="filter_list margint">
|
33
33
|
<% if @promotion.rules.any? %>
|
34
|
-
<%= render :
|
34
|
+
<%= render partial: 'promotion_rule', collection: @promotion.rules, locals: {} %>
|
35
35
|
<% else %>
|
36
36
|
<div class="alert alert-warning">
|
37
37
|
<%= Spree.t(:no_rules_added) %>
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<%= label_tag field_name, Spree.t(:calculator) %>
|
6
6
|
<%= select_tag field_name,
|
7
7
|
options_from_collection_for_select(@calculators, :to_s, :description, promotion_action.calculator.type),
|
8
|
-
:
|
8
|
+
class: 'type-select select2' %>
|
9
9
|
</div>
|
10
10
|
<% unless promotion_action.new_record? %>
|
11
11
|
<div class="form-group col-md-6 no-marginb settings">
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<%= label_tag field_name, Spree.t(:calculator) %>
|
6
6
|
<%= select_tag field_name,
|
7
7
|
options_from_collection_for_select(Spree::Promotion::Actions::CreateItemAdjustments.calculators, :to_s, :description, promotion_action.calculator.type),
|
8
|
-
:
|
8
|
+
class: 'type-select select2' %>
|
9
9
|
</div>
|
10
10
|
<% unless promotion_action.new_record? %>
|
11
11
|
<div class="form-group col-md-6 no-marginb settings">
|
@@ -14,7 +14,7 @@
|
|
14
14
|
<%= label_tag field_name, Spree.t(key.to_s) %>
|
15
15
|
<%= preference_field_tag(field_name,
|
16
16
|
promotion_action.calculator.get_preference(key),
|
17
|
-
:
|
17
|
+
type: promotion_action.calculator.preference_type(key)) %>
|
18
18
|
<% end %>
|
19
19
|
<%= hidden_field_tag "#{param_prefix}[calculator_attributes][id]", promotion_action.calculator.id %>
|
20
20
|
</div>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div class="panel-body calculator-fields">
|
2
2
|
<% promotion_action.promotion_action_line_items.each do |item| %>
|
3
|
-
<strong><%= item.quantity %> x <%= item.
|
3
|
+
<strong><%= item.quantity %> x <%= item.name %></strong>
|
4
4
|
<%= item.variant.options_text %>
|
5
5
|
<% end %>
|
6
6
|
|
@@ -3,11 +3,11 @@
|
|
3
3
|
<%= @promotion.name %>
|
4
4
|
<% end %>
|
5
5
|
|
6
|
-
<%= form_for @promotion, :
|
6
|
+
<%= form_for @promotion, url: object_url, method: :put do |f| %>
|
7
7
|
<div class="row">
|
8
8
|
<div class="col-md-12">
|
9
|
-
<%= render :
|
10
|
-
<%= render :
|
9
|
+
<%= render partial: 'form', locals: { f: f } %>
|
10
|
+
<%= render partial: 'spree/admin/shared/edit_resource_links' %>
|
11
11
|
</div>
|
12
12
|
</div>
|
13
13
|
|
@@ -16,15 +16,15 @@
|
|
16
16
|
<div id="promotion-filters" class="row">
|
17
17
|
<div id="rules_container" class="col-md-6">
|
18
18
|
<div class="panel panel-default">
|
19
|
-
<%= render :
|
19
|
+
<%= render partial: 'rules' %>
|
20
20
|
</div>
|
21
21
|
</div>
|
22
22
|
|
23
23
|
<div id="actions_container" class="col-md-6">
|
24
24
|
<div class="panel panel-default">
|
25
|
-
<%= render :
|
25
|
+
<%= render partial: 'actions' %>
|
26
26
|
</div>
|
27
27
|
</div>
|
28
28
|
</div>
|
29
29
|
|
30
|
-
<%= render :
|
30
|
+
<%= render partial: "spree/admin/variants/autocomplete", formats: [:js] %>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<% content_for :page_actions do %>
|
6
|
-
<%= button_link_to Spree.t(:new_promotion), new_object_url, :
|
6
|
+
<%= button_link_to Spree.t(:new_promotion), new_object_url, class: "btn-success", icon: 'add' %>
|
7
7
|
<% end %>
|
8
8
|
|
9
9
|
<% content_for :table_filter do %>
|
@@ -30,7 +30,7 @@
|
|
30
30
|
|
31
31
|
<div class="form-group">
|
32
32
|
<%= label_tag :q_promotion_category_id_eq, Spree.t(:promotion_category) %>
|
33
|
-
<%= f.collection_select(:promotion_category_id_eq, @promotion_categories, :id, :name, { :
|
33
|
+
<%= f.collection_select(:promotion_category_id_eq, @promotion_categories, :id, :name, { include_blank: Spree.t('match_choices.all') }, { class: 'select2' }) %>
|
34
34
|
</div>
|
35
35
|
</div>
|
36
36
|
</div>
|
@@ -64,11 +64,11 @@
|
|
64
64
|
<td><%= promotion.code %></td>
|
65
65
|
<td><%= promotion.description %></td>
|
66
66
|
<td><%= promotion.usage_limit.nil? ? "∞" : promotion.usage_limit %></td>
|
67
|
-
<td><%= Spree.t(:current_promotion_usage, :
|
67
|
+
<td><%= Spree.t(:current_promotion_usage, count: promotion.credits_count) %></td>
|
68
68
|
<td><%= promotion.expires_at.to_date.to_s(:short_date) if promotion.expires_at %></td>
|
69
69
|
<td class="actions actions-2">
|
70
|
-
<%= link_to_edit promotion, :
|
71
|
-
<%= link_to_delete promotion, :
|
70
|
+
<%= link_to_edit promotion, no_text: true %>
|
71
|
+
<%= link_to_delete promotion, no_text: true %>
|
72
72
|
</td>
|
73
73
|
</tr>
|
74
74
|
<% end %>
|
@@ -3,9 +3,9 @@
|
|
3
3
|
<%= Spree.t(:new_promotion) %>
|
4
4
|
<% end %>
|
5
5
|
|
6
|
-
<%= form_for :promotion, :
|
7
|
-
<%= render :
|
6
|
+
<%= form_for :promotion, url: collection_url do |f| %>
|
7
|
+
<%= render partial: 'form', locals: { f: f } %>
|
8
8
|
<div class="text-center">
|
9
|
-
<%= render :
|
9
|
+
<%= render partial: 'spree/admin/shared/new_resource_links' %>
|
10
10
|
</div>
|
11
11
|
<% end %>
|
@@ -0,0 +1,6 @@
|
|
1
|
+
<div class="panel-body">
|
2
|
+
<div class="form-group no-marginb">
|
3
|
+
<%= label_tag Spree.t('country_rule.label') %>
|
4
|
+
<%= select_tag("#{param_prefix}[preferred_country_id]", options_for_select(Spree::Country.pluck(:name, :id), promotion_rule.preferred_country_id), { class: 'select_product form-control' }) %>
|
5
|
+
</div>
|
6
|
+
</div>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<div class="panel-body">
|
2
2
|
<div class="form-group">
|
3
3
|
<label for="<%= "#{param_prefix}_preferred_path" %>"><%= Spree.t('promotion_rule_types.landing_page.description') %>:</label>
|
4
|
-
<%= text_field_tag "#{param_prefix}[preferred_path]", promotion_rule.preferred_path, :
|
4
|
+
<%= text_field_tag "#{param_prefix}[preferred_path]", promotion_rule.preferred_path, class: 'form-control' %>
|
5
5
|
<p class="help-block">
|
6
6
|
<%= Spree.t('landing_page_rule.must_have_visited_path') %>
|
7
7
|
</p>
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<div class="panel-body">
|
2
2
|
<div class="form-group products_rule_products">
|
3
3
|
<%= label_tag "#{param_prefix}_product_ids_string", Spree.t('product_rule.choose_products') %>
|
4
|
-
<%= hidden_field_tag "#{param_prefix}[product_ids_string]", promotion_rule.product_ids.join(","), :
|
4
|
+
<%= hidden_field_tag "#{param_prefix}[product_ids_string]", promotion_rule.product_ids.join(","), class: "product_picker" %>
|
5
5
|
</div>
|
6
6
|
<div class="form-group no-marginb">
|
7
7
|
<%= label_tag Spree.t('product_rule.label') %>
|
8
|
-
<%= select_tag("#{param_prefix}[preferred_match_policy]", options_for_select(Spree::Promotion::Rules::Product::MATCH_POLICIES.map{|s| [Spree.t("product_rule.match_#{s}"),s] }, promotion_rule.preferred_match_policy), {:
|
8
|
+
<%= select_tag("#{param_prefix}[preferred_match_policy]", options_for_select(Spree::Promotion::Rules::Product::MATCH_POLICIES.map{|s| [Spree.t("product_rule.match_#{s}"),s] }, promotion_rule.preferred_match_policy), {class: 'select_product form-control'}) %>
|
9
9
|
</div>
|
10
10
|
</div>
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<div class="panel-body">
|
2
2
|
<div class="form-group taxons_rule_taxons">
|
3
3
|
<%= label_tag "#{param_prefix}_taxon_ids_string", Spree.t('taxon_rule.choose_taxons') %>
|
4
|
-
<%= hidden_field_tag "#{param_prefix}[taxon_ids_string]", promotion_rule.taxon_ids.join(","), :
|
4
|
+
<%= hidden_field_tag "#{param_prefix}[taxon_ids_string]", promotion_rule.taxon_ids.join(","), class: "taxon_picker", id: 'product_taxon_ids' %>
|
5
5
|
</div>
|
6
6
|
<div class="form-group no-marginb">
|
7
7
|
<%= label_tag Spree.t('taxon_rule.label') %>
|
8
|
-
<%= select_tag("#{param_prefix}[preferred_match_policy]", options_for_select(Spree::Promotion::Rules::Taxon::MATCH_POLICIES.map{|s| [Spree.t("taxon_rule.match_#{s}"),s] }, promotion_rule.preferred_match_policy), {:
|
8
|
+
<%= select_tag("#{param_prefix}[preferred_match_policy]", options_for_select(Spree::Promotion::Rules::Taxon::MATCH_POLICIES.map{|s| [Spree.t("taxon_rule.match_#{s}"),s] }, promotion_rule.preferred_match_policy), {class: 'select_taxon form-control'}) %>
|
9
9
|
</div>
|
10
10
|
</div>
|
@@ -2,14 +2,14 @@
|
|
2
2
|
<div class="col-md-6">
|
3
3
|
<%= f.field_container :name, class: ['form-group'] do %>
|
4
4
|
<%= f.label :name, Spree.t(:name) %> <span class="required">*</span>
|
5
|
-
<%= f.text_field :name, :
|
5
|
+
<%= f.text_field :name, class: 'form-control' %>
|
6
6
|
<%= f.error_message_on :name %>
|
7
7
|
<% end %>
|
8
8
|
</div>
|
9
9
|
<div class="col-md-6">
|
10
10
|
<%= f.field_container :presentation, class: ['form-group'] do %>
|
11
11
|
<%= f.label :presentation, Spree.t(:presentation) %> <span class="required">*</span>
|
12
|
-
<%= f.text_field :presentation, :
|
12
|
+
<%= f.text_field :presentation, class: 'form-control' %>
|
13
13
|
<%= f.error_message_on :presentation %>
|
14
14
|
<% end %>
|
15
15
|
</div>
|
@@ -3,11 +3,11 @@
|
|
3
3
|
<%= @property.name %>
|
4
4
|
<% end %>
|
5
5
|
|
6
|
-
<%= render :
|
6
|
+
<%= render partial: 'spree/admin/shared/error_messages', locals: { target: @property } %>
|
7
7
|
|
8
8
|
<%= form_for [:admin, @property] do |f| %>
|
9
9
|
<fieldset>
|
10
|
-
<%= render :
|
11
|
-
<%= render :
|
10
|
+
<%= render partial: 'form', locals: { f: f } %>
|
11
|
+
<%= render partial: 'spree/admin/shared/edit_resource_links' %>
|
12
12
|
</fieldset>
|
13
13
|
<% end %>
|