solidus_backend 4.7.3 → 4.8.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.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +29 -0
  3. data/app/assets/images/spree/backend/themes/solidus_admin/remixicon.symbol.svg +4 -4
  4. data/app/controllers/spree/admin/adjustment_reasons_controller.rb +0 -5
  5. data/app/controllers/spree/admin/adjustments_controller.rb +0 -4
  6. data/app/controllers/spree/admin/base_controller.rb +3 -1
  7. data/app/controllers/spree/admin/images_controller.rb +0 -7
  8. data/app/controllers/spree/admin/option_types_controller.rb +0 -10
  9. data/app/controllers/spree/admin/orders/customer_details_controller.rb +8 -4
  10. data/app/controllers/spree/admin/orders_controller.rb +3 -3
  11. data/app/controllers/spree/admin/payment_methods_controller.rb +1 -6
  12. data/app/controllers/spree/admin/payments_controller.rb +15 -2
  13. data/app/controllers/spree/admin/prices_controller.rb +0 -6
  14. data/app/controllers/spree/admin/product_properties_controller.rb +0 -4
  15. data/app/controllers/spree/admin/products_controller.rb +1 -17
  16. data/app/controllers/spree/admin/properties_controller.rb +1 -5
  17. data/app/controllers/spree/admin/refund_reasons_controller.rb +0 -5
  18. data/app/controllers/spree/admin/refunds_controller.rb +9 -5
  19. data/app/controllers/spree/admin/reimbursements_controller.rb +0 -6
  20. data/app/controllers/spree/admin/resource_controller.rb +3 -17
  21. data/app/controllers/spree/admin/return_authorizations_controller.rb +0 -12
  22. data/app/controllers/spree/admin/return_items_controller.rb +0 -4
  23. data/app/controllers/spree/admin/return_reasons_controller.rb +0 -5
  24. data/app/controllers/spree/admin/search_controller.rb +2 -0
  25. data/app/controllers/spree/admin/shipping_categories_controller.rb +0 -5
  26. data/app/controllers/spree/admin/shipping_methods_controller.rb +0 -16
  27. data/app/controllers/spree/admin/stock_items_controller.rb +1 -1
  28. data/app/controllers/spree/admin/stock_locations_controller.rb +1 -8
  29. data/app/controllers/spree/admin/store_credit_reasons_controller.rb +0 -5
  30. data/app/controllers/spree/admin/store_credits_controller.rb +1 -1
  31. data/app/controllers/spree/admin/stores_controller.rb +8 -8
  32. data/app/controllers/spree/admin/tax_categories_controller.rb +0 -5
  33. data/app/controllers/spree/admin/tax_rates_controller.rb +1 -16
  34. data/app/controllers/spree/admin/taxonomies_controller.rb +0 -4
  35. data/app/controllers/spree/admin/users_controller.rb +7 -3
  36. data/app/controllers/spree/admin/variants_controller.rb +1 -5
  37. data/app/controllers/spree/admin/zones_controller.rb +0 -4
  38. data/app/helpers/spree/admin/products_helper.rb +1 -1
  39. data/app/views/spree/admin/orders/customer_details/_form.html.erb +2 -2
  40. data/app/views/spree/admin/payment_methods/_form.html.erb +1 -1
  41. data/app/views/spree/admin/payments/_log_entries.html.erb +7 -2
  42. data/app/views/spree/admin/payments/show.html.erb +2 -2
  43. data/app/views/spree/admin/shared/_address_form.html.erb +19 -13
  44. data/app/views/spree/admin/shared/_head.html.erb +1 -1
  45. data/app/views/spree/admin/shared/_locale_selection.html.erb +1 -1
  46. data/app/views/spree/admin/shared/_locale_selection_solidus_admin.html.erb +1 -1
  47. data/app/views/spree/admin/shared/_navigation.html.erb +1 -0
  48. data/app/views/spree/admin/shared/_navigation_header.html.erb +1 -1
  49. data/app/views/spree/admin/shared/_navigation_solidus_admin.html.erb +3 -2
  50. data/app/views/spree/admin/shared/_timezone_selection.html.erb +10 -0
  51. data/app/views/spree/admin/shared/_timezone_selection_solidus_admin.html.erb +13 -0
  52. data/app/views/spree/admin/stores/_form.html.erb +7 -0
  53. data/app/views/spree/admin/users/_form.html.erb +8 -1
  54. data/lib/spree/backend_configuration.rb +0 -2
  55. metadata +10 -7
  56. /data/app/assets/images/{favicon.ico → spree/backend/favicon.ico} +0 -0
@@ -4,7 +4,7 @@ module Spree
4
4
  module Admin
5
5
  module ProductsHelper
6
6
  def frontend_product_path(product)
7
- Spree::Backend::Config[:frontend_product_path].call(self, product)
7
+ Spree::Backend::Config.frontend_product_path.call(self, product)
8
8
  end
9
9
 
10
10
  def show_rebuild_vat_checkbox?
@@ -41,7 +41,7 @@
41
41
  </fieldset>
42
42
 
43
43
  <div class="row">
44
- <% if Spree::Config[:order_bill_address_used] %>
44
+ <% if Spree::Config.order_bill_address_used %>
45
45
  <div class="col-6" data-hook="bill_address_wrapper">
46
46
  <fieldset class="no-border-bottom">
47
47
  <legend align="center"><%= t('spree.billing_address') %></legend>
@@ -57,7 +57,7 @@
57
57
  <div class="col-6" data-hook="ship_address_wrapper">
58
58
  <fieldset class="no-border-bottom">
59
59
  <legend align="center"><%= t('spree.shipping_address') %></legend>
60
- <% if Spree::Config[:order_bill_address_used] %>
60
+ <% if Spree::Config.order_bill_address_used %>
61
61
  <div class="field">
62
62
  <span data-hook="use_billing">
63
63
  <label>
@@ -32,7 +32,7 @@
32
32
  <div data-hook="auto_capture" class="field">
33
33
  <%= f.label :auto_capture %>
34
34
  <%= f.select :auto_capture,
35
- [["#{t('spree.use_app_default')} (#{Spree::Config[:auto_capture] ? t('spree.say_yes') : t('spree.say_no')})", ''],
35
+ [["#{t('spree.use_app_default')} (#{Spree::Config.auto_capture ? t('spree.say_yes') : t('spree.say_no')})", ''],
36
36
  [t('spree.say_yes'), true],
37
37
  [t('spree.say_no'), false]],
38
38
  {},
@@ -1,12 +1,14 @@
1
1
  <table class='index' id='listing_log_entries'>
2
2
  <colgroup>
3
- <col style="width: 30%">
4
- <col style="width: 60%">
3
+ <col style="width: 25%">
4
+ <col style="width: 15%">
5
+ <col style="width: 50%">
5
6
  <col style="width: 10%">
6
7
  </colgroup>
7
8
  <thead>
8
9
  <tr>
9
10
  <th><%= Spree::LogEntry.human_attribute_name(:created_at) %></th>
11
+ <th><%= Spree::LogEntry.human_attribute_name(:source) %></th>
10
12
  <th><%= Spree::LogEntry.human_attribute_name(:details) %></th>
11
13
  <th></th>
12
14
  </tr>
@@ -17,6 +19,9 @@
17
19
  <td>
18
20
  <%= pretty_time(entry.created_at) %>
19
21
  </td>
22
+ <td>
23
+ <%= entry.source_type.constantize.model_name.human %>
24
+ </td>
20
25
  <td>
21
26
  <pre><%= entry.parsed_details.message %></pre>
22
27
  </td>
@@ -21,9 +21,9 @@
21
21
  </fieldset>
22
22
  <% end %>
23
23
 
24
- <% if @payment.log_entries.any? %>
24
+ <% if @all_log_entries.any? %>
25
25
  <fieldset class="no-border-bottom">
26
26
  <legend><%= plural_resource_name(Spree::LogEntry) %></legend>
27
- <%= render 'spree/admin/payments/log_entries', log_entries: @payment.log_entries %>
27
+ <%= render 'spree/admin/payments/log_entries', log_entries: @all_log_entries %>
28
28
  </fieldset>
29
29
  <% end %>
@@ -6,7 +6,7 @@
6
6
  <%= f.text_field :name, class: 'fullwidth' %>
7
7
  </div>
8
8
 
9
- <% if Spree::Config[:company] %>
9
+ <% if Spree::Config.company %>
10
10
  <div class="field <%= "#{type}-row" %>">
11
11
  <%= f.label :company %>
12
12
  <%= f.text_field :company, class: 'fullwidth' %>
@@ -18,10 +18,12 @@
18
18
  <%= f.text_field :address1, class: 'fullwidth' %>
19
19
  </div>
20
20
 
21
- <div class="field <%= "#{type}-row" %>">
22
- <%= f.label :address2 %>
23
- <%= f.text_field :address2, class: 'fullwidth' %>
24
- </div>
21
+ <% unless local_assigns.fetch(:excludes, []).include?(:address2) %>
22
+ <div class="field <%= "#{type}-row" %>">
23
+ <%= f.label :address2 %>
24
+ <%= f.text_field :address2, class: 'fullwidth' %>
25
+ </div>
26
+ <% end %>
25
27
 
26
28
  <div class="field <%= "#{type}-row" %>">
27
29
  <%= f.label :city %>
@@ -59,15 +61,19 @@
59
61
  </span>
60
62
  </div>
61
63
 
62
- <div class="field <%= "#{type}-row" %>">
63
- <%= f.label :phone %>
64
- <%= f.phone_field :phone, class: 'fullwidth' %>
65
- </div>
64
+ <% unless local_assigns.fetch(:excludes, []).include?(:phone) %>
65
+ <div class="field <%= "#{type}-row" %>">
66
+ <%= f.label :phone %>
67
+ <%= f.phone_field :phone, class: 'fullwidth' %>
68
+ </div>
69
+ <% end %>
66
70
 
67
- <div class="field <%= "#{type}-row" %>">
68
- <%= f.label :email %>
69
- <%= f.email_field :email, class: 'fullwidth' %>
70
- </div>
71
+ <% unless local_assigns.fetch(:excludes, []).include?(:email) %>
72
+ <div class="field <%= "#{type}-row" %>">
73
+ <%= f.label :email %>
74
+ <%= f.email_field :email, class: 'fullwidth' %>
75
+ </div>
76
+ <% end %>
71
77
 
72
78
  <% if Spree::Backend::Config.show_reverse_charge_fields %>
73
79
  <div class="field <%= "#{type}-row" %>">
@@ -5,7 +5,7 @@
5
5
 
6
6
  <title><%= admin_page_title %></title>
7
7
 
8
- <%= favicon_link_tag 'favicon.ico' %>
8
+ <%= favicon_link_tag 'spree/backend/favicon.ico' %>
9
9
  <%= stylesheet_link_tag Spree::Backend::Config.theme_path(session[:admin_light_theme]), media: '(prefers-color-scheme: light)', data: {turbolinks_track: 'reload'} %>
10
10
  <%= stylesheet_link_tag Spree::Backend::Config.theme_path(session[:admin_dark_theme]), media: '(prefers-color-scheme: dark)', data: {turbolinks_track: 'reload'} %>
11
11
  <%= javascript_include_tag 'spree/backend/all', data: {turbolinks_track: 'reload'} %>
@@ -5,7 +5,7 @@
5
5
  <% if available_locale_options_for_select.size > 1 %>
6
6
  <%= form_tag(spree.admin_set_locale_path(format: :html), method: :put, style: "width: 100%;") do %>
7
7
  <label class="admin-navbar-selection admin-locale-selection">
8
- <i class="fa fa-globe fa-fw" title="<%= I18n.t('spree.choose_dashboard_locale') %>"></i>
8
+ <i class="fa fa-language fa-fw" title="<%= I18n.t('spree.choose_dashboard_locale') %>"></i>
9
9
  <select class="custom-select fullwidth" onchange="this.form.requestSubmit()">
10
10
  <%= options_for_select(available_locale_options_for_select, I18n.locale) %>
11
11
  </select>
@@ -6,7 +6,7 @@
6
6
  <li>
7
7
  <%= form_tag(spree.admin_set_locale_path(format: :html), method: :put, style: "width: 100%;") do %>
8
8
  <label>
9
- <svg aria-hidden="true"><use xlink:href="<%= image_path('spree/backend/themes/solidus_admin/remixicon.symbol.svg') %>#ri-global-line"></use></svg>
9
+ <svg aria-hidden="true"><use xlink:href="<%= image_path('spree/backend/themes/solidus_admin/remixicon.symbol.svg') %>#ri-translate-2"></use></svg>
10
10
  <select name="switch_to_locale" onchange="this.form.requestSubmit()">
11
11
  <%= options_for_select(available_locale_options_for_select, selected: I18n.locale) %>
12
12
  </select>
@@ -6,6 +6,7 @@
6
6
  <%= button_tag class: 'btn fa fa-chevron-circle-left', id: 'admin-nav-toggle', type: :button do %>
7
7
  <span class="text"><%= t('spree.minimize_menu') %></span>
8
8
  <% end %>
9
+ <%= render partial: 'spree/admin/shared/timezone_selection' %>
9
10
  <%= render partial: 'spree/admin/shared/locale_selection' %>
10
11
  <%= render partial: 'spree/admin/shared/theme_selection' %>
11
12
  <% if lookup_context.exists?('spree/admin/shared/_navigation_footer') %>
@@ -1,5 +1,5 @@
1
1
  <header class="admin-nav-header">
2
2
  <%= link_to spree.admin_path, class: 'brand-link' do %>
3
- <%= image_tag(Spree::Config[:admin_interface_logo]) %>
3
+ <%= image_tag(Spree::Config.admin_interface_logo) %>
4
4
  <%- end %>
5
5
  </header>
@@ -4,7 +4,7 @@
4
4
  <aside class="solidus-admin--nav">
5
5
  <header class="solidus-admin--nav--section">
6
6
  <%= link_to spree.admin_path, class: 'solidus-admin--nav--logo' do %>
7
- <%= image_tag(Spree::Config[:admin_interface_logo]) %>
7
+ <%= image_tag(Spree::Config.admin_interface_logo) %>
8
8
  <%- end %>
9
9
 
10
10
  <%= link_to "//#{default_store.url}", target: '_blank', class: 'solidus-admin--nav--store-link' do %>
@@ -33,7 +33,7 @@
33
33
  data-legacy-label="<%= 'spree.navigation.switch_to_legacy'.then { t(_1, default: t(_1, locale: :en)) } %>"
34
34
  data-admin-label="<%= 'spree.navigation.switch_to_solidus_admin'.then { t(_1, default: t(_1, locale: :en)) } %>"
35
35
  ></span>
36
- <span><input type="checkbox" id="solidus-admin-switch" class="solidus-admin--nav--switch"/></span>
36
+ <span><input type="checkbox" id="solidus-admin-switch" class="solidus-admin--nav--switch"></span>
37
37
  </label>
38
38
  </li>
39
39
  </ul>
@@ -49,6 +49,7 @@
49
49
  </summary>
50
50
 
51
51
  <ul>
52
+ <%= render 'spree/admin/shared/timezone_selection_solidus_admin' %>
52
53
  <%= render 'spree/admin/shared/locale_selection_solidus_admin' %>
53
54
  <%= render 'spree/admin/shared/theme_selection_solidus_admin' %>
54
55
 
@@ -0,0 +1,10 @@
1
+ <% available_timezones_for_select = ActiveSupport::TimeZone.all.map(&:name) %>
2
+
3
+ <%= form_tag(url_for, method: :get, style: "width: 100%;") do %>
4
+ <label class="admin-navbar-selection admin-timezone-selection">
5
+ <i class="fa fa-globe fa-fw" title="<%= I18n.t('spree.choose_dashboard_timezone') %>"></i>
6
+ <select name="solidus_timezone" class="custom-select fullwidth" onchange="this.form.requestSubmit()">
7
+ <%= options_for_select(available_timezones_for_select, selected: Time.zone.name) %>
8
+ </select>
9
+ </label>
10
+ <% end %>
@@ -0,0 +1,13 @@
1
+ <% available_timezones_for_select = ActiveSupport::TimeZone.all.map(&:name) %>
2
+
3
+ <li>
4
+ <%= form_tag(url_for, method: :get, style: "width: 100%;") do %>
5
+ <label>
6
+ <svg aria-hidden="true"><use xlink:href="<%= image_path('spree/backend/themes/solidus_admin/remixicon.symbol.svg') %>#ri-time-zone-line"></use></svg>
7
+ <select name="solidus_timezone" onchange="this.form.requestSubmit()">
8
+ <%= options_for_select(available_timezones_for_select, selected: Time.zone.name) %>
9
+ </select>
10
+ <svg aria-hidden="true"><use xlink:href="<%= image_path('spree/backend/themes/solidus_admin/remixicon.symbol.svg') %>#ri-expand-up-down-line"></use></svg>
11
+ </label>
12
+ <% end %>
13
+ </li>
@@ -41,6 +41,13 @@
41
41
  <%= f.error_message_on :reverse_charge_status %>
42
42
  <% end %>
43
43
  <% end %>
44
+
45
+ <fieldset class="no-border-bottom js-addresses-form" data-hook="store_address_wrapper">
46
+ <legend align="center"><%= Spree::Address.model_name.human %></legend>
47
+ <%= f.fields_for :address, f.object.address || Spree::Address.new(country: Spree::Country.find_by(iso: Spree::Config.default_country_iso)) do |address_form| %>
48
+ <%= render partial: 'spree/admin/shared/address_form', locals: { f: address_form, type: "store", excludes: Spree::Config.address_requires_phone ? [:address2, :email] : [:address2, :email, :phone] } %>
49
+ <% end %>
50
+ </fieldset>
44
51
  </div>
45
52
  <div class="col-12 col-md-6">
46
53
  <%= f.field_container :url do %>
@@ -35,7 +35,7 @@
35
35
  </div>
36
36
  <% end %>
37
37
 
38
- <% if Spree::Config[:can_restrict_stock_management] && can?(:show, Spree::StockLocation) %>
38
+ <% if Spree::Config.can_restrict_stock_management && can?(:show, Spree::StockLocation) %>
39
39
  <div data-hook="admin_user_form_stock_locations" class="field">
40
40
  <%= label_tag nil, plural_resource_name(Spree::StockLocation) %>
41
41
  <ul>
@@ -76,5 +76,12 @@
76
76
  <% end %>
77
77
  <% end %>
78
78
  <% end %>
79
+
80
+ <% if can?(:update, @user) && @user.respond_to?(:timezone) %>
81
+ <%= f.field_container :timezone do %>
82
+ <%= f.label :timezone %>
83
+ <%= f.time_zone_select :timezone, nil, {include_blank: t("spree.none")}, class: "select2 fullwidth" %>
84
+ <% end %>
85
+ <% end %>
79
86
  </div>
80
87
  </div>
@@ -7,8 +7,6 @@ module Spree
7
7
  class BackendConfiguration < Preferences::Configuration
8
8
  preference :locale, :string, default: I18n.default_locale
9
9
 
10
- preference :permit_all_resource_params_fallback, :boolean, default: false
11
-
12
10
  # @!attribute [rw] themes
13
11
  # @return [Hash] A hash containing the themes that are available for the admin panel
14
12
  preference :themes, :hash, default: {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_backend
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.7.3
4
+ version: 4.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Solidus Team
@@ -15,28 +15,28 @@ dependencies:
15
15
  requirements:
16
16
  - - '='
17
17
  - !ruby/object:Gem::Version
18
- version: 4.7.3
18
+ version: 4.8.0
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - '='
24
24
  - !ruby/object:Gem::Version
25
- version: 4.7.3
25
+ version: 4.8.0
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: solidus_core
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements:
30
30
  - - '='
31
31
  - !ruby/object:Gem::Version
32
- version: 4.7.3
32
+ version: 4.8.0
33
33
  type: :runtime
34
34
  prerelease: false
35
35
  version_requirements: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - '='
38
38
  - !ruby/object:Gem::Version
39
- version: 4.7.3
39
+ version: 4.8.0
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: font-awesome-rails
42
42
  requirement: !ruby/object:Gem::Requirement
@@ -155,11 +155,12 @@ executables: []
155
155
  extensions: []
156
156
  extra_rdoc_files: []
157
157
  files:
158
+ - LICENSE
158
159
  - README.md
159
160
  - Rakefile
160
161
  - app/assets/config/solidus_backend_manifest.js
161
- - app/assets/images/favicon.ico
162
162
  - app/assets/images/solidus-style-guide-logo.png
163
+ - app/assets/images/spree/backend/favicon.ico
163
164
  - app/assets/images/spree/backend/themes/solidus_admin/remixicon.license.txt
164
165
  - app/assets/images/spree/backend/themes/solidus_admin/remixicon.symbol.svg
165
166
  - app/assets/javascripts/spree/backend.js
@@ -563,6 +564,8 @@ files:
563
564
  - app/views/spree/admin/shared/_taxes_tabs.html.erb
564
565
  - app/views/spree/admin/shared/_theme_selection.html.erb
565
566
  - app/views/spree/admin/shared/_theme_selection_solidus_admin.html.erb
567
+ - app/views/spree/admin/shared/_timezone_selection.html.erb
568
+ - app/views/spree/admin/shared/_timezone_selection_solidus_admin.html.erb
566
569
  - app/views/spree/admin/shared/_variant_search.html.erb
567
570
  - app/views/spree/admin/shared/named_types/_edit.html.erb
568
571
  - app/views/spree/admin/shared/named_types/_form.html.erb
@@ -877,7 +880,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
877
880
  - !ruby/object:Gem::Version
878
881
  version: 1.8.23
879
882
  requirements: []
880
- rubygems_version: 4.0.10
883
+ rubygems_version: 4.0.20
881
884
  specification_version: 4
882
885
  summary: Admin interface for the Solidus e-commerce framework.
883
886
  test_files: []