solidus_backend 4.3.3 → 4.3.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c16ee63546b0858a50fdf7427e815d90a3ddf5ac6d220a768f5ec0e9293fb18f
4
- data.tar.gz: b1a924e5dc1bbc8e6890afd8db1fbdc7894cf021466aa58ee822f7036ac59c73
3
+ metadata.gz: 9a28e10929444f614078beef56951eeb1400caee5af900a0d1c74cc745e69376
4
+ data.tar.gz: 7e090b803b158eea69a0bebf9ec68c4f68bb194c30d5e49b942b08a8bd34007f
5
5
  SHA512:
6
- metadata.gz: 4f4c53d6bd06d3932d471c7f10f4fa95c74771c4672264bf89b94a9a2cbbf1bd0f314bd981c3ab4ee70a957618937a3005fdf75fc3be5b5b2f28f17e405e6925
7
- data.tar.gz: 38007856f43c6c07574039f79b890a7c5d24e46de1ac5263a8b28be50ce6f553909ca73a3473b40b5e54e16b95eb6f478ca869b6f3380a653d5e5907b9ecba2a
6
+ metadata.gz: 9b06ede62b152b63928c67d7acc2d4007e14e3e887874358d0f2af792e8e60aea53e554033e6e67eab8df77f9703f369cf9b1654d2ae6441e9e7dc9f28ea4d54
7
+ data.tar.gz: 0a172fbf3ffdad8495a41a3b22ee13a2cd5fece342d22ad6ec2c41a4cec08fbd69e2d338cbff62b4ca8a5f038861f7db82093a3057750e4cc944a8050eba4c3e
@@ -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,
@@ -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.3
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-03-11 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.3
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.3
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.3
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.3
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.4.10
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.