solidus_backend 2.7.4 → 2.9.2
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 +12 -8
- data/app/assets/images/favicon.ico +0 -0
- data/app/assets/javascripts/spree/backend.js +0 -2
- data/app/assets/javascripts/spree/backend/adjustments.js +1 -1
- data/app/assets/javascripts/spree/backend/components/sortable_table.js +1 -0
- data/app/assets/javascripts/spree/backend/components/tabs.js +1 -0
- data/app/assets/javascripts/spree/backend/components/tooltips.js +21 -17
- data/app/assets/javascripts/spree/backend/option_type_autocomplete.js +1 -1
- data/app/assets/javascripts/spree/backend/product_picker.js +1 -1
- data/app/assets/javascripts/spree/backend/shipments.js +7 -1
- data/app/assets/javascripts/spree/backend/stock_management.js +18 -0
- data/app/assets/javascripts/spree/backend/store_credits.js +18 -2
- data/app/assets/javascripts/spree/backend/taxons.js +1 -1
- data/app/assets/javascripts/spree/backend/templates/orders/line_item.hbs +1 -1
- data/app/assets/javascripts/spree/backend/templates/stock_items/stock_location_stock_item.hbs +24 -25
- data/app/assets/javascripts/spree/backend/user_picker.js +1 -1
- data/app/assets/javascripts/spree/backend/variant_autocomplete.js +1 -1
- data/app/assets/javascripts/spree/backend/views/order/customer_select.js +1 -1
- data/app/assets/javascripts/spree/backend/views/order/summary.js +2 -2
- data/app/assets/javascripts/spree/backend/views/stock/add_stock_item.js +15 -4
- data/app/assets/javascripts/spree/backend/views/stock/edit_stock_item_row.js +46 -10
- data/app/assets/stylesheets/spree/backend/_bootstrap_custom.scss +24 -16
- data/app/assets/stylesheets/spree/backend/components/_breadcrumb.scss +12 -0
- data/app/assets/stylesheets/spree/backend/components/_buttons.scss +18 -0
- data/app/assets/stylesheets/spree/backend/components/_image_placeholder.scss +2 -2
- data/app/assets/stylesheets/spree/backend/components/_list_group.scss +2 -2
- data/app/assets/stylesheets/spree/backend/components/_messages.scss +20 -12
- data/app/assets/stylesheets/spree/backend/components/_navigation.scss +45 -11
- data/app/assets/stylesheets/spree/backend/components/_progress.scss +3 -3
- data/app/assets/stylesheets/spree/backend/components/_sidebar.scss +1 -2
- data/app/assets/stylesheets/spree/backend/components/_tabs.scss +14 -13
- data/app/assets/stylesheets/spree/backend/globals/_deprecated_variables.scss +24 -0
- data/app/assets/stylesheets/spree/backend/globals/_deprecation.scss +10 -1
- data/app/assets/stylesheets/spree/backend/globals/_functions.scss +2 -0
- data/app/assets/stylesheets/spree/backend/globals/_variables.scss +88 -57
- data/app/assets/stylesheets/spree/backend/globals/_variables_override.scss +1 -0
- data/app/assets/stylesheets/spree/backend/globals/mixins/_caret.scss +1 -1
- data/app/assets/stylesheets/spree/backend/globals/mixins/_line_through.scss +1 -1
- data/app/assets/stylesheets/spree/backend/sections/_log_entries.scss +8 -2
- data/app/assets/stylesheets/spree/backend/sections/_orders.scss +25 -6
- data/app/assets/stylesheets/spree/backend/sections/_products.scss +3 -1
- data/app/assets/stylesheets/spree/backend/sections/_promotions.scss +5 -5
- data/app/assets/stylesheets/spree/backend/sections/_stock_management.scss +77 -2
- data/app/assets/stylesheets/spree/backend/sections/_style_guide.scss +4 -4
- data/app/assets/stylesheets/spree/backend/sections/_taxonomies.scss +1 -1
- data/app/assets/stylesheets/spree/backend/shared/_fonts.scss +15 -0
- data/app/assets/stylesheets/spree/backend/shared/_forms.scss +27 -7
- data/app/assets/stylesheets/spree/backend/shared/_header.scss +2 -2
- data/app/assets/stylesheets/spree/backend/shared/_icons.scss +5 -1
- data/app/assets/stylesheets/spree/backend/shared/_layout.scss +5 -4
- data/app/assets/stylesheets/spree/backend/shared/_tables.scss +11 -6
- data/app/assets/stylesheets/spree/backend/shared/_typography.scss +10 -6
- data/app/assets/stylesheets/spree/backend/spree_admin.scss +3 -1
- data/app/controllers/spree/admin/cancellations_controller.rb +2 -2
- data/app/controllers/spree/admin/customer_returns_controller.rb +8 -1
- data/app/controllers/spree/admin/locale_controller.rb +1 -1
- data/app/controllers/spree/admin/log_entries_controller.rb +3 -0
- data/app/controllers/spree/admin/orders/customer_details_controller.rb +8 -1
- data/app/controllers/spree/admin/orders_controller.rb +1 -12
- data/app/controllers/spree/admin/products_controller.rb +10 -6
- data/app/controllers/spree/admin/promotion_codes_controller.rb +19 -1
- data/app/controllers/spree/admin/promotions_controller.rb +1 -1
- data/app/controllers/spree/admin/reimbursements_controller.rb +7 -2
- data/app/controllers/spree/admin/resource_controller.rb +1 -0
- data/app/controllers/spree/admin/store_credit_reasons_controller.rb +8 -0
- data/app/controllers/spree/admin/store_credits_controller.rb +11 -11
- data/app/controllers/spree/admin/users_controller.rb +4 -2
- data/app/helpers/spree/admin/base_helper.rb +9 -3
- data/app/helpers/spree/admin/navigation_helper.rb +1 -1
- data/app/helpers/spree/admin/promotions_helper.rb +15 -0
- data/app/models/spree/backend_configuration.rb +38 -21
- data/app/views/spree/admin/cancellations/index.html.erb +3 -1
- data/app/views/spree/admin/images/_image_row.html.erb +1 -1
- data/app/views/spree/admin/images/edit.html.erb +3 -3
- data/app/views/spree/admin/images/index.html.erb +3 -3
- data/app/views/spree/admin/log_entries/index.html.erb +1 -19
- data/app/views/spree/admin/option_types/edit.html.erb +1 -1
- data/app/views/spree/admin/orders/_carton_manifest.html.erb +3 -1
- data/app/views/spree/admin/orders/_line_items_edit_form.html.erb +1 -1
- data/app/views/spree/admin/orders/_shipment_manifest.html.erb +3 -1
- data/app/views/spree/admin/orders/confirm/_line_items.html.erb +3 -2
- data/app/views/spree/admin/orders/confirm/_shipment_manifest.html.erb +3 -1
- data/app/views/spree/admin/orders/index.html.erb +1 -1
- data/app/views/spree/admin/payments/_capture_events.html.erb +15 -18
- data/app/views/spree/admin/payments/_list.html.erb +1 -1
- data/app/views/spree/admin/payments/_log_entries.html.erb +29 -0
- data/app/views/spree/admin/payments/show.html.erb +13 -6
- data/app/views/spree/admin/payments/source_forms/{_storecredit.html.erb → _store_credit.html.erb} +0 -0
- data/app/views/spree/admin/payments/source_views/{_storecredit.html.erb → _store_credit.html.erb} +0 -0
- data/app/views/spree/admin/prices/_form.html.erb +1 -1
- data/app/views/spree/admin/product_properties/index.html.erb +1 -1
- data/app/views/spree/admin/products/_form.html.erb +23 -12
- data/app/views/spree/admin/products/edit.html.erb +5 -0
- data/app/views/spree/admin/products/index.html.erb +3 -1
- data/app/views/spree/admin/promotion_categories/index.html.erb +1 -1
- data/app/views/spree/admin/promotion_code_batches/index.html.erb +1 -1
- data/app/views/spree/admin/promotion_codes/index.html.erb +5 -1
- data/app/views/spree/admin/promotion_codes/new.html.erb +31 -0
- data/app/views/spree/admin/promotions/_actions.html.erb +1 -1
- data/app/views/spree/admin/promotions/_activations_edit.html.erb +1 -1
- data/app/views/spree/admin/promotions/_form.html.erb +6 -5
- data/app/views/spree/admin/promotions/_rules.html.erb +1 -1
- data/app/views/spree/admin/promotions/edit.html.erb +3 -1
- data/app/views/spree/admin/promotions/index.html.erb +4 -4
- data/app/views/spree/admin/refunds/new.html.erb +1 -1
- data/app/views/spree/admin/reimbursements/edit.html.erb +2 -2
- data/app/views/spree/admin/shared/_address_form.html.erb +10 -3
- data/app/views/spree/admin/shared/_edit_resource_links.html.erb +1 -1
- data/app/views/spree/admin/shared/_head.html.erb +1 -3
- data/app/views/spree/admin/shared/_image.html.erb +2 -2
- data/app/views/spree/admin/shared/_modal.html.erb +1 -1
- data/app/views/spree/admin/shared/_product_sub_menu.html.erb +1 -1
- data/app/views/spree/admin/shared/_settings_checkout_tabs.html.erb +4 -0
- data/app/views/spree/admin/shared/_settings_sub_menu.html.erb +3 -3
- data/app/views/spree/admin/shared/_tabs.html.erb +3 -2
- data/app/views/spree/admin/shared/_variant_search.html.erb +1 -1
- data/app/views/spree/admin/shipping_methods/_form.html.erb +10 -10
- data/app/views/spree/admin/stock_items/_stock_management.html.erb +56 -38
- data/app/views/spree/admin/stock_locations/_form.html.erb +133 -121
- data/app/views/spree/admin/stock_locations/edit.html.erb +4 -2
- data/app/views/spree/admin/store_credit_reasons/edit.html.erb +15 -0
- data/app/views/spree/admin/store_credit_reasons/index.html.erb +56 -0
- data/app/views/spree/admin/store_credit_reasons/new.html.erb +18 -0
- data/app/views/spree/admin/store_credit_reasons/shared/_form.html.erb +15 -0
- data/app/views/spree/admin/store_credits/_store_credit_reason_field.html.erb +7 -0
- data/app/views/spree/admin/store_credits/edit_amount.html.erb +1 -1
- data/app/views/spree/admin/store_credits/edit_validity.html.erb +2 -2
- data/app/views/spree/admin/store_credits/index.html.erb +1 -1
- data/app/views/spree/admin/store_credits/show.html.erb +3 -3
- data/app/views/spree/admin/stores/_form.html.erb +1 -0
- data/app/views/spree/admin/style_guide/topics/typography/_colors.html.erb +30 -20
- data/app/views/spree/admin/style_guide/topics/typography/_fonts.html.erb +1 -1
- data/app/views/spree/admin/taxonomies/edit.html.erb +1 -1
- data/app/views/spree/admin/taxons/_form.html.erb +1 -1
- data/app/views/spree/admin/taxons/edit.html.erb +2 -2
- data/app/views/spree/admin/users/edit.html.erb +2 -2
- data/app/views/spree/admin/users/index.html.erb +2 -2
- data/app/views/spree/admin/users/items.html.erb +3 -1
- data/app/views/spree/admin/users/orders.html.erb +1 -1
- data/app/views/spree/admin/variants/_form.html.erb +1 -1
- data/app/views/spree/admin/variants/index.html.erb +1 -1
- data/app/views/spree/admin/zones/_state_members.html.erb +1 -1
- data/config/routes.rb +2 -8
- data/lib/spree/backend.rb +1 -1
- data/solidus_backend.gemspec +3 -4
- data/spec/controllers/spree/admin/base_controller_spec.rb +1 -1
- data/spec/controllers/spree/admin/cancellations_controller_spec.rb +7 -3
- data/spec/controllers/spree/admin/locale_controller_spec.rb +45 -0
- data/spec/controllers/spree/admin/orders/customer_details_controller_spec.rb +50 -2
- data/spec/controllers/spree/admin/orders_controller_spec.rb +25 -13
- data/spec/controllers/spree/admin/payments_controller_spec.rb +1 -1
- data/spec/controllers/spree/admin/products_controller_spec.rb +72 -0
- data/spec/controllers/spree/admin/promotion_codes_controller_spec.rb +13 -1
- data/spec/controllers/spree/admin/reimbursements_controller_spec.rb +11 -0
- data/spec/controllers/spree/admin/resource_controller_spec.rb +22 -0
- data/spec/controllers/spree/admin/stock_items_controller_spec.rb +1 -1
- data/spec/controllers/spree/admin/stock_locations_controller_spec.rb +1 -1
- data/spec/controllers/spree/admin/store_credits_controller_spec.rb +7 -7
- data/spec/features/admin/configuration/payment_methods_spec.rb +2 -2
- data/spec/features/admin/configuration/shipping_methods_spec.rb +2 -2
- data/spec/features/admin/homepage_spec.rb +1 -6
- data/spec/features/admin/locale_spec.rb +1 -2
- data/spec/features/admin/orders/adjustments_spec.rb +1 -1
- data/spec/features/admin/orders/customer_details_spec.rb +5 -7
- data/spec/features/admin/orders/customer_returns_spec.rb +28 -0
- data/spec/features/admin/orders/listing_spec.rb +2 -7
- data/spec/features/admin/orders/log_entries_spec.rb +2 -2
- data/spec/features/admin/orders/new_order_spec.rb +117 -0
- data/spec/features/admin/orders/new_refund_spec.rb +35 -0
- data/spec/features/admin/orders/order_details_spec.rb +10 -5
- data/spec/features/admin/orders/payments_spec.rb +82 -41
- data/spec/features/admin/orders/return_payment_state_spec.rb +3 -0
- data/spec/features/admin/orders/shipments_spec.rb +28 -0
- data/spec/features/admin/products/edit/products_spec.rb +25 -0
- data/spec/features/admin/products/edit/taxons_spec.rb +4 -0
- data/spec/features/admin/products/pricing_spec.rb +24 -6
- data/spec/features/admin/products/products_spec.rb +5 -5
- data/spec/features/admin/products/stock_management_spec.rb +27 -13
- data/spec/features/admin/products/variant_spec.rb +1 -1
- data/spec/features/admin/promotion_adjustments_spec.rb +12 -12
- data/spec/features/admin/promotions/option_value_rule_spec.rb +2 -2
- data/spec/features/admin/promotions/product_rule_spec.rb +1 -1
- data/spec/features/admin/promotions/promotion_spec.rb +52 -0
- data/spec/features/admin/promotions/tiered_calculator_spec.rb +1 -1
- data/spec/features/admin/promotions/user_rule_spec.rb +2 -2
- data/spec/features/admin/reimbursements_spec.rb +1 -1
- data/spec/features/admin/store_credits_spec.rb +51 -2
- data/spec/features/admin/taxons_spec.rb +35 -0
- data/spec/features/admin/users_spec.rb +44 -11
- data/spec/helpers/admin/navigation_helper_spec.rb +4 -2
- data/spec/helpers/admin/store_credit_events_helper_spec.rb +2 -2
- data/spec/javascripts/spec_helper.js +2 -0
- data/spec/models/spree/backend_configuration/menu_item_spec.rb +17 -0
- data/spec/models/spree/backend_configuration_spec.rb +22 -0
- data/spec/spec_helper.rb +2 -2
- data/spec/support/appear_before_matcher.rb +1 -1
- data/spec/support/feature/order_feature_helper.rb +1 -1
- data/spec/views/spree/admin/shared/navigation_footer_spec.rb +1 -1
- data/vendor/assets/fonts/inter/Inter-Regular.woff +0 -0
- data/vendor/assets/fonts/inter/Inter-Regular.woff2 +0 -0
- data/vendor/assets/fonts/inter/Inter-SemiBold.woff +0 -0
- data/vendor/assets/fonts/inter/Inter-SemiBold.woff2 +0 -0
- data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_en-US.js +10 -0
- data/vendor/assets/stylesheets/solidus_admin/bootstrap/_pagination.scss +4 -0
- metadata +38 -36
- data/.eslintrc +0 -21
- data/app/controllers/spree/admin/reports_controller.rb +0 -82
- data/app/views/spree/admin/reports/index.html.erb +0 -19
- data/app/views/spree/admin/reports/sales_total.html.erb +0 -35
- data/app/views/spree/admin/shared/_report_order_criteria.html.erb +0 -19
- data/app/views/spree/admin/store_credits/_update_reason_field.html.erb +0 -7
- data/spec/controllers/spree/admin/reports_controller_spec.rb +0 -133
- data/spec/features/admin/reports_spec.rb +0 -63
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
<% if can?(:update, @promotion) %>
|
8
8
|
<div class="field">
|
9
|
-
<%= label_tag :promotion_rule_type, t('spree.
|
9
|
+
<%= label_tag :promotion_rule_type, t('spree.discount_rules') %>
|
10
10
|
<%= select_tag('promotion_rule[type]', options_for_promotion_rule_types(@promotion), include_blank: t(:choose_promotion_rule, scope: 'spree'), class: 'custom-select fullwidth') %>
|
11
11
|
</div>
|
12
12
|
<div class="filter-actions actions">
|
@@ -6,7 +6,9 @@
|
|
6
6
|
<% content_for :page_actions do %>
|
7
7
|
<li>
|
8
8
|
<% if can?(:display, Spree::PromotionCode) %>
|
9
|
-
<%= link_to t('spree.
|
9
|
+
<%= link_to t('spree.view_promotion_codes_list'), admin_promotion_promotion_codes_path(promotion_id: @promotion.id), class: 'btn btn-primary' %>
|
10
|
+
|
11
|
+
<%= link_to t('spree.download_promotion_codes_list'), admin_promotion_promotion_codes_path(promotion_id: @promotion.id, format: :csv), class: 'btn btn-primary' %>
|
10
12
|
<% end %>
|
11
13
|
|
12
14
|
<% if can?(:display, Spree::PromotionCodeBatch) %>
|
@@ -78,11 +78,11 @@
|
|
78
78
|
<tr id="<%= spree_dom_id promotion %>">
|
79
79
|
<td><%= promotion.name %></td>
|
80
80
|
<td>
|
81
|
-
<%= (promotion.codes.size == 1) ? promotion.codes.
|
81
|
+
<%= (promotion.codes.size == 1) ? promotion.codes.take.try!(:value) : t('spree.number_of_codes', count: promotion.codes.size) %>
|
82
82
|
</td>
|
83
83
|
<td>
|
84
84
|
<span class="pill pill-<%= promotion.active? ? 'active' : 'inactive' %>">
|
85
|
-
<%= t(promotion
|
85
|
+
<%= t(admin_promotion_status(promotion), scope: 'spree.admin.promotion_status') %>
|
86
86
|
</span>
|
87
87
|
</td>
|
88
88
|
<td>
|
@@ -92,10 +92,10 @@
|
|
92
92
|
<%= promotion.usage_count %>
|
93
93
|
</td>
|
94
94
|
<td>
|
95
|
-
<%= promotion.starts_at.
|
95
|
+
<%= promotion.starts_at.to_s(:long) if promotion.starts_at %>
|
96
96
|
</td>
|
97
97
|
<td>
|
98
|
-
<%= promotion.expires_at.
|
98
|
+
<%= promotion.expires_at.to_s(:long) if promotion.expires_at %>
|
99
99
|
</td>
|
100
100
|
<td class="actions">
|
101
101
|
<% if can?(:edit, promotion) %>
|
@@ -35,7 +35,7 @@
|
|
35
35
|
</div>
|
36
36
|
|
37
37
|
<div class="form-buttons filter-actions actions" data-hook="buttons">
|
38
|
-
<%=
|
38
|
+
<%= f.submit Spree::Refund.model_name.human, class: 'btn btn-primary' %>
|
39
39
|
<%= link_to t('spree.actions.cancel'), admin_order_payments_url(@refund.payment.order), class: 'btn btn-primary' %>
|
40
40
|
</div>
|
41
41
|
</fieldset>
|
@@ -97,10 +97,10 @@
|
|
97
97
|
<% end %>
|
98
98
|
<div class="form-buttons filter-actions actions" data-hook="reimburse-buttons">
|
99
99
|
<% if !@reimbursement.reimbursed? %>
|
100
|
-
<%= button_to [:perform, :admin, @order, @reimbursement], { class: 'button', method: 'post' } do %>
|
100
|
+
<%= button_to [:perform, :admin, @order, @reimbursement], { class: 'button btn btn-primary', method: 'post' } do %>
|
101
101
|
<%= t('spree.reimburse') %>
|
102
102
|
<% end %>
|
103
|
-
<%= link_to t('spree.actions.cancel'), url_for([:admin, @order, @reimbursement.customer_return]), class: 'btn btn-
|
103
|
+
<%= link_to t('spree.actions.cancel'), url_for([:admin, @order, @reimbursement.customer_return]), class: 'btn btn-default' %>
|
104
104
|
<% end %>
|
105
105
|
</div>
|
106
106
|
</fieldset>
|
@@ -49,11 +49,18 @@
|
|
49
49
|
<%= f.label :state_id, Spree::State.model_name.human %>
|
50
50
|
<span id="<%= s_or_b %>state">
|
51
51
|
<%= f.hidden_field :state_name, value: nil %>
|
52
|
+
<% states = f.object.country.try(:states).nil? ? [] : f.object.country.states %>
|
52
53
|
<%= f.text_field :state_name,
|
53
|
-
style: "display: #{
|
54
|
-
|
54
|
+
style: "display: #{states.empty? ? 'block' : 'none' };",
|
55
|
+
disabled: !states.empty?, class: 'fullwidth state_name js-state_name' %>
|
55
56
|
<%= f.hidden_field :state_id, value: nil %>
|
56
|
-
<%= f.collection_select :state_id,
|
57
|
+
<%= f.collection_select :state_id,
|
58
|
+
states.sort,
|
59
|
+
:id, :name,
|
60
|
+
{ include_blank: true },
|
61
|
+
{ class: 'custom-select fullwidth js-state_id',
|
62
|
+
style: "display: #{states.empty? ? 'none' : 'block' };",
|
63
|
+
disabled: states.empty? } %>
|
57
64
|
</span>
|
58
65
|
</div>
|
59
66
|
|
@@ -1,4 +1,4 @@
|
|
1
1
|
<div class="form-buttons filter-actions actions" data-hook="buttons">
|
2
2
|
<%= button_tag t('spree.actions.update'), class: 'btn btn-primary' %>
|
3
|
-
<%= link_to t('spree.actions.cancel'), collection_url, class: '
|
3
|
+
<%= link_to t('spree.actions.cancel'), collection_url, class: 'button' %>
|
4
4
|
</div>
|
@@ -5,9 +5,7 @@
|
|
5
5
|
|
6
6
|
<title><%= admin_page_title %></title>
|
7
7
|
|
8
|
-
|
9
|
-
<link href='//fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,400,600&subset=latin,cyrillic,greek,vietnamese' rel='stylesheet' type='text/css'>
|
10
|
-
|
8
|
+
<%= favicon_link_tag 'favicon.ico' %>
|
11
9
|
<%= stylesheet_link_tag 'spree/backend/all', media: 'all', data: {turbolinks_track: 'reload'} %>
|
12
10
|
<%= javascript_include_tag 'spree/backend/all', data: {turbolinks_track: 'reload'} %>
|
13
11
|
|
@@ -16,6 +16,10 @@
|
|
16
16
|
<% if can?(:display, Spree::AdjustmentReason) %>
|
17
17
|
<%= settings_tab_item plural_resource_name(Spree::AdjustmentReason), spree.admin_adjustment_reasons_path %>
|
18
18
|
<% end %>
|
19
|
+
|
20
|
+
<% if can?(:display, Spree::StoreCreditReason) %>
|
21
|
+
<%= settings_tab_item plural_resource_name(Spree::StoreCreditReason), spree.admin_store_credit_reasons_path %>
|
22
|
+
<% end %>
|
19
23
|
</ul>
|
20
24
|
</nav>
|
21
25
|
<% end %>
|
@@ -8,12 +8,12 @@
|
|
8
8
|
<% end %>
|
9
9
|
|
10
10
|
<% if can?(:display, Spree::TaxCategory) || can?(:display, Spree::TaxRate) %>
|
11
|
-
<%= tab :taxes, url: spree.admin_tax_categories_path %>
|
11
|
+
<%= tab :taxes, url: spree.admin_tax_categories_path, match_path: %r(tax_categories|tax_rates) %>
|
12
12
|
<% end %>
|
13
13
|
|
14
14
|
<% if can?(:display, Spree::RefundReason) || can?(:display, Spree::ReimbursementType) ||
|
15
|
-
|
16
|
-
<%= tab :checkout, url: spree.admin_refund_reasons_path %>
|
15
|
+
can?(:display, Spree::ReturnReason) || can?(:display, Spree::AdjustmentReason) %>
|
16
|
+
<%= tab :checkout, url: spree.admin_refund_reasons_path, match_path: %r(refund_reasons|reimbursement_types|return_reasons|adjustment_reasons) %>
|
17
17
|
<% end %>
|
18
18
|
|
19
19
|
<% if can?(:display, Spree::ShippingMethod) || can?(:display, Spree::ShippingCategory) || can?(:display, Spree::StockLocation) %>
|
@@ -1,11 +1,12 @@
|
|
1
|
-
<% Spree::Backend::Config.menu_items.each do |menu_item| %>
|
1
|
+
<% Spree::Backend::Config.menu_items.sort_by { |item| item.position || Float::INFINITY }.each do |menu_item| %>
|
2
2
|
<% if instance_exec(&menu_item.condition) %>
|
3
3
|
<%=
|
4
4
|
tab(
|
5
5
|
*menu_item.sections,
|
6
6
|
icon: menu_item.icon,
|
7
7
|
label: menu_item.label,
|
8
|
-
url: menu_item.url.is_a?(Symbol) ? spree.public_send(menu_item.url) : menu_item.url
|
8
|
+
url: menu_item.url.is_a?(Symbol) ? spree.public_send(menu_item.url) : menu_item.url,
|
9
|
+
match_path: menu_item.match_path,
|
9
10
|
) do
|
10
11
|
%>
|
11
12
|
<%- render partial: menu_item.partial if menu_item.partial %>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<div class="field-block col-3">
|
5
5
|
<div class="field">
|
6
6
|
<%= label_tag nil, Spree::StockLocation.model_name.human %>
|
7
|
-
<%= select_tag :stock_location_id, options_from_collection_for_select(stock_locations, :id, :name, params[:stock_location_id]), { include_blank:
|
7
|
+
<%= select_tag :stock_location_id, options_from_collection_for_select(stock_locations, :id, :name, params[:stock_location_id]), { include_blank: t('spree.all'), class: 'custom-select fullwidth', "data-placeholder" => t('spree.select_a_stock_location') } %>
|
8
8
|
</div>
|
9
9
|
</div>
|
10
10
|
<div class="<%= if content_for?(:sidebar) then 'col-6' else 'col-9' end %>">
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<div data-hook="admin_shipping_method_form_fields" class="row">
|
2
2
|
<div data-hook="admin_shipping_method_form_name_field" class="col-5">
|
3
3
|
<%= f.field_container :name do %>
|
4
|
-
<%= f.label :name
|
4
|
+
<%= f.label :name, class: 'required' %>
|
5
5
|
<%= f.text_field :name, class: 'fullwidth' %>
|
6
6
|
<%= error_message_on :shipping_method, :name %>
|
7
7
|
<% end %>
|
@@ -9,32 +9,32 @@
|
|
9
9
|
|
10
10
|
<div data-hook="admin_shipping_method_form_internal_name_field" class="col-5">
|
11
11
|
<%= f.field_container :admin_name do %>
|
12
|
-
<%= f.label :admin_name
|
13
|
-
<%= f.text_field :admin_name, class: 'fullwidth', label: false
|
12
|
+
<%= f.label :admin_name %>
|
13
|
+
<%= f.text_field :admin_name, class: 'fullwidth', label: false %>
|
14
14
|
<%= error_message_on :shipping_method, :admin_name %>
|
15
15
|
<% end %>
|
16
16
|
</div>
|
17
17
|
|
18
18
|
<div data-hook="admin_shipping_method_form_code" class="col-5">
|
19
19
|
<%= f.field_container :code do %>
|
20
|
-
<%= f.label :code
|
21
|
-
<%= f.text_field :code, class: 'fullwidth', label: false
|
20
|
+
<%= f.label :code %>
|
21
|
+
<%= f.text_field :code, class: 'fullwidth', label: false %>
|
22
22
|
<%= error_message_on :shipping_method, :code %>
|
23
23
|
<% end %>
|
24
24
|
</div>
|
25
25
|
|
26
26
|
<div class="col-5">
|
27
27
|
<%= f.field_container :carrier do %>
|
28
|
-
<%= f.label :carrier
|
29
|
-
<%= f.text_field :carrier, class: 'fullwidth', label: false
|
28
|
+
<%= f.label :carrier %>
|
29
|
+
<%= f.text_field :carrier, class: 'fullwidth', label: false %>
|
30
30
|
<%= error_message_on :shipping_method, :carrier %>
|
31
31
|
<% end %>
|
32
32
|
</div>
|
33
33
|
|
34
34
|
<div class="col-5">
|
35
35
|
<%= f.field_container :service_level do %>
|
36
|
-
<%= f.label :service_level
|
37
|
-
<%= f.text_field :service_level, class: 'fullwidth', label: false
|
36
|
+
<%= f.label :service_level %>
|
37
|
+
<%= f.text_field :service_level, class: 'fullwidth', label: false %>
|
38
38
|
<%= error_message_on :shipping_method, :service_level %>
|
39
39
|
<% end %>
|
40
40
|
</div>
|
@@ -49,7 +49,7 @@
|
|
49
49
|
|
50
50
|
<div data-hook="admin_shipping_method_form_tracking_url_field" class="col-10">
|
51
51
|
<%= f.field_container :tracking_url do %>
|
52
|
-
<%= f.label :tracking_url
|
52
|
+
<%= f.label :tracking_url %>
|
53
53
|
<%= f.text_field :tracking_url, class: 'fullwidth', placeholder: t('spree.tracking_url_placeholder') %>
|
54
54
|
<%= error_message_on :shipping_method, :tracking_url %>
|
55
55
|
<% end %>
|
@@ -1,34 +1,37 @@
|
|
1
|
+
<% admin_layout "full-width" %>
|
2
|
+
|
1
3
|
<%= paginate @variants, theme: "solidus_admin" %>
|
2
4
|
|
3
5
|
<table class="index stock-table" id="listing_product_stock">
|
4
6
|
<colgroup>
|
5
|
-
<col style="width:
|
6
|
-
<col style="width:
|
7
|
-
<col style="width:
|
8
|
-
<col style="width:
|
9
|
-
<col style="width:
|
10
|
-
<col style="width: 10%"
|
7
|
+
<col style="width: 30%">
|
8
|
+
<col style="width: 15%">
|
9
|
+
<col style="width: 14%">
|
10
|
+
<col style="width: 11%">
|
11
|
+
<col style="width: 11%">
|
12
|
+
<col style="width: 10%">
|
13
|
+
<col style="width: 9%">
|
11
14
|
</colgroup>
|
12
15
|
<thead>
|
13
16
|
<tr>
|
14
17
|
<th><%= t('spree.item') %></th>
|
15
|
-
<th><%=
|
18
|
+
<th><%= Spree::Variant.model_name.human %></th>
|
16
19
|
<th><%= Spree::StockLocation.model_name.human %></th>
|
17
|
-
<th><%= t('spree.backorderable_header') %></th>
|
18
|
-
<th><%= t('spree.count_on_hand') %></th>
|
20
|
+
<th class="align-center"><%= t('spree.backorderable_header') %></th>
|
21
|
+
<th class="align-center"><%= t('spree.count_on_hand') %></th>
|
22
|
+
<th><%= t('spree.modify_stock_count') %></th>
|
19
23
|
<th class="actions"></th>
|
20
24
|
</tr>
|
21
25
|
</thead>
|
22
26
|
<% variants.each do |variant| %>
|
23
|
-
<%- locations_without_items = @stock_item_stock_locations - variant.stock_items.flat_map(&:stock_location) %>
|
24
|
-
<%- display_add_row = locations_without_items.any? && can?(:create, Spree::StockItem) %>
|
25
|
-
<%- row_count = @stock_item_stock_locations.count + 2 %>
|
26
27
|
<tbody class="variant-stock-items">
|
27
28
|
<tr id="<%= spree_dom_id variant %>">
|
28
|
-
<td
|
29
|
+
<td>
|
29
30
|
<div class='variant-container'>
|
30
31
|
<div class='variant-image'>
|
31
|
-
<%= render 'spree/admin/shared/image',
|
32
|
+
<%= render 'spree/admin/shared/image',
|
33
|
+
image: variant.gallery.images.first,
|
34
|
+
size: :small %>
|
32
35
|
</div>
|
33
36
|
<div class='variant-details'>
|
34
37
|
<table class='stock-variant-field-table'>
|
@@ -46,7 +49,7 @@
|
|
46
49
|
</div>
|
47
50
|
</div>
|
48
51
|
</td>
|
49
|
-
<td
|
52
|
+
<td class="align-center">
|
50
53
|
<table class='stock-variant-field-table'>
|
51
54
|
<% variant.option_values.sort_by(&:option_type_name).each do |option_value| %>
|
52
55
|
<tr>
|
@@ -58,30 +61,45 @@
|
|
58
61
|
<% end %>
|
59
62
|
</table>
|
60
63
|
</td>
|
64
|
+
<td class="stock-location-items-cell" colspan="5">
|
65
|
+
<table class="stock-location-items-table">
|
66
|
+
<colgroup>
|
67
|
+
<col style="width: 25%" />
|
68
|
+
<col style="width: 20%" />
|
69
|
+
<col style="width: 20%" />
|
70
|
+
<col style="width: 20%" />
|
71
|
+
<col style="width: 15%" />
|
72
|
+
</colgroup>
|
73
|
+
<% variant.stock_items.each do |item| %>
|
74
|
+
<% if @stock_item_stock_locations.include?(item.stock_location) %>
|
75
|
+
<tr class="js-edit-stock-item stock-item-edit-row" data-variant-id="<%= variant.id %>" data-stock-item="<%= item.to_json %>" data-stock-location-name="<%= item.stock_location.name %>" data-track-inventory="<%= variant.should_track_inventory? %>" data-can-edit="<%= can?(:admin, Spree::StockItem) %>">
|
76
|
+
<%# This is rendered in JS %>
|
77
|
+
</tr>
|
78
|
+
<% end %>
|
79
|
+
<% end %>
|
80
|
+
<% locations_without_items = @stock_item_stock_locations - variant.stock_items.flat_map(&:stock_location) %>
|
81
|
+
<% if locations_without_items.any? && can?(:create, Spree::StockItem) %>
|
82
|
+
<tr class="js-add-stock-item stock-item-edit-row" data-variant-id="<%= variant.id %>">
|
83
|
+
<form>
|
84
|
+
<td class='location-name-cell'>
|
85
|
+
<%= select_tag :stock_location_id, options_from_collection_for_select(locations_without_items, :id, :name), class: 'custom-select', prompt: t('spree.add_to_stock_location'), id: "variant-stock-location-#{variant.id}" %>
|
86
|
+
</td>
|
87
|
+
<td class="align-center">
|
88
|
+
<%= check_box_tag :backorderable, 'backorderable', false, id: "variant-backorderable-#{variant.id}" %>
|
89
|
+
</td>
|
90
|
+
<td>
|
91
|
+
<%= number_field_tag :count_on_hand, "", class: 'fullwidth', id: "variant-count-on-hand-#{variant.id}" %>
|
92
|
+
</td>
|
93
|
+
<td></td>
|
94
|
+
<td class="actions">
|
95
|
+
<%= link_to_with_icon 'plus', t('spree.actions.create'), '#', no_text: true, data: { action: 'add' }, class: "submit" %>
|
96
|
+
</td>
|
97
|
+
</form>
|
98
|
+
</tr>
|
99
|
+
<% end %>
|
100
|
+
</table>
|
101
|
+
</td>
|
61
102
|
</tr>
|
62
|
-
<% variant.stock_items.each do |item| %>
|
63
|
-
<% if @stock_item_stock_locations.include?(item.stock_location) %>
|
64
|
-
<tr class="js-edit-stock-item stock-item-edit-row" data-variant-id="<%= variant.id %>" data-stock-item="<%= item.to_json %>" data-stock-location-name="<%= item.stock_location.name %>">
|
65
|
-
<%# This is rendered in JS %>
|
66
|
-
</tr>
|
67
|
-
<% end %>
|
68
|
-
<% end %>
|
69
|
-
<% if display_add_row %>
|
70
|
-
<tr class="js-add-stock-item stock-item-edit-row" data-variant-id="<%= variant.id %>">
|
71
|
-
<td class='location-name-cell'>
|
72
|
-
<%= select_tag :stock_location_id, options_from_collection_for_select(locations_without_items, :id, :name), { include_blank: true, class: 'custom-select', "data-placeholder" => t('spree.add_to_stock_location'), id: "variant-stock-location-#{variant.id}" } %>
|
73
|
-
</td>
|
74
|
-
<td class="align-center">
|
75
|
-
<%= check_box_tag :backorderable, 'backorderable', false, id: "variant-backorderable-#{variant.id}" %>
|
76
|
-
</td>
|
77
|
-
<td class="align-center">
|
78
|
-
<%= number_field_tag :count_on_hand, "", class: 'fullwidth', id: "variant-count-on-hand-#{variant.id}" %>
|
79
|
-
</td>
|
80
|
-
<td class="actions">
|
81
|
-
<%= link_to_with_icon 'plus', t('spree.actions.create'), '#', no_text: true, data: { action: 'add' }, class: "submit" %>
|
82
|
-
</td>
|
83
|
-
</tr>
|
84
|
-
<% end %>
|
85
103
|
</tbody>
|
86
104
|
<% end %>
|
87
105
|
</table>
|
@@ -1,122 +1,134 @@
|
|
1
|
-
<div data-hook="admin_stock_locations_form_fields" class="js-addresses-form">
|
2
|
-
<
|
3
|
-
<
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
<
|
26
|
-
|
27
|
-
|
28
|
-
<%= f.
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
<%= f.
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
<%= f.
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<%= f.
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
<%= f.
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
<
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
1
|
+
<div data-hook="admin_stock_locations_form_fields" class="js-addresses-form row">
|
2
|
+
<div class="col-md-6">
|
3
|
+
<fieldset class="no-border-bottom">
|
4
|
+
<legend><%= t('.general') %></legend>
|
5
|
+
|
6
|
+
<%= f.field_container :name do %>
|
7
|
+
<%= f.label :name, class: 'required' %><br />
|
8
|
+
<%= f.text_field :name, class: 'fullwidth', required: true %>
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<%= f.field_container :code do %>
|
12
|
+
<%= f.label :code %>
|
13
|
+
<%= f.text_field :code, :class => 'fullwidth', :label => false %>
|
14
|
+
<% end %>
|
15
|
+
|
16
|
+
<%= f.field_container :admin_name do %>
|
17
|
+
<%= f.label :admin_name %>
|
18
|
+
<%= f.text_field :admin_name, class: 'fullwidth', label: false %>
|
19
|
+
<% end %>
|
20
|
+
</fieldset>
|
21
|
+
</div>
|
22
|
+
|
23
|
+
<div class="col-md-6">
|
24
|
+
<fieldset class="no-border-bottom">
|
25
|
+
<legend><%= t('.address') %></legend>
|
26
|
+
|
27
|
+
<%= f.field_container :check_stock_on_transfer do %>
|
28
|
+
<%= f.label :address1 %>
|
29
|
+
<%= f.text_field :address1, class: 'fullwidth' %>
|
30
|
+
<% end %>
|
31
|
+
|
32
|
+
<%= f.field_container :address2 do %>
|
33
|
+
<%= f.label :address2 %>
|
34
|
+
<%= f.text_field :address2, class: 'fullwidth' %>
|
35
|
+
<% end %>
|
36
|
+
|
37
|
+
<%= f.field_container :city do %>
|
38
|
+
<%= f.label :city %>
|
39
|
+
<%= f.text_field :city, class: 'fullwidth' %>
|
40
|
+
<% end %>
|
41
|
+
|
42
|
+
<%= f.field_container :zipcode do %>
|
43
|
+
<%= f.label :zipcode %>
|
44
|
+
<%= f.text_field :zipcode, class: 'fullwidth' %>
|
45
|
+
<% end %>
|
46
|
+
|
47
|
+
<%= f.field_container :phone do %>
|
48
|
+
<%= f.label :phone %>
|
49
|
+
<%= f.phone_field :phone, class: 'fullwidth' %>
|
50
|
+
<% end %>
|
51
|
+
|
52
|
+
<%= f.field_container :country_id do %>
|
53
|
+
<%= f.label :country_id %>
|
54
|
+
<span id="country"><%= f.collection_select :country_id, available_countries(restrict_to_zone: nil), :id, :name, { include_blank: true }, { class: 'custom-select js-country_id fullwidth' } %></span>
|
55
|
+
<% end %>
|
56
|
+
|
57
|
+
<%= f.field_container :state do %>
|
58
|
+
<% country = f.object.country %>
|
59
|
+
<%= f.label :state_id %>
|
60
|
+
<span id="state" class="region">
|
61
|
+
<%= f.text_field :state_name, style: "display: none", class: 'fullwidth state_name js-state_name' %>
|
62
|
+
<%= f.collection_select :state_id, country ? country.states.sort : [], :id, :name, { include_blank: true }, {class: 'custom-select fullwidth js-state_id', style: "display: none" } %>
|
63
|
+
</span>
|
64
|
+
<% end %>
|
65
|
+
</fieldset>
|
66
|
+
</div>
|
67
|
+
|
68
|
+
<div class="col-md-12">
|
69
|
+
<fieldset class="no-border-bottom">
|
70
|
+
<legend><%= t('.settings') %></legend>
|
71
|
+
|
72
|
+
<div class="row">
|
73
|
+
<div class="col-md-6">
|
74
|
+
<%= f.field_container :active do %>
|
75
|
+
<label>
|
76
|
+
<%= f.check_box :active %>
|
77
|
+
<%= Spree::StockLocation.human_attribute_name :active %>
|
78
|
+
<%= f.field_hint :active %>
|
79
|
+
</label>
|
80
|
+
<% end %>
|
81
|
+
|
82
|
+
<%= f.field_container :default do %>
|
83
|
+
<label>
|
84
|
+
<%= f.check_box :default %>
|
85
|
+
<%= Spree::StockLocation.human_attribute_name :default %>
|
86
|
+
</label>
|
87
|
+
<% end %>
|
88
|
+
|
89
|
+
<%= f.field_container :backorderable_default do %>
|
90
|
+
<label>
|
91
|
+
<%= f.check_box :backorderable_default %>
|
92
|
+
<%= Spree::StockLocation.human_attribute_name :backorderable_default %>
|
93
|
+
<%= f.field_hint :backorderable_default %>
|
94
|
+
</label>
|
95
|
+
<% end %>
|
96
|
+
</div>
|
97
|
+
|
98
|
+
<div class="col-md-6">
|
99
|
+
<%= f.field_container :propagate_all_variants do %>
|
100
|
+
<label>
|
101
|
+
<%= f.check_box :propagate_all_variants %>
|
102
|
+
<%= Spree::StockLocation.human_attribute_name :propagate_all_variants %>
|
103
|
+
<%= f.field_hint :propagate_all_variants %>
|
104
|
+
</label>
|
105
|
+
<% end %>
|
106
|
+
|
107
|
+
<%= f.field_container :restock_inventory do %>
|
108
|
+
<label>
|
109
|
+
<%= f.check_box :restock_inventory %>
|
110
|
+
<%= Spree::StockLocation.human_attribute_name :restock_inventory %>
|
111
|
+
<%= f.field_hint :restock_inventory %>
|
112
|
+
</label>
|
113
|
+
<% end %>
|
114
|
+
|
115
|
+
<%= f.field_container :fulfillable do %>
|
116
|
+
<label>
|
117
|
+
<%= f.check_box :fulfillable %>
|
118
|
+
<%= Spree::StockLocation.human_attribute_name :fulfillable %>
|
119
|
+
<%= f.field_hint :fulfillable %>
|
120
|
+
</label>
|
121
|
+
<% end %>
|
122
|
+
|
123
|
+
<%= f.field_container :check_stock_on_transfer do %>
|
124
|
+
<label>
|
125
|
+
<%= f.check_box :check_stock_on_transfer %>
|
126
|
+
<%= Spree::StockLocation.human_attribute_name :check_stock_on_transfer %>
|
127
|
+
<%= f.field_hint :check_stock_on_transfer %>
|
128
|
+
</label>
|
129
|
+
<% end %>
|
130
|
+
</div>
|
131
|
+
</div>
|
132
|
+
</fieldset>
|
133
|
+
</div>
|
122
134
|
</div>
|