solidus_backend 4.3.2 → 4.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d6acbf3e8d70baf621cd4624ee5fdae07cdb736bb4ef331dfbe11c8041bdbbeb
4
- data.tar.gz: acd0789aac52f91891e8fce8697a968f8965298d0067cfdd1e60b7e6d870c260
3
+ metadata.gz: 9a28e10929444f614078beef56951eeb1400caee5af900a0d1c74cc745e69376
4
+ data.tar.gz: 7e090b803b158eea69a0bebf9ec68c4f68bb194c30d5e49b942b08a8bd34007f
5
5
  SHA512:
6
- metadata.gz: 61cbc3cda58c0252c8af1c0ba2ae7e8311fbea5de24e907db563111013aab6a30db9b5df8cabf5ceefe6682fb6606882f2a7abf96b05acb7edf0bfd7744362d8
7
- data.tar.gz: 3be5e187b46c8e801cf1786ef91ee0e30cb30041347491849a6d20b57bf536d27357885050366d7686187b6061f99c85408b17fc5acd2b3411b3603156412852
6
+ metadata.gz: 9b06ede62b152b63928c67d7acc2d4007e14e3e887874358d0f2af792e8e60aea53e554033e6e67eab8df77f9703f369cf9b1654d2ae6441e9e7dc9f28ea4d54
7
+ data.tar.gz: 0a172fbf3ffdad8495a41a3b22ee13a2cd5fece342d22ad6ec2c41a4cec08fbd69e2d338cbff62b4ca8a5f038861f7db82093a3057750e4cc944a8050eba4c3e
@@ -7,5 +7,5 @@ Spree.formatMoney = function(amount, currency) {
7
7
  var thousand = Spree.t('currency_delimiter');
8
8
  var decimal = Spree.t('currency_separator');
9
9
 
10
- return accounting.formatMoney(amount, currencyInfo[0], currencyInfo[1], thousand, decimal, currencyInfo[2]);
10
+ return accounting.formatMoney(amount, currencyInfo[0], currencyInfo[1], thousand, decimal, currencyInfo[2]).trim();
11
11
  }
@@ -56,7 +56,7 @@ module Spree
56
56
  def variant_scope
57
57
  scope = Spree::Variant
58
58
  .accessible_by(current_ability)
59
- .distinct.order(:sku)
59
+ .distinct
60
60
  .includes(
61
61
  :images,
62
62
  stock_items: :stock_location,
@@ -17,11 +17,14 @@
17
17
  JSON.dump(
18
18
  Spree::Config.available_currencies.map { |c|
19
19
  format =
20
- if c.symbol == "" || c.symbol_first
20
+ if c.format.present?
21
+ c.format.gsub("%u", "%s").gsub("%n", "%v")
22
+ elsif c.symbol == "" || c.symbol_first
21
23
  "%s%v"
22
24
  else
23
25
  "%v %s"
24
26
  end
27
+
25
28
  [c.id.to_s.upcase, [
26
29
  c.symbol || "¤",
27
30
  c.exponent,
@@ -3,7 +3,7 @@
3
3
  }.sort %>
4
4
 
5
5
  <% if available_locale_options_for_select.size > 1 %>
6
- <%= form_tag(admin_set_locale_path(format: :html), method: :put, style: "width: 100%;") do %>
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
8
  <i class="fa fa-globe fa-fw" title="<%= I18n.t('spree.choose_dashboard_locale') %>"></i>
9
9
  <select class="custom-select fullwidth" onchange="this.form.requestSubmit()">
@@ -1,21 +1,23 @@
1
1
  <% theme_options_for_select = Spree::Backend::Config.themes.keys.map { |theme| [theme.to_s.humanize, theme] }.sort %>
2
2
 
3
- <%= form_tag(spree.admin_set_theme_path(format: :html), method: :put, style: "width: 100%;", class: "light-only") do %>
4
- <%= hidden_field_tag :system_theme, :light %>
5
- <label class="admin-navbar-selection">
6
- <i class="fa fa-sun-o fa-fw" title="<%= I18n.t('spree.choose_dashboard_theme') %>"></i>
7
- <select name="switch_to_theme" class="custom-select fullwidth" onchange="this.form.requestSubmit()">
8
- <%= options_for_select(theme_options_for_select, session[:admin_light_theme] || Spree::Backend::Config.theme) %>
9
- </select>
10
- </label>
11
- <% end %>
3
+ <% if theme_options_for_select.length > 1 %>
4
+ <%= form_tag(spree.admin_set_theme_path(format: :html), method: :put, style: "width: 100%;", class: "light-only") do %>
5
+ <%= hidden_field_tag :system_theme, :light %>
6
+ <label class="admin-navbar-selection">
7
+ <i class="fa fa-sun-o fa-fw" title="<%= I18n.t('spree.choose_dashboard_theme') %>"></i>
8
+ <select name="switch_to_theme" class="custom-select fullwidth" onchange="this.form.requestSubmit()">
9
+ <%= options_for_select(theme_options_for_select, session[:admin_light_theme] || Spree::Backend::Config.theme) %>
10
+ </select>
11
+ </label>
12
+ <% end %>
12
13
 
13
- <%= form_tag(spree.admin_set_theme_path(format: :html), method: :put, style: "width: 100%;", class: "dark-only") do %>
14
- <%= hidden_field_tag :system_theme, :dark %>
15
- <label class="admin-navbar-selection">
16
- <i class="fa fa-moon-o fa-fw" title="<%= I18n.t('spree.choose_dashboard_theme') %>"></i>
17
- <select name="switch_to_theme" class="custom-select fullwidth" onchange="this.form.requestSubmit()">
18
- <%= options_for_select(theme_options_for_select, session[:admin_dark_theme] || Spree::Backend::Config.dark_theme) %>
19
- </select>
20
- </label>
14
+ <%= form_tag(spree.admin_set_theme_path(format: :html), method: :put, style: "width: 100%;", class: "dark-only") do %>
15
+ <%= hidden_field_tag :system_theme, :dark %>
16
+ <label class="admin-navbar-selection">
17
+ <i class="fa fa-moon-o fa-fw" title="<%= I18n.t('spree.choose_dashboard_theme') %>"></i>
18
+ <select name="switch_to_theme" class="custom-select fullwidth" onchange="this.form.requestSubmit()">
19
+ <%= options_for_select(theme_options_for_select, session[:admin_dark_theme] || Spree::Backend::Config.dark_theme) %>
20
+ </select>
21
+ </label>
22
+ <% end %>
21
23
  <% end %>
@@ -1,25 +1,27 @@
1
1
  <% theme_options_for_select = Spree::Backend::Config.themes.keys.map { |theme| [theme.to_s.humanize, theme] }.sort %>
2
2
 
3
- <li>
4
- <%= form_tag(spree.admin_set_theme_path(format: :html), method: :put, style: "width: 100%;", class: "light-only") do %>
5
- <%= hidden_field_tag :system_theme, :light %>
6
- <label>
7
- <svg aria-hidden="true"><use xlink:href="<%= image_path('spree/backend/themes/solidus_admin/remixicon.symbol.svg') %>#ri-sun-line"></use></svg>
8
- <select name="switch_to_theme" onchange="this.form.requestSubmit()">
9
- <%= options_for_select(theme_options_for_select, session[:admin_light_theme] || Spree::Backend::Config.theme) %>
10
- </select>
11
- <svg aria-hidden="true"><use xlink:href="<%= image_path('spree/backend/themes/solidus_admin/remixicon.symbol.svg') %>#ri-expand-up-down-line"></use></svg>
12
- </label>
13
- <% end %>
3
+ <% if theme_options_for_select.length > 1 %>
4
+ <li>
5
+ <%= form_tag(spree.admin_set_theme_path(format: :html), method: :put, style: "width: 100%;", class: "light-only") do %>
6
+ <%= hidden_field_tag :system_theme, :light %>
7
+ <label>
8
+ <svg aria-hidden="true"><use xlink:href="<%= image_path('spree/backend/themes/solidus_admin/remixicon.symbol.svg') %>#ri-sun-line"></use></svg>
9
+ <select name="switch_to_theme" onchange="this.form.requestSubmit()">
10
+ <%= options_for_select(theme_options_for_select, session[:admin_light_theme] || Spree::Backend::Config.theme) %>
11
+ </select>
12
+ <svg aria-hidden="true"><use xlink:href="<%= image_path('spree/backend/themes/solidus_admin/remixicon.symbol.svg') %>#ri-expand-up-down-line"></use></svg>
13
+ </label>
14
+ <% end %>
14
15
 
15
- <%= form_tag(spree.admin_set_theme_path(format: :html), method: :put, style: "width: 100%;", class: "dark-only") do %>
16
- <%= hidden_field_tag :system_theme, :dark %>
17
- <label>
18
- <svg aria-hidden="true"><use xlink:href="<%= image_path('spree/backend/themes/solidus_admin/remixicon.symbol.svg') %>#ri-moon-line"></use></svg>
19
- <select name="switch_to_theme" onchange="this.form.requestSubmit()">
20
- <%= options_for_select(theme_options_for_select, session[:admin_dark_theme] || Spree::Backend::Config.dark_theme) %>
21
- </select>
22
- <svg aria-hidden="true"><use xlink:href="<%= image_path('spree/backend/themes/solidus_admin/remixicon.symbol.svg') %>#ri-expand-up-down-line"></use></svg>
23
- </label>
24
- <% end %>
25
- </li>
16
+ <%= form_tag(spree.admin_set_theme_path(format: :html), method: :put, style: "width: 100%;", class: "dark-only") do %>
17
+ <%= hidden_field_tag :system_theme, :dark %>
18
+ <label>
19
+ <svg aria-hidden="true"><use xlink:href="<%= image_path('spree/backend/themes/solidus_admin/remixicon.symbol.svg') %>#ri-moon-line"></use></svg>
20
+ <select name="switch_to_theme" onchange="this.form.requestSubmit()">
21
+ <%= options_for_select(theme_options_for_select, session[:admin_dark_theme] || Spree::Backend::Config.dark_theme) %>
22
+ </select>
23
+ <svg aria-hidden="true"><use xlink:href="<%= image_path('spree/backend/themes/solidus_admin/remixicon.symbol.svg') %>#ri-expand-up-down-line"></use></svg>
24
+ </label>
25
+ <% end %>
26
+ </li>
27
+ <% end %>
@@ -78,18 +78,17 @@ module Spree
78
78
  end
79
79
 
80
80
  def match_path?(request)
81
- matches =
82
- if match_path.is_a? Regexp
83
- request.fullpath =~ match_path
84
- elsif match_path.respond_to?(:call)
85
- match_path.call(request)
86
- elsif match_path
87
- request.fullpath.starts_with?("#{spree.admin_path}#{match_path}")
88
- end
89
- matches ||= request.fullpath.to_s.starts_with?(url.to_s) if url.present?
90
- matches ||= @sections.include?(request.controller_class.controller_name.to_sym) if @sections.present?
91
-
92
- matches
81
+ if match_path.is_a? Regexp
82
+ request.fullpath =~ match_path
83
+ elsif match_path.respond_to?(:call)
84
+ match_path.call(request)
85
+ elsif match_path
86
+ request.fullpath.starts_with?("#{spree.admin_path}#{match_path}")
87
+ elsif url.present?
88
+ request.fullpath.to_s.starts_with?(url.to_s)
89
+ elsif @sections.present?
90
+ @sections.include?(request.controller_class.controller_name.to_sym)
91
+ end
93
92
  end
94
93
 
95
94
  def url
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.3.2
4
+ version: 4.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Solidus Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-22 00:00:00.000000000 Z
11
+ date: 2024-04-05 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: 4.3.2
19
+ version: 4.3.4
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: 4.3.2
26
+ version: 4.3.4
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: 4.3.2
33
+ version: 4.3.4
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: 4.3.2
40
+ version: 4.3.4
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: font-awesome-rails
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -919,7 +919,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
919
919
  - !ruby/object:Gem::Version
920
920
  version: 1.8.23
921
921
  requirements: []
922
- rubygems_version: 3.2.33
922
+ rubygems_version: 3.4.19
923
923
  signing_key:
924
924
  specification_version: 4
925
925
  summary: Admin interface for the Solidus e-commerce framework.