solidus_backend 4.3.5 → 4.4.0
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/namespaces.js +0 -1
- data/app/assets/javascripts/spree/backend/templates/index.js +0 -3
- data/app/assets/javascripts/spree/backend/variant_autocomplete.js +11 -8
- data/app/assets/javascripts/spree/backend/views/cart/empty_cart_button.js +1 -1
- data/app/assets/javascripts/spree/backend/views/index.js +0 -2
- data/app/assets/javascripts/spree/backend/views/order/details_adjustments.js +1 -2
- data/app/assets/javascripts/spree/backend.js +0 -2
- data/app/assets/stylesheets/spree/backend/sections/_adjustments.scss +0 -3
- data/app/assets/stylesheets/spree/backend/sections/index.scss +0 -1
- data/app/controllers/spree/admin/cancellations_controller.rb +1 -1
- data/app/controllers/spree/admin/dashboards_controller.rb +4 -0
- data/app/controllers/spree/admin/option_types_controller.rb +1 -1
- data/app/controllers/spree/admin/orders/customer_details_controller.rb +2 -2
- data/app/controllers/spree/admin/resource_controller.rb +1 -1
- data/app/helpers/spree/admin/base_helper.rb +2 -2
- data/app/helpers/spree/admin/navigation_helper.rb +1 -1
- data/app/views/spree/admin/adjustments/_adjustment.html.erb +0 -1
- data/app/views/spree/admin/dashboards/home.html.erb +1 -0
- data/app/views/spree/admin/orders/_adjustments.html.erb +1 -1
- data/app/views/spree/admin/orders/_order_details.html.erb +3 -3
- data/app/views/spree/admin/orders/confirm.html.erb +3 -3
- data/app/views/spree/admin/orders/index.html.erb +4 -82
- data/app/views/spree/admin/products/index.html.erb +2 -2
- data/app/views/spree/admin/shared/_locale_selection_solidus_admin.html.erb +1 -1
- data/app/views/spree/admin/shared/search_fields/_checkbox.html.erb +8 -0
- data/app/views/spree/admin/shared/search_fields/_date_range_picker.html.erb +16 -0
- data/app/views/spree/admin/shared/search_fields/_select.html.erb +6 -0
- data/app/views/spree/admin/shared/search_fields/_text_field.html.erb +6 -0
- data/app/views/spree/admin/shared/search_fields/_variant_autocomplete.html.erb +6 -0
- data/app/views/spree/admin/tax_rates/index.html.erb +1 -1
- data/app/views/spree/admin/users/index.html.erb +1 -1
- data/app/views/spree/admin/users/items.html.erb +3 -3
- data/app/views/spree/admin/users/orders.html.erb +3 -3
- data/app/views/spree/admin/variants/_form.html.erb +1 -1
- data/app/views/spree/admin/zones/index.html.erb +1 -1
- data/config/routes.rb +0 -11
- data/lib/spree/backend_configuration.rb +83 -18
- data/solidus_backend.gemspec +1 -1
- metadata +13 -72
- data/app/assets/javascripts/spree/backend/promotions/activation.js +0 -26
- data/app/assets/javascripts/spree/backend/promotions.js +0 -35
- data/app/assets/javascripts/spree/backend/templates/promotions/calculators/fields/tiered_flat_rate.hbs +0 -23
- data/app/assets/javascripts/spree/backend/templates/promotions/calculators/fields/tiered_percent.hbs +0 -23
- data/app/assets/javascripts/spree/backend/templates/promotions/rules/option_values.hbs +0 -12
- data/app/assets/javascripts/spree/backend/views/calculators/tiered.js +0 -54
- data/app/assets/javascripts/spree/backend/views/promotions/option_values_rule.js +0 -79
- data/app/assets/stylesheets/spree/backend/sections/_promotions.scss +0 -138
- data/app/controllers/spree/admin/promotion_actions_controller.rb +0 -51
- data/app/controllers/spree/admin/promotion_categories_controller.rb +0 -8
- data/app/controllers/spree/admin/promotion_code_batches_controller.rb +0 -30
- data/app/controllers/spree/admin/promotion_codes_controller.rb +0 -48
- data/app/controllers/spree/admin/promotion_rules_controller.rb +0 -60
- data/app/controllers/spree/admin/promotions_controller.rb +0 -67
- data/app/helpers/spree/admin/promotions_helper.rb +0 -15
- data/app/helpers/spree/promotion_rules_helper.rb +0 -12
- data/app/views/spree/admin/promotion_actions/create.js.erb +0 -10
- data/app/views/spree/admin/promotion_actions/destroy.js.erb +0 -1
- data/app/views/spree/admin/promotion_categories/_form.html.erb +0 -14
- data/app/views/spree/admin/promotion_categories/edit.html.erb +0 -10
- data/app/views/spree/admin/promotion_categories/index.html.erb +0 -47
- data/app/views/spree/admin/promotion_categories/new.html.erb +0 -10
- data/app/views/spree/admin/promotion_code_batches/_form_fields.html.erb +0 -22
- data/app/views/spree/admin/promotion_code_batches/download.csv.ruby +0 -8
- data/app/views/spree/admin/promotion_code_batches/index.html.erb +0 -65
- data/app/views/spree/admin/promotion_code_batches/new.html.erb +0 -8
- data/app/views/spree/admin/promotion_codes/index.csv.ruby +0 -8
- data/app/views/spree/admin/promotion_codes/index.html.erb +0 -32
- data/app/views/spree/admin/promotion_codes/new.html.erb +0 -31
- data/app/views/spree/admin/promotion_rules/create.js.erb +0 -8
- data/app/views/spree/admin/promotion_rules/destroy.js.erb +0 -3
- data/app/views/spree/admin/promotions/_actions.html.erb +0 -37
- data/app/views/spree/admin/promotions/_activations_edit.html.erb +0 -22
- data/app/views/spree/admin/promotions/_activations_new.html.erb +0 -43
- data/app/views/spree/admin/promotions/_form.html.erb +0 -67
- data/app/views/spree/admin/promotions/_promotion_action.html.erb +0 -13
- data/app/views/spree/admin/promotions/_promotion_rule.html.erb +0 -12
- data/app/views/spree/admin/promotions/_rules.html.erb +0 -42
- data/app/views/spree/admin/promotions/actions/_create_adjustment.html.erb +0 -2
- data/app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb +0 -6
- data/app/views/spree/admin/promotions/actions/_create_quantity_adjustments.html.erb +0 -10
- data/app/views/spree/admin/promotions/actions/_free_shipping.html.erb +0 -0
- data/app/views/spree/admin/promotions/actions/_promotion_calculators_with_custom_fields.html.erb +0 -29
- data/app/views/spree/admin/promotions/calculators/_default_fields.html.erb +0 -6
- data/app/views/spree/admin/promotions/calculators/distributed_amount/_fields.html.erb +0 -56
- data/app/views/spree/admin/promotions/calculators/flat_rate/_fields.html.erb +0 -6
- data/app/views/spree/admin/promotions/calculators/tiered_flat_rate/_fields.html.erb +0 -30
- data/app/views/spree/admin/promotions/calculators/tiered_percent/_fields.html.erb +0 -30
- data/app/views/spree/admin/promotions/edit.html.erb +0 -35
- data/app/views/spree/admin/promotions/index.html.erb +0 -124
- data/app/views/spree/admin/promotions/new.html.erb +0 -9
- data/app/views/spree/admin/promotions/rules/_first_order.html.erb +0 -0
- data/app/views/spree/admin/promotions/rules/_first_repeat_purchase_since.html.erb +0 -13
- data/app/views/spree/admin/promotions/rules/_item_total.html.erb +0 -14
- data/app/views/spree/admin/promotions/rules/_minimum_quantity.html.erb +0 -5
- data/app/views/spree/admin/promotions/rules/_nth_order.html.erb +0 -12
- data/app/views/spree/admin/promotions/rules/_one_use_per_user.html.erb +0 -0
- data/app/views/spree/admin/promotions/rules/_option_value.html.erb +0 -13
- data/app/views/spree/admin/promotions/rules/_product.html.erb +0 -15
- data/app/views/spree/admin/promotions/rules/_store.html.erb +0 -6
- data/app/views/spree/admin/promotions/rules/_taxon.html.erb +0 -9
- data/app/views/spree/admin/promotions/rules/_user.html.erb +0 -4
- data/app/views/spree/admin/promotions/rules/_user_logged_in.html.erb +0 -0
- data/app/views/spree/admin/promotions/rules/_user_role.html.erb +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 80a90789fe2e7df10cab902ad495b6d25980448801fa8cc03a593069babb157c
|
4
|
+
data.tar.gz: cfaa6f5111283f821071b3c333ca41804567f44bbbc9476a4dd7419c99785104
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4caa30a62fc16223f5aa9bfcf41c3fd2f8ed091a15d4a082f9a65e621a5823966fcce5ec4cf291af7d88518210d748a6ad3562bda5373e82589a063029404ed
|
7
|
+
data.tar.gz: c1782137a614b7f6e8713e100f0cea0c49173ad8946ce9e0605573cfaed6444ce7a7a13587e24f975065b0ccde4d89314aa8870b34b4f4196ca4fc40acea6cc3
|
@@ -8,9 +8,6 @@
|
|
8
8
|
//= require spree/backend/templates/orders/shipping_method
|
9
9
|
//= require spree/backend/templates/products/sortable
|
10
10
|
//= require spree/backend/templates/products/upload_progress
|
11
|
-
//= require spree/backend/templates/promotions/calculators/fields/tiered_flat_rate
|
12
|
-
//= require spree/backend/templates/promotions/calculators/fields/tiered_percent
|
13
|
-
//= require spree/backend/templates/promotions/rules/option_values
|
14
11
|
//= require spree/backend/templates/stock_items/stock_location_stock_item
|
15
12
|
//= require spree/backend/templates/taxons/_tree
|
16
13
|
//= require spree/backend/templates/taxons/tree
|
@@ -10,17 +10,18 @@
|
|
10
10
|
/**
|
11
11
|
* Make the element a select2 dropdown used for finding Variants. By default, the search term will be
|
12
12
|
* passed to the defined Spree::Config.variant_search_class by the controller with its defined scope.
|
13
|
-
* @param {Object|undefined|null} options Options
|
13
|
+
* @param {Object|undefined|null} options Options to be passed to select2. If null, the default options will be used.
|
14
14
|
* @param {Function|undefined} options.searchParameters Returns a hash object for params to merge on the select2 ajax request
|
15
15
|
* Accepts an argument of the select2 search term. To use Ransack, define
|
16
16
|
* variant_search_term as a falsy value, and q as the Ransack query. Note,
|
17
17
|
* you need to ensure that the attributes are allowed to be Ransacked.
|
18
18
|
*/
|
19
|
-
$.fn.variantAutocomplete = function(options) {
|
19
|
+
$.fn.variantAutocomplete = function(options = {}) {
|
20
20
|
// Default options
|
21
|
-
|
22
|
-
|
23
|
-
|
21
|
+
const searchParameters = options.searchParameters || null
|
22
|
+
delete options.searchParameters
|
23
|
+
const select2options = options
|
24
|
+
const defaultOptions = {
|
24
25
|
placeholder: Spree.translations.variant_placeholder,
|
25
26
|
minimumInputLength: 3,
|
26
27
|
initSelection: function(element, callback) {
|
@@ -39,7 +40,7 @@
|
|
39
40
|
}
|
40
41
|
},
|
41
42
|
data: function(term, page) {
|
42
|
-
const extraParameters =
|
43
|
+
const extraParameters = searchParameters ? searchParameters(term) : {}
|
43
44
|
|
44
45
|
return {
|
45
46
|
variant_search_term: term,
|
@@ -64,7 +65,9 @@
|
|
64
65
|
} else {
|
65
66
|
return Select2.util.escapeMarkup(variant.name);
|
66
67
|
}
|
67
|
-
}
|
68
|
-
}
|
68
|
+
},
|
69
|
+
}
|
70
|
+
|
71
|
+
this.select2(Object.assign({}, defaultOptions, select2options));
|
69
72
|
};
|
70
73
|
})();
|
@@ -24,6 +24,6 @@ Spree.Views.Cart.EmptyCartButton = Backbone.View.extend({
|
|
24
24
|
|
25
25
|
render: function() {
|
26
26
|
var isNew = function (item) { return item.isNew() };
|
27
|
-
this.$el.prop("disabled", !this.collection.length || this.collection.some(isNew));
|
27
|
+
this.$el.prop("disabled", !this.collection.length || this.collection.some(isNew) || this.model.get("completed_at"));
|
28
28
|
}
|
29
29
|
});
|
@@ -1,4 +1,3 @@
|
|
1
|
-
//= require 'spree/backend/views/calculators/tiered'
|
2
1
|
//= require 'spree/backend/views/cart/add_line_item_button'
|
3
2
|
//= require 'spree/backend/views/cart/empty_cart_button'
|
4
3
|
//= require 'spree/backend/views/cart/line_item_row'
|
@@ -22,7 +21,6 @@
|
|
22
21
|
//= require 'spree/backend/views/payment/payment_row'
|
23
22
|
//= require 'spree/backend/views/payment/edit_credit_card'
|
24
23
|
//= require 'spree/backend/views/product/search'
|
25
|
-
//= require 'spree/backend/views/promotions/option_values_rule'
|
26
24
|
//= require 'spree/backend/views/tables/editable_table'
|
27
25
|
//= require 'spree/backend/views/tables/editable_table_row'
|
28
26
|
//= require 'spree/backend/views/tables/return_items'
|
@@ -9,8 +9,7 @@ Spree.Views.Order.DetailsAdjustments = Backbone.View.extend({
|
|
9
9
|
var collection = this.collection ? this.collection.chain() : _.chain([this.model]);
|
10
10
|
collection
|
11
11
|
.map(function(item) {
|
12
|
-
return (item.get("adjustments") || [])
|
13
|
-
.filter(function(adjustment) { return (adjustment.eligible === true); });
|
12
|
+
return (item.get("adjustments") || []);
|
14
13
|
})
|
15
14
|
.flatten(true)
|
16
15
|
.each(function(adjustment){
|
@@ -50,8 +50,6 @@
|
|
50
50
|
//= require spree/backend/products/index
|
51
51
|
//= require spree/backend/product_picker
|
52
52
|
//= require spree/backend/progress
|
53
|
-
//= require spree/backend/promotions
|
54
|
-
//= require spree/backend/promotions/activation
|
55
53
|
//= require spree/backend/shipments
|
56
54
|
//= require spree/backend/spree-select2
|
57
55
|
//= require spree/backend/stock_management
|
@@ -2,7 +2,6 @@
|
|
2
2
|
@import 'spree/backend/sections/orders';
|
3
3
|
@import 'spree/backend/sections/products';
|
4
4
|
@import 'spree/backend/sections/variants';
|
5
|
-
@import 'spree/backend/sections/promotions';
|
6
5
|
@import 'spree/backend/sections/bulk_transfer';
|
7
6
|
@import 'spree/backend/sections/return_authorizations';
|
8
7
|
@import 'spree/backend/sections/log_entries';
|
@@ -20,7 +20,7 @@ module Spree
|
|
20
20
|
flash[:error] = t('spree.no_inventory_selected')
|
21
21
|
redirect_to admin_order_cancellations_path(@order)
|
22
22
|
else
|
23
|
-
@order.cancellations.short_ship(inventory_units, created_by:
|
23
|
+
@order.cancellations.short_ship(inventory_units, created_by:)
|
24
24
|
|
25
25
|
flash[:success] = t('spree.inventory_canceled')
|
26
26
|
redirect_to edit_admin_order_url(@order)
|
@@ -3,6 +3,10 @@
|
|
3
3
|
module Spree
|
4
4
|
module Admin
|
5
5
|
class DashboardsController < BaseController
|
6
|
+
before_action :deprecate
|
7
|
+
def deprecate
|
8
|
+
Spree.deprecator.warn "The #{self.class.name} is deprecated. If you still use dashboards, please copy all controllers and views from solidus_backend to your application."
|
9
|
+
end
|
6
10
|
end
|
7
11
|
end
|
8
12
|
end
|
@@ -15,8 +15,8 @@ module Spree
|
|
15
15
|
def edit
|
16
16
|
country_id = default_country_id
|
17
17
|
|
18
|
-
@order.build_bill_address(country_id:
|
19
|
-
@order.build_ship_address(country_id:
|
18
|
+
@order.build_bill_address(country_id:) if @order.bill_address.nil?
|
19
|
+
@order.build_ship_address(country_id:) if @order.ship_address.nil?
|
20
20
|
|
21
21
|
@order.bill_address.country_id = country_id if @order.bill_address.country.nil?
|
22
22
|
@order.ship_address.country_id = country_id if @order.ship_address.country.nil?
|
@@ -88,7 +88,7 @@ class Spree::Admin::ResourceController < Spree::Admin::BaseController
|
|
88
88
|
#
|
89
89
|
# TODO : create a global set_list_position on all concerned objects
|
90
90
|
# maybe in the acts_as_list gem
|
91
|
-
model_class.where(id:
|
91
|
+
model_class.where(id:).first&.set_list_position(index)
|
92
92
|
end
|
93
93
|
end
|
94
94
|
|
@@ -25,7 +25,7 @@ module Spree
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def admin_hint(title, text)
|
28
|
-
content_tag(:span, class: 'hint-tooltip', title
|
28
|
+
content_tag(:span, class: 'hint-tooltip', title:, data: { content: text }) do
|
29
29
|
content_tag(:i, '', class: 'fa fa-info-circle')
|
30
30
|
end
|
31
31
|
end
|
@@ -39,7 +39,7 @@ module Spree
|
|
39
39
|
t('spree.date_picker.format', default: '%Y/%m/%d')
|
40
40
|
end
|
41
41
|
|
42
|
-
l(date, format:
|
42
|
+
l(date, format:)
|
43
43
|
end
|
44
44
|
|
45
45
|
def spree_dom_id(record)
|
@@ -114,7 +114,7 @@ module Spree
|
|
114
114
|
name = options[:name] || t('spree.actions.delete')
|
115
115
|
confirm = options[:confirm] || t('spree.are_you_sure')
|
116
116
|
options[:class] = "#{options[:class]} delete-resource".strip
|
117
|
-
options[:data] = { confirm
|
117
|
+
options[:data] = { confirm:, action: 'remove' }
|
118
118
|
link_to_with_icon 'trash', name, url, options
|
119
119
|
end
|
120
120
|
|
@@ -8,7 +8,7 @@
|
|
8
8
|
</tr>
|
9
9
|
</thead>
|
10
10
|
<tbody data-hook="order_details_adjustments">
|
11
|
-
<% adjustments.
|
11
|
+
<% adjustments.group_by(&:label).each do |label, adjustments| %>
|
12
12
|
<tr class="total">
|
13
13
|
<td><%= label %>:</td>
|
14
14
|
<td class="total"><span><%= Spree::Money.new(adjustments.sum(&:amount), currency: adjustments.first.order.try(:currency)) %></span></td>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<div class="js-order-line-item-adjustments <%= "hidden" if order.line_item_adjustments.
|
1
|
+
<div class="js-order-line-item-adjustments <%= "hidden" if order.line_item_adjustments.none? %>">
|
2
2
|
<%=
|
3
3
|
render "spree/admin/orders/adjustments", {
|
4
4
|
adjustments: order.line_item_adjustments,
|
@@ -7,7 +7,7 @@
|
|
7
7
|
}
|
8
8
|
%>
|
9
9
|
</div>
|
10
|
-
<div class="js-order-shipment-adjustments <%= "hidden" if order.shipment_adjustments.
|
10
|
+
<div class="js-order-shipment-adjustments <%= "hidden" if order.shipment_adjustments.none? %>">
|
11
11
|
<%=
|
12
12
|
render "spree/admin/orders/adjustments", {
|
13
13
|
adjustments: order.shipment_adjustments,
|
@@ -16,7 +16,7 @@
|
|
16
16
|
}
|
17
17
|
%>
|
18
18
|
</div>
|
19
|
-
<div class="js-order-adjustments <%= "hidden" if order.adjustments.
|
19
|
+
<div class="js-order-adjustments <%= "hidden" if order.adjustments.none? %>">
|
20
20
|
<%=
|
21
21
|
render "spree/admin/orders/adjustments", {
|
22
22
|
adjustments: order.adjustments,
|
@@ -18,7 +18,7 @@
|
|
18
18
|
order: @order,
|
19
19
|
title: t('spree.line_item_adjustments'),
|
20
20
|
}
|
21
|
-
) if @order.line_item_adjustments.
|
21
|
+
) if @order.line_item_adjustments.any?
|
22
22
|
%>
|
23
23
|
|
24
24
|
<%=
|
@@ -29,7 +29,7 @@
|
|
29
29
|
order: @order,
|
30
30
|
title: t('spree.shipment_adjustments'),
|
31
31
|
}
|
32
|
-
) if @order.shipment_adjustments.
|
32
|
+
) if @order.shipment_adjustments.any?
|
33
33
|
%>
|
34
34
|
|
35
35
|
<%=
|
@@ -40,7 +40,7 @@
|
|
40
40
|
order: @order,
|
41
41
|
title: t('spree.order_adjustments'),
|
42
42
|
}
|
43
|
-
) if @order.adjustments.
|
43
|
+
) if @order.adjustments.any?
|
44
44
|
%>
|
45
45
|
|
46
46
|
<% if @order.line_items.exists? %>
|
@@ -16,89 +16,11 @@
|
|
16
16
|
<div data-hook="admin_orders_index_search">
|
17
17
|
<%= search_form_for [:admin, @search] do |f| %>
|
18
18
|
<div class="row">
|
19
|
-
|
20
|
-
|
21
|
-
<%=
|
22
|
-
<div class="date-range-fields input-group">
|
23
|
-
<%= f.text_field :created_at_gt, class: 'datepicker form-control datepicker-from', value: params[:q][:created_at_gt], placeholder: t('spree.start') %>
|
24
|
-
|
25
|
-
<div class="input-group-prepend input-group-append">
|
26
|
-
<span class="input-group-text range-divider">
|
27
|
-
<i class="fa fa-arrow-right"></i>
|
28
|
-
</span>
|
29
|
-
</div>
|
30
|
-
|
31
|
-
<%= f.text_field :created_at_lt, class: 'datepicker form-control datepicker-to', value: params[:q][:created_at_lt], placeholder: t('spree.stop') %>
|
32
|
-
</div>
|
33
|
-
</div>
|
34
|
-
|
35
|
-
<div class="field">
|
36
|
-
<%= label_tag :q_state_eq, t('spree.status') %>
|
37
|
-
<%= f.select :state_eq, Spree::Order.state_machines[:state].states.collect {|s| [t(s.name, scope: 'spree.order_state'), s.value]}, {include_blank: true}, class: 'custom-select fullwidth' %>
|
38
|
-
</div>
|
39
|
-
|
40
|
-
<div class="field">
|
41
|
-
<%= label_tag nil, t('spree.promotion') %>
|
42
|
-
<%= f.text_field :order_promotions_promotion_code_value_start, size: 25 %>
|
43
|
-
</div>
|
44
|
-
|
45
|
-
<div class="field">
|
46
|
-
<%= label_tag nil, t('spree.shipment_number') %>
|
47
|
-
<%= f.text_field :shipments_number_start %>
|
48
|
-
</div>
|
49
|
-
|
50
|
-
<div class="field">
|
51
|
-
<%= label_tag :q_shipment_state, t('spree.shipment_state') %>
|
52
|
-
<%= f.select :shipment_state_eq, %i[backorder canceled partial pending ready shipped].map { |state| [t("spree.shipment_states.#{state}"), state] }, { include_blank: true }, { class: "custom-select fullwidth" } %>
|
53
|
-
</div>
|
54
|
-
</div>
|
55
|
-
|
56
|
-
<div class="col-12 col-md-6 col-lg-4 col-xl-6">
|
57
|
-
<div class="row">
|
58
|
-
<div class="col-12 col-xl-6">
|
59
|
-
<div class="field">
|
60
|
-
<%= label_tag :q_number_start, t('spree.order_number', number: '') %>
|
61
|
-
<%= f.text_field :number_start %>
|
62
|
-
</div>
|
63
|
-
|
64
|
-
<div class="field">
|
65
|
-
<%= label_tag :q_email_start, t('spree.email') %>
|
66
|
-
<%= f.text_field :email_start %>
|
67
|
-
</div>
|
68
|
-
</div>
|
69
|
-
|
70
|
-
<div class="col-12 col-xl-6">
|
71
|
-
<div class="field">
|
72
|
-
<%= label_tag :q_bill_address_name_cont, t('spree.name_contains') %>
|
73
|
-
<%= f.text_field :bill_address_name_cont, size: 25 %>
|
74
|
-
</div>
|
75
|
-
</div>
|
76
|
-
|
77
|
-
<div class="col-12 col-xl-6">
|
78
|
-
<div class="field" data-hook="sku-select">
|
79
|
-
<%= label_tag :q_line_items_variant_id_in, t('spree.variant') %>
|
80
|
-
<%= f.text_field :line_items_variant_id_in, class: "variant_autocomplete fullwidth" %>
|
81
|
-
</div>
|
82
|
-
</div>
|
83
|
-
</div>
|
84
|
-
</div>
|
85
|
-
|
86
|
-
<div class="col-12 col-md-6 col-lg-4 col-xl-3">
|
87
|
-
<% if Spree::Store.count > 1 %>
|
88
|
-
<div class="field">
|
89
|
-
<%= label_tag :q_store_id_eq, t('spree.store') %>
|
90
|
-
<%= f.select :store_id_eq, Spree::Store.all.map { |s| [s.name, s.id] }, { include_blank: true }, { class: "custom-select fullwidth" } %>
|
91
|
-
</div>
|
19
|
+
<% Spree::Backend::Config.search_fields[controller_path].each do |field_config| %>
|
20
|
+
<% if !field_config.has_key?(:if) || field_config[:if].call %>
|
21
|
+
<%= render field_config.except(:if).deep_merge(locals: { f: f }) %>
|
92
22
|
<% end %>
|
93
|
-
|
94
|
-
<div class="field checkbox">
|
95
|
-
<label>
|
96
|
-
<%= f.check_box :completed_at_not_null, {checked: @show_only_completed}, '1', '0' %>
|
97
|
-
<%= t('spree.show_only_complete_orders') %>
|
98
|
-
</label>
|
99
|
-
</div>
|
100
|
-
</div>
|
101
|
-
|
23
|
+
<% end %>
|
102
24
|
</div>
|
103
25
|
|
104
26
|
<div class="clearfix"></div>
|
@@ -71,8 +71,8 @@
|
|
71
71
|
<tr data-hook="admin_products_index_headers">
|
72
72
|
<th><%= Spree::Variant.human_attribute_name(:sku) %></th>
|
73
73
|
<th></th>
|
74
|
-
<th><%= sort_link @search,:name, Spree::Product.human_attribute_name(:name), { default_order: "desc"
|
75
|
-
<th class="align-right"><%= sort_link @search,:master_default_price_amount, Spree::Product.human_attribute_name(:price), {
|
74
|
+
<th><%= sort_link @search,:name, Spree::Product.human_attribute_name(:name), { default_order: "desc", title: 'admin_products_listing_name_title'} %></th>
|
75
|
+
<th class="align-right"><%= sort_link @search,:master_default_price_amount, Spree::Product.human_attribute_name(:price), {title: 'admin_products_listing_price_title'} %></th>
|
76
76
|
<th data-hook="admin_products_index_header_actions" class="actions"></th>
|
77
77
|
</tr>
|
78
78
|
</thead>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
<% if available_locale_options_for_select.size > 1 %>
|
6
6
|
<li>
|
7
|
-
<%= form_tag(admin_set_locale_path(format: :html), method: :put, style: "width: 100%;") do %>
|
7
|
+
<%= form_tag(spree.admin_set_locale_path(format: :html), method: :put, style: "width: 100%;") do %>
|
8
8
|
<label>
|
9
9
|
<svg aria-hidden="true"><use xlink:href="<%= image_path('spree/backend/themes/solidus_admin/remixicon.symbol.svg') %>#ri-global-line"></use></svg>
|
10
10
|
<select name="switch_to_locale" onchange="this.form.requestSubmit()">
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<div class="col-12 col-md-6 col-lg-4 col-xl-3">
|
2
|
+
<div class="date-range-filter field">
|
3
|
+
<%= label_tag "q_#{attribute}", label.respond_to?(:call) ? label.call : label %>
|
4
|
+
<div class="date-range-fields input-group">
|
5
|
+
<%= f.text_field "#{attribute}_gt", class: 'datepicker form-control datepicker-from', value: params[:q][:created_at_gt], placeholder: t('spree.start') %>
|
6
|
+
|
7
|
+
<div class="input-group-prepend input-group-append">
|
8
|
+
<span class="input-group-text range-divider">
|
9
|
+
<i class="fa fa-arrow-right"></i>
|
10
|
+
</span>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
<%= f.text_field "#{attribute}_lt", class: 'datepicker form-control datepicker-to', value: params[:q][:created_at_lt], placeholder: t('spree.stop') %>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
</div>
|
@@ -0,0 +1,6 @@
|
|
1
|
+
<div class="col-12 col-md-6 col-lg-4 col-xl-3">
|
2
|
+
<div class="field">
|
3
|
+
<%= label_tag "q_#{ransack}", label.respond_to?(:call) ? label.call : label %>
|
4
|
+
<%= f.select ransack, options_for_select(options.call, params[:q][ransack]), {include_blank: true}, class: 'custom-select fullwidth' %>
|
5
|
+
</div>
|
6
|
+
</div>
|
@@ -81,7 +81,7 @@
|
|
81
81
|
<td><%= tax_rate.amount %></td>
|
82
82
|
<td><%= tax_rate.included_in_price? ? t('spree.say_yes') : t('spree.say_no') %></td>
|
83
83
|
<td><%= tax_rate.show_rate_in_label? ? t('spree.say_yes') : t('spree.say_no') %></td>
|
84
|
-
<td><%= tax_rate.expires_at.to_date.
|
84
|
+
<td><%= tax_rate.expires_at.to_date.to_fs(:short_date) if tax_rate.expires_at %></td>
|
85
85
|
<td><%= tax_rate.calculator && tax_rate.calculator.class.model_name.human %></td>
|
86
86
|
<td class="actions">
|
87
87
|
<% if can?(:update, tax_rate) %>
|
@@ -69,7 +69,7 @@
|
|
69
69
|
</colgroup>
|
70
70
|
<thead>
|
71
71
|
<tr data-hook="admin_users_index_headers">
|
72
|
-
<th><%= sort_link @search, :email, Spree.user_class.human_attribute_name(:email), {
|
72
|
+
<th><%= sort_link @search, :email, Spree.user_class.human_attribute_name(:email), {title: 'users_email_title'} %></th>
|
73
73
|
<th><%= Spree.user_class.human_attribute_name(:spree_roles) %></th>
|
74
74
|
<th class="align-center"><%= t('spree.num_orders') %></th>
|
75
75
|
<th class="align-center"><%= Spree.user_class.human_attribute_name(:lifetime_value) %></th>
|
@@ -25,13 +25,13 @@
|
|
25
25
|
</colgroup>
|
26
26
|
|
27
27
|
<thead>
|
28
|
-
<th><%= sort_link @search, :completed_at, Spree::Order.human_attribute_name(:completed_at), {
|
28
|
+
<th><%= sort_link @search, :completed_at, Spree::Order.human_attribute_name(:completed_at), {title: 'orders_completed_at_title'} %></th>
|
29
29
|
<th colspan=2><%= Spree::LineItem.human_attribute_name(:description) %></th>
|
30
30
|
<th><%= Spree::LineItem.human_attribute_name(:price) %></th>
|
31
31
|
<th><%= Spree::LineItem.human_attribute_name(:quantity) %></th>
|
32
32
|
<th><%= Spree::Order.human_attribute_name(:total) %></th>
|
33
|
-
<th><%= sort_link @search, :state, Spree::Order.human_attribute_name(:state), {
|
34
|
-
<th><%= sort_link @search, :number, t('spree.admin.user.order_num'), {
|
33
|
+
<th><%= sort_link @search, :state, Spree::Order.human_attribute_name(:state), {title: 'orders_state_title'} %></th>
|
34
|
+
<th><%= sort_link @search, :number, t('spree.admin.user.order_num'), {title: 'orders_number_title'} %></th>
|
35
35
|
</thead>
|
36
36
|
|
37
37
|
<tbody>
|
@@ -22,14 +22,14 @@
|
|
22
22
|
</colgroup>
|
23
23
|
<thead>
|
24
24
|
<tr data-hook="admin_orders_index_headers">
|
25
|
-
<th><%= sort_link @search, :completed_at, Spree::Order.human_attribute_name(:completed_at), {
|
26
|
-
<th><%= sort_link @search, :number, Spree::Order.human_attribute_name(:number), {
|
25
|
+
<th><%= sort_link @search, :completed_at, Spree::Order.human_attribute_name(:completed_at), {title: 'orders_completed_at_title'} %></th>
|
26
|
+
<th><%= sort_link @search, :number, Spree::Order.human_attribute_name(:number), {title: 'orders_number_title'} %></th>
|
27
27
|
<th><%= sort_link @search, :state %></th>
|
28
28
|
<th><%= sort_link @search, :payment_state %></th>
|
29
29
|
<% if Spree::Order.checkout_step_names.include?(:delivery) %>
|
30
30
|
<th><%= sort_link @search, :shipment_state %></th>
|
31
31
|
<% end %>
|
32
|
-
<th><%= sort_link @search, :total, Spree::Order.human_attribute_name(:total), {
|
32
|
+
<th><%= sort_link @search, :total, Spree::Order.human_attribute_name(:total), {title: 'orders_total_title'} %></th>
|
33
33
|
</tr>
|
34
34
|
</thead>
|
35
35
|
<tbody>
|
@@ -103,7 +103,7 @@
|
|
103
103
|
@shipping_categories,
|
104
104
|
:id,
|
105
105
|
:name,
|
106
|
-
{ include_blank: t('.use_product_shipping_category') },
|
106
|
+
{ include_blank: t('.use_product_shipping_category'), selected: @variant[:shipping_category_id] },
|
107
107
|
{ class: 'custom-select fullwidth' } %>
|
108
108
|
</div>
|
109
109
|
</div>
|
@@ -23,7 +23,7 @@
|
|
23
23
|
<tr data-hook="zones_header">
|
24
24
|
<th><%= sort_link @search,:name, Spree::Zone.human_attribute_name(:name), title: 'zones_order_by_name_title' %></th>
|
25
25
|
<th>
|
26
|
-
<%= sort_link @search,:description, Spree::Zone.human_attribute_name(:description), {
|
26
|
+
<%= sort_link @search,:description, Spree::Zone.human_attribute_name(:description), {title: 'zones_order_by_description_title'} %>
|
27
27
|
</th>
|
28
28
|
<th class="actions"></th>
|
29
29
|
</tr>
|
data/config/routes.rb
CHANGED
@@ -14,17 +14,6 @@ Spree::Core::Engine.routes.draw do
|
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
|
-
resources :promotions do
|
18
|
-
resources :promotion_rules
|
19
|
-
resources :promotion_actions
|
20
|
-
resources :promotion_codes, only: [:index, :new, :create]
|
21
|
-
resources :promotion_code_batches, only: [:index, :new, :create] do
|
22
|
-
get '/download', to: "promotion_code_batches#download", defaults: { format: "csv" }
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
resources :promotion_categories, except: [:show]
|
27
|
-
|
28
17
|
resources :zones
|
29
18
|
|
30
19
|
resources :tax_categories
|