solidus_backend 2.11.1 → 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.

Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/spree/backend.js +0 -1
  3. data/app/assets/javascripts/spree/backend/collections/shipments.js +0 -1
  4. data/app/assets/javascripts/spree/backend/models/line_item.js +0 -2
  5. data/app/assets/javascripts/spree/backend/models/order.js +0 -1
  6. data/app/assets/javascripts/spree/backend/user_picker.js +1 -1
  7. data/app/assets/javascripts/spree/backend/views/order/customer_select.js +1 -1
  8. data/app/assets/javascripts/spree/backend/views/tables/return_items.js +5 -0
  9. data/app/assets/javascripts/spree/backend/views/tables/selectable_table/sum_return_item_amount.js +10 -3
  10. data/app/assets/stylesheets/spree/backend/_bootstrap_custom.scss +1 -1
  11. data/app/assets/stylesheets/spree/backend/components/_actions.scss +62 -0
  12. data/app/assets/stylesheets/spree/backend/components/_messages.scss +6 -6
  13. data/app/assets/stylesheets/spree/backend/globals/_deprecated_variables.scss +7 -24
  14. data/app/assets/stylesheets/spree/backend/globals/_deprecation.scss +1 -1
  15. data/app/assets/stylesheets/spree/backend/globals/_functions.scss +0 -17
  16. data/app/assets/stylesheets/spree/backend/globals/_variables.scss +0 -28
  17. data/app/assets/stylesheets/spree/backend/sections/_orders.scss +0 -4
  18. data/app/assets/stylesheets/spree/backend/spree_admin.scss +0 -1
  19. data/app/controllers/spree/admin/orders_controller.rb +0 -2
  20. data/app/controllers/spree/admin/payment_methods_controller.rb +0 -12
  21. data/app/controllers/spree/admin/products_controller.rb +5 -0
  22. data/app/controllers/spree/admin/refunds_controller.rb +3 -2
  23. data/app/controllers/spree/admin/resource_controller.rb +4 -21
  24. data/app/controllers/spree/admin/search_controller.rb +1 -1
  25. data/app/controllers/spree/admin/users_controller.rb +0 -34
  26. data/app/helpers/spree/admin/base_helper.rb +0 -93
  27. data/app/helpers/spree/admin/navigation_helper.rb +0 -33
  28. data/app/views/spree/admin/orders/customer_details/show.html.erb +1 -1
  29. data/app/views/spree/admin/orders/index.html.erb +4 -15
  30. data/app/views/spree/admin/products/_form.html.erb +1 -1
  31. data/app/views/spree/admin/products/index.html.erb +1 -1
  32. data/app/views/spree/admin/search/users.json.jbuilder +0 -3
  33. data/app/views/spree/admin/shared/_address_form.html.erb +4 -16
  34. data/app/views/spree/admin/shared/_settings_sub_menu.html.erb +5 -5
  35. data/app/views/spree/admin/store_credits/index.html.erb +1 -1
  36. data/app/views/spree/admin/style_guide/topics/typography/_colors.html.erb +3 -3
  37. data/app/views/spree/admin/taxons/_form.html.erb +14 -1
  38. data/config/routes.rb +0 -1
  39. data/lib/spree/backend.rb +3 -4
  40. data/lib/spree/backend_configuration.rb +11 -11
  41. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_en-AU.js +10 -0
  42. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_en-GB.js +10 -0
  43. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_en-IN.js +10 -0
  44. data/vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_en-NZ.js +10 -0
  45. metadata +10 -12
  46. data/app/assets/javascripts/spree/backend/routes.js +0 -46
  47. data/app/assets/stylesheets/spree/backend/components/_states.scss +0 -11
  48. data/app/controllers/spree/admin/log_entries_controller.rb +0 -23
  49. data/app/helpers/spree/admin/payments_helper.rb +0 -12
  50. data/app/views/spree/admin/log_entries/index.html.erb +0 -11
  51. data/app/views/spree/admin/taxons/attachment_forms/_paperclip.html.erb +0 -16
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fa06c5143ed4281567a88b1a3237c63e96c608a32c4f3d11ee54811f6b776108
4
- data.tar.gz: 479a858bb8c4e43936ecee55d573ebd15228772438c461e86c95ed5a4d65f91d
3
+ metadata.gz: 9d883e31d8d9dc7f660154fb30d230147d6a0058295efd2b89f136dcfb90bc53
4
+ data.tar.gz: 37e837f85e4333dfbf3f6dbfed46f27a8470df725606864c397888277b22e6d8
5
5
  SHA512:
6
- metadata.gz: f96eb0492d0bc0af33cd16e7a6f25b4d3c43164683fd6d3f5572062af4bb65fff5ba651930ee2b2b1da564a6c5769ab3cf78bc9dfb0da9b0e922087b4d2ab16c
7
- data.tar.gz: 1605c6b1a664c1703a776fd1669bd17c946d826e7fec078f15e74f77d7973071e0ea0385e13a7277efb4f8dc9c92d016733da1da6cddc33f4007c58c9e93b547
6
+ metadata.gz: ad08af46b9ceb6d01a71d924acbf52d56035a1122eaa84628b33dd8132e86cb8d05066b32cb81cebc609d3dc1887a3863f211d7bd078eea2f1587dfb89dc2df6
7
+ data.tar.gz: 9d395e27b06456a0c706035ecaa52f6af4a278b946c561de41ea7b9f502ac3a2f136644f6492e725119a017f1a950bb119d6fbf962870ac7c20dc8a6a95a6887
@@ -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,4 +1,3 @@
1
- //= require spree/backend/routes
2
1
  //= require spree/backend/models/shipment
3
2
 
4
3
  Spree.Collections.Shipments = Backbone.Collection.extend({
@@ -1,5 +1,3 @@
1
- //= require spree/backend/routes
2
-
3
1
  Spree.Models.LineItem = Backbone.Model.extend({
4
2
  defaults: {
5
3
  quantity: 1
@@ -1,4 +1,3 @@
1
- //= require spree/backend/routes
2
1
  //= require spree/backend/collections/line_items
3
2
  //= require spree/backend/collections/shipments
4
3
  //= require spree/backend/models/address
@@ -28,7 +28,7 @@ $.fn.userAutocomplete = function () {
28
28
  q: {
29
29
  m: 'or',
30
30
  email_start: term,
31
- firstname_or_lastname_start: term
31
+ name_start: term
32
32
  }
33
33
  };
34
34
  },
@@ -34,7 +34,7 @@ Spree.Views.Order.CustomerSelect = Backbone.View.extend({
34
34
  q: {
35
35
  m: 'or',
36
36
  email_start: term,
37
- firstname_or_lastname_start: term
37
+ name_start: term
38
38
  }
39
39
  }
40
40
  },
@@ -4,6 +4,11 @@ Spree.Views.Tables.ReturnItems = Backbone.View.extend({
4
4
  var tfoot = document.createElement('tfoot')
5
5
  new Spree.Views.Tables.SelectableTable.SumReturnItemAmount({el: tfoot, model: this.model});
6
6
  this.$el.append(tfoot);
7
+
8
+ this.$el.find('input, select').not('.add-item').on('change', function(e) {
9
+ $(this).closest('tr').find('input.add-item').prop('checked', true)
10
+ .change();
11
+ });
7
12
  }
8
13
  },
9
14
  })
@@ -15,8 +15,11 @@ Spree.Views.Tables.SelectableTable.SumReturnItemAmount = Backbone.View.extend({
15
15
  },
16
16
 
17
17
  totalSelectedReturnItemAmount: function () {
18
- var totalAmount = 0.00;
18
+ var totalAmount = 0;
19
19
  var selectedItems = [];
20
+ var decimals = 0;
21
+ var separator = Spree.t('currency_separator');
22
+ var amount, decimalAmount;
20
23
 
21
24
  if(this.model.get('allSelected')) {
22
25
  selectedItems = $('.selectable');
@@ -24,9 +27,13 @@ Spree.Views.Tables.SelectableTable.SumReturnItemAmount = Backbone.View.extend({
24
27
  selectedItems = $(this.model.attributes.selectedItems);
25
28
  }
26
29
  selectedItems.each(function(_, selectedItem){
27
- totalAmount += $(selectedItem).data('price');
30
+ amount = $(selectedItem).data('price');
31
+ decimalAmount = amount.toString().split(separator)[1] || '';
32
+ decimals = Math.max(decimals, decimalAmount.length);
33
+
34
+ totalAmount += parseFloat(amount);
28
35
  })
29
36
 
30
- return totalAmount;
37
+ return accounting.formatNumber(totalAmount, decimals, Spree.t('currency_delimiter'), separator);
31
38
  },
32
39
  });
@@ -13,7 +13,7 @@ $secondary: $color-dark-accent !default;
13
13
  $blue: $color-primary !default;
14
14
  $red: $color-red !default;
15
15
  $orange: $color-yellow !default;
16
- $green: $color-success !default;
16
+ $green: $color-green !default;
17
17
 
18
18
  // Body
19
19
  //
@@ -1,3 +1,65 @@
1
+ $color-action-success-bg: theme-color-level(success, -10) !default;
2
+ $color-action-success-brd: theme-color-level(success, -9) !default;
3
+ $color-action-warning-bg: theme-color-level(warning, -10) !default;
4
+ $color-action-warning-brd: theme-color-level(warning, -9) !default;
5
+ $color-action-danger-bg: theme-color-level(danger, -10) !default;
6
+ $color-action-danger-brd: theme-color-level(danger, -9) !default;
7
+
8
+ $color-action-edit-bg: $color-action-success-bg !default;
9
+ $color-action-edit-brd: $color-action-success-brd !default;
10
+ $color-action-clone-bg: $color-action-warning-bg !default;
11
+ $color-action-clone-brd: $color-action-warning-brd !default;
12
+ $color-action-remove-bg: $color-action-danger-bg !default;
13
+ $color-action-remove-brd: $color-action-danger-brd !default;
14
+ $color-action-void-bg: $color-action-danger-bg !default;
15
+ $color-action-void-brd: $color-action-danger-brd !default;
16
+ $color-action-cancel-bg: $color-action-warning-bg !default;
17
+ $color-action-cancel-brd: $color-action-warning-brd !default;
18
+ $color-action-capture-bg: $color-action-success-bg !default;
19
+ $color-action-capture-brd: $color-action-success-brd !default;
20
+ $color-action-save-bg: $color-action-success-bg !default;
21
+ $color-action-save-brd: $color-action-success-brd !default;
22
+ $color-action-mail-bg: $color-action-success-bg !default;
23
+ $color-action-mail-brd: $color-action-success-brd !default;
24
+ $color-action-failure-bg: $color-action-danger-bg !default;
25
+ $color-action-failure-brd: $color-action-danger-brd !default;
26
+
27
+ $actions: (
28
+ edit,
29
+ clone,
30
+ remove,
31
+ void,
32
+ capture,
33
+ save,
34
+ cancel,
35
+ mail,
36
+ failure
37
+ ) !default;
38
+
39
+ $actions-bg-colors: (
40
+ $color-action-edit-bg,
41
+ $color-action-clone-bg,
42
+ $color-action-remove-bg,
43
+ $color-action-void-bg,
44
+ $color-action-capture-bg,
45
+ $color-action-save-bg,
46
+ $color-action-cancel-bg,
47
+ $color-action-mail-bg,
48
+ $color-action-failure-bg
49
+ ) !default;
50
+
51
+ $actions-brd-colors: (
52
+ $color-action-edit-brd,
53
+ $color-action-clone-brd,
54
+ $color-action-remove-brd,
55
+ $color-action-void-brd,
56
+ $color-action-capture-brd,
57
+ $color-action-save-brd,
58
+ $color-action-cancel-brd,
59
+ $color-action-mail-brd,
60
+ $color-action-failure-brd
61
+ ) !default;
62
+
1
63
  table tbody tr {
2
64
  &.highlight {
3
65
 
@@ -44,16 +44,16 @@
44
44
  color: $body-color;
45
45
 
46
46
  &.notice {
47
- background-color: rgba(lighten($color-notice, 15), .95);
48
- border-top-color: $color-notice;
47
+ background-color: rgba(theme-color-level(warning, -8), .95);
48
+ border-top-color: theme-color(warning);
49
49
  }
50
50
  &.success {
51
- background-color: rgba(lighten($color-success, 30), .95);
52
- border-top-color: $color-success;
51
+ background-color: rgba(theme-color-level(success, -10), .95);
52
+ border-top-color: theme-color(success);
53
53
  }
54
54
  &.error {
55
- background-color: rgba(lighten($color-error, 30), .95);
56
- border-top-color: $color-error;
55
+ background-color: rgba(theme-color-level(danger, -8), .95);
56
+ border-top-color: theme-color(danger);
57
57
  }
58
58
  }
59
59
 
@@ -1,24 +1,7 @@
1
- // Numbered colors variables are deprecated and will be removed in Solidus v3.0
2
- @include solidus-deprecated-variable("color-1", "color-white");
3
- $color-1: $color-white !default;
4
-
5
- @include solidus-deprecated-variable("color-2", "color-primary");
6
- $color-2: $color-primary !default;
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");
@@ -11,7 +11,7 @@ $output-solidus-deprecation-warnings: true !default;
11
11
  @if $output-solidus-deprecation-warnings == true {
12
12
  @if global-variable-exists($variable) {
13
13
  @warn "[Solidus] [Deprecation] `$#{$variable}` is deprecated and will be " +
14
- "removed in 3.0.0. Please use Bootstraps $#{$replacement} instead";
14
+ "removed in 3.0.0. Please use Bootstraps #{$replacement} instead";
15
15
  }
16
16
  }
17
17
  }
@@ -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", "brand-success");
66
65
  $color-success: $color-green !default;
67
- @include bs-deprecated-variable("color-notice", "brand-warning");
68
66
  $color-notice: $color-yellow !default;
69
- @include bs-deprecated-variable("color-error", "brand-danger");
70
67
  $color-error: $color-red !default;
71
68
 
72
69
  // Breadcrumb custom variable
@@ -113,26 +110,6 @@ $color-pill-warning-text: $color-pill-text;
113
110
  $color-pill-error: #ff967b;
114
111
  $color-pill-error-text: $color-pill-text;
115
112
 
116
- // Actions colors
117
- $color-action-edit-bg: lighten($color-success, (5 * 5) ) !default;
118
- $color-action-edit-brd: lighten($color-success, (20 * 5) ) !default;
119
- $color-action-clone-bg: lighten($color-notice, (5 * 5) ) !default;
120
- $color-action-clone-brd: lighten($color-notice, (15 * 5) ) !default;
121
- $color-action-remove-bg: lighten($color-error, (5 * 5) ) !default;
122
- $color-action-remove-brd: lighten($color-error, (10 * 5) ) !default;
123
- $color-action-void-bg: lighten($color-error, (10 * 5) ) !default;
124
- $color-action-void-brd: lighten($color-error, (20 * 5) ) !default;
125
- $color-action-cancel-bg: lighten($color-notice, (10 * 5) ) !default;
126
- $color-action-cancel-brd: lighten($color-notice, (20 * 5) ) !default;
127
- $color-action-capture-bg: lighten($color-success, (5 * 5) ) !default;
128
- $color-action-capture-brd: lighten($color-success, (20 * 5) ) !default;
129
- $color-action-save-bg: lighten($color-success, (5 * 5) ) !default;
130
- $color-action-save-brd: lighten($color-success, (20 * 5) ) !default;
131
- $color-action-mail-bg: lighten($color-success, (5 * 5) ) !default;
132
- $color-action-mail-brd: lighten($color-success, (20 * 5) ) !default;
133
- $color-action-failure-bg: lighten($color-error, (10 * 5) ) !default;
134
- $color-action-failure-brd: lighten($color-error, (20 * 5) ) !default;
135
-
136
113
  // Available states
137
114
  $states: (
138
115
  active,
@@ -160,11 +137,6 @@ $states: (
160
137
  void
161
138
  ) !default;
162
139
 
163
- // Available actions
164
- $actions: edit, clone, remove, void, capture, save, cancel, mail, failure !default;
165
- $actions-bg-colors: $color-action-edit-bg, $color-action-clone-bg, $color-action-remove-bg, $color-action-void-bg, $color-action-capture-bg, $color-action-save-bg, $color-action-cancel-bg, $color-action-mail-bg, $color-action-failure-bg !default;
166
- $actions-brd-colors: $color-action-edit-brd, $color-action-clone-brd, $color-action-remove-brd, $color-action-void-brd, $color-action-capture-brd, $color-action-save-brd, $color-action-cancel-brd, $color-action-mail-brd, $color-action-failure-brd !default;
167
-
168
140
  // Sidebar
169
141
  //--------------------------------------------------------------
170
142
  $width-sidebar: 200px !default;
@@ -64,10 +64,6 @@
64
64
  margin-bottom: 15px;
65
65
  }
66
66
 
67
- label[for="order_bill_address_attributes_firstname"] {
68
- margin-top: 53.5px;
69
- }
70
-
71
67
  label[for="order_bill_address_attributes_name"] {
72
68
  margin-top: 53.5px;
73
69
  }
@@ -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
@@ -10,6 +10,7 @@ module Spree
10
10
  helper_method :clone_object_url
11
11
  before_action :split_params, only: [:create, :update]
12
12
  before_action :normalize_variant_property_rules, only: [:update]
13
+ before_action :set_default_tax_category, only: [:new, :edit]
13
14
 
14
15
  def show
15
16
  redirect_to action: :edit
@@ -46,6 +47,10 @@ module Spree
46
47
 
47
48
  private
48
49
 
50
+ def set_default_tax_category
51
+ @product.tax_category_id ||= @default_tax_category&.id
52
+ end
53
+
49
54
  def split_params
50
55
  if params[:product][:taxon_ids].present?
51
56
  params[:product][:taxon_ids] = params[:product][:taxon_ids].split(',')
@@ -11,8 +11,9 @@ module Spree
11
11
  rescue_from Spree::Core::GatewayError, with: :spree_core_gateway_error
12
12
 
13
13
  def create
14
- @refund.attributes = refund_params.merge(perform_after_create: false)
15
- if @refund.save && @refund.perform!
14
+ @refund.attributes = refund_params
15
+
16
+ if @refund.valid? && @refund.perform!
16
17
  flash[:success] = flash_message_for(@refund, :successfully_created)
17
18
  respond_with(@refund) do |format|
18
19
  format.html { redirect_to location_after_save }
@@ -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,21 +178,11 @@ 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
- if parent?
195
- @parent ||= self.class.parent_data[:model_class]
196
- .includes(self.class.parent_data[:includes])
197
- .find_by!(self.class.parent_data[:find_by] => params["#{parent_model_name}_id"])
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
187
  resource_not_found(flash_class: e.model.constantize, redirect_url: spree.polymorphic_url([:admin, parent_model_name.pluralize]))
205
188
  end
@@ -16,7 +16,7 @@ module Spree
16
16
  @users = Spree.user_class.ransack({
17
17
  m: 'or',
18
18
  email_start: params[:q],
19
- firstname_or_lastname_start: params[:q]
19
+ name_start: params[:q]
20
20
  }).result.limit(10)
21
21
  end
22
22
  end
@@ -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>
@@ -12,7 +12,7 @@
12
12
  <section>
13
13
  <%= content_tag :h4, t('spree.account') %>
14
14
  <%= t('spree.email') %>: <%= @order.email %><br>
15
- <%= t('spree.guest_checkout') %>: <%= @order.user ? t('spree.yes') : t('spree.no') %>
15
+ <%= t('spree.guest_checkout') %>: <%= @order.user.nil? ? t('spree.yes') : t('spree.no') %>
16
16
  </section>
17
17
 
18
18
  <section>
@@ -65,21 +65,10 @@
65
65
  </div>
66
66
 
67
67
  <div class="col-12 col-xl-6">
68
- <% if Spree::Config.use_combined_first_and_last_name_in_address %>
69
- <div class="field">
70
- <%= label_tag :q_bill_address_firstname_or_lastname_start, t('spree.name_contains') %>
71
- <%= f.text_field :bill_address_firstname_or_lastname_start, size: 25 %>
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">
@@ -158,7 +158,7 @@
158
158
  <%= f.field_container :tax_category do %>
159
159
  <%= f.label :tax_category_id, Spree::TaxCategory.model_name.human %>
160
160
  <%= f.field_hint :tax_category, default_tax_category: @default_tax_category&.name %>
161
- <%= f.collection_select(:tax_category_id, @tax_categories, :id, :name, { include_blank: t('spree.match_choices.none'), selected: @default_tax_category&.id }, { class: 'custom-select' }) %>
161
+ <%= f.collection_select(:tax_category_id, @tax_categories, :id, :name, { include_blank: t('spree.match_choices.none') }, { class: 'custom-select' }) %>
162
162
  <%= f.error_message_on :tax_category %>
163
163
  <% end %>
164
164
  </div>
@@ -84,7 +84,7 @@
84
84
  &nbsp;
85
85
  <%= link_to_clone product, no_text: true, class: 'clone' if can?(:clone, product) %>
86
86
  &nbsp;
87
- <%= link_to_delete product, no_text: true if can?(:delete, product) && !product.deleted? %>
87
+ <%= link_to_delete product, no_text: true if can?(:destroy, product) && !product.deleted? %>
88
88
  </td>
89
89
  </tr>
90
90
  <% end %>
@@ -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
- <% if Spree::Config.use_combined_first_and_last_name_in_address %>
5
- <div class="field <%= "#{type}-row" %>">
6
- <%= f.label :name %>
7
- <%= f.text_field :name, class: 'fullwidth' %>
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" %>">
@@ -3,24 +3,24 @@
3
3
  <%= tab :stores, label: :stores, url: spree.admin_stores_path %>
4
4
  <% end %>
5
5
 
6
- <% if can?(:show, Spree::PaymentMethod) %>
6
+ <% if can?(:admin, Spree::PaymentMethod) %>
7
7
  <%= tab :payments, url: spree.admin_payment_methods_path %>
8
8
  <% end %>
9
9
 
10
- <% if can?(:show, Spree::TaxCategory) || can?(:show, Spree::TaxRate) %>
10
+ <% if can?(:admin, Spree::TaxCategory) || can?(:admin, Spree::TaxRate) %>
11
11
  <%= tab :taxes, url: spree.admin_tax_categories_path, match_path: %r(tax_categories|tax_rates) %>
12
12
  <% end %>
13
13
 
14
- <% if can?(:show, Spree::RefundReason) || can?(:show, Spree::ReimbursementType) ||
14
+ <% if can?(:admin, Spree::RefundReason) || can?(:admin, Spree::ReimbursementType) ||
15
15
  can?(:show, Spree::ReturnReason) || can?(:show, Spree::AdjustmentReason) %>
16
16
  <%= tab :checkout, url: spree.admin_refund_reasons_path, match_path: %r(refund_reasons|reimbursement_types|return_reasons|adjustment_reasons|store_credit_reasons) %>
17
17
  <% end %>
18
18
 
19
- <% if can?(:show, Spree::ShippingMethod) || can?(:show, Spree::ShippingCategory) || can?(:show, Spree::StockLocation) %>
19
+ <% if can?(:admin, Spree::ShippingMethod) || can?(:admin, Spree::ShippingCategory) || can?(:admin, Spree::StockLocation) %>
20
20
  <%= tab :shipping, url: spree.admin_shipping_methods_path, match_path: %r(shipping_methods|shipping_categories|stock_locations) %>
21
21
  <% end %>
22
22
 
23
- <% if can?(:show, Spree::Zone) %>
23
+ <% if can?(:admin, Spree::Zone) %>
24
24
  <%= tab :zones, url: spree.admin_zones_path %>
25
25
  <% end %>
26
26
  </ul>
@@ -56,7 +56,7 @@
56
56
  <span><%= t store_credit.invalidated? ? 'spree.say_yes' : 'spree.say_no' %></span>
57
57
  </td>
58
58
  <td class="actions" data-hook="admin_store_credits_index_row_actions">
59
- <% if can?(:show, store_credit) %>
59
+ <% if can?(:edit, store_credit) %>
60
60
  <%= link_to_edit_url admin_user_store_credit_path(@user, store_credit), { no_text: true, class: 'edit' } %>
61
61
  <% end %>
62
62
  </td>
@@ -39,17 +39,17 @@ colors = [
39
39
  used_for: 'Buttons primary actions, links, active states.'
40
40
  },
41
41
  {
42
- name: '$color-success',
42
+ name: 'theme-color(success)',
43
43
  value: '#52B73B',
44
44
  used_for: 'Success actions.'
45
45
  },
46
46
  {
47
- name: '$color-error',
47
+ name: 'theme-color(danger)',
48
48
  value: '#CE452A',
49
49
  used_for: 'Errors, destructive action warnings.'
50
50
  },
51
51
  {
52
- name: '$color-notice',
52
+ name: 'theme-color(warning)',
53
53
  value: '#FFDD59',
54
54
  used_for: 'Warnings actions.'
55
55
  }
@@ -20,7 +20,20 @@
20
20
  </div>
21
21
  <% end %>
22
22
 
23
- <%= render "spree/admin/taxons/attachment_forms/#{f.object.attachment_partial_name}", f: f %>
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' %>
35
+ <% end %>
36
+ <% end %>
24
37
  </div>
25
38
 
26
39
  <div class="col-5">
data/config/routes.rb CHANGED
@@ -102,7 +102,6 @@ Spree::Core::Engine.routes.draw do
102
102
  put :fire
103
103
  end
104
104
 
105
- resources :log_entries
106
105
  resources :refunds, only: [:new, :create, :edit, :update]
107
106
  end
108
107
 
data/lib/spree/backend.rb CHANGED
@@ -1,6 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'rails/all'
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'
@@ -133,17 +133,17 @@ module Spree
133
133
  'wrench',
134
134
  condition: -> {
135
135
  can?(:admin, Spree::Store) ||
136
- can?(:show, Spree::AdjustmentReason) ||
137
- can?(:show, Spree::PaymentMethod) ||
138
- can?(:show, Spree::RefundReason) ||
139
- can?(:show, Spree::ReimbursementType) ||
140
- can?(:show, Spree::ShippingCategory) ||
141
- can?(:show, Spree::ShippingMethod) ||
142
- can?(:show, Spree::StockLocation) ||
143
- can?(:show, Spree::TaxCategory) ||
144
- can?(:show, Spree::TaxRate) ||
145
- can?(:show, Spree::ReturnReason) ||
146
- can?(:show, Spree::Zone)
136
+ can?(:admin, Spree::AdjustmentReason) ||
137
+ can?(:admin, Spree::PaymentMethod) ||
138
+ can?(:admin, Spree::RefundReason) ||
139
+ can?(:admin, Spree::ReimbursementType) ||
140
+ can?(:admin, Spree::ShippingCategory) ||
141
+ can?(:admin, Spree::ShippingMethod) ||
142
+ can?(:admin, Spree::StockLocation) ||
143
+ can?(:admin, Spree::TaxCategory) ||
144
+ can?(:admin, Spree::TaxRate) ||
145
+ can?(:admin, Spree::ReturnReason) ||
146
+ can?(:admin, Spree::Zone)
147
147
  },
148
148
  label: :settings,
149
149
  partial: 'spree/admin/shared/settings_sub_menu',
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Select2 English Australian translations
3
+ */
4
+ (function ($) {
5
+ "use strict";
6
+
7
+ $.fn.select2.locales['en-AU'] = {};
8
+
9
+ $.extend($.fn.select2.defaults, $.fn.select2.locales['en-AU']);
10
+ })(jQuery);
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Select2 English GB translations
3
+ */
4
+ (function ($) {
5
+ "use strict";
6
+
7
+ $.fn.select2.locales['en-GB'] = {};
8
+
9
+ $.extend($.fn.select2.defaults, $.fn.select2.locales['en-GB']);
10
+ })(jQuery);
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Select2 English IN translations
3
+ */
4
+ (function ($) {
5
+ "use strict";
6
+
7
+ $.fn.select2.locales['en-IN'] = {};
8
+
9
+ $.extend($.fn.select2.defaults, $.fn.select2.locales['en-IN']);
10
+ })(jQuery);
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Select2 English NZ translations
3
+ */
4
+ (function ($) {
5
+ "use strict";
6
+
7
+ $.fn.select2.locales['en-NZ'] = {};
8
+
9
+ $.extend($.fn.select2.defaults, $.fn.select2.locales['en-NZ']);
10
+ })(jQuery);
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: 2.11.1
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: 2020-11-06 00:00:00.000000000 Z
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: 2.11.1
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: 2.11.1
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: 2.11.1
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: 2.11.1
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
@@ -770,6 +764,10 @@ files:
770
764
  - vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_da.js
771
765
  - vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_de.js
772
766
  - vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_el.js
767
+ - vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_en-AU.js
768
+ - vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_en-GB.js
769
+ - vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_en-IN.js
770
+ - vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_en-NZ.js
773
771
  - vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_en-US.js
774
772
  - vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_es-MX.js
775
773
  - vendor/assets/javascripts/solidus_admin/select2_locales/select2_locale_es.js
@@ -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,11 +0,0 @@
1
- // The state component has been deprecated in favour of Pills. This will be
2
- // removed in a future version of Solidus.
3
- .state {
4
- @extend .pill;
5
-
6
- @each $state in $states {
7
- &.#{$state} {
8
- @extend .pill-#{$state};
9
- }
10
- }
11
- }
@@ -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,16 +0,0 @@
1
- <% f.object.class.attachment_definitions.each do |attachment, definition| %>
2
- <%= f.field_container attachment do %>
3
- <%= f.label attachment %><br>
4
- <%= f.file_field attachment %>
5
- <% if f.object.send(attachment).exists? %>
6
- <%= image_tag f.object.send(attachment, definition[:default_style]) %>
7
- <%= link_to t('spree.actions.remove'),
8
- admin_taxonomy_taxon_attachment_path(@taxonomy,
9
- @taxon.id,
10
- attachment_definition: attachment,
11
- authenticity_token: form_authenticity_token),
12
- method: :delete,
13
- class: 'btn btn-sm btn-danger' %>
14
- <% end %>
15
- <% end %>
16
- <% end %>