solidus_backend 3.0.6 → 3.0.8

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: dc6c54007c56cf228ae4adf6db13ca7023e14268fd4d50f7988bacd6665530d3
4
- data.tar.gz: 55e40b3a4e73ef425ea200005d7dc7fcd171d174047fb719893e1fe574b7bdc5
3
+ metadata.gz: 013dd9d01948eac2de99e184d6bb7f395f82416263cd714a632850955005144b
4
+ data.tar.gz: 35bf7fdf47cab56c76d89dfee1f711f388c69de5799954c2334bbfb3e5f3f831
5
5
  SHA512:
6
- metadata.gz: acd5045ee15211e7d2cd7fc7e7018e8dc54a5cd2f2982d731ab57fb152aa9245087aaa7681db91d6008b560dd346212ed575bb46395b121018130560eae8cd49
7
- data.tar.gz: 9ba222825a7f9800cffbeb5a54b05d4266e8cac5abe4d93ceae8e51e1dfc05f1f84b94d8d5a93b6a906e136e9e5b345702a3392e7f8a210c48694e45dc9ce02b
6
+ metadata.gz: f38d975c0c853412f13079a7cbc8cb69c06df8c1a1c950a9d7aa26d97387f90480e15bd3c6bf81ebeedafa60ab06c6594795826f1dcc2ca612b41f5ee6517340
7
+ data.tar.gz: 9a84581e63970a276a646de74b7e75999f93c961722730eef87c0a357b290463c9c1d7d22315c258eaec4616cfe514045645384bf1ceb2a8e14c2ac94d8f566a
@@ -92,7 +92,7 @@ module Spree
92
92
 
93
93
  @search = super.ransack(params[:q])
94
94
  @collection = @search.result.includes(:spree_roles)
95
- @collection = @collection.includes(:spree_orders)
95
+ @collection = @collection.includes(:orders)
96
96
  @collection = @collection.page(params[:page]).per(Spree::Config[:admin_products_per_page])
97
97
  end
98
98
 
@@ -121,7 +121,7 @@ module Spree
121
121
  # handling raise from Spree::Admin::ResourceController#destroy
122
122
  def user_destroy_with_orders_error
123
123
  invoke_callbacks(:destroy, :fails)
124
- render status: :forbidden, text: t('spree.error_user_destroy_with_orders')
124
+ render status: :forbidden, plain: t("spree.error_user_destroy_with_orders")
125
125
  end
126
126
 
127
127
  def sign_in_if_change_own_password
@@ -62,8 +62,8 @@
62
62
  <%= f.field_container :cart_tax_country_iso do %>
63
63
  <%= f.label :cart_tax_country_iso %>
64
64
  <%= f.field_hint :cart_tax_country_iso %>
65
- <%= f.select :cart_tax_country_iso,
66
- Spree::Country.all.map { |c| [c.name, c.iso] },
65
+ <%= f.collection_select :cart_tax_country_iso,
66
+ available_countries(restrict_to_zone: nil), :iso, :name,
67
67
  { include_blank: t(".no_cart_tax_country") },
68
68
  { class: "custom-select fullwidth" } %>
69
69
  <%= f.error_message_on :cart_tax_country_iso %>
@@ -40,6 +40,7 @@
40
40
  <%= label_tag nil, plural_resource_name(Spree::StockLocation) %>
41
41
  <ul>
42
42
  <% if can?(:manage, Spree::UserStockLocation) %>
43
+ <%= hidden_field_tag('user[stock_location_ids][]', nil) %>
43
44
  <% @stock_locations.each do |stock_location| %>
44
45
  <li>
45
46
  <label>
@@ -89,7 +89,7 @@
89
89
  <% if can?(:edit, user) %>
90
90
  <%= link_to_edit user, no_text: true %>
91
91
  <% end %>
92
- <% if can?(:destroy, user) && user.orders.count.zero? %>
92
+ <% if can?(:destroy, user) && user.can_be_deleted? %>
93
93
  <%= link_to_delete user, no_text: true %>
94
94
  <% end %>
95
95
  </td>
@@ -3,10 +3,9 @@
3
3
  <table class="index sortable" data-sortable-link="<%= update_positions_admin_product_variants_path(@product) %>">
4
4
  <colgroup>
5
5
  <col style="width: 5%" />
6
- <col style="width: 25%" />
7
- <col style="width: 20%" />
6
+ <col style="width: 35%" />
8
7
  <col style="width: 20%" />
9
- <col style="width: 15%" />
8
+ <col style="width: 25%" />
10
9
  <col style="width: 15%" />
11
10
  </colgroup>
12
11
  <thead data-hook="variants_header">
@@ -40,9 +39,11 @@
40
39
  </td>
41
40
  </tr>
42
41
  <% end %>
43
- <% if variants.empty? %>
44
- <tr><td colspan="4"><%= t('spree.none') %></td></tr>
45
- <% end %>
46
42
  </tbody>
47
43
  </table>
44
+ <% if variants.empty? %>
45
+ <div class="alert alert-warning">
46
+ <%= t('.no_variants_found', term: params[:variant_search_term]) %>
47
+ </div>
48
+ <% end %>
48
49
  <%= paginate variants, theme: "solidus_admin" %>
@@ -4,14 +4,14 @@
4
4
 
5
5
  <% content_for :table_filter do %>
6
6
  <%= form_for :variant_search, url: spree.admin_product_variants_path(product), method: :get do |f| %>
7
- <div class="col-10">
8
- <div data-hook="admin_variants_index_search" class="field">
9
- <%= f.label :variant_search_term, t('spree.variant_search_placeholder') %>
10
- <%= text_field_tag :variant_search_term, params[:variant_search_term], class: "fullwidth", placeholder: t('spree.variant_search_placeholder') %>
7
+ <div class="row">
8
+ <div class="col-10">
9
+ <div data-hook="admin_variants_index_search" class="field">
10
+ <%= f.label :variant_search_term, t('spree.variant_search_placeholder') %>
11
+ <%= text_field_tag :variant_search_term, params[:variant_search_term], class: "fullwidth", placeholder: t('spree.variant_search_placeholder') %>
12
+ </div>
11
13
  </div>
12
- </div>
13
14
 
14
- <% if product.variants.discarded.any? %>
15
15
  <div class="col-2">
16
16
  <div class="field checkbox">
17
17
  <label>
@@ -20,10 +20,10 @@
20
20
  </label>
21
21
  </div>
22
22
  </div>
23
- <% end %>
23
+ </div>
24
24
 
25
25
  <div class="actions filter-actions">
26
- <%= f.button :search %>
26
+ <%= button_tag t('spree.filter_results'), class: 'btn btn-primary' %>
27
27
  </div>
28
28
  <% end %>
29
29
  <% end %>
@@ -14,7 +14,7 @@
14
14
  <% end %>
15
15
  <% end %>
16
16
 
17
- <% if @variants.any? || @product.variants.discarded.any? %>
17
+ <% if @variants.any? || @product.variants.discarded.any? || params[:variant_search_term].present? %>
18
18
  <%= render "table_filter", product: @product %>
19
19
  <%= render "table", variants: @variants %>
20
20
  <% else %>
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: 3.0.6
4
+ version: 3.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Solidus Team
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-01 00:00:00.000000000 Z
11
+ date: 2022-09-22 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: 3.0.6
19
+ version: 3.0.8
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: 3.0.6
26
+ version: 3.0.8
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: 3.0.6
33
+ version: 3.0.8
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: 3.0.6
40
+ version: 3.0.8
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: coffee-rails
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -904,7 +904,7 @@ homepage: http://solidus.io
904
904
  licenses:
905
905
  - BSD-3-Clause
906
906
  metadata: {}
907
- post_install_message:
907
+ post_install_message:
908
908
  rdoc_options: []
909
909
  require_paths:
910
910
  - lib
@@ -919,8 +919,8 @@ 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.31
923
- signing_key:
922
+ rubygems_version: 3.3.7
923
+ signing_key:
924
924
  specification_version: 4
925
925
  summary: Admin interface for the Solidus e-commerce framework.
926
926
  test_files: []