solidus_backend 2.11.15 → 3.0.0.rc2
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/app/assets/javascripts/spree/backend/collections/shipments.js +0 -1
- data/app/assets/javascripts/spree/backend/models/line_item.js +0 -2
- data/app/assets/javascripts/spree/backend/models/order.js +0 -1
- data/app/assets/javascripts/spree/backend/user_picker.js +1 -1
- data/app/assets/javascripts/spree/backend/views/order/address.js +3 -4
- data/app/assets/javascripts/spree/backend/views/order/customer_select.js +1 -1
- data/app/assets/javascripts/spree/backend.js +0 -1
- data/app/assets/stylesheets/spree/backend/globals/_deprecated_variables.scss +7 -24
- data/app/assets/stylesheets/spree/backend/globals/_functions.scss +0 -17
- data/app/assets/stylesheets/spree/backend/globals/_variables.scss +0 -3
- data/app/assets/stylesheets/spree/backend/sections/_orders.scss +0 -4
- data/app/assets/stylesheets/spree/backend/spree_admin.scss +0 -1
- data/app/controllers/spree/admin/orders_controller.rb +0 -2
- data/app/controllers/spree/admin/payment_methods_controller.rb +0 -12
- data/app/controllers/spree/admin/resource_controller.rb +5 -22
- data/app/controllers/spree/admin/search_controller.rb +1 -1
- data/app/controllers/spree/admin/users_controller.rb +0 -34
- data/app/helpers/spree/admin/base_helper.rb +0 -93
- data/app/helpers/spree/admin/navigation_helper.rb +0 -33
- data/app/helpers/spree/admin/orders_helper.rb +1 -1
- data/app/views/spree/admin/orders/index.html.erb +4 -15
- data/app/views/spree/admin/search/users.json.jbuilder +0 -3
- data/app/views/spree/admin/shared/_address_form.html.erb +4 -16
- data/app/views/spree/admin/taxons/_form.html.erb +12 -16
- data/config/routes.rb +0 -1
- data/lib/spree/backend.rb +3 -4
- metadata +7 -13
- data/app/assets/javascripts/spree/backend/routes.js +0 -46
- data/app/assets/stylesheets/spree/backend/components/_states.scss +0 -11
- data/app/controllers/spree/admin/log_entries_controller.rb +0 -23
- data/app/helpers/spree/admin/payments_helper.rb +0 -12
- data/app/views/spree/admin/log_entries/index.html.erb +0 -11
- data/app/views/spree/admin/taxons/attachment_forms/_paperclip.html.erb +0 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d883e31d8d9dc7f660154fb30d230147d6a0058295efd2b89f136dcfb90bc53
|
4
|
+
data.tar.gz: 37e837f85e4333dfbf3f6dbfed46f27a8470df725606864c397888277b22e6d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad08af46b9ceb6d01a71d924acbf52d56035a1122eaa84628b33dd8132e86cb8d05066b32cb81cebc609d3dc1887a3863f211d7bd078eea2f1587dfb89dc2df6
|
7
|
+
data.tar.gz: 9d395e27b06456a0c706035ecaa52f6af4a278b946c561de41ea7b9f502ac3a2f136644f6492e725119a017f1a950bb119d6fbf962870ac7c20dc8a6a95a6887
|
@@ -1,5 +1,5 @@
|
|
1
1
|
Spree.Views.Order.Address = Backbone.View.extend({
|
2
|
-
initialize: function() {
|
2
|
+
initialize: function(options) {
|
3
3
|
// read initial values from page
|
4
4
|
this.onChange();
|
5
5
|
|
@@ -23,9 +23,8 @@ Spree.Views.Order.Address = Backbone.View.extend({
|
|
23
23
|
|
24
24
|
eachField: function(callback){
|
25
25
|
var view = this;
|
26
|
-
var fields = ["name", "
|
27
|
-
|
28
|
-
"state_name"];
|
26
|
+
var fields = ["name", "company", "address1", "address2",
|
27
|
+
"city", "zipcode", "phone", "country_id", "state_name"];
|
29
28
|
_.each(fields, function(field) {
|
30
29
|
var el = view.$('[name$="[' + field + ']"]');
|
31
30
|
if (el.length) callback(field, el);
|
@@ -51,7 +51,6 @@
|
|
51
51
|
//= require spree/backend/progress
|
52
52
|
//= require spree/backend/promotions
|
53
53
|
//= require spree/backend/promotions/activation
|
54
|
-
//= require spree/backend/routes
|
55
54
|
//= require spree/backend/shipments
|
56
55
|
//= require spree/backend/spree-select2
|
57
56
|
//= require spree/backend/stock_management
|
@@ -1,24 +1,7 @@
|
|
1
|
-
//
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
@include solidus-deprecated-variable("color-3", "color-dark-light");
|
9
|
-
$color-3: $color-dark-light !default;
|
10
|
-
|
11
|
-
@include solidus-deprecated-variable("color-4", "color-dark");
|
12
|
-
$color-4: $color-dark !default;
|
13
|
-
|
14
|
-
@include solidus-deprecated-variable("color-5", "color-red");
|
15
|
-
$color-5: $color-red !default;
|
16
|
-
|
17
|
-
@include solidus-deprecated-variable("color-6", "color-yellow");
|
18
|
-
$color-6: $color-yellow !default;
|
19
|
-
|
20
|
-
@include solidus-deprecated-variable("color-7", "color-light");
|
21
|
-
$color-7: $color-light !default;
|
22
|
-
|
23
|
-
@include solidus-deprecated-variable("color-8", "color-dark-light");
|
24
|
-
$color-8: $color-dark-light !default;
|
1
|
+
// This is a good place where we can deprecate scss variables.
|
2
|
+
// The deprecation will be shown when scss is precompiled
|
3
|
+
// only if deprecated variables are redefined in a custom
|
4
|
+
// variables_override.scss file of the host application.
|
5
|
+
// E.g.
|
6
|
+
//
|
7
|
+
// @include solidus-deprecated-variable("deprecated-variable", "new-variable");
|
@@ -1,20 +1,3 @@
|
|
1
|
-
// Make color very close to white
|
2
|
-
@function very-light($color, $adjust: 3){
|
3
|
-
@warn "The `very-light` function is deprecated. Please use the default sass `lighten` function, instead.";
|
4
|
-
|
5
|
-
@if type-of($adjust) == 'number' and $adjust > 0 {
|
6
|
-
@for $i from 0 through 100 {
|
7
|
-
@if lighten($color, $i) == white and ($i - $adjust) > $adjust {
|
8
|
-
@return lighten($color, $i - $adjust);
|
9
|
-
}
|
10
|
-
}
|
11
|
-
}
|
12
|
-
@else {
|
13
|
-
@debug "Please correct $adjust value. It should be number and larger then 0. Currently it is '#{type-of($adjust)}' with value '#{$adjust}'"
|
14
|
-
}
|
15
|
-
@return $color;
|
16
|
-
};
|
17
|
-
|
18
1
|
// Quick fix for dynamic variables missing in SASS
|
19
2
|
@function get-value($prop, $val, $search) {
|
20
3
|
$n1: index($prop, $search);
|
@@ -62,11 +62,8 @@ $color-tab-active-bg: $color-white !default;
|
|
62
62
|
$color-tab-active-border: $color-white !default;
|
63
63
|
|
64
64
|
// Basic flash colors
|
65
|
-
@include bs-deprecated-variable("color-success", "theme-color(success)");
|
66
65
|
$color-success: $color-green !default;
|
67
|
-
@include bs-deprecated-variable("color-notice", "theme-color(warning)");
|
68
66
|
$color-notice: $color-yellow !default;
|
69
|
-
@include bs-deprecated-variable("color-error", "theme-color(danger)");
|
70
67
|
$color-error: $color-red !default;
|
71
68
|
|
72
69
|
// Breadcrumb custom variable
|
@@ -19,7 +19,6 @@
|
|
19
19
|
@import 'spree/backend/shared/header';
|
20
20
|
@import 'spree/backend/shared/utilities';
|
21
21
|
|
22
|
-
@import 'spree/backend/components/states';
|
23
22
|
@import 'spree/backend/components/actions';
|
24
23
|
@import 'spree/backend/components/breadcrumb';
|
25
24
|
@import 'spree/backend/components/buttons';
|
@@ -3,8 +3,6 @@
|
|
3
3
|
module Spree
|
4
4
|
module Admin
|
5
5
|
class OrdersController < Spree::Admin::BaseController
|
6
|
-
helper 'spree/admin/payments'
|
7
|
-
|
8
6
|
before_action :initialize_order_events
|
9
7
|
before_action :load_order, only: [:edit, :update, :complete, :advance, :cancel, :resume, :approve, :resend, :unfinalize_adjustments, :finalize_adjustments, :cart, :confirm]
|
10
8
|
around_action :lock_order, only: [:update, :advance, :complete, :confirm, :cancel, :resume, :approve, :resend]
|
@@ -50,20 +50,8 @@ module Spree
|
|
50
50
|
super.ordered_by_position
|
51
51
|
end
|
52
52
|
|
53
|
-
def load_providers
|
54
|
-
Spree::Deprecation.warn('load_providers is deprecated. Please use load_payment_method_types instead.', caller)
|
55
|
-
load_payment_method_types
|
56
|
-
end
|
57
|
-
|
58
53
|
def load_payment_method_types
|
59
54
|
@payment_method_types = Rails.application.config.spree.payment_methods.sort_by(&:name)
|
60
|
-
# TODO: Remove `@providers` instance var once `load_providers` gets removed.
|
61
|
-
@providers = @payment_method_types
|
62
|
-
end
|
63
|
-
|
64
|
-
def validate_payment_provider
|
65
|
-
Spree::Deprecation.warn('validate_payment_provider is deprecated. Please use validate_payment_method_type instead.', caller)
|
66
|
-
validate_payment_method_type
|
67
55
|
end
|
68
56
|
|
69
57
|
def validate_payment_method_type
|
@@ -94,8 +94,6 @@ class Spree::Admin::ResourceController < Spree::Admin::BaseController
|
|
94
94
|
destroy_result =
|
95
95
|
if @object.respond_to?(:discard)
|
96
96
|
@object.discard
|
97
|
-
elsif @object.respond_to?(:paranoia_destroy)
|
98
|
-
@object.paranoia_destroy
|
99
97
|
else
|
100
98
|
@object.destroy
|
101
99
|
end
|
@@ -148,11 +146,6 @@ class Spree::Admin::ResourceController < Spree::Admin::BaseController
|
|
148
146
|
self.class.parent_data[:model_name].gsub('spree/', '')
|
149
147
|
end
|
150
148
|
|
151
|
-
def model_name
|
152
|
-
Spree::Deprecation.warn('model_name is deprecated. Please use parent_model_name instead.', caller)
|
153
|
-
parent_model_name
|
154
|
-
end
|
155
|
-
|
156
149
|
def object_name
|
157
150
|
controller_name.singularize
|
158
151
|
end
|
@@ -185,23 +178,13 @@ class Spree::Admin::ResourceController < Spree::Admin::BaseController
|
|
185
178
|
end
|
186
179
|
end
|
187
180
|
|
188
|
-
def parent_data
|
189
|
-
Spree::Deprecation.warn('parent_data is deprecated without replacement.', caller)
|
190
|
-
self.class.parent_data
|
191
|
-
end
|
192
|
-
|
193
181
|
def parent
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
instance_variable_set("@#{parent_model_name}", @parent)
|
199
|
-
else
|
200
|
-
Spree::Deprecation.warn "Calling #parent is deprecated on a ResourceController which has not defined a belongs_to"
|
201
|
-
nil
|
202
|
-
end
|
182
|
+
@parent ||= self.class.parent_data[:model_class]
|
183
|
+
.includes(self.class.parent_data[:includes])
|
184
|
+
.find_by!(self.class.parent_data[:find_by] => params["#{parent_model_name}_id"])
|
185
|
+
instance_variable_set("@#{parent_model_name}", @parent)
|
203
186
|
rescue ActiveRecord::RecordNotFound => e
|
204
|
-
resource_not_found(flash_class: e.model.constantize, redirect_url: spree.polymorphic_url([:admin, parent_model_name.pluralize
|
187
|
+
resource_not_found(flash_class: e.model.constantize, redirect_url: spree.polymorphic_url([:admin, parent_model_name.pluralize]))
|
205
188
|
end
|
206
189
|
|
207
190
|
def parent?
|
@@ -81,40 +81,6 @@ module Spree
|
|
81
81
|
@orders = @search.result.page(params[:page]).per(Spree::Config[:admin_products_per_page])
|
82
82
|
end
|
83
83
|
|
84
|
-
def generate_api_key
|
85
|
-
Spree::Deprecation.warn <<-WARN.strip_heredoc, caller
|
86
|
-
The route or controller action you are using is deprecated.
|
87
|
-
|
88
|
-
Instead of:
|
89
|
-
generate_api_key_admin_user PUT /admin/users/:id/generate_api_key
|
90
|
-
|
91
|
-
Please use:
|
92
|
-
admin_user_api_key POST /admin/users/:user_id/api_key
|
93
|
-
WARN
|
94
|
-
|
95
|
-
if @user.generate_spree_api_key!
|
96
|
-
flash[:success] = t('spree.admin.api.key_generated')
|
97
|
-
end
|
98
|
-
redirect_to edit_admin_user_path(@user)
|
99
|
-
end
|
100
|
-
|
101
|
-
def clear_api_key
|
102
|
-
Spree::Deprecation.warn <<-WARN.strip_heredoc, caller
|
103
|
-
The route or controller action you are using is deprecated.
|
104
|
-
|
105
|
-
Instead of:
|
106
|
-
clear_api_key_admin_user PUT /admin/users/:id/clear_api_key
|
107
|
-
|
108
|
-
Please use:
|
109
|
-
admin_user_api_key DELETE /admin/users/:user_id/api_key
|
110
|
-
WARN
|
111
|
-
|
112
|
-
if @user.clear_spree_api_key!
|
113
|
-
flash[:success] = t('spree.admin.api.key_cleared')
|
114
|
-
end
|
115
|
-
redirect_to edit_admin_user_path(@user)
|
116
|
-
end
|
117
|
-
|
118
84
|
def model_class
|
119
85
|
Spree.user_class
|
120
86
|
end
|
@@ -42,99 +42,6 @@ module Spree
|
|
42
42
|
l(date, format: format)
|
43
43
|
end
|
44
44
|
|
45
|
-
# @deprecated Render `spree/admin/shared/preference_fields/\#{preference_type}' instead
|
46
|
-
def preference_field_tag(name, value, options)
|
47
|
-
type = options.delete(:type) || :text
|
48
|
-
render "spree/admin/shared/preference_fields/#{type}",
|
49
|
-
name: name, value: value, html_options: options
|
50
|
-
end
|
51
|
-
deprecate preference_field_tag:
|
52
|
-
"Render `spree/admin/shared/preference_fields/\#{preference_type}' instead",
|
53
|
-
deprecator: Spree::Deprecation
|
54
|
-
|
55
|
-
# @deprecated Render `spree/admin/shared/preference_fields/\#{preference_type}' instead
|
56
|
-
def preference_field_for(form, field, options)
|
57
|
-
type = options.delete(:type) || :text
|
58
|
-
render "spree/admin/shared/preference_fields/#{type}",
|
59
|
-
form: form, attribute: field, html_options: options
|
60
|
-
end
|
61
|
-
deprecate preference_field_for:
|
62
|
-
"Render `spree/admin/shared/preference_fields/\#{preference_type}' instead",
|
63
|
-
deprecator: Spree::Deprecation
|
64
|
-
|
65
|
-
# @deprecated Pass an `html_options' hash into preference field partial instead
|
66
|
-
def preference_field_options(options)
|
67
|
-
field_options = case options[:type]
|
68
|
-
when :integer
|
69
|
-
{ size: 10,
|
70
|
-
class: 'input_integer' }
|
71
|
-
when :boolean
|
72
|
-
{}
|
73
|
-
when :string
|
74
|
-
{ size: 10,
|
75
|
-
class: 'input_string fullwidth' }
|
76
|
-
when :password
|
77
|
-
{ size: 10,
|
78
|
-
class: 'password_string fullwidth' }
|
79
|
-
when :text
|
80
|
-
{ rows: 15,
|
81
|
-
cols: 85,
|
82
|
-
class: 'fullwidth' }
|
83
|
-
else
|
84
|
-
{ size: 10,
|
85
|
-
class: 'input_string fullwidth' }
|
86
|
-
end
|
87
|
-
|
88
|
-
field_options.merge!({
|
89
|
-
readonly: options[:readonly],
|
90
|
-
disabled: options[:disabled],
|
91
|
-
size: options[:size]
|
92
|
-
})
|
93
|
-
end
|
94
|
-
deprecate preference_field_options: "Pass an `html_options' hash into " \
|
95
|
-
"`render('spree/admin/shared/preference_fields/\#{preference_type}')` instead)",
|
96
|
-
deprecator: Spree::Deprecation
|
97
|
-
|
98
|
-
# @deprecated Please render each preference keys partial instead. Example:
|
99
|
-
# <% @object.preferences.keys.each do |key| %>
|
100
|
-
# <%= render "spree/admin/shared/preference_fields/#{@object.preference_type(key)}",
|
101
|
-
# form: f, attribute: "preferred_#{key}", label: t(key, scope: 'spree') %>
|
102
|
-
# <% end %>
|
103
|
-
def preference_fields(object, form)
|
104
|
-
return unless object.respond_to?(:preferences)
|
105
|
-
capture do
|
106
|
-
object.preferences.keys.each do |key|
|
107
|
-
concat render("spree/admin/shared/preference_fields/#{object.preference_type(key)}",
|
108
|
-
form: form, attribute: "preferred_#{key}", label: t(key, scope: 'spree'))
|
109
|
-
end
|
110
|
-
end
|
111
|
-
end
|
112
|
-
deprecate preference_fields: "Please render each preference key's partial instead. Example: \n" \
|
113
|
-
"<% @object.preferences.keys.each do |key| %>\n" \
|
114
|
-
"<%= render \"spree/admin/shared/preference_fields/\#{@object.preference_type(key)}\", \n" \
|
115
|
-
"form: f, attribute: \"preferred_\#{key}\", label: t(key, scope: 'spree') %>\n" \
|
116
|
-
"<% end %>", deprecator: Spree::Deprecation
|
117
|
-
|
118
|
-
def link_to_add_fields(name, target, options = {})
|
119
|
-
name = '' if options[:no_text]
|
120
|
-
css_classes = options[:class] ? options[:class] + " spree_add_fields" : "spree_add_fields"
|
121
|
-
link_to_with_icon('plus', name, 'javascript:', data: { target: target }, class: css_classes)
|
122
|
-
end
|
123
|
-
deprecate link_to_add_fields: "Please use button_tag instead, Example: \n" \
|
124
|
-
"button_tag \"Name\", type: \"button\", data: { target: \"tbody#div\" }", deprecator: Spree::Deprecation
|
125
|
-
|
126
|
-
# renders hidden field and link to remove record using nested_attributes
|
127
|
-
def link_to_remove_fields(name, form, options = {})
|
128
|
-
name = '' if options[:no_text]
|
129
|
-
options[:class] = '' unless options[:class]
|
130
|
-
options[:class] += 'no-text with-tip' if options[:no_text]
|
131
|
-
url = form.object.persisted? ? [:admin, form.object] : '#'
|
132
|
-
link_to_with_icon('trash', name, url, class: "spree_remove_fields #{options[:class]}", data: { action: 'remove' }, title: t('spree.actions.remove')) +
|
133
|
-
form.hidden_field(:_destroy)
|
134
|
-
end
|
135
|
-
deprecate link_to_remove_fields: "Please use link_to_delete instead, Example: \n" \
|
136
|
-
"link_to_delete \"form.object\"", deprecator: Spree::Deprecation
|
137
|
-
|
138
45
|
def spree_dom_id(record)
|
139
46
|
dom_id(record, 'spree')
|
140
47
|
end
|
@@ -124,39 +124,6 @@ module Spree
|
|
124
124
|
icon_name ? content_tag(:i, '', class: icon_name) : ''
|
125
125
|
end
|
126
126
|
|
127
|
-
alias_method :icon, :solidus_icon
|
128
|
-
deprecate icon: :solidus_icon, deprecator: Spree::Deprecation
|
129
|
-
|
130
|
-
def button(text, icon_name = nil, button_type = 'submit', options = {})
|
131
|
-
Spree::Deprecation.warn "button helper is deprecated. Instead use button_tag"
|
132
|
-
class_names = "button"
|
133
|
-
if icon_name
|
134
|
-
Spree::Deprecation.warn "Using icon_name arg is deprecated. Icons could not be visible in future versions.", caller
|
135
|
-
class_names = "fa fa-#{icon_name} #{class_names}"
|
136
|
-
end
|
137
|
-
button_tag(text, options.merge(type: button_type, class: class_names))
|
138
|
-
end
|
139
|
-
|
140
|
-
def button_link_to(text, url, html_options = {})
|
141
|
-
Spree::Deprecation.warn "Passing button_link_to is deprecated. Use either link_to or button_to instead.", caller
|
142
|
-
html_options = { class: '' }.merge(html_options)
|
143
|
-
if html_options[:method] &&
|
144
|
-
!html_options[:method].to_s.casecmp('get').zero? &&
|
145
|
-
!html_options[:remote]
|
146
|
-
form_tag(url, method: html_options.delete(:method)) do
|
147
|
-
html_options.delete(:icon)
|
148
|
-
button_tag(text, html_options)
|
149
|
-
end
|
150
|
-
else
|
151
|
-
html_options[:class] += ' button'
|
152
|
-
|
153
|
-
if html_options[:icon]
|
154
|
-
html_options[:class] += " fa fa-#{html_options[:icon]}"
|
155
|
-
end
|
156
|
-
link_to(text, url, html_options)
|
157
|
-
end
|
158
|
-
end
|
159
|
-
|
160
127
|
def configurations_menu_item(link_text, url, description = '')
|
161
128
|
%(<tr>
|
162
129
|
<td>#{link_to(link_text, url)}</td>
|
@@ -11,7 +11,7 @@ module Spree
|
|
11
11
|
translated_event = t(event, scope: [:spree, :admin, :order, :events])
|
12
12
|
links << button_to(
|
13
13
|
translated_event,
|
14
|
-
[event
|
14
|
+
[event, :admin, @order],
|
15
15
|
method: :put,
|
16
16
|
data: { confirm: t(:order_sure_want_to, event: translated_event, scope: :spree) }
|
17
17
|
)
|
@@ -65,21 +65,10 @@
|
|
65
65
|
</div>
|
66
66
|
|
67
67
|
<div class="col-12 col-xl-6">
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
</div>
|
73
|
-
<% else %>
|
74
|
-
<div class="field">
|
75
|
-
<%= label_tag :q_bill_address_firstname_start, t('spree.first_name_begins_with') %>
|
76
|
-
<%= f.text_field :bill_address_firstname_start, size: 25 %>
|
77
|
-
</div>
|
78
|
-
<div class="field">
|
79
|
-
<%= label_tag :q_bill_address_lastname_start, t('spree.last_name_begins_with') %>
|
80
|
-
<%= f.text_field :bill_address_lastname_start, size: 25 %>
|
81
|
-
</div>
|
82
|
-
<% end %>
|
68
|
+
<div class="field">
|
69
|
+
<%= label_tag :q_bill_address_name_start, t('spree.name_contains') %>
|
70
|
+
<%= f.text_field :bill_address_name_start, size: 25 %>
|
71
|
+
</div>
|
83
72
|
</div>
|
84
73
|
|
85
74
|
<div class="col-12 col-xl-6">
|
@@ -16,9 +16,6 @@ json.array!(@users) do |user|
|
|
16
16
|
:country_id,
|
17
17
|
:company
|
18
18
|
]
|
19
|
-
unless Spree::Config.use_combined_first_and_last_name_in_address
|
20
|
-
address_fields.push(:firstname, :lastname)
|
21
|
-
end
|
22
19
|
json.ship_address do
|
23
20
|
if user.ship_address
|
24
21
|
json.(user.ship_address, *address_fields)
|
@@ -1,22 +1,10 @@
|
|
1
1
|
<% s_or_b = type.chars.first %>
|
2
2
|
|
3
3
|
<div id="<%= type %>" data-hook="address_fields">
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
</div>
|
9
|
-
<% else %>
|
10
|
-
<div class="field <%= "#{type}-row" %>">
|
11
|
-
<%= f.label :firstname %>
|
12
|
-
<%= f.text_field :firstname, class: 'fullwidth' %>
|
13
|
-
</div>
|
14
|
-
|
15
|
-
<div class="field <%= "#{type}-row" %>">
|
16
|
-
<%= f.label :lastname %>
|
17
|
-
<%= f.text_field :lastname, class: 'fullwidth' %>
|
18
|
-
</div>
|
19
|
-
<% end %>
|
4
|
+
<div class="field <%= "#{type}-row" %>">
|
5
|
+
<%= f.label :name %>
|
6
|
+
<%= f.text_field :name, class: 'fullwidth' %>
|
7
|
+
</div>
|
20
8
|
|
21
9
|
<% if Spree::Config[:company] %>
|
22
10
|
<div class="field <%= "#{type}-row" %>">
|
@@ -20,22 +20,18 @@
|
|
20
20
|
</div>
|
21
21
|
<% end %>
|
22
22
|
|
23
|
-
|
24
|
-
<%=
|
25
|
-
|
26
|
-
|
27
|
-
<%= f.
|
28
|
-
<%=
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
authenticity_token: form_authenticity_token),
|
36
|
-
method: :delete,
|
37
|
-
class: 'btn btn-sm btn-danger' %>
|
38
|
-
<% end %>
|
23
|
+
<%= f.field_container :icon do %>
|
24
|
+
<%= f.label :icon %><br>
|
25
|
+
<%= f.file_field :icon %>
|
26
|
+
<% if f.object.icon_present? %>
|
27
|
+
<%= image_tag f.object.icon(:mini) %>
|
28
|
+
<%= link_to t('spree.actions.remove'),
|
29
|
+
admin_taxonomy_taxon_attachment_path(@taxonomy,
|
30
|
+
@taxon.id,
|
31
|
+
attachment_definition: :icon,
|
32
|
+
authenticity_token: form_authenticity_token),
|
33
|
+
method: :delete,
|
34
|
+
class: 'btn btn-sm btn-danger' %>
|
39
35
|
<% end %>
|
40
36
|
<% end %>
|
41
37
|
</div>
|
data/config/routes.rb
CHANGED
data/lib/spree/backend.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require '
|
3
|
+
require 'spree_core'
|
4
|
+
require 'spree_api'
|
5
|
+
|
4
6
|
require 'jquery-rails'
|
5
7
|
require 'coffee-rails'
|
6
8
|
require 'sassc-rails'
|
@@ -11,9 +13,6 @@ require 'jbuilder'
|
|
11
13
|
require 'kaminari'
|
12
14
|
require 'responders'
|
13
15
|
|
14
|
-
require 'spree_core'
|
15
|
-
require 'spree_api'
|
16
|
-
|
17
16
|
require 'spree/backend/action_callbacks'
|
18
17
|
require 'spree/backend/callbacks'
|
19
18
|
require 'spree/backend/engine'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solidus_backend
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0.rc2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Solidus Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: solidus_api
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 3.0.0.rc2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 3.0.0.rc2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: solidus_core
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 3.0.0.rc2
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 3.0.0.rc2
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: coffee-rails
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -226,7 +226,6 @@ files:
|
|
226
226
|
- app/assets/javascripts/spree/backend/progress.js
|
227
227
|
- app/assets/javascripts/spree/backend/promotions.js
|
228
228
|
- app/assets/javascripts/spree/backend/promotions/activation.js
|
229
|
-
- app/assets/javascripts/spree/backend/routes.js
|
230
229
|
- app/assets/javascripts/spree/backend/shipments.js
|
231
230
|
- app/assets/javascripts/spree/backend/shipping_methods/stock_locations_picker.js
|
232
231
|
- app/assets/javascripts/spree/backend/spree-select2.js
|
@@ -307,7 +306,6 @@ files:
|
|
307
306
|
- app/assets/stylesheets/spree/backend/components/_pills.scss
|
308
307
|
- app/assets/stylesheets/spree/backend/components/_progress.scss
|
309
308
|
- app/assets/stylesheets/spree/backend/components/_sidebar.scss
|
310
|
-
- app/assets/stylesheets/spree/backend/components/_states.scss
|
311
309
|
- app/assets/stylesheets/spree/backend/components/_stock_table.scss
|
312
310
|
- app/assets/stylesheets/spree/backend/components/_table-filter.scss
|
313
311
|
- app/assets/stylesheets/spree/backend/components/_tabs.scss
|
@@ -357,7 +355,6 @@ files:
|
|
357
355
|
- app/controllers/spree/admin/general_settings_controller.rb
|
358
356
|
- app/controllers/spree/admin/images_controller.rb
|
359
357
|
- app/controllers/spree/admin/locale_controller.rb
|
360
|
-
- app/controllers/spree/admin/log_entries_controller.rb
|
361
358
|
- app/controllers/spree/admin/option_types_controller.rb
|
362
359
|
- app/controllers/spree/admin/option_values_controller.rb
|
363
360
|
- app/controllers/spree/admin/orders/customer_details_controller.rb
|
@@ -409,7 +406,6 @@ files:
|
|
409
406
|
- app/helpers/spree/admin/customer_returns_helper.rb
|
410
407
|
- app/helpers/spree/admin/navigation_helper.rb
|
411
408
|
- app/helpers/spree/admin/orders_helper.rb
|
412
|
-
- app/helpers/spree/admin/payments_helper.rb
|
413
409
|
- app/helpers/spree/admin/products_helper.rb
|
414
410
|
- app/helpers/spree/admin/promotions_helper.rb
|
415
411
|
- app/helpers/spree/admin/reimbursement_type_helper.rb
|
@@ -449,7 +445,6 @@ files:
|
|
449
445
|
- app/views/spree/admin/images/edit.html.erb
|
450
446
|
- app/views/spree/admin/images/index.html.erb
|
451
447
|
- app/views/spree/admin/images/new.html.erb
|
452
|
-
- app/views/spree/admin/log_entries/index.html.erb
|
453
448
|
- app/views/spree/admin/option_types/_form.html.erb
|
454
449
|
- app/views/spree/admin/option_types/_option_value_fields.html.erb
|
455
450
|
- app/views/spree/admin/option_types/edit.html.erb
|
@@ -701,7 +696,6 @@ files:
|
|
701
696
|
- app/views/spree/admin/taxonomies/index.html.erb
|
702
697
|
- app/views/spree/admin/taxonomies/new.html.erb
|
703
698
|
- app/views/spree/admin/taxons/_form.html.erb
|
704
|
-
- app/views/spree/admin/taxons/attachment_forms/_paperclip.html.erb
|
705
699
|
- app/views/spree/admin/taxons/edit.html.erb
|
706
700
|
- app/views/spree/admin/taxons/index.html.erb
|
707
701
|
- app/views/spree/admin/taxons/search.json.jbuilder
|
@@ -919,7 +913,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
919
913
|
- !ruby/object:Gem::Version
|
920
914
|
version: 1.8.23
|
921
915
|
requirements: []
|
922
|
-
rubygems_version: 3.
|
916
|
+
rubygems_version: 3.1.4
|
923
917
|
signing_key:
|
924
918
|
specification_version: 4
|
925
919
|
summary: Admin interface for the Solidus e-commerce framework.
|
@@ -1,46 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @deprecated Spree.routes will be removed in a future release. Please use Spree.pathFor instead.
|
3
|
-
* See: https://github.com/solidusio/solidus/issues/3405
|
4
|
-
*/
|
5
|
-
|
6
|
-
var admin_routes = {
|
7
|
-
classifications_api: Spree.pathFor('api/classifications'),
|
8
|
-
option_value_search: Spree.pathFor('api/option_values'),
|
9
|
-
option_type_search: Spree.pathFor('api/option_types'),
|
10
|
-
orders_api: Spree.pathFor('api/orders'),
|
11
|
-
product_search: Spree.pathFor('api/products'),
|
12
|
-
admin_product_search: Spree.pathFor('admin/search/products'),
|
13
|
-
shipments_api: Spree.pathFor('api/shipments'),
|
14
|
-
checkouts_api: Spree.pathFor('api/checkouts'),
|
15
|
-
stock_locations_api: Spree.pathFor('api/stock_locations'),
|
16
|
-
taxon_products_api: Spree.pathFor('api/taxons/products'),
|
17
|
-
taxons_search: Spree.pathFor('api/taxons'),
|
18
|
-
user_search: Spree.pathFor('admin/search/users'),
|
19
|
-
variants_api: Spree.pathFor('api/variants'),
|
20
|
-
users_api: Spree.pathFor('api/users'),
|
21
|
-
|
22
|
-
line_items_api: function(order_id) {
|
23
|
-
return Spree.pathFor('api/orders/' + order_id + '/line_items')
|
24
|
-
},
|
25
|
-
|
26
|
-
payments_api: function(order_id) {
|
27
|
-
return Spree.pathFor('api/orders/' + order_id + '/payments')
|
28
|
-
},
|
29
|
-
|
30
|
-
stock_items_api: function(stock_location_id) {
|
31
|
-
return Spree.pathFor('api/stock_locations/' + stock_location_id + '/stock_items')
|
32
|
-
}
|
33
|
-
}
|
34
|
-
|
35
|
-
var frontend_routes = {
|
36
|
-
states_search: Spree.pathFor('api/states'),
|
37
|
-
apply_coupon_code: function(order_id) {
|
38
|
-
return Spree.pathFor("api/orders/" + order_id + "/coupon_codes");
|
39
|
-
}
|
40
|
-
}
|
41
|
-
|
42
|
-
if(typeof Proxy == "function") {
|
43
|
-
Spree.routes = new Proxy(Object.assign(admin_routes, frontend_routes), Spree.routesDeprecationProxy);
|
44
|
-
} else {
|
45
|
-
Object.assign(Spree.routes, admin_routes)
|
46
|
-
}
|
@@ -1,23 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Spree
|
4
|
-
module Admin
|
5
|
-
class LogEntriesController < Spree::Admin::BaseController
|
6
|
-
before_action :find_order_and_payment
|
7
|
-
|
8
|
-
def index
|
9
|
-
Spree::Deprecation.warn 'Using a dedicated route for payment log entries ' \
|
10
|
-
'has been deprecated in favor of displaying the log entries on ' \
|
11
|
-
'the payment screen itself.', caller_locations(0)
|
12
|
-
@log_entries = @payment.log_entries
|
13
|
-
end
|
14
|
-
|
15
|
-
private
|
16
|
-
|
17
|
-
def find_order_and_payment
|
18
|
-
@order = Spree::Order.where(number: params[:order_id]).first!
|
19
|
-
@payment = @order.payments.find(params[:payment_id])
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Spree
|
4
|
-
module Admin
|
5
|
-
module PaymentsHelper
|
6
|
-
def payment_method_name(payment)
|
7
|
-
Spree::Deprecation.warn "payment_method_name(payment) is deprecated. Instead use payment.payment_method.name"
|
8
|
-
payment.payment_method.name
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
@@ -1,11 +0,0 @@
|
|
1
|
-
<%= render partial: 'spree/admin/shared/order_tabs', locals: { current: 'Payments' }%>
|
2
|
-
|
3
|
-
<% admin_breadcrumb(Spree::Payment.model_name.human) %>
|
4
|
-
<% admin_breadcrumb(plural_resource_name(Spree::LogEntry)) %>
|
5
|
-
|
6
|
-
<% content_for :page_actions do %>
|
7
|
-
<li><%= link_to t('spree.logs'), spree.admin_order_payment_log_entries_url(@order, @payment), class: 'btn btn-primary' %></li>
|
8
|
-
<li><%= link_to t('spree.back_to_payment'), spree.admin_order_payment_url(@order, @payment), class: 'btn btn-primary' %></li>
|
9
|
-
<% end %>
|
10
|
-
|
11
|
-
<%= render 'spree/admin/payments/log_entries', log_entries: @log_entries %>
|
@@ -1,23 +0,0 @@
|
|
1
|
-
<%
|
2
|
-
Spree::Deprecation.warn(
|
3
|
-
"This partial with its support for multiple Spree::Taxon attachments is deprecated and will be removed in a future " \
|
4
|
-
"version of Solidus, please overwrite the standard view if you need to support custom attachments."
|
5
|
-
)
|
6
|
-
%>
|
7
|
-
|
8
|
-
<% f.object.class.attachment_definitions.each do |attachment, definition| %>
|
9
|
-
<%= f.field_container attachment do %>
|
10
|
-
<%= f.label attachment %><br>
|
11
|
-
<%= f.file_field attachment %>
|
12
|
-
<% if f.object.send(:"#{attachment}_present?") %>
|
13
|
-
<%= image_tag f.object.send(attachment, definition[:default_style]) %>
|
14
|
-
<%= link_to t('spree.actions.remove'),
|
15
|
-
admin_taxonomy_taxon_attachment_path(@taxonomy,
|
16
|
-
@taxon.id,
|
17
|
-
attachment_definition: attachment,
|
18
|
-
authenticity_token: form_authenticity_token),
|
19
|
-
method: :delete,
|
20
|
-
class: 'btn btn-sm btn-danger' %>
|
21
|
-
<% end %>
|
22
|
-
<% end %>
|
23
|
-
<% end %>
|