spree_backend 4.5.0 → 4.6.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.
- checksums.yaml +4 -4
- data/.circleci/config.yml +98 -4
- data/.github/workflows/spelling_lint.yml +1 -1
- data/Gemfile +5 -3
- data/app/assets/images/admin/logo.png +0 -0
- data/app/assets/images/backend-spree-icon.svg +5 -1
- data/app/assets/images/backend-spree-logo.svg +8 -4
- data/app/assets/images/noimage/large.png +0 -0
- data/app/assets/images/noimage/mini.png +0 -0
- data/app/assets/images/noimage/product.png +0 -0
- data/app/assets/images/noimage/small.png +0 -0
- data/app/assets/stylesheets/spree/backend/components/_nav.scss +13 -0
- data/app/assets/stylesheets/spree/backend/spree_admin.css.scss +1 -0
- data/app/controllers/concerns/spree/admin/product_concern.rb +1 -1
- data/app/controllers/concerns/spree/admin/translatable.rb +29 -0
- data/app/controllers/spree/admin/base_controller.rb +1 -1
- data/app/controllers/spree/admin/data_feeds_controller.rb +12 -0
- data/app/controllers/spree/admin/option_types_controller.rb +2 -0
- data/app/controllers/spree/admin/option_values_controller.rb +8 -1
- data/app/controllers/spree/admin/payment_methods_controller.rb +4 -1
- data/app/controllers/spree/admin/products_controller.rb +1 -1
- data/app/controllers/spree/admin/stores_controller.rb +8 -1
- data/app/controllers/spree/admin/taxons_controller.rb +7 -0
- data/app/views/spree/admin/dashboard/_getting_started.html.erb +17 -21
- data/app/views/spree/admin/data_feeds/_form.html.erb +29 -0
- data/app/views/spree/admin/data_feeds/edit.html.erb +13 -0
- data/app/views/spree/admin/data_feeds/index.html.erb +45 -0
- data/app/views/spree/admin/data_feeds/new.html.erb +13 -0
- data/app/views/spree/admin/option_types/_option_value_fields.html.erb +12 -0
- data/app/views/spree/admin/option_types/_tabs.html.erb +22 -0
- data/app/views/spree/admin/option_types/edit.html.erb +1 -2
- data/app/views/spree/admin/option_types/translations.html.erb +5 -0
- data/app/views/spree/admin/option_values/translations.html.erb +9 -0
- data/app/views/spree/admin/products/translations.html.erb +6 -0
- data/app/views/spree/admin/prototypes/show.html.erb +1 -1
- data/app/views/spree/admin/shared/_product_tabs.html.erb +8 -0
- data/app/views/spree/admin/shared/_store_switcher.html.erb +2 -2
- data/app/views/spree/admin/shared/sub_menu/_integrations.html.erb +1 -0
- data/app/views/spree/admin/stores/_tabs.html.erb +17 -0
- data/app/views/spree/admin/stores/edit.html.erb +1 -0
- data/app/views/spree/admin/stores/form/_internationalization.html.erb +3 -0
- data/app/views/spree/admin/stores/translations.html.erb +8 -0
- data/app/views/spree/admin/taxonomies/translations.html.erb +3 -0
- data/app/views/spree/admin/taxons/_tabs.html.erb +26 -0
- data/app/views/spree/admin/taxons/edit.html.erb +1 -8
- data/app/views/spree/admin/taxons/translations.html.erb +5 -0
- data/app/views/spree/admin/translations/_form.html.erb +16 -0
- data/app/views/spree/admin/translations/_translation_table.html.erb +31 -0
- data/app/views/spree/admin/translations/_translations_unavailable.html.erb +11 -0
- data/app/views/spree/admin/webhooks_subscribers/index.html.erb +1 -1
- data/app/views/spree/admin/webhooks_subscribers/show.html.erb +1 -1
- data/config/locales/en.yml +25 -0
- data/config/routes.rb +28 -1
- data/lib/spree/backend/version.rb +1 -1
- data/spec/fixtures/files/favicon.ico +0 -0
- data/spree_backend.gemspec +1 -1
- metadata +26 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b658a0d5f11161bb88e49c2db87c4a50a2346b2f76bab36c286d93c89fbc171
|
4
|
+
data.tar.gz: 5135287e5f65f52b088d9ecae613efbfb721533eb40f79dcb2a07b80553501c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed586053b82dbf636a94436d7e960d592ac574fb98c55177a5424366dc34dd6fdd315c8ab24e5e32927f0749c697f206ba21452795aa002776b4188cbb012616
|
7
|
+
data.tar.gz: 2e7b00634d3d7dd86fb4d8a2e65904289865d501789f4263993502753b5c62dd21020265ce2f4ea0931ebe4304dbe2bf0417aa26023c5e6f2b3151179c6499c0
|
data/.circleci/config.yml
CHANGED
@@ -19,6 +19,12 @@ defaults_3_0: &defaults_3_0
|
|
19
19
|
- image: &ruby_3_0_image circleci/ruby:3.0-node-browsers
|
20
20
|
- image: *redis_image
|
21
21
|
|
22
|
+
defaults_3_2: &defaults_3_2
|
23
|
+
<<: *defaults
|
24
|
+
docker:
|
25
|
+
- image: &ruby_3_2_image cimg/ruby:3.2.0-browsers
|
26
|
+
- image: *redis_image
|
27
|
+
|
22
28
|
run_tests_2_7: &run_tests_2_7
|
23
29
|
<<: *defaults
|
24
30
|
parallelism: 8
|
@@ -28,9 +34,12 @@ run_tests_2_7: &run_tests_2_7
|
|
28
34
|
keys:
|
29
35
|
- spree-dashboard-bundle-v10-ruby-2-7-{{ .Branch }}
|
30
36
|
- spree-dashboard-bundle-v10-ruby-2-7
|
37
|
+
- run:
|
38
|
+
name: Add keyserver
|
39
|
+
command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4EB27DB2A3B88B8B
|
31
40
|
- run:
|
32
41
|
name: Install libvips
|
33
|
-
command: sudo apt-get install libvips
|
42
|
+
command: sudo apt-get update && sudo apt-get install libvips
|
34
43
|
- run:
|
35
44
|
name: Set bundle path
|
36
45
|
command: bundle config --local path vendor/bundle
|
@@ -68,9 +77,12 @@ run_tests_3_0: &run_tests_3_0
|
|
68
77
|
keys:
|
69
78
|
- spree-dashboard-bundle-v10-ruby-3-0-{{ .Branch }}
|
70
79
|
- spree-dashboard-bundle-v10-ruby-3-0
|
80
|
+
- run:
|
81
|
+
name: Add keyserver
|
82
|
+
command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4EB27DB2A3B88B8B
|
71
83
|
- run:
|
72
84
|
name: Install libvips
|
73
|
-
command: sudo apt-get install libvips
|
85
|
+
command: sudo apt-get update && sudo apt-get install libvips
|
74
86
|
- run:
|
75
87
|
name: Set bundle path
|
76
88
|
command: bundle config --local path vendor/bundle
|
@@ -99,6 +111,46 @@ run_tests_3_0: &run_tests_3_0
|
|
99
111
|
- store_artifacts:
|
100
112
|
path: /tmp/test-artifacts
|
101
113
|
|
114
|
+
run_tests_3_2: &run_tests_3_2
|
115
|
+
<<: *defaults_3_2
|
116
|
+
parallelism: 8
|
117
|
+
steps:
|
118
|
+
- checkout
|
119
|
+
- restore_cache:
|
120
|
+
keys:
|
121
|
+
- spree-dashboard-bundle-v10-ruby-3-2-{{ .Branch }}
|
122
|
+
- spree-dashboard-bundle-v10-ruby-3-2
|
123
|
+
- run:
|
124
|
+
name: Install libvips
|
125
|
+
command: sudo apt-get update && sudo apt-get install libvips42
|
126
|
+
- run:
|
127
|
+
name: Set bundle path
|
128
|
+
command: bundle config --local path vendor/bundle
|
129
|
+
- run:
|
130
|
+
name: Ensure bundle Install
|
131
|
+
command: |
|
132
|
+
bundle check || bundle install
|
133
|
+
- run:
|
134
|
+
name: Create test app
|
135
|
+
command: |
|
136
|
+
bundle exec rake test_app
|
137
|
+
- run:
|
138
|
+
name: Unlink NPM package
|
139
|
+
command: |
|
140
|
+
cd spec/dummy && yarn unlink @spree/dashboard
|
141
|
+
- run:
|
142
|
+
name: Run Rspec
|
143
|
+
command: |
|
144
|
+
TESTFILES=$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)
|
145
|
+
bundle exec rspec --format documentation \
|
146
|
+
--format RspecJunitFormatter \
|
147
|
+
-o ~/rspec/rspec.xml \
|
148
|
+
-- ${TESTFILES}
|
149
|
+
- store_test_results:
|
150
|
+
path: ~/rspec
|
151
|
+
- store_artifacts:
|
152
|
+
path: /tmp/test-artifacts
|
153
|
+
|
102
154
|
jobs:
|
103
155
|
bundle_ruby_2_7:
|
104
156
|
<<: *defaults
|
@@ -108,9 +160,12 @@ jobs:
|
|
108
160
|
keys:
|
109
161
|
- spree-dashboard-bundle-v10-ruby-2-7-{{ .Branch }}
|
110
162
|
- spree-dashboard-bundle-v10-ruby-2-7
|
163
|
+
- run:
|
164
|
+
name: Add keyserver
|
165
|
+
command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4EB27DB2A3B88B8B
|
111
166
|
- run:
|
112
167
|
name: Install libvips
|
113
|
-
command: sudo apt-get install libvips
|
168
|
+
command: sudo apt-get update && sudo apt-get install libvips
|
114
169
|
- run:
|
115
170
|
name: Set bundle path
|
116
171
|
command: bundle config --local path vendor/bundle
|
@@ -131,9 +186,12 @@ jobs:
|
|
131
186
|
keys:
|
132
187
|
- spree-dashboard-bundle-v10-ruby-3-0-{{ .Branch }}
|
133
188
|
- spree-dashboard-bundle-v10-ruby-3-0
|
189
|
+
- run:
|
190
|
+
name: Add keyserver
|
191
|
+
command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4EB27DB2A3B88B8B
|
134
192
|
- run:
|
135
193
|
name: Install libvips
|
136
|
-
command: sudo apt-get install libvips
|
194
|
+
command: sudo apt-get update && sudo apt-get install libvips
|
137
195
|
- run:
|
138
196
|
name: Set bundle path
|
139
197
|
command: bundle config --local path vendor/bundle
|
@@ -146,6 +204,29 @@ jobs:
|
|
146
204
|
- vendor/bundle
|
147
205
|
key: spree-dashboard-bundle-v10-ruby-3-0-{{ checksum "Gemfile.lock" }}
|
148
206
|
|
207
|
+
bundle_ruby_3_2:
|
208
|
+
<<: *defaults_3_2
|
209
|
+
steps:
|
210
|
+
- checkout
|
211
|
+
- restore_cache:
|
212
|
+
keys:
|
213
|
+
- spree-dashboard-bundle-v10-ruby-3-2-{{ .Branch }}
|
214
|
+
- spree-dashboard-bundle-v10-ruby-3-2
|
215
|
+
- run:
|
216
|
+
name: Install libvips
|
217
|
+
command: sudo apt-get update && sudo apt-get install libvips42
|
218
|
+
- run:
|
219
|
+
name: Set bundle path
|
220
|
+
command: bundle config --local path vendor/bundle
|
221
|
+
- run:
|
222
|
+
name: Bundle Install
|
223
|
+
command: |
|
224
|
+
bundle check || bundle install
|
225
|
+
- save_cache:
|
226
|
+
paths:
|
227
|
+
- vendor/bundle
|
228
|
+
key: spree-dashboard-bundle-v10-ruby-3-2-{{ checksum "Gemfile.lock" }}
|
229
|
+
|
149
230
|
tests_ruby_2_7_rails_7_0_postgres:
|
150
231
|
<<: *run_tests_2_7
|
151
232
|
environment: &postgres_environment
|
@@ -169,6 +250,15 @@ jobs:
|
|
169
250
|
- image: *postgres_image
|
170
251
|
- image: *redis_image
|
171
252
|
|
253
|
+
tests_ruby_3_2_rails_7_0_postgres:
|
254
|
+
<<: *run_tests_3_2
|
255
|
+
environment:
|
256
|
+
<<: *postgres_environment
|
257
|
+
docker:
|
258
|
+
- image: *ruby_3_2_image
|
259
|
+
- image: *postgres_image
|
260
|
+
- image: *redis_image
|
261
|
+
|
172
262
|
tests_ruby_2_7_rails_7_0_mysql:
|
173
263
|
<<: *run_tests_2_7
|
174
264
|
environment:
|
@@ -189,6 +279,10 @@ workflows:
|
|
189
279
|
jobs:
|
190
280
|
- bundle_ruby_2_7
|
191
281
|
- bundle_ruby_3_0
|
282
|
+
- bundle_ruby_3_2
|
283
|
+
- tests_ruby_3_2_rails_7_0_postgres:
|
284
|
+
requires:
|
285
|
+
- bundle_ruby_3_2
|
192
286
|
- tests_ruby_3_0_rails_7_0_postgres:
|
193
287
|
requires:
|
194
288
|
- bundle_ruby_3_0
|
@@ -22,7 +22,7 @@ jobs:
|
|
22
22
|
pip install codespell
|
23
23
|
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
24
24
|
- name: Check spelling with codespell
|
25
|
-
run: codespell --ignore-words=codespell.txt || exit 1
|
25
|
+
run: codespell --ignore-words=codespell.txt --skip=vendor,node_modules,yarn.lock || exit 1
|
26
26
|
misspell:
|
27
27
|
name: Check spelling all files in commit with misspell
|
28
28
|
runs-on: ubuntu-latest
|
data/Gemfile
CHANGED
@@ -36,7 +36,7 @@ group :test do
|
|
36
36
|
gem 'rspec_junit_formatter'
|
37
37
|
gem 'rswag-specs'
|
38
38
|
gem 'jsonapi-rspec'
|
39
|
-
gem 'simplecov', '0.
|
39
|
+
gem 'simplecov', '0.22.0'
|
40
40
|
gem 'webmock', '~> 3.7'
|
41
41
|
gem 'timecop'
|
42
42
|
gem 'rails-controller-testing'
|
@@ -47,7 +47,7 @@ group :test, :development do
|
|
47
47
|
gem 'awesome_print'
|
48
48
|
gem 'gem-release'
|
49
49
|
gem 'redis'
|
50
|
-
gem 'rubocop', '~> 1.
|
50
|
+
gem 'rubocop', '~> 1.48.1', require: false # bumped
|
51
51
|
gem 'rubocop-rspec', require: false
|
52
52
|
gem 'pry-byebug'
|
53
53
|
gem 'webdrivers', '~> 4.1'
|
@@ -65,5 +65,7 @@ end
|
|
65
65
|
spree_opts = { github: 'spree/spree', branch: 'main' }
|
66
66
|
gem 'spree_core', spree_opts
|
67
67
|
gem 'spree_api', spree_opts
|
68
|
-
|
68
|
+
# Last version that supports Ruby 2.7
|
69
|
+
# We should remove this once we drop support for Ruby 2.7
|
70
|
+
gem 'selenium-webdriver', '~> 4.8.1'
|
69
71
|
gemspec
|
Binary file
|
@@ -1 +1,5 @@
|
|
1
|
-
<svg
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="215.156" height="240.112" viewBox="0 0 215.156 240.112">
|
2
|
+
<g fill-rule="nonzero" fill="currentColor">
|
3
|
+
<path d="M125.668,240.112h0a72.581,72.581,0,0,1-23.006-3.89,94.124,94.124,0,0,1-18.873-8.857,107.267,107.267,0,0,1-20.2-15.773h0a.038.038,0,0,1-.01-.008L67.7,205.44a.257.257,0,0,0,.031.015,129.888,129.888,0,0,0,18,6.538,159.717,159.717,0,0,0,18.66,4.242,140.957,140.957,0,0,0,22.752,1.911c18.939,0,36.223-4.183,51.365-12.433l4.6,6.144C165.469,230.606,146.145,240.112,125.668,240.112Zm49.205-52.481a15.174,15.174,0,0,1-10.359-3.971,12.848,12.848,0,0,1,0-19.168,15.5,15.5,0,0,1,20.719,0,12.848,12.848,0,0,1,0,19.168A15.167,15.167,0,0,1,174.873,187.631Zm-102.539,0c-8.377,0-15.2-6.081-15.2-13.555s6.818-13.555,15.2-13.555a16.057,16.057,0,0,1,10.74,3.971,12.551,12.551,0,0,1,0,19.168A16.06,16.06,0,0,1,72.334,187.631Zm5.723-45.9a32.085,32.085,0,0,1-10.328-1.7,31.065,31.065,0,0,1-8.91-4.729,29.019,29.019,0,0,1-6.748-7.224,27.241,27.241,0,0,1-3.848-9.182L30.924,18.424H0L.008,0h37.41A12.563,12.563,0,0,1,44.98,2.5a10.945,10.945,0,0,1,4.137,6.373l4.895,24.229H203.217a12.291,12.291,0,0,1,9.2,4,10.438,10.438,0,0,1,2.531,9.111l-14.965,72.605a27.356,27.356,0,0,1-3.859,9.228,28.967,28.967,0,0,1-6.777,7.248,31.211,31.211,0,0,1-8.98,4.738,32.738,32.738,0,0,1-10.459,1.7c-.2,0-.387,0-.588-.005H78.641C78.449,141.736,78.25,141.736,78.057,141.736ZM193.385,52.909h0l-135.6.019,10.869,61.653a6.213,6.213,0,0,0,2.342,3.641,7.124,7.124,0,0,0,4.291,1.419h.131l97.768-.019h.152a6.726,6.726,0,0,0,6.846-5.041L193.389,52.91Z" />
|
4
|
+
</g>
|
5
|
+
</svg>
|
@@ -1,6 +1,10 @@
|
|
1
|
-
<svg
|
2
|
-
<g
|
3
|
-
<
|
4
|
-
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1199.129" height="300.825" viewBox="0 0 1199.129 300.825">
|
2
|
+
<g transform="translate(-224.344 -239.125)" fill="currentColor">
|
3
|
+
<g transform="translate(224.344 239.125)">
|
4
|
+
<g>
|
5
|
+
<path d="M125.668,240.112h0a72.581,72.581,0,0,1-23.006-3.89,94.124,94.124,0,0,1-18.873-8.857,107.267,107.267,0,0,1-20.2-15.773h0a.038.038,0,0,1-.01-.008L67.7,205.44a.257.257,0,0,0,.031.015,129.888,129.888,0,0,0,18,6.538,159.717,159.717,0,0,0,18.66,4.242,140.957,140.957,0,0,0,22.752,1.911c18.939,0,36.223-4.183,51.365-12.433l4.6,6.144C165.469,230.606,146.145,240.112,125.668,240.112Zm49.205-52.481a15.174,15.174,0,0,1-10.359-3.971,12.848,12.848,0,0,1,0-19.168,15.5,15.5,0,0,1,20.719,0,12.848,12.848,0,0,1,0,19.168A15.167,15.167,0,0,1,174.873,187.631Zm-102.539,0c-8.377,0-15.2-6.081-15.2-13.555s6.818-13.555,15.2-13.555a16.057,16.057,0,0,1,10.74,3.971,12.551,12.551,0,0,1,0,19.168A16.06,16.06,0,0,1,72.334,187.631Zm5.723-45.9a32.085,32.085,0,0,1-10.328-1.7,31.065,31.065,0,0,1-8.91-4.729,29.019,29.019,0,0,1-6.748-7.224,27.241,27.241,0,0,1-3.848-9.182L30.924,18.424H0L.008,0h37.41A12.563,12.563,0,0,1,44.98,2.5a10.945,10.945,0,0,1,4.137,6.373l4.895,24.229H203.217a12.291,12.291,0,0,1,9.2,4,10.438,10.438,0,0,1,2.531,9.111l-14.965,72.605a27.356,27.356,0,0,1-3.859,9.228,28.967,28.967,0,0,1-6.777,7.248,31.211,31.211,0,0,1-8.98,4.738,32.738,32.738,0,0,1-10.459,1.7c-.2,0-.387,0-.588-.005H78.641C78.449,141.736,78.25,141.736,78.057,141.736ZM193.385,52.909h0l-135.6.019,10.869,61.653a6.213,6.213,0,0,0,2.342,3.641,7.124,7.124,0,0,0,4.291,1.419h.131l97.768-.019h.152a6.726,6.726,0,0,0,6.846-5.041L193.389,52.91Z" transform="translate(0 0)" />
|
6
|
+
</g>
|
7
|
+
</g>
|
8
|
+
<path d="M220.518,267.868H188.227V3.852h28.885l3.414,34.871.051.538h3.205l.17-.313a71.884,71.884,0,0,1,12.227-16.555A70.851,70.851,0,0,1,252.49,10.179a80,80,0,0,1,19.9-7.58A99.514,99.514,0,0,1,295.41,0c12.859,0,24.6,2.308,34.889,6.858a69.852,69.852,0,0,1,26.039,19.913c7.152,8.765,12.648,19.555,16.334,32.071,3.758,12.743,5.662,27.323,5.662,43.333,0,16.193-1.9,30.9-5.662,43.722-3.693,12.6-9.189,23.417-16.334,32.165A69.522,69.522,0,0,1,330.3,197.925c-10.266,4.522-22,6.815-34.895,6.815a101.836,101.836,0,0,1-23.617-2.656,79.464,79.464,0,0,1-20.025-7.667,67.849,67.849,0,0,1-27.812-28.62l-.168-.319h-3.27Zm65.65-241.347a76.039,76.039,0,0,0-26.777,4.591A59.7,59.7,0,0,0,238.65,44.06a57.23,57.23,0,0,0-13.391,20.02,68.977,68.977,0,0,0-4.742,25.782v25.018A68.52,68.52,0,0,0,225.26,140.6a56.735,56.735,0,0,0,13.391,19.894A59.585,59.585,0,0,0,259.4,173.3a76.919,76.919,0,0,0,26.77,4.535c17.721,0,32.619-5.164,43.084-14.933,10.484-9.782,16.025-23.727,16.025-40.327V82.163c0-16.625-5.539-30.635-16.018-40.514C318.768,31.752,303.867,26.521,286.168,26.521ZM813.123,207.434c-14.346,0-27.553-2.449-39.25-7.278a81.139,81.139,0,0,1-29.59-20.815,92.683,92.683,0,0,1-18.717-32.885c-4.332-12.969-6.531-27.608-6.531-43.509,0-15.868,2.2-30.426,6.525-43.271a90,90,0,0,1,18.674-32.347A80.172,80.172,0,0,1,773.711,7.041C785.316,2.369,798.449,0,812.74,0a104.883,104.883,0,0,1,36.965,6.245,76.843,76.843,0,0,1,27.906,17.877A78.153,78.153,0,0,1,895.27,52.385a108.659,108.659,0,0,1,6.178,37.477,171.369,171.369,0,0,1-1.086,20.188H752.1l0,12.146a65.8,65.8,0,0,0,4.406,24.36,53.083,53.083,0,0,0,12.516,18.792,55.624,55.624,0,0,0,19.518,12.077,73.161,73.161,0,0,0,25.357,4.259c13.848,0,26.477-3.546,36.518-10.254a49.172,49.172,0,0,0,20.127-27.085h31.914c-4.311,19.228-14.252,34.234-30.393,45.877a92.6,92.6,0,0,1-12.91,7.529,93.781,93.781,0,0,1-14.1,5.375,104.528,104.528,0,0,1-15.326,3.232A124.678,124.678,0,0,1,813.123,207.434ZM812.74,25.75a73.857,73.857,0,0,0-24.521,3.965,56.338,56.338,0,0,0-19.18,11.2A49.878,49.878,0,0,0,756.547,58.26,55.846,55.846,0,0,0,752.1,80.622V86.61H869.535l0-8.3a55.422,55.422,0,0,0-4.117-21.5A47.378,47.378,0,0,0,853.8,40.195a51.919,51.919,0,0,0-17.953-10.673A68.611,68.611,0,0,0,812.74,25.75ZM602.188,207.434c-14.346,0-27.553-2.449-39.25-7.278a81.053,81.053,0,0,1-29.59-20.815,92.683,92.683,0,0,1-18.717-32.885c-4.332-12.969-6.531-27.608-6.531-43.509,0-15.882,2.2-30.44,6.525-43.271A90,90,0,0,1,533.3,27.329,80.2,80.2,0,0,1,562.77,7.041C574.381,2.369,587.514,0,601.8,0A104.883,104.883,0,0,1,638.77,6.245a76.845,76.845,0,0,1,27.9,17.877,78.078,78.078,0,0,1,17.664,28.263,108.613,108.613,0,0,1,6.178,37.477,171.4,171.4,0,0,1-1.084,20.188H541.16l0,12.146a65.8,65.8,0,0,0,4.406,24.36,53,53,0,0,0,12.516,18.792,55.615,55.615,0,0,0,19.52,12.077,73.094,73.094,0,0,0,25.355,4.259c13.848,0,26.477-3.546,36.518-10.254A49.146,49.146,0,0,0,659.6,144.344h31.914c-4.311,19.228-14.252,34.234-30.393,45.877a91.839,91.839,0,0,1-27.012,12.9,104.621,104.621,0,0,1-15.326,3.232A124.678,124.678,0,0,1,602.188,207.434ZM601.8,25.75a73.849,73.849,0,0,0-24.521,3.965,56.338,56.338,0,0,0-19.18,11.2A49.755,49.755,0,0,0,545.611,58.26a55.846,55.846,0,0,0-4.449,22.362V86.61H658.6l0-8.3a55.377,55.377,0,0,0-4.117-21.5,47.378,47.378,0,0,0-11.619-16.612,51.906,51.906,0,0,0-17.953-10.673A68.619,68.619,0,0,0,601.8,25.75ZM81.393,207.434c-24.617,0-45.252-6.1-59.678-17.626A56.742,56.742,0,0,1,5.605,169.613,60.958,60.958,0,0,1,0,143.962H31.914c.158,11.487,4.887,21.176,13.678,28.021s21.18,10.47,35.8,10.47a73.968,73.968,0,0,0,19.047-2.274,42.731,42.731,0,0,0,14.363-6.646,29.5,29.5,0,0,0,9.076-10.736,32.54,32.54,0,0,0,3.146-14.432,30.161,30.161,0,0,0-1.7-10.379,23.257,23.257,0,0,0-5.111-8.218,28.879,28.879,0,0,0-8.469-5.976,49.488,49.488,0,0,0-11.77-3.727l-43.113-8.086a100.8,100.8,0,0,1-23.322-6.953A56.1,56.1,0,0,1,17,93.958,42.633,42.633,0,0,1,7.139,78.8,54.181,54.181,0,0,1,3.854,59.45,57.6,57.6,0,0,1,9.145,34.57,51.835,51.835,0,0,1,24.215,15.9C37.465,5.5,56.438,0,79.08,0A110.546,110.546,0,0,1,111.02,4.34a70.231,70.231,0,0,1,23.936,12.271c13.072,10.551,20.162,25.557,20.5,43.4H123.535c-1-23.5-15.959-35.416-44.455-35.416a70.987,70.987,0,0,0-18.3,2.18A39.769,39.769,0,0,0,47.3,33.035a27.234,27.234,0,0,0-8.334,9.922,29.573,29.573,0,0,0-2.83,13.029,28.154,28.154,0,0,0,3.4,14.106,23.2,23.2,0,0,0,9.619,9.133l.045.019c7.922,3.4,11.479,4.623,19.758,6.2l39.648,7.31A93.816,93.816,0,0,1,131.49,99.57a54.132,54.132,0,0,1,16.3,11.206,43.876,43.876,0,0,1,9.783,15.591,58.259,58.259,0,0,1,3.273,20.075,58.013,58.013,0,0,1-5.57,25.6A53.43,53.43,0,0,1,139.395,191.2C125.43,201.82,105.373,207.434,81.393,207.434Zm357.762-3.852H406.861V32.891a39.827,39.827,0,0,1,1.848-12.722,22.8,22.8,0,0,1,5.525-9.032A23.415,23.415,0,0,1,423.5,5.693a42.561,42.561,0,0,1,13.174-1.841h69.07V30.367H439.158Z" transform="translate(521.02 272.083)" />
|
5
9
|
</g>
|
6
10
|
</svg>
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -14,6 +14,7 @@
|
|
14
14
|
@import 'spree/backend/components/page_header';
|
15
15
|
@import 'spree/backend/components/icons';
|
16
16
|
@import 'spree/backend/components/buttons';
|
17
|
+
@import 'spree/backend/components/nav';
|
17
18
|
@import 'spree/backend/components/filters';
|
18
19
|
@import 'spree/backend/components/navigation';
|
19
20
|
@import 'spree/backend/components/taxon_products_view';
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module Spree
|
2
|
+
module Admin
|
3
|
+
module Translatable
|
4
|
+
extend ActiveSupport::Concern
|
5
|
+
|
6
|
+
def edit_translations
|
7
|
+
save_translation_values
|
8
|
+
flash[:success] = Spree.t('notice_messages.translations_saved')
|
9
|
+
|
10
|
+
redirect_to(edit_polymorphic_path([:admin, @object]))
|
11
|
+
end
|
12
|
+
|
13
|
+
private
|
14
|
+
|
15
|
+
def save_translation_values
|
16
|
+
translation_params = params[:translation]
|
17
|
+
|
18
|
+
current_store.supported_locales_list.each do |locale|
|
19
|
+
I18n.with_locale(locale) do
|
20
|
+
translation_params.each do |attribute, translations|
|
21
|
+
@object.public_send("#{attribute}=", translations[locale])
|
22
|
+
end
|
23
|
+
@object.save!
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -1,6 +1,13 @@
|
|
1
1
|
module Spree
|
2
2
|
module Admin
|
3
|
-
class OptionValuesController <
|
3
|
+
class OptionValuesController < ResourceController
|
4
|
+
include Translatable
|
5
|
+
|
6
|
+
# This method is added here to allow `edit_polymorphic_path` to work
|
7
|
+
def edit_admin_option_value_path(option_value)
|
8
|
+
spree.edit_admin_option_type_url(option_value.option_type)
|
9
|
+
end
|
10
|
+
|
4
11
|
def destroy
|
5
12
|
option_value = Spree::OptionValue.find(params[:id])
|
6
13
|
option_value.destroy
|
@@ -45,7 +45,10 @@ module Spree
|
|
45
45
|
redirect_to spree.edit_admin_payment_method_path(@payment_method)
|
46
46
|
else
|
47
47
|
invoke_callbacks(:update, :fails)
|
48
|
-
respond_with(@payment_method
|
48
|
+
respond_with(@payment_method) do |format|
|
49
|
+
format.html { render action: :edit, status: :unprocessable_entity }
|
50
|
+
format.js { render layout: false, status: :unprocessable_entity }
|
51
|
+
end
|
49
52
|
end
|
50
53
|
end
|
51
54
|
|
@@ -2,6 +2,7 @@ module Spree
|
|
2
2
|
module Admin
|
3
3
|
class ProductsController < ResourceController
|
4
4
|
include Spree::Admin::ProductConcern
|
5
|
+
include Translatable
|
5
6
|
|
6
7
|
helper 'spree/admin/products'
|
7
8
|
|
@@ -139,7 +140,6 @@ module Spree
|
|
139
140
|
|
140
141
|
params[:q] ||= {}
|
141
142
|
params[:q][:deleted_at_null] ||= '1'
|
142
|
-
|
143
143
|
params[:q][:s] ||= 'name asc'
|
144
144
|
|
145
145
|
@collection = product_scope
|
@@ -1,7 +1,9 @@
|
|
1
1
|
module Spree
|
2
2
|
module Admin
|
3
3
|
class StoresController < Spree::Admin::BaseController
|
4
|
-
|
4
|
+
include Translatable
|
5
|
+
|
6
|
+
before_action :load_store, only: [:new, :edit, :translations, :edit_translations, :update]
|
5
7
|
before_action :set_default_currency, only: :new
|
6
8
|
before_action :set_default_locale, only: :new
|
7
9
|
before_action :normalize_supported_currencies, only: [:create, :update]
|
@@ -88,6 +90,11 @@ module Spree
|
|
88
90
|
def set_default_country_id
|
89
91
|
@store.default_country_id ||= Spree::Store.default.default_country_id || Spree::Country.find_by(iso: "US")&.id
|
90
92
|
end
|
93
|
+
|
94
|
+
def save_translation_values
|
95
|
+
@object = @store
|
96
|
+
super
|
97
|
+
end
|
91
98
|
end
|
92
99
|
end
|
93
100
|
end
|
@@ -1,6 +1,8 @@
|
|
1
1
|
module Spree
|
2
2
|
module Admin
|
3
3
|
class TaxonsController < ResourceController
|
4
|
+
include Translatable
|
5
|
+
|
4
6
|
belongs_to 'spree/taxonomy'
|
5
7
|
|
6
8
|
before_action :set_permalink_part, only: [:edit]
|
@@ -55,6 +57,11 @@ module Spree
|
|
55
57
|
end
|
56
58
|
end
|
57
59
|
|
60
|
+
# This method is added here to allow `edit_polymorphic_path` to work
|
61
|
+
def edit_admin_taxon_path(taxon)
|
62
|
+
spree.edit_admin_taxonomy_taxon_path(taxon.taxonomy, taxon.id)
|
63
|
+
end
|
64
|
+
|
58
65
|
private
|
59
66
|
|
60
67
|
def location_after_save
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<h4 class="mb-3"
|
1
|
+
<h4 class="mb-3"><%= Spree.t('admin.gettting_started.lets_get_you_started') %></h4>
|
2
2
|
|
3
3
|
<div class="row mb-3">
|
4
4
|
<div class="col-4">
|
@@ -9,7 +9,7 @@
|
|
9
9
|
<% else %>
|
10
10
|
<%= svg_icon name: 'tags', width: 20, height: 20, classes: "mr-3" %>
|
11
11
|
<% end %>
|
12
|
-
|
12
|
+
<%= Spree.t('admin.gettting_started.add_products') %>
|
13
13
|
</a>
|
14
14
|
<a class="list-group-item list-group-item-action <% if @shipping_methods_added %>list-group-item-info<% elsif @active_tab == 'shipping' %>active<% end %>" id="list-shipping-list" data-toggle="list" href="#list-shipping" role="tab" aria-controls="shipping">
|
15
15
|
<% if @shipping_methods_added %>
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<% else %>
|
18
18
|
<%= svg_icon name: 'truck', width: 20, height: 20, classes: "mr-3" %>
|
19
19
|
<% end %>
|
20
|
-
|
20
|
+
<%= Spree.t('admin.gettting_started.setup_shipping') %>
|
21
21
|
</a>
|
22
22
|
<a class="list-group-item list-group-item-action <% if @payment_methods_added %>list-group-item-info<% elsif @active_tab == 'payments' %>active<% end %>" id="list-payments-list" data-toggle="list" href="#list-payments" role="tab" aria-controls="payments">
|
23
23
|
<% if @payment_methods_added %>
|
@@ -25,7 +25,7 @@
|
|
25
25
|
<% else %>
|
26
26
|
<%= svg_icon name: 'cash-coin', width: 20, height: 20, classes: "mr-3" %>
|
27
27
|
<% end %>
|
28
|
-
|
28
|
+
<%= Spree.t('admin.gettting_started.setup_payment_method') %>
|
29
29
|
</a>
|
30
30
|
<a class="list-group-item list-group-item-action <% if @taxes_added %>list-group-item-info<% elsif @active_tab == 'taxes' %>active<% end %>" id="list-taxes-list" data-toggle="list" href="#list-taxes" role="tab" aria-controls="taxes">
|
31
31
|
<% if @taxes_added %>
|
@@ -33,7 +33,7 @@
|
|
33
33
|
<% else %>
|
34
34
|
<%= svg_icon name: 'receipt', width: 20, height: 20, classes: "mr-3" %>
|
35
35
|
<% end %>
|
36
|
-
|
36
|
+
<%= Spree.t('admin.gettting_started.setup_taxes') %>
|
37
37
|
</a>
|
38
38
|
</div>
|
39
39
|
</div>
|
@@ -41,19 +41,18 @@
|
|
41
41
|
<div class="tab-content" id="nav-tabContent">
|
42
42
|
<div class="tab-pane fade <% if @active_tab == 'products'%>show active<% end %>" id="list-products" role="tabpanel" aria-labelledby="list-products-list">
|
43
43
|
<% if @products_added %>
|
44
|
-
<p>
|
45
|
-
You have added <strong><%= current_store.products.count %> products</strong> so far - good job!</p>
|
44
|
+
<p><%= Spree.t('admin.gettting_started.products_section.message_with_products_html', count: current_store.products.count ) %></p>
|
46
45
|
<% else %>
|
47
46
|
<p>
|
48
|
-
|
47
|
+
<%= Spree.t('admin.gettting_started.products_section.message_without_products') %>
|
49
48
|
</p>
|
50
|
-
<%= link_to_with_icon 'add.svg', '
|
49
|
+
<%= link_to_with_icon 'add.svg', Spree.t('admin.gettting_started.add_products'), spree.admin_products_path, class: 'btn btn-success btn-sm mb-2' %>
|
51
50
|
<% end %>
|
52
51
|
</div>
|
53
52
|
<div class="tab-pane fade <% if @active_tab == 'shipping'%>show active<% end %>" id="list-shipping" role="tabpanel" aria-labelledby="list-shipping-list">
|
54
53
|
<% if @shipping_methods_added %>
|
55
54
|
<p>
|
56
|
-
|
55
|
+
<%= Spree.t('admin.gettting_started.shipping_section.message_with_shipping') %>
|
57
56
|
<% @shippable_countries.each do |country| %>
|
58
57
|
<strong class="mr-2">
|
59
58
|
<%= country.name %>
|
@@ -63,39 +62,36 @@
|
|
63
62
|
</p>
|
64
63
|
<% else %>
|
65
64
|
<p>
|
66
|
-
|
65
|
+
<%= Spree.t('admin.gettting_started.shipping_section.message_without_shipping') %>
|
67
66
|
</p>
|
68
|
-
<%= link_to_with_icon 'settings.svg', '
|
67
|
+
<%= link_to_with_icon 'settings.svg', Spree.t('admin.gettting_started.setup_shipping'), spree.admin_shipping_methods_path, class: 'btn btn-primary btn-sm mb-2' %>
|
69
68
|
<% end %>
|
70
69
|
</div>
|
71
70
|
<div class="tab-pane fade <% if @active_tab == 'payments'%>show active<% end %>" id="list-payments" role="tabpanel" aria-labelledby="list-payments-list">
|
72
71
|
<% if @payment_methods_added %>
|
73
72
|
<p>
|
74
|
-
|
73
|
+
<%= Spree.t('admin.gettting_started.payment_methods_section.message_with_payment_method') %>
|
75
74
|
</p>
|
76
75
|
<% else %>
|
77
76
|
<p>
|
78
|
-
|
77
|
+
<%= Spree.t('admin.gettting_started.payment_methods_section.message_without_payment_method') %>
|
79
78
|
</p>
|
80
|
-
<%= link_to_with_icon 'settings.svg', '
|
79
|
+
<%= link_to_with_icon 'settings.svg', Spree.t('admin.gettting_started.setup_payment_method'), spree.admin_payment_methods_path, class: 'btn btn-primary btn-sm mb-2' %>
|
81
80
|
<% end %>
|
82
81
|
</div>
|
83
82
|
<div class="tab-pane fade <% if @active_tab == 'taxes' %>show active<% end %>" id="list-taxes" role="tabpanel" aria-labelledby="list-taxes-list">
|
84
83
|
<% if @taxes_added %>
|
85
84
|
<p>
|
86
|
-
|
85
|
+
<%= Spree.t('admin.gettting_started.taxes_section.message_with_taxes') %>
|
87
86
|
</p>
|
88
87
|
<% else %>
|
89
88
|
<p>
|
90
|
-
|
89
|
+
<%= Spree.t('admin.gettting_started.taxes_section.message_without_taxes') %>
|
91
90
|
</p>
|
92
|
-
<%= link_to_with_icon 'settings.svg', '
|
91
|
+
<%= link_to_with_icon 'settings.svg', Spree.t('admin.gettting_started.setup_taxes_calculation'), spree.admin_tax_rates_path, class: 'btn btn-primary btn-sm mb-2' %>
|
93
92
|
<% end %>
|
94
93
|
|
95
94
|
</div>
|
96
95
|
</div>
|
97
96
|
</div>
|
98
97
|
</div>
|
99
|
-
|
100
|
-
|
101
|
-
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<div data-hook="admin_webhooks_subscriber_form_fields">
|
2
|
+
<%= f.field_container :name, class: ['form-group'] do %>
|
3
|
+
<%= f.label :name %>
|
4
|
+
<%= f.text_field :name, class: 'form-control' %>
|
5
|
+
<%= f.error_message_on :name %>
|
6
|
+
<% end %>
|
7
|
+
|
8
|
+
<%= f.field_container :slug, class: ['form-group'] do %>
|
9
|
+
<%= f.label :slug, Spree.t('admin.data_feeds.slug_label') %>
|
10
|
+
<%= f.text_field :slug, class: 'form-control' %>
|
11
|
+
<%= f.error_message_on :slug %>
|
12
|
+
<% end %>
|
13
|
+
|
14
|
+
<%= f.field_container :provider, class: ['form-group'] do %>
|
15
|
+
<%= f.label :type, Spree.t('admin.data_feeds.type') %>
|
16
|
+
<%= f.collection_select :type, Spree::DataFeed.available_types, :name, :label, {}, class: 'form-control' %>
|
17
|
+
<%= f.error_message_on :type %>
|
18
|
+
<% end %>
|
19
|
+
|
20
|
+
<%= f.hidden_field :store_id, value: current_store.id %>
|
21
|
+
|
22
|
+
<div class="form-group">
|
23
|
+
<div class="custom-control custom-switch">
|
24
|
+
<%= f.check_box :active, class: 'custom-control-input' %>
|
25
|
+
<%= f.label :active, class: 'custom-control-label' %>
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
|
29
|
+
</div>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<% content_for :page_title do %>
|
2
|
+
<%= link_to Spree.t('spree.admin.data_feeds.data_feeds'), spree.admin_data_feeds_path %> /
|
3
|
+
<%= @data_feed.name %>
|
4
|
+
<% end %>
|
5
|
+
|
6
|
+
<%= render partial: 'spree/admin/shared/error_messages', locals: { target: @data_feed } %>
|
7
|
+
|
8
|
+
<%= form_for @data_feed, as: :data_feed, url: admin_data_feed_path(@data_feed) do |f| %>
|
9
|
+
<fieldset>
|
10
|
+
<%= render partial: 'form', locals: { f: f } %>
|
11
|
+
<%= render partial: 'spree/admin/shared/edit_resource_links' %>
|
12
|
+
</fieldset>
|
13
|
+
<% end %>
|