spree_backend 3.6.6 → 3.7.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/javascripts/spree/backend.js +7 -7
- data/app/assets/javascripts/spree/backend/address_states.js +21 -21
- data/app/assets/javascripts/spree/backend/adjustments.js +25 -0
- data/app/assets/javascripts/spree/backend/admin.js +253 -244
- data/app/assets/javascripts/spree/backend/calculator.js +14 -13
- data/app/assets/javascripts/spree/backend/checkouts/edit.js +48 -52
- data/app/assets/javascripts/spree/backend/gateway.js +11 -10
- data/app/assets/javascripts/spree/backend/general_settings.js +18 -0
- data/app/assets/javascripts/spree/backend/handlebar_extensions.js +6 -6
- data/app/assets/javascripts/spree/backend/line_items.js +72 -0
- data/app/assets/javascripts/spree/backend/line_items_on_order_edit.js +48 -47
- data/app/assets/javascripts/spree/backend/option_type_autocomplete.js +10 -10
- data/app/assets/javascripts/spree/backend/option_value_picker.js +13 -14
- data/app/assets/javascripts/spree/backend/orders/edit.js +3 -4
- data/app/assets/javascripts/spree/backend/payments/edit.js +230 -0
- data/app/assets/javascripts/spree/backend/payments/new.js +31 -31
- data/app/assets/javascripts/spree/backend/product_picker.js +15 -15
- data/app/assets/javascripts/spree/backend/progress.js +8 -0
- data/app/assets/javascripts/spree/backend/promotions.js +102 -107
- data/app/assets/javascripts/spree/backend/returns/expedited_exchanges_warning.js +5 -0
- data/app/assets/javascripts/spree/backend/returns/return_item_selection.js +32 -33
- data/app/assets/javascripts/spree/backend/shipments.js +246 -241
- data/app/assets/javascripts/spree/backend/spree-select2.js +3 -3
- data/app/assets/javascripts/spree/backend/states.js +8 -8
- data/app/assets/javascripts/spree/backend/stock_location.js +4 -3
- data/app/assets/javascripts/spree/backend/stock_management.js +13 -0
- data/app/assets/javascripts/spree/backend/stock_movement.js +35 -0
- data/app/assets/javascripts/spree/backend/stock_transfer.js +260 -0
- data/app/assets/javascripts/spree/backend/tag_picker.js +21 -21
- data/app/assets/javascripts/spree/backend/taxon_autocomplete.js +13 -13
- data/app/assets/javascripts/spree/backend/taxon_permalink_preview.js +8 -9
- data/app/assets/javascripts/spree/backend/taxon_tree_menu.js +35 -0
- data/app/assets/javascripts/spree/backend/taxonomy.js +165 -0
- data/app/assets/javascripts/spree/backend/taxons.js +122 -0
- data/app/assets/javascripts/spree/backend/user_picker.js +11 -11
- data/app/assets/javascripts/spree/backend/users/edit.js +14 -15
- data/app/assets/javascripts/spree/backend/variant_autocomplete.js +61 -0
- data/app/assets/javascripts/spree/backend/variant_management.js +14 -0
- data/app/assets/javascripts/spree/backend/zone.js +44 -0
- data/app/controllers/spree/admin/countries_controller.rb +3 -3
- data/app/controllers/spree/admin/customer_returns_controller.rb +1 -0
- data/app/controllers/spree/admin/general_settings_controller.rb +1 -0
- data/app/controllers/spree/admin/orders_controller.rb +4 -4
- data/app/controllers/spree/admin/payment_methods_controller.rb +1 -0
- data/app/controllers/spree/admin/payments_controller.rb +3 -2
- data/app/controllers/spree/admin/products_controller.rb +3 -1
- data/app/controllers/spree/admin/promotions_controller.rb +1 -0
- data/app/controllers/spree/admin/properties_controller.rb +1 -0
- data/app/controllers/spree/admin/reports_controller.rb +4 -4
- data/app/controllers/spree/admin/resource_controller.rb +3 -1
- data/app/controllers/spree/admin/return_authorizations_controller.rb +1 -1
- data/app/controllers/spree/admin/return_index_controller.rb +1 -0
- data/app/controllers/spree/admin/shipping_methods_controller.rb +2 -0
- data/app/controllers/spree/admin/store_credits_controller.rb +1 -2
- data/app/controllers/spree/admin/users_controller.rb +3 -1
- data/app/helpers/spree/admin/base_helper.rb +8 -5
- data/app/helpers/spree/admin/{general_settings_helper.rb → currency_helper.rb} +4 -3
- data/app/helpers/spree/admin/navigation_helper.rb +0 -8
- data/app/helpers/spree/admin/orders_helper.rb +2 -1
- data/app/models/spree/admin/resource.rb +1 -0
- data/app/views/spree/admin/orders/_line_items.html.erb +3 -1
- data/app/views/spree/admin/orders/_shipment_manifest.html.erb +3 -1
- data/app/views/spree/admin/orders/index.html.erb +15 -8
- data/app/views/spree/admin/products/index.html.erb +2 -2
- data/app/views/spree/admin/promotions/index.html.erb +4 -4
- data/app/views/spree/admin/properties/index.html.erb +2 -2
- data/app/views/spree/admin/return_index/customer_returns.html.erb +1 -1
- data/app/views/spree/admin/return_index/return_authorizations.html.erb +2 -2
- data/app/views/spree/admin/shared/_order_summary.html.erb +6 -0
- data/app/views/spree/admin/store_credits/_form.html.erb +15 -6
- data/app/views/spree/admin/store_credits/edit.html.erb +1 -1
- data/app/views/spree/admin/store_credits/new.html.erb +1 -1
- data/app/views/spree/admin/users/_addresses_form.html.erb +1 -1
- data/app/views/spree/admin/users/index.html.erb +8 -8
- data/app/views/spree/admin/users/items.html.erb +3 -1
- data/app/views/spree/admin/variants/index.html.erb +2 -2
- data/lib/generators/spree/backend/copy_views/copy_views_generator.rb +1 -1
- data/lib/spree/backend/callbacks.rb +1 -0
- data/spree_backend.gemspec +2 -2
- data/vendor/assets/javascripts/jquery.jstree/jquery.jstree.js +4358 -4358
- data/vendor/assets/javascripts/js.cookie.js +165 -0
- metadata +28 -28
- data/app/assets/javascripts/spree/backend/adjustments.js.coffee +0 -17
- data/app/assets/javascripts/spree/backend/general_settings.js.coffee +0 -15
- data/app/assets/javascripts/spree/backend/line_items.js.coffee +0 -64
- data/app/assets/javascripts/spree/backend/payments/edit.js.coffee +0 -145
- data/app/assets/javascripts/spree/backend/progress.js.coffee +0 -6
- data/app/assets/javascripts/spree/backend/returns/expedited_exchanges_warning.coffee +0 -4
- data/app/assets/javascripts/spree/backend/stock_management.js.coffee +0 -9
- data/app/assets/javascripts/spree/backend/stock_movement.js.coffee +0 -19
- data/app/assets/javascripts/spree/backend/stock_transfer.js.coffee +0 -201
- data/app/assets/javascripts/spree/backend/taxon_tree_menu.js.coffee +0 -22
- data/app/assets/javascripts/spree/backend/taxonomy.js.coffee +0 -153
- data/app/assets/javascripts/spree/backend/taxons.js.coffee +0 -82
- data/app/assets/javascripts/spree/backend/variant_autocomplete.js.coffee +0 -38
- data/app/assets/javascripts/spree/backend/variant_management.js.coffee +0 -10
- data/app/assets/javascripts/spree/backend/zone.js.coffee +0 -43
- data/vendor/assets/javascripts/jquery.cookie.js +0 -117
@@ -0,0 +1,14 @@
|
|
1
|
+
$(function () {
|
2
|
+
$('.track_inventory_checkbox').on('click', function () {
|
3
|
+
$(this).siblings('.variant_track_inventory').val($(this).is(':checked'))
|
4
|
+
$(this).parents('form').submit()
|
5
|
+
})
|
6
|
+
$('.toggle_variant_track_inventory').on('submit', function () {
|
7
|
+
$.ajax({
|
8
|
+
type: this.method,
|
9
|
+
url: this.action,
|
10
|
+
data: $(this).serialize()
|
11
|
+
})
|
12
|
+
return false
|
13
|
+
})
|
14
|
+
})
|
@@ -0,0 +1,44 @@
|
|
1
|
+
$(function () {
|
2
|
+
var countryBased = $('#country_based')
|
3
|
+
var stateBased = $('#state_based')
|
4
|
+
countryBased.click(show_country)
|
5
|
+
stateBased.click(show_state)
|
6
|
+
if (countryBased.is(':checked')) {
|
7
|
+
show_country()
|
8
|
+
} else if (stateBased.is(':checked')) {
|
9
|
+
show_state()
|
10
|
+
} else {
|
11
|
+
show_state()
|
12
|
+
stateBased.click()
|
13
|
+
}
|
14
|
+
})
|
15
|
+
// eslint-disable-next-line camelcase
|
16
|
+
function show_country () {
|
17
|
+
$('#state_members :input').each(function () {
|
18
|
+
$(this).prop('disabled', true)
|
19
|
+
})
|
20
|
+
$('#state_members').hide()
|
21
|
+
$('#zone_members :input').each(function () {
|
22
|
+
$(this).prop('disabled', true)
|
23
|
+
})
|
24
|
+
$('#zone_members').hide()
|
25
|
+
$('#country_members :input').each(function () {
|
26
|
+
$(this).prop('disabled', false)
|
27
|
+
})
|
28
|
+
$('#country_members').show()
|
29
|
+
}
|
30
|
+
// eslint-disable-next-line camelcase
|
31
|
+
function show_state () {
|
32
|
+
$('#country_members :input').each(function () {
|
33
|
+
$(this).prop('disabled', true)
|
34
|
+
})
|
35
|
+
$('#country_members').hide()
|
36
|
+
$('#zone_members :input').each(function () {
|
37
|
+
$(this).prop('disabled', true)
|
38
|
+
})
|
39
|
+
$('#zone_members').hide()
|
40
|
+
$('#state_members :input').each(function () {
|
41
|
+
$(this).prop('disabled', false)
|
42
|
+
})
|
43
|
+
$('#state_members').show()
|
44
|
+
}
|
@@ -57,6 +57,7 @@ module Spree
|
|
57
57
|
|
58
58
|
@customer_return.return_items = return_items_params.map do |item_params|
|
59
59
|
next unless item_params.delete('returned') == '1'
|
60
|
+
|
60
61
|
return_item = item_params[:id] ? Spree::ReturnItem.find(item_params[:id]) : Spree::ReturnItem.new
|
61
62
|
return_item.attributes = item_params
|
62
63
|
return_item
|
@@ -24,7 +24,7 @@ module Spree
|
|
24
24
|
if params[:q][:created_at_gt].present?
|
25
25
|
params[:q][:created_at_gt] = begin
|
26
26
|
Time.zone.parse(params[:q][:created_at_gt]).beginning_of_day
|
27
|
-
rescue
|
27
|
+
rescue StandardError
|
28
28
|
''
|
29
29
|
end
|
30
30
|
end
|
@@ -32,7 +32,7 @@ module Spree
|
|
32
32
|
if params[:q][:created_at_lt].present?
|
33
33
|
params[:q][:created_at_lt] = begin
|
34
34
|
Time.zone.parse(params[:q][:created_at_lt]).end_of_day
|
35
|
-
rescue
|
35
|
+
rescue StandardError
|
36
36
|
''
|
37
37
|
end
|
38
38
|
end
|
@@ -119,7 +119,7 @@ module Spree
|
|
119
119
|
end
|
120
120
|
|
121
121
|
def open_adjustments
|
122
|
-
adjustments = @order.all_adjustments.
|
122
|
+
adjustments = @order.all_adjustments.finalized
|
123
123
|
adjustments.update_all(state: 'open')
|
124
124
|
flash[:success] = Spree.t(:all_adjustments_opened)
|
125
125
|
|
@@ -127,7 +127,7 @@ module Spree
|
|
127
127
|
end
|
128
128
|
|
129
129
|
def close_adjustments
|
130
|
-
adjustments = @order.all_adjustments.
|
130
|
+
adjustments = @order.all_adjustments.not_finalized
|
131
131
|
adjustments.update_all(state: 'closed')
|
132
132
|
flash[:success] = Spree.t(:all_adjustments_closed)
|
133
133
|
|
@@ -27,7 +27,8 @@ module Spree
|
|
27
27
|
|
28
28
|
begin
|
29
29
|
if @payment_method.store_credit?
|
30
|
-
|
30
|
+
Spree::Checkout::AddStoreCredit.call(order: @order)
|
31
|
+
payments = @order.payments.store_credits.valid
|
31
32
|
else
|
32
33
|
@payment ||= @order.payments.build(object_params)
|
33
34
|
if @payment.payment_method.source_required? && params[:card].present? && params[:card] != 'new'
|
@@ -90,7 +91,7 @@ module Spree
|
|
90
91
|
def load_data
|
91
92
|
@amount = params[:amount] || load_order.total
|
92
93
|
@payment_methods = @order.collect_backend_payment_methods
|
93
|
-
if @payment
|
94
|
+
if @payment&.payment_method
|
94
95
|
@payment_method = @payment.payment_method
|
95
96
|
else
|
96
97
|
@payment_method = @payment_methods.find { |payment_method| payment_method.id == params[:payment][:payment_method_id].to_i } if params[:payment]
|
@@ -107,6 +107,7 @@ module Spree
|
|
107
107
|
|
108
108
|
def collection
|
109
109
|
return @collection if @collection.present?
|
110
|
+
|
110
111
|
params[:q] ||= {}
|
111
112
|
params[:q][:deleted_at_null] ||= '1'
|
112
113
|
params[:q][:not_discontinued] ||= '1'
|
@@ -123,7 +124,6 @@ module Spree
|
|
123
124
|
# This is to include all products and not just deleted products.
|
124
125
|
@search = @collection.ransack(params[:q].reject { |k, _v| k.to_s == 'deleted_at_null' })
|
125
126
|
@collection = @search.result.
|
126
|
-
distinct_by_product_ids(params[:q][:s]).
|
127
127
|
includes(product_includes).
|
128
128
|
page(params[:page]).
|
129
129
|
per(params[:per_page] || Spree::Config[:admin_products_per_page])
|
@@ -132,6 +132,7 @@ module Spree
|
|
132
132
|
|
133
133
|
def create_before
|
134
134
|
return if params[:product][:prototype_id].blank?
|
135
|
+
|
135
136
|
@prototype = Spree::Prototype.find(params[:product][:prototype_id])
|
136
137
|
end
|
137
138
|
|
@@ -139,6 +140,7 @@ module Spree
|
|
139
140
|
# note: we only reset the product properties if we're receiving a post
|
140
141
|
# from the form on that tab
|
141
142
|
return unless params[:clear_product_properties]
|
143
|
+
|
142
144
|
params[:product] ||= {}
|
143
145
|
end
|
144
146
|
|
@@ -32,16 +32,16 @@ module Spree
|
|
32
32
|
Time.zone.now.beginning_of_month
|
33
33
|
else
|
34
34
|
begin
|
35
|
-
|
36
|
-
rescue
|
37
|
-
|
35
|
+
Time.zone.parse(params[:q][:completed_at_gt]).beginning_of_day
|
36
|
+
rescue StandardError
|
37
|
+
Time.zone.now.beginning_of_month
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
41
|
if params[:q] && !params[:q][:completed_at_lt].blank?
|
42
42
|
params[:q][:completed_at_lt] = begin
|
43
43
|
Time.zone.parse(params[:q][:completed_at_lt]).end_of_day
|
44
|
-
rescue
|
44
|
+
rescue StandardError
|
45
45
|
''
|
46
46
|
end
|
47
47
|
end
|
@@ -113,6 +113,7 @@ class Spree::Admin::ResourceController < Spree::Admin::BaseController
|
|
113
113
|
|
114
114
|
def resource
|
115
115
|
return @resource if @resource
|
116
|
+
|
116
117
|
parent_model_name = parent_data[:model_name] if parent_data
|
117
118
|
@resource = Spree::Admin::Resource.new controller_path, controller_name, parent_model_name, object_name
|
118
119
|
end
|
@@ -176,6 +177,7 @@ class Spree::Admin::ResourceController < Spree::Admin::BaseController
|
|
176
177
|
|
177
178
|
def collection
|
178
179
|
return parent.send(controller_name) if parent_data.present?
|
180
|
+
|
179
181
|
if model_class.respond_to?(:accessible_by) &&
|
180
182
|
!current_ability.has_block?(params[:action], model_class)
|
181
183
|
model_class.accessible_by(current_ability, action)
|
@@ -212,7 +214,7 @@ class Spree::Admin::ResourceController < Spree::Admin::BaseController
|
|
212
214
|
end
|
213
215
|
|
214
216
|
def object_url(object = nil, options = {})
|
215
|
-
target = object
|
217
|
+
target = object || @object
|
216
218
|
if parent_data.present?
|
217
219
|
spree.send "admin_#{resource.model_name}_#{resource.object_name}_url", parent, target, options
|
218
220
|
else
|
@@ -29,7 +29,7 @@ module Spree
|
|
29
29
|
unassociated_inventory_units = all_inventory_units - associated_inventory_units
|
30
30
|
|
31
31
|
new_return_items = unassociated_inventory_units.map do |new_unit|
|
32
|
-
Spree::ReturnItem.new(inventory_unit: new_unit).tap(&:set_default_pre_tax_amount)
|
32
|
+
Spree::ReturnItem.new(inventory_unit: new_unit, return_authorization: @return_authorization).tap(&:set_default_pre_tax_amount)
|
33
33
|
end
|
34
34
|
|
35
35
|
@form_return_items = (@return_authorization.return_items + new_return_items).sort_by(&:inventory_unit_id)
|
@@ -20,6 +20,7 @@ module Spree
|
|
20
20
|
|
21
21
|
def set_shipping_category
|
22
22
|
return true if params['shipping_method'][:shipping_categories].blank?
|
23
|
+
|
23
24
|
@shipping_method.shipping_categories = Spree::ShippingCategory.where(id: params['shipping_method'][:shipping_categories])
|
24
25
|
@shipping_method.save
|
25
26
|
params[:shipping_method].delete(:shipping_categories)
|
@@ -27,6 +28,7 @@ module Spree
|
|
27
28
|
|
28
29
|
def set_zones
|
29
30
|
return true if params['shipping_method'][:zones].blank?
|
31
|
+
|
30
32
|
@shipping_method.zones = Spree::Zone.where(id: params['shipping_method'][:zones])
|
31
33
|
@shipping_method.save
|
32
34
|
params[:shipping_method].delete(:zones)
|
@@ -62,8 +62,7 @@ module Spree
|
|
62
62
|
protected
|
63
63
|
|
64
64
|
def permitted_store_credit_params
|
65
|
-
params.require(:store_credit).permit(permitted_store_credit_attributes)
|
66
|
-
merge(currency: Spree::Config[:currency])
|
65
|
+
params.require(:store_credit).permit(permitted_store_credit_attributes)
|
67
66
|
end
|
68
67
|
|
69
68
|
private
|
@@ -54,7 +54,8 @@ module Spree
|
|
54
54
|
@search = Spree::Order.includes(
|
55
55
|
line_items: {
|
56
56
|
variant: [:product, { option_values: :option_type }]
|
57
|
-
}
|
57
|
+
}
|
58
|
+
).ransack(params[:q].merge(user_id_eq: @user.id))
|
58
59
|
@orders = @search.result.page(params[:page])
|
59
60
|
end
|
60
61
|
|
@@ -80,6 +81,7 @@ module Spree
|
|
80
81
|
|
81
82
|
def collection
|
82
83
|
return @collection if @collection.present?
|
84
|
+
|
83
85
|
@collection = super
|
84
86
|
@search = @collection.ransack(params[:q])
|
85
87
|
@collection = @search.result.page(params[:page]).per(Spree::Config[:admin_users_per_page])
|
@@ -108,15 +108,16 @@ module Spree
|
|
108
108
|
size: 10,
|
109
109
|
class: 'input_string form-control'
|
110
110
|
}
|
111
|
-
|
111
|
+
end
|
112
112
|
|
113
113
|
field_options.merge!(readonly: options[:readonly],
|
114
114
|
disabled: options[:disabled],
|
115
|
-
size:
|
115
|
+
size: options[:size])
|
116
116
|
end
|
117
117
|
|
118
118
|
def preference_fields(object, form)
|
119
119
|
return unless object.respond_to?(:preferences)
|
120
|
+
|
120
121
|
fields = object.preferences.keys.map do |key|
|
121
122
|
if object.has_preference?(key)
|
122
123
|
form.label("preferred_#{key}", Spree.t(key) + ': ') +
|
@@ -127,9 +128,11 @@ module Spree
|
|
127
128
|
end
|
128
129
|
|
129
130
|
# renders hidden field and link to remove record using nested_attributes
|
130
|
-
def link_to_icon_remove_fields(
|
131
|
-
url =
|
132
|
-
|
131
|
+
def link_to_icon_remove_fields(form)
|
132
|
+
url = form.object.persisted? ? [:admin, form.object] : '#'
|
133
|
+
css_class = 'spree_remove_fields btn btn-sm btn-danger'
|
134
|
+
title = Spree.t(:remove)
|
135
|
+
link_to_with_icon('delete', '', url, class: css_class, data: { action: 'remove' }, title: title) + form.hidden_field(:_destroy)
|
133
136
|
end
|
134
137
|
|
135
138
|
def spree_dom_id(record)
|
@@ -1,12 +1,13 @@
|
|
1
1
|
module Spree
|
2
2
|
module Admin
|
3
|
-
module
|
4
|
-
def currency_options
|
3
|
+
module CurrencyHelper
|
4
|
+
def currency_options(selected_value = nil)
|
5
|
+
selected_value ||= Spree::Config[:currency]
|
5
6
|
currencies = ::Money::Currency.table.map do |_code, details|
|
6
7
|
iso = details[:iso_code]
|
7
8
|
[iso, "#{details[:name]} (#{iso})"]
|
8
9
|
end
|
9
|
-
options_from_collection_for_select(currencies, :first, :last,
|
10
|
+
options_from_collection_for_select(currencies, :first, :last, selected_value)
|
10
11
|
end
|
11
12
|
end
|
12
13
|
end
|
@@ -163,14 +163,6 @@ module Spree
|
|
163
163
|
icon_name ? content_tag(:i, '', class: icon_name) : ''
|
164
164
|
end
|
165
165
|
|
166
|
-
def icon(icon_name)
|
167
|
-
ActiveSupport::Deprecation.warn(<<-EOS, caller)
|
168
|
-
Admin::NavigationHelper#icon was renamed to Admin::NavigationHelper#spree_icon
|
169
|
-
and will be removed in Spree 3.6. Please update your code to avoid problems after update
|
170
|
-
EOS
|
171
|
-
spree_icon(icon_name)
|
172
|
-
end
|
173
|
-
|
174
166
|
# Override: Add disable_with option to prevent multiple request on consecutive clicks
|
175
167
|
def button(text, icon_name = nil, button_type = 'submit', options = {})
|
176
168
|
if icon_name
|
@@ -6,6 +6,7 @@ module Spree
|
|
6
6
|
links = []
|
7
7
|
events.sort.each do |event|
|
8
8
|
next unless order.send("can_#{event}?")
|
9
|
+
|
9
10
|
label = Spree.t(event, scope: 'admin.order.events', default: Spree.t(event))
|
10
11
|
links << button_link_to(
|
11
12
|
label.capitalize,
|
@@ -60,7 +61,7 @@ module Spree
|
|
60
61
|
'P' => 'Not Processed',
|
61
62
|
'S' => 'Issuer indicates that CVV2 data should be present on the card, but the merchant has indicated data is not present on the card',
|
62
63
|
'U' => 'Issuer has not certified for CVV2 or Issuer has not provided Visa with the CVV2 encryption keys',
|
63
|
-
''
|
64
|
+
'' => 'Transaction failed because wrong CVV2 number was entered or no CVV2 number was entered'
|
64
65
|
}
|
65
66
|
end
|
66
67
|
end
|
@@ -23,7 +23,9 @@
|
|
23
23
|
<%= mini_image(item.variant) %>
|
24
24
|
</td>
|
25
25
|
<td class="line-item-name text-center">
|
26
|
-
<%= item.name
|
26
|
+
<%= item.name %>
|
27
|
+
<br />
|
28
|
+
<%= "(#{item.options_text})" if item.options_text.present? %>
|
27
29
|
</td>
|
28
30
|
<td class="line-item-price text-center"><%= item.single_money.to_html %></td>
|
29
31
|
<td class="line-item-qty-show text-center">
|
@@ -5,7 +5,9 @@
|
|
5
5
|
</td>
|
6
6
|
|
7
7
|
<td class="item-name">
|
8
|
-
<%= item.variant.product.name
|
8
|
+
<%= item.variant.product.name %>
|
9
|
+
<br />
|
10
|
+
<%= "(#{item.variant.options_text})" if item.variant.options_text.present? %>
|
9
11
|
<% if item.variant.sku.present? %>
|
10
12
|
<strong><%= Spree.t(:sku) %>:</strong> <%= item.variant.sku %>
|
11
13
|
<% end %>
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<div class="row no-padding-bottom">
|
18
18
|
<div class="col-xs-12 col-md-6">
|
19
19
|
<div class="input-group">
|
20
|
-
<%= f.text_field :created_at_gt, class: 'datepicker datepicker-from form-control', value: params[:q][:created_at_gt], placeholder: Spree.t(:start) %>
|
20
|
+
<%= f.text_field :created_at_gt, class: 'datepicker datepicker-from form-control js-filterable', value: params[:q][:created_at_gt], placeholder: Spree.t(:start) %>
|
21
21
|
<span class="input-group-addon">
|
22
22
|
<i class="icon icon-calendar"></i>
|
23
23
|
</span>
|
@@ -26,7 +26,7 @@
|
|
26
26
|
</div>
|
27
27
|
<div class="col-xs-12 col-md-6">
|
28
28
|
<div class="input-group">
|
29
|
-
<%= f.text_field :created_at_lt, class: 'datepicker datepicker-to form-control', value: params[:q][:created_at_lt], placeholder: Spree.t(:stop) %>
|
29
|
+
<%= f.text_field :created_at_lt, class: 'datepicker datepicker-to form-control js-filterable', value: params[:q][:created_at_lt], placeholder: Spree.t(:stop) %>
|
30
30
|
<span class="input-group-addon">
|
31
31
|
<i class="icon icon-calendar"></i>
|
32
32
|
</span>
|
@@ -39,7 +39,7 @@
|
|
39
39
|
<div class="col-xs-12 col-md-4">
|
40
40
|
<div class="form-group">
|
41
41
|
<%= label_tag :q_number_cont, Spree.t(:order_number, number: '') %>
|
42
|
-
<%= f.text_field :number_cont, class: 'form-control js-quick-search-target' %>
|
42
|
+
<%= f.text_field :number_cont, class: 'form-control js-quick-search-target js-filterable' %>
|
43
43
|
</div>
|
44
44
|
</div>
|
45
45
|
|
@@ -75,14 +75,14 @@
|
|
75
75
|
<div class="col-xs-12 col-md-4">
|
76
76
|
<div class="form-group">
|
77
77
|
<%= label_tag :q_bill_address_firstname_start, Spree.t(:first_name_begins_with) %>
|
78
|
-
<%= f.text_field :bill_address_firstname_start, class: 'form-control' %>
|
78
|
+
<%= f.text_field :bill_address_firstname_start, class: 'form-control js-filterable' %>
|
79
79
|
</div>
|
80
80
|
</div>
|
81
81
|
|
82
82
|
<div class="col-xs-12 col-md-4">
|
83
83
|
<div class="form-group">
|
84
84
|
<%= label_tag :q_bill_address_lastname_start, Spree.t(:last_name_begins_with) %>
|
85
|
-
<%= f.text_field :bill_address_lastname_start, class: 'form-control' %>
|
85
|
+
<%= f.text_field :bill_address_lastname_start, class: 'form-control js-filterable' %>
|
86
86
|
</div>
|
87
87
|
</div>
|
88
88
|
|
@@ -100,21 +100,28 @@
|
|
100
100
|
<div class="col-xs-12 col-md-4">
|
101
101
|
<div class="form-group">
|
102
102
|
<%= label_tag :q_line_items_variant_sku_eq, Spree.t(:sku) %>
|
103
|
-
<%= f.text_field :line_items_variant_sku_eq, class: 'form-control' %>
|
103
|
+
<%= f.text_field :line_items_variant_sku_eq, class: 'form-control js-filterable' %>
|
104
104
|
</div>
|
105
105
|
</div>
|
106
106
|
|
107
107
|
<div class="col-xs-12 col-md-4">
|
108
108
|
<div class="form-group">
|
109
109
|
<%= label_tag :q_promotions_id_in, Spree.t(:promotion) %>
|
110
|
-
<%= f.select :promotions_id_in, Spree::Promotion.applied.pluck(:name, :id), { include_blank: true }, class: 'select2' %>
|
110
|
+
<%= f.select :promotions_id_in, Spree::Promotion.applied.pluck(:name, :id), { include_blank: true }, class: 'select2 js-filterable' %>
|
111
111
|
</div>
|
112
112
|
</div>
|
113
113
|
|
114
114
|
<div class="col-xs-12 col-md-4">
|
115
115
|
<div class="form-group">
|
116
116
|
<%= label_tag :q_store_id_in, Spree.t(:store) %>
|
117
|
-
<%= f.select :store_id_in, Spree::Store.order("#{Spree::Store.table_name}.name").pluck(:name, :id), { include_blank: true }, class: 'select2' %>
|
117
|
+
<%= f.select :store_id_in, Spree::Store.order("#{Spree::Store.table_name}.name").pluck(:name, :id), { include_blank: true }, class: 'select2 js-filterable' %>
|
118
|
+
</div>
|
119
|
+
</div>
|
120
|
+
|
121
|
+
<div class="col-xs-12 col-md-4">
|
122
|
+
<div class="form-group">
|
123
|
+
<%= label_tag :q_channel_eq, Spree.t(:channel) %>
|
124
|
+
<%= f.select :channel_eq, Spree::Order.distinct.pluck(:channel), { include_blank: true }, class: 'select2 js-filterable' %>
|
118
125
|
</div>
|
119
126
|
</div>
|
120
127
|
|