spree_backend 4.2.0.rc1 → 4.2.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/spree/admin/general_settings_controller.rb +1 -1
- data/app/controllers/spree/admin/stores_controller.rb +5 -0
- data/app/helpers/spree/admin/stores_helper.rb +9 -0
- data/app/views/spree/admin/general_settings/_form.html.erb +3 -13
- data/app/views/spree/admin/option_types/_form.html.erb +9 -0
- data/app/views/spree/admin/option_types/index.html.erb +2 -0
- data/app/views/spree/admin/orders/_store_form.html.erb +1 -1
- data/app/views/spree/admin/payment_methods/_form.html.erb +1 -1
- data/app/views/spree/admin/products/index.html.erb +1 -1
- data/app/views/spree/admin/stores/_form.html.erb +6 -0
- data/app/views/spree/admin/stores/index.html.erb +1 -1
- metadata +10 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: caac247ae4531a6f5a3a6801e0bccfb61a89534db3db870157fd4fbc369e6f4a
|
4
|
+
data.tar.gz: 1e6d1992b4ef3922e5581618ad3e3dd8217834d7cdfbdf9e037b8e6f04b77474
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dce86a37e8ee568b809acaec411c7845c321a4850d39047167e5101fd594ade748f235d00fe4a3bec5915078c1cebe0e44bc01a1b9e9d022e3dfb4859ad20186
|
7
|
+
data.tar.gz: 4e901dd7190ef44b43065ee007aa696c9d89c3e3f6acf7eb6c643712973309cdf6860bf8233c17d10ecd861358562c146e5cbe5f73256f1f307cefc20294cef1
|
@@ -7,6 +7,7 @@ module Spree
|
|
7
7
|
before_action :normalize_supported_currencies, only: [:create, :update]
|
8
8
|
before_action :set_default_country_id, only: :new
|
9
9
|
before_action :load_all_countries, only: [:new, :edit, :update, :create]
|
10
|
+
before_action :load_all_zones, only: %i[new edit]
|
10
11
|
|
11
12
|
if defined?(SpreeI18n)
|
12
13
|
include SpreeI18n::LocaleHelper
|
@@ -114,6 +115,10 @@ module Spree
|
|
114
115
|
@countries = Spree::Country.all
|
115
116
|
end
|
116
117
|
|
118
|
+
def load_all_zones
|
119
|
+
@zones = Spree::Zone.pluck(:name, :id)
|
120
|
+
end
|
121
|
+
|
117
122
|
def set_default_currency
|
118
123
|
@store.default_currency = Spree::Config[:currency]
|
119
124
|
end
|
@@ -7,20 +7,10 @@
|
|
7
7
|
<div class="form-group">
|
8
8
|
<div class="checkbox">
|
9
9
|
<label>
|
10
|
-
<%= check_box('', :
|
11
|
-
<%= Spree.t('
|
10
|
+
<%= check_box('', :show_store_currency_selector, { checked: Spree::Config.show_store_currency_selector }) %>
|
11
|
+
<%= Spree.t('show_store_currency_selector.short') %>
|
12
12
|
</label>
|
13
|
-
<p class="help-block"><%= Spree.t('
|
14
|
-
</div>
|
15
|
-
</div>
|
16
|
-
|
17
|
-
<div class="form-group">
|
18
|
-
<div class="checkbox">
|
19
|
-
<label>
|
20
|
-
<%= check_box('', :show_currency_selector, { checked: Spree::Config.show_currency_selector}) %>
|
21
|
-
<%= Spree.t('show_currency_selector.short') %>
|
22
|
-
</label>
|
23
|
-
<p class="help-block"><%= Spree.t('show_currency_selector.long_html') %></p>
|
13
|
+
<p class="help-block"><%= Spree.t('show_store_currency_selector.long') %></p>
|
24
14
|
</div>
|
25
15
|
</div>
|
26
16
|
</div>
|
@@ -14,4 +14,13 @@
|
|
14
14
|
<%= f.error_message_on :presentation %>
|
15
15
|
<% end %>
|
16
16
|
</div>
|
17
|
+
|
18
|
+
<div class="col-12 col-md-6">
|
19
|
+
<%= f.field_container :filterable, class: ['form-group'] do %>
|
20
|
+
<%= label_tag :option_type_filterable do %>
|
21
|
+
<%= f.check_box :filterable %>
|
22
|
+
<%= Spree.t(:filterable) %>
|
23
|
+
<% end %>
|
24
|
+
<% end %>
|
25
|
+
</div>
|
17
26
|
</div>
|
@@ -18,6 +18,7 @@
|
|
18
18
|
<th class="no-border handel-head"></th>
|
19
19
|
<th><%= Spree.t(:name) %></th>
|
20
20
|
<th><%= Spree.t(:presentation) %></th>
|
21
|
+
<th><%= Spree.t(:filterable) %></th>
|
21
22
|
<th class="actions"></th>
|
22
23
|
</tr>
|
23
24
|
</thead>
|
@@ -29,6 +30,7 @@
|
|
29
30
|
</td>
|
30
31
|
<td><%= option_type.name %></td>
|
31
32
|
<td class="presentation"><%= option_type.presentation %></td>
|
33
|
+
<td><%= option_type.filterable %></td>
|
32
34
|
<td class="actions actions-2 text-right">
|
33
35
|
<%= link_to_edit(option_type, class: 'admin_edit_option_type', no_text: true) if can?(:edit, option_type) %>
|
34
36
|
<%= link_to_delete(option_type, no_text: true) if can?(:delete, option_type) %>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<div data-hook="admin_order_store_field">
|
5
5
|
<%= f.field_container :store_id, class: ['form-group'] do %>
|
6
6
|
<%= f.label :store_id, Spree.t(:store) %>
|
7
|
-
<%= f.collection_select(:store_id, @stores, :id, :
|
7
|
+
<%= f.collection_select(:store_id, @stores, :id, :unique_name, { include_blank: false }, { class: "select2" }) %>
|
8
8
|
<%= f.error_message_on :store_id %>
|
9
9
|
<% end %>
|
10
10
|
</div>
|
@@ -17,7 +17,7 @@
|
|
17
17
|
</div>
|
18
18
|
<div data-hook="store" class="form-group">
|
19
19
|
<%= label_tag :payment_method_store, Spree.t(:store) %>
|
20
|
-
<%= collection_select(:payment_method, :store_id, @stores, :id, :
|
20
|
+
<%= collection_select(:payment_method, :store_id, @stores, :id, :unique_name, { include_blank: true }, {id: 'store_id', class: 'select2'}) %>
|
21
21
|
</div>
|
22
22
|
<div data-hook="display" class="form-group">
|
23
23
|
<%= label_tag :payment_method_display_on, Spree.t(:display) %>
|
@@ -75,7 +75,7 @@
|
|
75
75
|
<td class="status"><%= available_status(product) %> </td>
|
76
76
|
<td class="text-center"><%= display_price(product) %></td>
|
77
77
|
<td class="actions " data-hook="admin_products_index_row_actions">
|
78
|
-
<span class="d-flex">
|
78
|
+
<span class="d-flex justify-content-end">
|
79
79
|
<%= link_to_edit product, no_text: true, class: 'edit' if can?(:edit, product) && !product.deleted? %>
|
80
80
|
<%= link_to_clone product, no_text: true, class: 'clone' if can?(:clone, product) %>
|
81
81
|
<%= link_to_delete product, no_text: true if can?(:delete, product) && !product.deleted? %>
|
@@ -116,6 +116,12 @@
|
|
116
116
|
<%= f.select :supported_currencies, currency_options(@store.supported_currencies&.split(',')), { prompt: false }, { multiple: true, class: 'select2' } %>
|
117
117
|
<%= f.error_message_on :supported_currencies %>
|
118
118
|
<% end %>
|
119
|
+
<%= f.field_container :checkout_zone_id, class: ['form-group'] do %>
|
120
|
+
<%= f.label :checkout_zone_id, Spree.t(:zone) %>
|
121
|
+
<%= f.select :checkout_zone_id, options_for_select(@zones, selected_checkout_zone(@store)&.id), { include_blank: Spree.t(:no_limits_zone) }, { class: 'select2' } %>
|
122
|
+
<%= f.label :checkout_zone_id, Spree.t('i18n.checkout_zone_warning_html'), class: 'alert alert-warning col-12' %>
|
123
|
+
<%= f.error_message_on :checkout_zone_id %>
|
124
|
+
<% end %>
|
119
125
|
<%= f.field_container :default_locale, class: ['form-group'] do %>
|
120
126
|
<%= f.label :default_locale, Spree.t('i18n.language') %>
|
121
127
|
<%= f.select :default_locale, options_from_collection_for_select(all_locales_options, :last, :first, @store.default_locale), {}, { class: 'select2' } %>
|
@@ -19,7 +19,7 @@
|
|
19
19
|
<tbody>
|
20
20
|
<% @stores.each do |store| %>
|
21
21
|
<tr>
|
22
|
-
<td><%= store.
|
22
|
+
<td><%= store.unique_name %></td>
|
23
23
|
<td><%= link_to store.url, 'https://' + store.url, target: :blank %></td>
|
24
24
|
<td><%= store.default_currency %></td>
|
25
25
|
<td><%= store.default ? "<strong>#{Spree.t(:say_yes)}</strong>".html_safe : Spree.t(:say_no) %>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_backend
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.2.0.
|
4
|
+
version: 4.2.0.rc2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Schofield
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-10
|
12
|
+
date: 2020-11-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: spree_api
|
@@ -17,28 +17,28 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - '='
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 4.2.0.
|
20
|
+
version: 4.2.0.rc2
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - '='
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 4.2.0.
|
27
|
+
version: 4.2.0.rc2
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: spree_core
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
32
|
- - '='
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: 4.2.0.
|
34
|
+
version: 4.2.0.rc2
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - '='
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: 4.2.0.
|
41
|
+
version: 4.2.0.rc2
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: bootstrap
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -349,6 +349,7 @@ files:
|
|
349
349
|
- app/helpers/spree/admin/reimbursements_helper.rb
|
350
350
|
- app/helpers/spree/admin/stock_locations_helper.rb
|
351
351
|
- app/helpers/spree/admin/stock_movements_helper.rb
|
352
|
+
- app/helpers/spree/admin/stores_helper.rb
|
352
353
|
- app/helpers/spree/admin/taxons_helper.rb
|
353
354
|
- app/models/spree/admin/resource.rb
|
354
355
|
- app/models/spree/backend_configuration.rb
|
@@ -651,9 +652,9 @@ licenses:
|
|
651
652
|
- BSD-3-Clause
|
652
653
|
metadata:
|
653
654
|
bug_tracker_uri: https://github.com/spree/spree/issues
|
654
|
-
changelog_uri: https://github.com/spree/spree/releases/tag/v4.2.0.
|
655
|
+
changelog_uri: https://github.com/spree/spree/releases/tag/v4.2.0.rc2
|
655
656
|
documentation_uri: https://guides.spreecommerce.org/
|
656
|
-
source_code_uri: https://github.com/spree/spree/tree/v4.2.0.
|
657
|
+
source_code_uri: https://github.com/spree/spree/tree/v4.2.0.rc2
|
657
658
|
post_install_message:
|
658
659
|
rdoc_options: []
|
659
660
|
require_paths:
|
@@ -670,7 +671,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
670
671
|
version: 1.3.1
|
671
672
|
requirements:
|
672
673
|
- none
|
673
|
-
rubygems_version: 3.1.
|
674
|
+
rubygems_version: 3.1.2
|
674
675
|
signing_key:
|
675
676
|
specification_version: 4
|
676
677
|
summary: backend e-commerce functionality for the Spree project.
|