solidus_backend 4.6.2 → 4.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Rakefile +17 -17
- data/app/assets/javascripts/spree/backend/components/tabs.js +0 -2
- data/app/assets/javascripts/spree/backend/views/tables/selectable_table/sum_return_item_amount.js +1 -1
- data/app/controllers/spree/admin/adjustments_controller.rb +1 -1
- data/app/controllers/spree/admin/base_controller.rb +9 -9
- data/app/controllers/spree/admin/cancellations_controller.rb +3 -3
- data/app/controllers/spree/admin/customer_returns_controller.rb +6 -6
- data/app/controllers/spree/admin/images_controller.rb +2 -2
- data/app/controllers/spree/admin/locale_controller.rb +4 -4
- 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/orders_controller.rb +29 -29
- data/app/controllers/spree/admin/payment_methods_controller.rb +3 -3
- data/app/controllers/spree/admin/payments_controller.rb +9 -9
- data/app/controllers/spree/admin/prices_controller.rb +1 -1
- data/app/controllers/spree/admin/product_properties_controller.rb +1 -1
- data/app/controllers/spree/admin/products_controller.rb +14 -14
- data/app/controllers/spree/admin/properties_controller.rb +3 -3
- data/app/controllers/spree/admin/refunds_controller.rb +2 -2
- data/app/controllers/spree/admin/reimbursements_controller.rb +4 -8
- data/app/controllers/spree/admin/resource_controller.rb +10 -10
- data/app/controllers/spree/admin/return_authorizations_controller.rb +14 -11
- data/app/controllers/spree/admin/return_items_controller.rb +1 -1
- data/app/controllers/spree/admin/search_controller.rb +8 -8
- data/app/controllers/spree/admin/stock_items_controller.rb +5 -5
- data/app/controllers/spree/admin/stock_locations_controller.rb +1 -1
- data/app/controllers/spree/admin/stock_movements_controller.rb +5 -5
- data/app/controllers/spree/admin/store_credits_controller.rb +10 -10
- data/app/controllers/spree/admin/style_guide_controller.rb +19 -19
- data/app/controllers/spree/admin/taxons/attachment_controller.rb +2 -2
- data/app/controllers/spree/admin/taxons_controller.rb +5 -5
- data/app/controllers/spree/admin/theme_controller.rb +3 -3
- data/app/controllers/spree/admin/users/api_key_controller.rb +2 -2
- data/app/controllers/spree/admin/users_controller.rb +6 -6
- data/app/controllers/spree/admin/variant_property_rule_values_controller.rb +1 -1
- data/app/controllers/spree/admin/variants_controller.rb +8 -8
- data/app/helpers/spree/admin/adjustments_helper.rb +7 -7
- data/app/helpers/spree/admin/base_helper.rb +10 -10
- data/app/helpers/spree/admin/navigation_helper.rb +37 -37
- data/app/helpers/spree/admin/orders_helper.rb +2 -2
- data/app/helpers/spree/admin/reimbursement_type_helper.rb +1 -1
- data/app/helpers/spree/admin/stock_locations_helper.rb +1 -1
- data/app/helpers/spree/admin/store_credit_events_helper.rb +9 -9
- data/app/views/spree/admin/search/users.json.jbuilder +2 -2
- data/config/initializers/assets.rb +1 -1
- data/config/initializers/form_builder.rb +1 -1
- data/config/routes.rb +9 -9
- data/lib/solidus_backend.rb +1 -1
- data/lib/spree/backend/callbacks.rb +2 -2
- data/lib/spree/backend/config.rb +1 -1
- data/lib/spree/backend/engine.rb +3 -3
- data/lib/spree/backend.rb +12 -12
- data/lib/spree/backend_configuration/deprecated_tab_constants.rb +2 -0
- data/lib/spree/backend_configuration.rb +46 -46
- data/lib/spree_backend.rb +1 -1
- data/solidus_backend.gemspec +22 -21
- metadata +30 -13
|
@@ -5,11 +5,11 @@ module Spree
|
|
|
5
5
|
module BaseHelper
|
|
6
6
|
def field_container(model, method, options = {}, &block)
|
|
7
7
|
css_classes = options[:class].to_a
|
|
8
|
-
css_classes <<
|
|
8
|
+
css_classes << "field"
|
|
9
9
|
if error_message_on(model, method).present?
|
|
10
|
-
css_classes <<
|
|
10
|
+
css_classes << "withError"
|
|
11
11
|
end
|
|
12
|
-
content_tag(:div, capture(&block), class: css_classes.join(
|
|
12
|
+
content_tag(:div, capture(&block), class: css_classes.join(" "), id: "#{model}_#{method}_field")
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
def error_message_on(object, method, _options = {})
|
|
@@ -18,15 +18,15 @@ module Spree
|
|
|
18
18
|
|
|
19
19
|
if obj && obj.errors[method].present?
|
|
20
20
|
errors = safe_join(obj.errors[method], "<br>".html_safe)
|
|
21
|
-
content_tag(:span, errors, class:
|
|
21
|
+
content_tag(:span, errors, class: "formError")
|
|
22
22
|
else
|
|
23
|
-
|
|
23
|
+
""
|
|
24
24
|
end
|
|
25
25
|
end
|
|
26
26
|
|
|
27
27
|
def admin_hint(title, text)
|
|
28
|
-
content_tag(:span, class:
|
|
29
|
-
content_tag(:i,
|
|
28
|
+
content_tag(:span, class: "hint-tooltip", title:, data: {content: text}) do
|
|
29
|
+
content_tag(:i, "", class: "fa fa-info-circle")
|
|
30
30
|
end
|
|
31
31
|
end
|
|
32
32
|
|
|
@@ -34,16 +34,16 @@ module Spree
|
|
|
34
34
|
return if date.blank?
|
|
35
35
|
|
|
36
36
|
format = if with_time
|
|
37
|
-
t(
|
|
37
|
+
t("spree.date_picker.format_with_time", default: "%Y/%m/%d %H:%M")
|
|
38
38
|
else
|
|
39
|
-
t(
|
|
39
|
+
t("spree.date_picker.format", default: "%Y/%m/%d")
|
|
40
40
|
end
|
|
41
41
|
|
|
42
42
|
l(date, format:)
|
|
43
43
|
end
|
|
44
44
|
|
|
45
45
|
def spree_dom_id(record)
|
|
46
|
-
dom_id(record,
|
|
46
|
+
dom_id(record, "spree")
|
|
47
47
|
end
|
|
48
48
|
|
|
49
49
|
def admin_layout(layout = nil)
|
|
@@ -19,9 +19,9 @@ module Spree
|
|
|
19
19
|
admin_breadcrumb(content_for(:page_title))
|
|
20
20
|
end
|
|
21
21
|
|
|
22
|
-
content_tag :ol, class:
|
|
22
|
+
content_tag :ol, class: "breadcrumb" do
|
|
23
23
|
segments = admin_breadcrumbs.map do |level|
|
|
24
|
-
content_tag(:li, level, class: "breadcrumb-item #{level == admin_breadcrumbs.last
|
|
24
|
+
content_tag(:li, level, class: "breadcrumb-item #{"active" if level == admin_breadcrumbs.last}")
|
|
25
25
|
end
|
|
26
26
|
safe_join(segments)
|
|
27
27
|
end
|
|
@@ -33,9 +33,9 @@ module Spree
|
|
|
33
33
|
elsif content_for?(:page_title)
|
|
34
34
|
content_for(:page_title)
|
|
35
35
|
elsif admin_breadcrumbs.any?
|
|
36
|
-
admin_breadcrumbs.map { |breadcrumb| strip_tags(breadcrumb) }.reverse.join(
|
|
36
|
+
admin_breadcrumbs.map { |breadcrumb| strip_tags(breadcrumb) }.reverse.join(" - ")
|
|
37
37
|
else
|
|
38
|
-
t(controller.controller_name, default: controller.controller_name.titleize, scope:
|
|
38
|
+
t(controller.controller_name, default: controller.controller_name.titleize, scope: "spree")
|
|
39
39
|
end
|
|
40
40
|
end
|
|
41
41
|
|
|
@@ -75,76 +75,76 @@ module Spree
|
|
|
75
75
|
request.fullpath.starts_with?(options[:url])
|
|
76
76
|
end
|
|
77
77
|
|
|
78
|
-
css_classes <<
|
|
78
|
+
css_classes << "selected" if options[:selected]
|
|
79
79
|
|
|
80
80
|
if options[:icon]
|
|
81
81
|
link = link_to_with_icon(options[:icon], label, options[:url])
|
|
82
|
-
css_classes <<
|
|
82
|
+
css_classes << "tab-with-icon"
|
|
83
83
|
else
|
|
84
84
|
link = link_to(label, options[:url])
|
|
85
85
|
end
|
|
86
86
|
block_content = capture(&block) if block_given?
|
|
87
|
-
content_tag(
|
|
87
|
+
content_tag("li", link + block_content.to_s, class: css_classes.join(" "))
|
|
88
88
|
end
|
|
89
89
|
|
|
90
90
|
def link_to_clone(resource, options = {})
|
|
91
|
-
options[:data] = {
|
|
91
|
+
options[:data] = {action: "clone"}
|
|
92
92
|
options[:method] = :post
|
|
93
|
-
link_to_with_icon(
|
|
93
|
+
link_to_with_icon("copy", t("spree.clone"), clone_object_url(resource), options)
|
|
94
94
|
end
|
|
95
95
|
|
|
96
96
|
def link_to_new(resource)
|
|
97
|
-
options[:data] = {
|
|
98
|
-
link_to_with_icon(
|
|
97
|
+
options[:data] = {action: "new"}
|
|
98
|
+
link_to_with_icon("plus", t("spree.new"), edit_object_url(resource))
|
|
99
99
|
end
|
|
100
100
|
|
|
101
101
|
def link_to_edit(resource, options = {})
|
|
102
102
|
url = options[:url] || edit_object_url(resource)
|
|
103
|
-
options[:data] = {
|
|
104
|
-
link_to_with_icon(
|
|
103
|
+
options[:data] = {action: "edit"}
|
|
104
|
+
link_to_with_icon("edit", t("spree.actions.edit"), url, options)
|
|
105
105
|
end
|
|
106
106
|
|
|
107
107
|
def link_to_edit_url(url, options = {})
|
|
108
|
-
options[:data] = {
|
|
109
|
-
link_to_with_icon(
|
|
108
|
+
options[:data] = {action: "edit"}
|
|
109
|
+
link_to_with_icon("edit", t("spree.actions.edit"), url, options)
|
|
110
110
|
end
|
|
111
111
|
|
|
112
112
|
def link_to_delete(resource, options = {})
|
|
113
113
|
url = options[:url] || object_url(resource)
|
|
114
|
-
name = options[:name] || t(
|
|
115
|
-
confirm = options[:confirm] || t(
|
|
114
|
+
name = options[:name] || t("spree.actions.delete")
|
|
115
|
+
confirm = options[:confirm] || t("spree.are_you_sure")
|
|
116
116
|
options[:class] = "#{options[:class]} delete-resource".strip
|
|
117
|
-
options[:data] = {
|
|
118
|
-
link_to_with_icon
|
|
117
|
+
options[:data] = {confirm:, action: "remove"}
|
|
118
|
+
link_to_with_icon "trash", name, url, options
|
|
119
119
|
end
|
|
120
120
|
|
|
121
121
|
def link_to_with_icon(icon_name, text, url, options = {})
|
|
122
122
|
options[:class] = "#{options[:class]} icon_link with-tip".strip
|
|
123
123
|
|
|
124
|
-
if icon_name.starts_with?(
|
|
125
|
-
svg_map = image_path(
|
|
124
|
+
if icon_name.starts_with?("ri-")
|
|
125
|
+
svg_map = image_path("spree/backend/themes/solidus_admin/remixicon.symbol.svg")
|
|
126
126
|
icon_tag = tag.svg(
|
|
127
|
-
tag.use(
|
|
128
|
-
|
|
129
|
-
style: "fill: currentColor;"
|
|
127
|
+
tag.use("xlink:href": "#{svg_map}##{icon_name}"),
|
|
128
|
+
"aria-hidden": true,
|
|
129
|
+
style: "fill: currentColor;"
|
|
130
130
|
)
|
|
131
131
|
else
|
|
132
132
|
options[:class] << " fa fa-#{icon_name}"
|
|
133
|
-
icon_tag =
|
|
133
|
+
icon_tag = "".html_safe
|
|
134
134
|
end
|
|
135
135
|
|
|
136
|
-
options[:class] +=
|
|
136
|
+
options[:class] += " no-text" if options[:no_text]
|
|
137
137
|
options[:title] = text if options[:no_text]
|
|
138
|
-
text = options[:no_text] ?
|
|
138
|
+
text = options[:no_text] ? "" : content_tag(:span, text, class: "text")
|
|
139
139
|
options.delete(:no_text)
|
|
140
140
|
link_to(icon_tag + text, url, options)
|
|
141
141
|
end
|
|
142
142
|
|
|
143
143
|
def solidus_icon(icon_name)
|
|
144
|
-
icon_name ? content_tag(:i,
|
|
144
|
+
icon_name ? content_tag(:i, "", class: icon_name) : ""
|
|
145
145
|
end
|
|
146
146
|
|
|
147
|
-
def configurations_menu_item(link_text, url, description =
|
|
147
|
+
def configurations_menu_item(link_text, url, description = "")
|
|
148
148
|
%(<tr>
|
|
149
149
|
<td>#{link_to(link_text, url)}</td>
|
|
150
150
|
<td>#{description}</td>
|
|
@@ -154,9 +154,9 @@ module Spree
|
|
|
154
154
|
|
|
155
155
|
def configurations_sidebar_menu_item(link_text, url, options = {})
|
|
156
156
|
is_active = url.ends_with?(controller.controller_name) ||
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
options[:class] = is_active ?
|
|
157
|
+
url.ends_with?("#{controller.controller_name}/edit") ||
|
|
158
|
+
url.ends_with?("#{controller.controller_name.singularize}/edit")
|
|
159
|
+
options[:class] = is_active ? "active" : nil
|
|
160
160
|
content_tag(:li, options) do
|
|
161
161
|
link_to(link_text, url)
|
|
162
162
|
end
|
|
@@ -164,12 +164,12 @@ module Spree
|
|
|
164
164
|
|
|
165
165
|
def settings_tab_item(link_text, url, options = {})
|
|
166
166
|
is_active = url.ends_with?(controller.controller_name) ||
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
options[:class] =
|
|
170
|
-
options[:class] +=
|
|
167
|
+
url.ends_with?("#{controller.controller_name}/edit") ||
|
|
168
|
+
url.ends_with?("#{controller.controller_name.singularize}/edit")
|
|
169
|
+
options[:class] = "fa"
|
|
170
|
+
options[:class] += " active" if is_active
|
|
171
171
|
options[:data] ||= {}
|
|
172
|
-
options[:data][:hook] = "admin_settings_#{link_text.downcase.tr(
|
|
172
|
+
options[:data][:hook] = "admin_settings_#{link_text.downcase.tr(" ", "_")}"
|
|
173
173
|
content_tag(:li, options) do
|
|
174
174
|
link_to(link_text, url)
|
|
175
175
|
end
|
|
@@ -16,7 +16,7 @@ module Spree
|
|
|
16
16
|
translated_event,
|
|
17
17
|
[event.to_sym, :admin, @order],
|
|
18
18
|
method: :put,
|
|
19
|
-
data: {
|
|
19
|
+
data: {confirm: t(:order_sure_want_to, event: translated_event, scope: :spree)}
|
|
20
20
|
)
|
|
21
21
|
end
|
|
22
22
|
safe_join(links, " ".html_safe)
|
|
@@ -72,7 +72,7 @@ module Spree
|
|
|
72
72
|
"P" => "Not Processed",
|
|
73
73
|
"S" => "Issuer indicates that CVV2 data should be present on the card, but the merchant has indicated data is not present on the card",
|
|
74
74
|
"U" => "Issuer has not certified for CVV2 or Issuer has not provided Visa with the CVV2 encryption keys",
|
|
75
|
-
""
|
|
75
|
+
"" => "Transaction failed because wrong CVV2 number was entered or no CVV2 number was entered"
|
|
76
76
|
}
|
|
77
77
|
end
|
|
78
78
|
end
|
|
@@ -4,7 +4,7 @@ module Spree
|
|
|
4
4
|
module Admin
|
|
5
5
|
module ReimbursementTypeHelper
|
|
6
6
|
def reimbursement_type_name(reimbursement_type)
|
|
7
|
-
reimbursement_type.present? ? reimbursement_type.name.humanize :
|
|
7
|
+
reimbursement_type.present? ? reimbursement_type.name.humanize : ""
|
|
8
8
|
end
|
|
9
9
|
end
|
|
10
10
|
end
|
|
@@ -4,7 +4,7 @@ module Spree
|
|
|
4
4
|
module Admin
|
|
5
5
|
module StockLocationsHelper
|
|
6
6
|
def admin_stock_location_display_name(stock_location)
|
|
7
|
-
[stock_location.admin_name, stock_location.name].reject(&:blank?).join(
|
|
7
|
+
[stock_location.admin_name, stock_location.name].reject(&:blank?).join(" / ")
|
|
8
8
|
end
|
|
9
9
|
end
|
|
10
10
|
end
|
|
@@ -6,18 +6,18 @@ module Spree::Admin::StoreCreditEventsHelper
|
|
|
6
6
|
Spree::Payment.to_s => {
|
|
7
7
|
new_tab: true,
|
|
8
8
|
href_type: :payment,
|
|
9
|
-
translation_key:
|
|
9
|
+
translation_key: "admin.store_credits.payment_originator"
|
|
10
10
|
},
|
|
11
11
|
Spree::Refund.to_s => {
|
|
12
12
|
new_tab: true,
|
|
13
13
|
href_type: :payments,
|
|
14
|
-
translation_key:
|
|
14
|
+
translation_key: "admin.store_credits.refund_originator"
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
def store_credit_event_admin_action_name(store_credit_event)
|
|
19
19
|
if Spree::StoreCreditEvent::NON_EXPOSED_ACTIONS.include?(store_credit_event.action) ||
|
|
20
|
-
|
|
20
|
+
store_credit_event.action == Spree::StoreCredit::VOID_ACTION
|
|
21
21
|
t("spree.store_credit.display_action.admin.#{store_credit_event.action}")
|
|
22
22
|
else
|
|
23
23
|
store_credit_event.display_action
|
|
@@ -35,35 +35,35 @@ module Spree::Admin::StoreCreditEventsHelper
|
|
|
35
35
|
|
|
36
36
|
options = {}
|
|
37
37
|
link_options = originator_links[store_credit_event.originator.class.to_s]
|
|
38
|
-
options[:target] =
|
|
38
|
+
options[:target] = "_blank" if link_options[:new_tab]
|
|
39
39
|
|
|
40
40
|
# Although not all href_types are used in originator_links
|
|
41
41
|
# they are necessary because they may be used within extensions
|
|
42
42
|
case link_options[:href_type]
|
|
43
43
|
when :user
|
|
44
44
|
link_to(
|
|
45
|
-
t(link_options[:translation_key], email: originator.email, scope:
|
|
45
|
+
t(link_options[:translation_key], email: originator.email, scope: "spree"),
|
|
46
46
|
spree.edit_admin_user_path(originator),
|
|
47
47
|
options
|
|
48
48
|
)
|
|
49
49
|
when :line_item
|
|
50
50
|
order = originator.line_item.order
|
|
51
51
|
link_to(
|
|
52
|
-
t(link_options[:translation_key], order_number: order.number, scope:
|
|
52
|
+
t(link_options[:translation_key], order_number: order.number, scope: "spree"),
|
|
53
53
|
spree.edit_admin_order_path(order),
|
|
54
54
|
options
|
|
55
55
|
)
|
|
56
56
|
when :payment
|
|
57
57
|
order = originator.order
|
|
58
58
|
link_to(
|
|
59
|
-
t(link_options[:translation_key], order_number: order.number, scope:
|
|
59
|
+
t(link_options[:translation_key], order_number: order.number, scope: "spree"),
|
|
60
60
|
spree.admin_order_payment_path(order, originator),
|
|
61
61
|
options
|
|
62
62
|
)
|
|
63
63
|
when :payments
|
|
64
64
|
order = originator.payment.order
|
|
65
65
|
link_to(
|
|
66
|
-
t(link_options[:translation_key], order_number: order.number, scope:
|
|
66
|
+
t(link_options[:translation_key], order_number: order.number, scope: "spree"),
|
|
67
67
|
spree.admin_order_payments_path(order),
|
|
68
68
|
options
|
|
69
69
|
)
|
|
@@ -80,7 +80,7 @@ module Spree::Admin::StoreCreditEventsHelper
|
|
|
80
80
|
originator_links[Spree.user_class.to_s] = {
|
|
81
81
|
new_tab: true,
|
|
82
82
|
href_type: :user,
|
|
83
|
-
translation_key:
|
|
83
|
+
translation_key: "admin.store_credits.user_originator"
|
|
84
84
|
}
|
|
85
85
|
end
|
|
86
86
|
end
|
|
@@ -21,7 +21,7 @@ json.array!(@users) do |user|
|
|
|
21
21
|
]
|
|
22
22
|
json.ship_address do
|
|
23
23
|
if user.ship_address
|
|
24
|
-
json.(user.ship_address, *address_fields)
|
|
24
|
+
json.call(user.ship_address, *address_fields)
|
|
25
25
|
if user.ship_address.state
|
|
26
26
|
json.state do
|
|
27
27
|
json.name user.ship_address.state.name
|
|
@@ -37,7 +37,7 @@ json.array!(@users) do |user|
|
|
|
37
37
|
|
|
38
38
|
json.bill_address do
|
|
39
39
|
if user.bill_address
|
|
40
|
-
json.(user.bill_address, *address_fields)
|
|
40
|
+
json.call(user.bill_address, *address_fields)
|
|
41
41
|
if user.bill_address.state
|
|
42
42
|
json.state do
|
|
43
43
|
json.name user.bill_address.state.name
|
|
@@ -19,4 +19,4 @@ class ActionView::Helpers::FormBuilder
|
|
|
19
19
|
end
|
|
20
20
|
end
|
|
21
21
|
|
|
22
|
-
ActionView::Base.field_error_proc = proc{ |html_tag, _instance| "<span class=\"field_with_errors\">#{html_tag}</span>".html_safe }
|
|
22
|
+
ActionView::Base.field_error_proc = proc { |html_tag, _instance| "<span class=\"field_with_errors\">#{html_tag}</span>".html_safe }
|
data/config/routes.rb
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Spree::Core::Engine.routes.draw do
|
|
4
4
|
namespace :admin do
|
|
5
|
-
get
|
|
6
|
-
get
|
|
5
|
+
get "/search/users", to: "search#users", as: :search_users
|
|
6
|
+
get "/search/products", to: "search#products", as: :search_products
|
|
7
7
|
|
|
8
|
-
put
|
|
9
|
-
put
|
|
8
|
+
put "/locale/set", to: "locale#set", defaults: {format: :json}, as: :set_locale
|
|
9
|
+
put "/theme/set", to: "theme#set", defaults: {format: :json}, as: :set_theme
|
|
10
10
|
|
|
11
11
|
resources :dashboards, only: [] do
|
|
12
12
|
collection do
|
|
@@ -45,7 +45,7 @@ Spree::Core::Engine.routes.draw do
|
|
|
45
45
|
resources :variants_including_master, only: [:update]
|
|
46
46
|
resources :prices, only: [:destroy, :index, :edit, :update, :new, :create]
|
|
47
47
|
end
|
|
48
|
-
get
|
|
48
|
+
get "/products/:product_slug/stock", to: "stock_items#index", as: :product_stock
|
|
49
49
|
|
|
50
50
|
resources :option_types do
|
|
51
51
|
collection do
|
|
@@ -54,11 +54,11 @@ Spree::Core::Engine.routes.draw do
|
|
|
54
54
|
end
|
|
55
55
|
end
|
|
56
56
|
|
|
57
|
-
delete
|
|
57
|
+
delete "/option_values/:id", to: "option_values#destroy", as: :option_value
|
|
58
58
|
|
|
59
59
|
resources :properties
|
|
60
60
|
|
|
61
|
-
delete
|
|
61
|
+
delete "/product_properties/:id", to: "product_properties#destroy", as: :product_property
|
|
62
62
|
|
|
63
63
|
resources :orders do
|
|
64
64
|
member do
|
|
@@ -118,7 +118,7 @@ Spree::Core::Engine.routes.draw do
|
|
|
118
118
|
post :update_positions
|
|
119
119
|
end
|
|
120
120
|
resources :taxons do
|
|
121
|
-
resource :attachment, controller:
|
|
121
|
+
resource :attachment, controller: "taxons/attachment", only: [:destroy]
|
|
122
122
|
end
|
|
123
123
|
end
|
|
124
124
|
|
|
@@ -174,5 +174,5 @@ Spree::Core::Engine.routes.draw do
|
|
|
174
174
|
resources :style_guide, only: [:index]
|
|
175
175
|
end
|
|
176
176
|
|
|
177
|
-
get
|
|
177
|
+
get "/admin", to: "admin/root#index", as: :admin
|
|
178
178
|
end
|
data/lib/solidus_backend.rb
CHANGED
|
@@ -43,8 +43,8 @@ module Spree
|
|
|
43
43
|
return if callbacks[action].nil?
|
|
44
44
|
case callback_type.to_sym
|
|
45
45
|
when :before then callbacks[action].before_methods.each { |method| send method }
|
|
46
|
-
when :after
|
|
47
|
-
when :fails
|
|
46
|
+
when :after then callbacks[action].after_methods.each { |method| send method }
|
|
47
|
+
when :fails then callbacks[action].fails_methods.each { |method| send method }
|
|
48
48
|
end
|
|
49
49
|
end
|
|
50
50
|
end
|
data/lib/spree/backend/config.rb
CHANGED
data/lib/spree/backend/engine.rb
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require
|
|
3
|
+
require "spree/backend/config"
|
|
4
4
|
|
|
5
5
|
module Spree
|
|
6
6
|
module Backend
|
|
7
7
|
class Engine < ::Rails::Engine
|
|
8
8
|
# Leave initializer empty for backwards-compatability. Other apps
|
|
9
9
|
# might still rely on this event.
|
|
10
|
-
initializer
|
|
10
|
+
initializer("spree.backend.environment", before: :load_config_initializers) {}
|
|
11
11
|
|
|
12
12
|
config.after_initialize do
|
|
13
|
-
Spree::Backend::Config.check_load_defaults_called(
|
|
13
|
+
Spree::Backend::Config.check_load_defaults_called("Spree::Backend::Config")
|
|
14
14
|
end
|
|
15
15
|
end
|
|
16
16
|
end
|
data/lib/spree/backend.rb
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require
|
|
4
|
-
require
|
|
3
|
+
require "spree_core"
|
|
4
|
+
require "spree_api"
|
|
5
5
|
|
|
6
|
-
require
|
|
7
|
-
require
|
|
8
|
-
require
|
|
9
|
-
require
|
|
10
|
-
require
|
|
11
|
-
require
|
|
12
|
-
require
|
|
6
|
+
require "jquery-rails"
|
|
7
|
+
require "sassc-rails"
|
|
8
|
+
require "handlebars_assets"
|
|
9
|
+
require "font-awesome-rails"
|
|
10
|
+
require "jbuilder"
|
|
11
|
+
require "kaminari"
|
|
12
|
+
require "responders"
|
|
13
13
|
|
|
14
|
-
require
|
|
15
|
-
require
|
|
16
|
-
require
|
|
14
|
+
require "spree/backend/action_callbacks"
|
|
15
|
+
require "spree/backend/callbacks"
|
|
16
|
+
require "spree/backend/engine"
|
|
@@ -4,6 +4,7 @@ Spree.deprecator.warn(
|
|
|
4
4
|
"Spree::BackendConfiguration::*_TABS is deprecated. Please use Spree::BackendConfiguration::MenuItem(match_path:) instead."
|
|
5
5
|
)
|
|
6
6
|
|
|
7
|
+
# rubocop:disable Lint/OrAssignmentToConstant
|
|
7
8
|
Spree::BackendConfiguration::ORDER_TABS ||= [
|
|
8
9
|
:orders, :payments, :creditcard_payments,
|
|
9
10
|
:shipments, :credit_cards, :return_authorizations,
|
|
@@ -32,3 +33,4 @@ Spree::BackendConfiguration::CONFIGURATION_TABS ||= [
|
|
|
32
33
|
:return_reasons, :adjustment_reasons,
|
|
33
34
|
:store_credit_reasons
|
|
34
35
|
]
|
|
36
|
+
# rubocop:enable Lint/OrAssignmentToConstant
|