solidus_backend 2.7.4 → 2.8.0
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/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 +6 -1
- data/app/assets/javascripts/spree/backend/stock_management.js +9 -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/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 +30 -10
- data/app/assets/stylesheets/spree/backend/globals/_functions.scss +1 -2
- data/app/assets/stylesheets/spree/backend/sections/_orders.scss +8 -0
- data/app/assets/stylesheets/spree/backend/sections/_stock_management.scss +77 -2
- data/app/assets/stylesheets/spree/backend/spree_admin.scss +0 -1
- data/app/controllers/spree/admin/cancellations_controller.rb +2 -2
- data/app/controllers/spree/admin/locale_controller.rb +1 -1
- data/app/controllers/spree/admin/orders/customer_details_controller.rb +8 -1
- data/app/controllers/spree/admin/orders_controller.rb +1 -11
- 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/helpers/spree/admin/navigation_helper.rb +1 -1
- 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 +2 -2
- data/app/views/spree/admin/log_entries/index.html.erb +2 -2
- data/app/views/spree/admin/orders/_carton_manifest.html.erb +3 -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/products/_form.html.erb +7 -7
- 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 +4 -3
- 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/refunds/new.html.erb +1 -1
- 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 -0
- data/app/views/spree/admin/shared/_image.html.erb +2 -2
- 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/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 +1 -1
- data/app/views/spree/admin/store_credits/show.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/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/orders/customer_details_controller_spec.rb +50 -2
- data/spec/controllers/spree/admin/orders_controller_spec.rb +23 -11
- 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/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/orders/listing_spec.rb +1 -1
- 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 +2 -2
- data/spec/features/admin/orders/payments_spec.rb +2 -2
- 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/products_spec.rb +1 -1
- data/spec/features/admin/products/stock_management_spec.rb +10 -13
- 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/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 +22 -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 +1 -0
- 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/javascripts/solidus_admin/select2_locales/select2_locale_en-US.js +10 -0
- metadata +26 -34
- 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
@@ -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? %>">
|
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>
|
@@ -19,6 +19,8 @@
|
|
19
19
|
<%= render partial: 'spree/shared/error_messages', locals: { target: @stock_location } %>
|
20
20
|
|
21
21
|
<%= form_for [:admin, @stock_location] do |f| %>
|
22
|
-
|
23
|
-
|
22
|
+
<fieldset class="no-border-top">
|
23
|
+
<%= render 'form', f: f %>
|
24
|
+
<%= render 'spree/admin/shared/edit_resource_links' %>
|
25
|
+
</fieldset>
|
24
26
|
<% end %>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<%= render 'spree/admin/shared/settings_checkout_tabs' %>
|
2
|
+
|
3
|
+
<% admin_breadcrumb t('spree.settings') %>
|
4
|
+
<% admin_breadcrumb t('spree.admin.tab.checkout') %>
|
5
|
+
<% admin_breadcrumb link_to plural_resource_name(Spree::StoreCreditReason), spree.admin_store_credit_reasons_path %>
|
6
|
+
<% admin_breadcrumb @object.name %>
|
7
|
+
|
8
|
+
<%= render partial: 'spree/shared/error_messages', locals: { target: @object } %>
|
9
|
+
|
10
|
+
<%= form_for [:admin, @object] do |f| %>
|
11
|
+
<fieldset class='no-border-top' data-hook='edit_store_credit_reason'>
|
12
|
+
<%= render partial: 'spree/admin/store_credit_reasons/shared/form', locals: { f: f } %>
|
13
|
+
<%= render partial: 'spree/admin/shared/edit_resource_links' %>
|
14
|
+
</fieldset>
|
15
|
+
<% end %>
|
@@ -0,0 +1,56 @@
|
|
1
|
+
<%= render 'spree/admin/shared/settings_checkout_tabs' %>
|
2
|
+
|
3
|
+
<% admin_breadcrumb(t('spree.settings')) %>
|
4
|
+
<% admin_breadcrumb(t('spree.admin.tab.checkout')) %>
|
5
|
+
<% admin_breadcrumb(plural_resource_name(Spree::StoreCreditReason)) %>
|
6
|
+
|
7
|
+
<% content_for :page_actions do %>
|
8
|
+
<ul class='actions inline-menu'>
|
9
|
+
<li>
|
10
|
+
<%= link_to t('spree.new_adjustment_reason'), new_object_url, id: 'admin_new_named_type', class: 'btn btn-primary' %>
|
11
|
+
</li>
|
12
|
+
</ul>
|
13
|
+
<% end %>
|
14
|
+
|
15
|
+
<% if @collection.any? %>
|
16
|
+
<table class='index' id='listing_store_credit_reasons'>
|
17
|
+
<colgroup>
|
18
|
+
<col style='width: 65%' />
|
19
|
+
<col style='width: 20%' />
|
20
|
+
<col style='width: 15%' />
|
21
|
+
</colgroup>
|
22
|
+
<thead>
|
23
|
+
<tr data-hook='store_credit_reasons_header'>
|
24
|
+
<th><%= Spree::StoreCreditReason.human_attribute_name(:name) %></th>
|
25
|
+
<th><%= Spree::StoreCreditReason.human_attribute_name(:state) %></th>
|
26
|
+
<th class='actions'></th>
|
27
|
+
</tr>
|
28
|
+
</thead>
|
29
|
+
<tbody>
|
30
|
+
<% @collection.each do |store_credit_reason| %>
|
31
|
+
<tr id='<%= spree_dom_id store_credit_reason %>' data-hook='store_credit_reason_row'>
|
32
|
+
<td>
|
33
|
+
<%= store_credit_reason.name %>
|
34
|
+
</td>
|
35
|
+
<td>
|
36
|
+
<span class="pill pill-<%= store_credit_reason.active? ? 'active' : 'inactive' %>">
|
37
|
+
<%= t(store_credit_reason.active? ? :active : :inactive, scope: 'spree') %>
|
38
|
+
</span>
|
39
|
+
</td>
|
40
|
+
<td class='actions'>
|
41
|
+
<%= link_to_edit store_credit_reason, no_text: true %>
|
42
|
+
<% if can?(:destroy, store_credit_reason) %>
|
43
|
+
<%= link_to_delete store_credit_reason, no_text: true %>
|
44
|
+
<% end %>
|
45
|
+
</td>
|
46
|
+
</tr>
|
47
|
+
<% end %>
|
48
|
+
</tbody>
|
49
|
+
</table>
|
50
|
+
<% else %>
|
51
|
+
<div class='no-objects-found'>
|
52
|
+
<%= render 'spree/admin/shared/no_objects_found',
|
53
|
+
resource: Spree::StoreCreditReason,
|
54
|
+
new_resource_url: new_object_url %>
|
55
|
+
</div>
|
56
|
+
<% end %>
|