spree_backend 4.5.0 → 4.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +98 -4
  3. data/.github/workflows/spelling_lint.yml +1 -1
  4. data/Gemfile +5 -3
  5. data/app/assets/images/admin/logo.png +0 -0
  6. data/app/assets/images/backend-spree-icon.svg +5 -1
  7. data/app/assets/images/backend-spree-logo.svg +8 -4
  8. data/app/assets/images/noimage/large.png +0 -0
  9. data/app/assets/images/noimage/mini.png +0 -0
  10. data/app/assets/images/noimage/product.png +0 -0
  11. data/app/assets/images/noimage/small.png +0 -0
  12. data/app/assets/stylesheets/spree/backend/components/_nav.scss +13 -0
  13. data/app/assets/stylesheets/spree/backend/spree_admin.css.scss +1 -0
  14. data/app/controllers/concerns/spree/admin/product_concern.rb +1 -1
  15. data/app/controllers/concerns/spree/admin/translatable.rb +29 -0
  16. data/app/controllers/spree/admin/base_controller.rb +1 -1
  17. data/app/controllers/spree/admin/data_feeds_controller.rb +12 -0
  18. data/app/controllers/spree/admin/option_types_controller.rb +2 -0
  19. data/app/controllers/spree/admin/option_values_controller.rb +8 -1
  20. data/app/controllers/spree/admin/payment_methods_controller.rb +4 -1
  21. data/app/controllers/spree/admin/products_controller.rb +1 -1
  22. data/app/controllers/spree/admin/stores_controller.rb +8 -1
  23. data/app/controllers/spree/admin/taxons_controller.rb +7 -0
  24. data/app/views/spree/admin/dashboard/_getting_started.html.erb +17 -21
  25. data/app/views/spree/admin/data_feeds/_form.html.erb +29 -0
  26. data/app/views/spree/admin/data_feeds/edit.html.erb +13 -0
  27. data/app/views/spree/admin/data_feeds/index.html.erb +45 -0
  28. data/app/views/spree/admin/data_feeds/new.html.erb +13 -0
  29. data/app/views/spree/admin/option_types/_option_value_fields.html.erb +12 -0
  30. data/app/views/spree/admin/option_types/_tabs.html.erb +22 -0
  31. data/app/views/spree/admin/option_types/edit.html.erb +1 -2
  32. data/app/views/spree/admin/option_types/translations.html.erb +5 -0
  33. data/app/views/spree/admin/option_values/translations.html.erb +9 -0
  34. data/app/views/spree/admin/products/translations.html.erb +6 -0
  35. data/app/views/spree/admin/prototypes/show.html.erb +1 -1
  36. data/app/views/spree/admin/shared/_product_tabs.html.erb +8 -0
  37. data/app/views/spree/admin/shared/_store_switcher.html.erb +2 -2
  38. data/app/views/spree/admin/shared/sub_menu/_integrations.html.erb +1 -0
  39. data/app/views/spree/admin/stores/_tabs.html.erb +17 -0
  40. data/app/views/spree/admin/stores/edit.html.erb +1 -0
  41. data/app/views/spree/admin/stores/form/_internationalization.html.erb +3 -0
  42. data/app/views/spree/admin/stores/translations.html.erb +8 -0
  43. data/app/views/spree/admin/taxonomies/translations.html.erb +3 -0
  44. data/app/views/spree/admin/taxons/_tabs.html.erb +26 -0
  45. data/app/views/spree/admin/taxons/edit.html.erb +1 -8
  46. data/app/views/spree/admin/taxons/translations.html.erb +5 -0
  47. data/app/views/spree/admin/translations/_form.html.erb +16 -0
  48. data/app/views/spree/admin/translations/_translation_table.html.erb +31 -0
  49. data/app/views/spree/admin/translations/_translations_unavailable.html.erb +11 -0
  50. data/app/views/spree/admin/webhooks_subscribers/index.html.erb +1 -1
  51. data/app/views/spree/admin/webhooks_subscribers/show.html.erb +1 -1
  52. data/config/locales/en.yml +25 -0
  53. data/config/routes.rb +28 -1
  54. data/lib/spree/backend/version.rb +1 -1
  55. data/spec/fixtures/files/favicon.ico +0 -0
  56. data/spree_backend.gemspec +1 -1
  57. metadata +26 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c5007e443443c3e6a08481e81a70865adfbeb507445da10879afa1c74753cc22
4
- data.tar.gz: 2450f675989e4f19bf758a348f5a57f2d43d49434ad17e3c0f09fc717a4411d8
3
+ metadata.gz: 6b658a0d5f11161bb88e49c2db87c4a50a2346b2f76bab36c286d93c89fbc171
4
+ data.tar.gz: 5135287e5f65f52b088d9ecae613efbfb721533eb40f79dcb2a07b80553501c2
5
5
  SHA512:
6
- metadata.gz: 7103bd2b9a6d1b4602b4a50b9ca5da17be218c944d1614a1627b67ab107fc16f0cf34233c36b489320682c0b2cd51efad648808a6af59e29e07a923ee63f1014
7
- data.tar.gz: 8bc7967c824b84d4c6eb7b2e5f640131cd29ddd815bf2f00a242616a804a36d0d20045e8950f59ebe447b4ef570d43246347180485a8c1c3c141b3a83470b963
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.17.1'
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.22.3', require: false # bumped
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
- gem 'selenium-webdriver'
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 viewBox="0 0 500 500" xmlns="http://www.w3.org/2000/svg" fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2"><path d="M219.139 381.189c0 13.505-10.945 24.451-24.45 24.451-13.502 0-24.448-10.946-24.448-24.451s10.946-24.451 24.448-24.451c13.505 0 24.45 10.946 24.45 24.451M321.928 381.189c0 13.505-10.948 24.451-24.45 24.451-13.503 0-24.448-10.946-24.448-24.451s10.945-24.451 24.448-24.451c13.502 0 24.45 10.946 24.45 24.451M306.461 332.291H185.71a23.944 23.944 0 01-22.136-14.808l-31.807-77.004h-24.896c-13.227 0-23.951-10.724-23.951-23.951s10.724-23.951 23.951-23.951h40.916a23.95 23.95 0 0122.137 14.808l31.806 77.004h88.869l32.729-77.208c5.164-12.182 19.22-17.858 31.402-12.705 12.176 5.164 17.864 19.22 12.703 31.399l-38.92 91.812a23.953 23.953 0 01-22.052 14.604" fill-rule="nonzero"/><path d="M333.217 113.118c-9.165-9.545-24.325-9.85-33.867-.686l-29.815 28.627V26.919c0-13.23-10.721-23.95-23.951-23.95-13.227 0-23.951 10.72-23.951 23.95v113.58l-28.693-27.95c-9.475-9.227-24.639-9.032-33.869.446-9.23 9.475-9.032 24.639.443 33.869l69.358 67.556c.318.309.659.581.988.868.174.153.342.312.521.461a24.027 24.027 0 002.539 1.83c.123.074.255.143.38.221a24.01 24.01 0 002.656 1.371c.084.036.156.087.239.123.057.024.114.042.168.063.545.228 1.096.422 1.653.605.203.069.404.149.607.212.545.162 1.099.294 1.65.419.222.051.44.117.662.159.553.111 1.11.183 1.667.252.222.027.437.074.659.092.748.075 1.497.111 2.245.111.024 0 .048.006.075.006h.003c.063 0 .129-.009.192-.009.7-.006 1.401-.036 2.095-.102.413-.039.824-.116 1.231-.176.344-.051.688-.087 1.03-.153.488-.093.97-.224 1.452-.347.254-.069.515-.117.766-.192.497-.147.979-.326 1.467-.506.234-.084.473-.155.707-.251.464-.186.916-.404 1.371-.623.248-.117.5-.225.742-.35.413-.216.815-.458 1.219-.701.275-.164.557-.32.826-.497.353-.23.695-.488 1.039-.739.305-.225.614-.446.91-.686.299-.242.587-.506.877-.763.222-.198.452-.375.668-.581l70.355-67.553c9.541-9.164 9.847-24.325.686-33.866M249.284 497.033c-23.996 0-49.024-9.035-75.93-27.103-10.981-7.374-13.906-22.253-6.532-33.234 7.373-10.979 22.253-13.904 33.237-6.533 41.938 28.163 65.634 21.379 90.282 1.311 10.26-8.349 25.346-6.808 33.696 3.452 8.35 10.26 6.805 25.346-3.455 33.696-23.268 18.942-46.74 28.411-71.298 28.411" fill-rule="nonzero"/></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 viewBox="0 0 2075 892" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2">
2
- <g fill-rule="nonzero" fill="currentColor">
3
- <path d="M774.897 704.867c-37.553 0-81.661-17.277-100.736-45.895-4.166-5.366-5.958-11.32-5.958-17.88 0-16.089 14.903-29.803 30.991-29.803 8.348 0 16.099 4.167 23.844 13.117 11.922 14.894 29.21 22.052 51.859 22.052 39.937 0 63.184-23.247 63.184-47.688 0-26.223-26.229-44.108-59.008-56.03-32.783-11.917-67.957-23.246-91.198-52.451-11.325-14.904-17.288-32.779-17.288-54.836 0-61.396 51.261-97.162 108.486-97.162 38.145 0 79.87 20.862 100.732 52.456 2.981 4.769 4.768 10.13 4.768 16.686 0 16.691-14.306 29.807-30.997 29.807-8.94 0-16.685-4.774-23.838-14.306-12.52-17.288-29.21-26.228-50.665-26.228-31.001 0-48.882 17.288-48.882 38.747 0 22.057 26.228 36.955 59.012 48.877 32.784 12.519 67.953 25.039 91.199 56.623 11.324 16.098 17.283 35.168 17.283 57.817 0 63.781-56.623 106.097-122.788 106.097zm226.342 84.294c0 18.518-13.734 29.863-29.858 29.863-16.123 0-29.857-11.345-29.857-29.863V466.683c0-71.064 57.325-128.389 128.39-128.389 71.069 0 128.395 57.325 128.395 128.389v110.485c0 71.059-57.326 128.39-128.395 128.39-26.871 0-49.565-8.363-68.675-25.676v109.279zm0-211.993c0 38.215 30.454 68.675 68.675 68.675 38.22 0 68.675-30.46 68.675-68.675V466.683c0-38.22-30.455-68.675-68.675-68.675-38.221 0-68.675 30.455-68.675 68.675v110.485zm426.266-153.928c-7.841 0-15.064-3.017-21.696-9.643l-1.204-1.205c-11.445-9.035-24.09-13.854-39.154-13.854-35.545 0-57.235 24.702-57.235 73.499v200.619c0 18.678-13.855 30.123-30.124 30.123s-30.123-11.445-30.123-30.123V472.037c0-75.306 42.773-133.746 117.482-133.746 28.908 0 63.851 13.252 83.739 33.135 6.024 6.626 9.036 13.257 9.036 21.083 0 16.269-14.457 30.731-30.721 30.731zm310.885 84.928c0 16.099-13.709 29.803-29.802 29.803h-166.901v38.747c0 35.761 34.576 68.545 74.513 68.545 23.839 0 42.914-7.746 57.817-22.649 6.551-8.946 14.301-13.709 23.839-13.709 16.098 0 31.002 13.709 31.002 29.797 0 11.927-6.561 19.672-13.714 26.825-24.436 26.228-57.818 39.34-98.944 39.34-69.739 0-134.123-57.215-134.123-128.149V466.444c0-70.928 57.23-128.154 128.159-128.154s128.154 57.226 128.154 128.154v41.724zm-59.604-29.802v-11.922c0-38.15-30.405-68.544-68.55-68.544-38.15 0-68.549 30.394-68.549 68.544v11.922h137.099zm357.283 29.802c0 16.099-13.709 29.803-29.802 29.803h-166.896v38.747c0 35.761 34.571 68.545 74.508 68.545 23.839 0 42.919-7.746 57.817-22.649 6.556-8.946 14.301-13.709 23.844-13.709 16.093 0 30.997 13.709 30.997 29.797 0 11.927-6.556 19.672-13.714 26.825-24.436 26.228-57.812 39.34-98.944 39.34-69.739 0-134.123-57.215-134.123-128.149V466.444c0-70.928 57.23-128.154 128.159-128.154 70.934 0 128.154 57.226 128.154 128.154v41.724zm-59.604-29.802v-11.922c0-38.15-30.405-68.544-68.55-68.544-38.15 0-68.544 30.394-68.544 68.544v11.922h137.094zM241.964 660.886c0 22.644-18.352 40.996-40.996 40.996-22.64 0-40.992-18.352-40.992-40.996 0-22.644 18.352-40.996 40.992-40.996 22.644 0 40.996 18.352 40.996 40.996M414.309 660.886c0 22.644-18.357 40.996-40.996 40.996-22.639 0-40.991-18.352-40.991-40.996 0-22.644 18.352-40.996 40.991-40.996s40.996 18.352 40.996 40.996M388.374 578.898H185.913a40.149 40.149 0 01-37.116-24.827L95.468 424.958H53.724c-22.178 0-40.158-17.981-40.158-40.158s17.98-40.158 40.158-40.158h68.604a40.156 40.156 0 0137.116 24.828l53.33 129.113H361.78l54.876-129.454c8.659-20.426 32.226-29.943 52.652-21.304 20.415 8.659 29.952 32.226 21.298 52.647l-65.256 153.94a40.164 40.164 0 01-36.976 24.486"/>
4
- <path d="M433.236 211.413c-15.366-16.003-40.786-16.515-56.783-1.15l-49.992 47.999V66.885c0-22.183-17.976-40.158-40.158-40.158-22.177 0-40.158 17.975-40.158 40.158v190.438l-48.109-46.864c-15.887-15.471-41.312-15.144-56.788.748-15.476 15.888-15.145 41.313.743 56.788l116.292 113.271c.532.517 1.104.974 1.656 1.455.292.256.573.523.874.774a40.237 40.237 0 004.257 3.067c.205.125.426.241.637.371a40.349 40.349 0 004.453 2.299c.14.06.261.146.401.206.096.04.191.07.281.105.914.382 1.837.708 2.771 1.014.342.116.678.251 1.019.357.914.271 1.842.492 2.766.702.372.086.738.196 1.109.267.929.185 1.863.306 2.796.421.372.045.733.126 1.105.156 1.255.125 2.51.186 3.765.186.04 0 .08.01.125.01h.005c.105 0 .216-.016.321-.016 1.175-.01 2.35-.06 3.514-.17.693-.065 1.381-.196 2.063-.296.578-.086 1.155-.146 1.727-.256.818-.156 1.626-.377 2.435-.583.426-.115.863-.195 1.285-.321.833-.246 1.641-.547 2.459-.848.392-.141.793-.261 1.185-.422.778-.311 1.536-.678 2.299-1.044.417-.196.838-.376 1.245-.587.693-.362 1.365-.768 2.043-1.175.462-.276.934-.537 1.385-.833.593-.387 1.165-.818 1.742-1.24.512-.377 1.029-.748 1.526-1.15.502-.406.984-.848 1.471-1.28.372-.331.758-.627 1.119-.973l117.964-113.266c15.998-15.365 16.51-40.785 1.15-56.783M292.506 855.121c-40.233 0-82.198-15.149-127.31-45.444-18.413-12.363-23.317-37.311-10.953-55.724 12.363-18.407 37.311-23.311 55.729-10.953 70.316 47.221 110.048 35.846 151.375 2.199 17.203-14 42.497-11.415 56.497 5.788 14 17.202 11.41 42.497-5.792 56.497-39.014 31.76-78.369 47.637-119.546 47.637"/>
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
@@ -0,0 +1,13 @@
1
+ .nav-pills .nav-link {
2
+ color: $gray-800;
3
+ }
4
+
5
+ .nav-pills .nav-link:hover {
6
+ color: map-get($theme-colors, 'primary');
7
+ }
8
+
9
+ .nav-pills .nav-link.active {
10
+ background-color: $gray-200;
11
+ color: map-get($theme-colors, 'primary');
12
+ }
13
+
@@ -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';
@@ -4,7 +4,7 @@ module Spree
4
4
  extend ActiveSupport::Concern
5
5
 
6
6
  def product_scope
7
- current_store.products.accessible_by(current_ability, :index)
7
+ current_store.products.accessible_by(current_ability, :index).includes(:translations)
8
8
  end
9
9
  end
10
10
  end
@@ -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
@@ -70,7 +70,7 @@ module Spree
70
70
  end
71
71
 
72
72
  def stores_scope
73
- Spree::Store.accessible_by(current_ability, :show)
73
+ Spree::Store.accessible_by(current_ability, :show).includes(:translations)
74
74
  end
75
75
 
76
76
  def load_stores
@@ -0,0 +1,12 @@
1
+ module Spree
2
+ module Admin
3
+ class DataFeedsController < ResourceController
4
+ def collection
5
+ return @collection if @collection.present?
6
+
7
+ @collection = super
8
+ @collection.page(params[:page]).per(params[:per_page])
9
+ end
10
+ end
11
+ end
12
+ end
@@ -1,6 +1,8 @@
1
1
  module Spree
2
2
  module Admin
3
3
  class OptionTypesController < ResourceController
4
+ include Translatable
5
+
4
6
  before_action :setup_new_option_value, only: :edit
5
7
 
6
8
  def update_values_positions
@@ -1,6 +1,13 @@
1
1
  module Spree
2
2
  module Admin
3
- class OptionValuesController < Spree::Admin::BaseController
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, status: :unprocessable_entity)
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
- before_action :load_store, only: [:new, :edit, :update]
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">Let's get you started</h4>
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
- Add products
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
- Setup shipping
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
- Setup payment methods
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
- Setup taxes
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
- You can add products manually through API or import from a CSV file.
47
+ <%= Spree.t('admin.gettting_started.products_section.message_without_products') %>
49
48
  </p>
50
- <%= link_to_with_icon 'add.svg', 'Add products', spree.admin_products_path, class: 'btn btn-success btn-sm mb-2' %>
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
- You have setup shipping for:
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
- You can add multiple shipping methods, different for each country, continent or region.
65
+ <%= Spree.t('admin.gettting_started.shipping_section.message_without_shipping') %>
67
66
  </p>
68
- <%= link_to_with_icon 'settings.svg', 'Setup shipping', spree.admin_shipping_methods_path, class: 'btn btn-primary btn-sm mb-2' %>
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
- You're ready to accept payments!
73
+ <%= Spree.t('admin.gettting_started.payment_methods_section.message_with_payment_method') %>
75
74
  </p>
76
75
  <% else %>
77
76
  <p>
78
- You can setup multiple payment methods such as Stripe, PayPal, ApplePay, etc.
77
+ <%= Spree.t('admin.gettting_started.payment_methods_section.message_without_payment_method') %>
79
78
  </p>
80
- <%= link_to_with_icon 'settings.svg', 'Setup payment methods', spree.admin_payment_methods_path, class: 'btn btn-primary btn-sm mb-2' %>
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
- You're tax calculation is setup!
85
+ <%= Spree.t('admin.gettting_started.taxes_section.message_with_taxes') %>
87
86
  </p>
88
87
  <% else %>
89
88
  <p>
90
- You can use tax services such as TaxJar or setup tax calculation manually
89
+ <%= Spree.t('admin.gettting_started.taxes_section.message_without_taxes') %>
91
90
  </p>
92
- <%= link_to_with_icon 'settings.svg', 'Setup tax calculation', spree.admin_tax_rates_path, class: 'btn btn-primary btn-sm mb-2' %>
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 %>