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
@@ -0,0 +1,45 @@
1
+ <% content_for :page_title do %>
2
+ <%= Spree.t('admin.data_feeds.data_feeds') %>
3
+ <% end %>
4
+
5
+ <% content_for :page_actions do %>
6
+ <%= button_link_to Spree.t('admin.data_feeds.new_data_feed'), new_object_url, class: "btn-success", icon: 'add.svg', id: 'admin_new_data_feed_link' %>
7
+ <% end if can?(:create, Spree::DataFeed) %>
8
+
9
+ <% if @data_feeds.present? %>
10
+ <div class="table-responsive border rounded bg-white">
11
+ <table class="table">
12
+ <thead class="text-muted">
13
+ <tr>
14
+ <th><%= Spree.t('admin.name') %></th>
15
+ <th><%= Spree.t('admin.url') %></th>
16
+ <th><%= Spree.t('admin.data_feeds.type') %></th>
17
+ <th><%= Spree.t('admin.active') %></th>
18
+ <th></th>
19
+ </tr>
20
+ </thead>
21
+ <tbody>
22
+ <% @data_feeds.each do |data_feed| %>
23
+ <tr id="<%= spree_dom_id data_feed %>">
24
+ <td><%= data_feed.name %></td>
25
+ <td><code><%= data_feed.formatted_url %></code></td>
26
+ <td><%= data_feed.class.label %></td>
27
+ <td><%= active_badge(data_feed.active) %></td>
28
+ <td class="actions">
29
+ <span class="d-flex justify-content-end">
30
+ <%= link_to_edit(data_feed, no_text: true) if can? :edit, data_feed %>
31
+ <%= link_to_delete(data_feed, no_text: true) if can? :delete, data_feed %>
32
+ </span>
33
+ </td>
34
+ </tr>
35
+ <% end %>
36
+ </tbody>
37
+ </table>
38
+ </div>
39
+ <%= render 'spree/admin/shared/index_table_options', collection: @data_feeds, simple: true %>
40
+ <% else %>
41
+ <div class="text-center no-objects-found m-5">
42
+ <%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree::DataFeed)) %>,
43
+ <%= link_to(Spree.t(:add_one), new_object_url) if can? :create, Spree::DataFeed %>!
44
+ </div>
45
+ <% end %>
@@ -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
+ <%= Spree.t('spree.admin.data_feeds.new_data_feed') %>
4
+ <% end %>
5
+
6
+ <%= render partial: 'spree/admin/shared/error_messages', locals: { target: @data_feed } %>
7
+
8
+ <%= form_for [:admin, @data_feed] do |f| %>
9
+ <fieldset>
10
+ <%= render partial: 'form', locals: { f: f } %>
11
+ <%= render partial: 'spree/admin/shared/new_resource_links' %>
12
+ </fieldset>
13
+ <% end %>
@@ -6,7 +6,19 @@
6
6
  <td class="name"><%= f.text_field :name, class: "form-control", required: true %></td>
7
7
  <td class="presentation"><%= f.text_field :presentation, class: "form-control", required: true %></td>
8
8
  <td class="actions">
9
+
9
10
  <span class="d-flex justify-content-end">
11
+ <% unless f.object.id.nil? -%>
12
+ <%= link_to_with_icon 'translate.svg',
13
+ '',
14
+ spree.translations_admin_option_type_option_value_path(f.object.option_type.id, f.object.id),
15
+ class: 'btn btn-sm btn-light',
16
+ data: {
17
+ action: 'translate'
18
+ },
19
+ title: Spree.t(:translations),
20
+ no_text: true %>
21
+ <% end %>
10
22
  <%= link_to_icon_remove_fields f %>
11
23
  </span>
12
24
  </td>
@@ -0,0 +1,22 @@
1
+ <% content_for :page_title do %>
2
+ <%= link_to Spree.t(:option_types), spree.admin_option_types_url %> /
3
+ <%= @option_type.name %>
4
+ <% end %>
5
+
6
+ <% content_for(:page_tabs) do %>
7
+ <%= content_tag :li, class: 'nav-item' do %>
8
+ <%= link_to_with_icon 'edit.svg',
9
+ Spree.t(:details),
10
+ spree.edit_admin_option_type_path(@option_type),
11
+ class: "nav-link #{'active' if current == :details}" %>
12
+
13
+ <% end if can?(:admin, Spree::OptionType) %>
14
+
15
+ <%= content_tag :li, class: 'nav-item' do %>
16
+ <%= link_to_with_icon 'translate.svg',
17
+ Spree.t(:translations),
18
+ spree.translations_admin_option_type_path(@option_type),
19
+ class: "nav-link #{'active' if current == :translations}" %>
20
+
21
+ <% end if can?(:admin, Spree::OptionType) %>
22
+ <% end %>
@@ -1,6 +1,5 @@
1
1
  <% content_for :page_title do %>
2
- <%= link_to Spree.t(:option_types), spree.admin_option_types_url %> /
3
- <%= @option_type.name %>
2
+ <%= render partial: 'spree/admin/option_types/tabs', locals: {current: :details} %>
4
3
  <% end %>
5
4
 
6
5
  <%= render partial: 'spree/admin/shared/error_messages', locals: { target: @option_type } %>
@@ -0,0 +1,5 @@
1
+ <%= render partial: 'spree/admin/option_types/tabs', locals: { current: :translations } %>
2
+
3
+ <div class="row" style="display: block">
4
+ <%= render 'spree/admin/translations/form', resource: @object %>
5
+ </div>
@@ -0,0 +1,9 @@
1
+ <% content_for :page_title do %>
2
+ <%= link_to Spree.t(:option_types), spree.admin_option_types_url %> /
3
+ <%= link_to @object.option_type.name, spree.edit_admin_option_type_url(@object.option_type) %> /
4
+ <%= @object.name %>
5
+ <% end %>
6
+
7
+ <div class="row" style="display: block">
8
+ <%= render 'spree/admin/translations/form', resource: @object %>
9
+ </div>
@@ -0,0 +1,6 @@
1
+ <%= render partial: 'spree/admin/shared/product_tabs', locals: { current: :translations } %>
2
+
3
+
4
+ <div class="row" style="display: block">
5
+ <%= render 'spree/admin/translations/form', resource: @object %>
6
+ </div>
@@ -8,7 +8,7 @@
8
8
  <%= check_box_tag "option_types[]", ot.id, (params[:option_types] || []).include?(ot.id.to_s), id: "option_type_#{ot.id}", class: "option-type" %>
9
9
  <%= label_tag "option_type_#{ot.id}", ot.presentation %>
10
10
  </b>
11
- <% if Spree::OptionType.color&.name == ot[:name] %>
11
+ <% if Spree::OptionType.color&.name == ot.name %>
12
12
  <ul class="option-type-values option-type-values__color">
13
13
  <% ot.option_values.each do |ov| %>
14
14
  <li>
@@ -59,4 +59,12 @@
59
59
  class: "nav-link #{'active' if current == :digitals} #{current}" %>
60
60
 
61
61
  <% end if can?(:admin, Spree::Digital) && !@product.deleted? %>
62
+
63
+ <%= content_tag :li, class: 'nav-item' do %>
64
+ <%= link_to_with_icon 'translate.svg',
65
+ Spree.t(:translations),
66
+ translations_admin_product_path(@product),
67
+ class: "nav-link #{'active' if current == :translations}" %>
68
+
69
+ <% end if can?(:admin, Spree::Product) && !@product.deleted? %>
62
70
  <% end %>
@@ -1,6 +1,6 @@
1
1
  <% if can?(:admin, current_store) %>
2
- <span class="d-none d-lg-inline text-light">
3
- <%= svg_icon name: "spree-icon.svg", width: '35', height: '35' %>
2
+ <span class="d-none d-lg-inline text-light pl-1 pr-2">
3
+ <%= svg_icon name: "spree-icon.svg", width: '28', height: '28' %>
4
4
  </span>
5
5
 
6
6
  <a class="px-0 py-1 btn text-light" id="storeSelectorDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
@@ -1,4 +1,5 @@
1
1
  <ul id="sidebar-integrations" class="collapse nav nav-pills nav-stacked pb-2" data-hook="admin_integrations">
2
2
  <%= tab :payment_methods, match_path: '/payment_methods', label: 'Payment Methods' if can? :manage, Spree::PaymentMethod %>
3
+ <%= tab :data_feeds, match_path: '/data_feeds', label: 'Data Feeds' if can? :manage, Spree::DataFeed %>
3
4
  <%= tab :webhooks_subscribers, match_path: '/webhooks_subscribers', label: 'Webhooks' if can? :manage, Spree::Webhooks::Subscriber %>
4
5
  </ul>
@@ -0,0 +1,17 @@
1
+ <% content_for(:page_tabs) do %>
2
+ <%= content_tag :li, class: 'nav-item' do %>
3
+ <%= link_to_with_icon 'edit.svg',
4
+ Spree.t(:details),
5
+ spree.edit_admin_store_path(@store),
6
+ class: "nav-link #{'active' if current == :details}" %>
7
+
8
+ <% end if can?(:admin, Spree::Store) %>
9
+
10
+ <%= content_tag :li, class: 'nav-item' do %>
11
+ <%= link_to_with_icon 'translate.svg',
12
+ Spree.t(:translations),
13
+ spree.translations_admin_store_path(@store),
14
+ class: "nav-link #{'active' if current == :translations}" %>
15
+
16
+ <% end if can?(:admin, Spree::Store) %>
17
+ <% end %>
@@ -1,5 +1,6 @@
1
1
  <% content_for :page_title do %>
2
2
  <%= Spree.t(:store) %>
3
+ <%= render partial: 'spree/admin/stores/tabs', locals: {current: :details} %>
3
4
  <% end %>
4
5
 
5
6
  <%= render partial: 'spree/admin/shared/error_messages', locals: { target: @store } %>
@@ -40,6 +40,9 @@
40
40
  <%= f.label :default_locale %>
41
41
  <%= f.select :default_locale, options_from_collection_for_select(all_locales_options, :last, :first, @store.default_locale || I18n.locale), {}, { class: 'select2' } %>
42
42
  <%= f.error_message_on :default_locale %>
43
+ <small class="form-text text-muted">
44
+ <%= Spree.t('admin.store_form.default_locale_notice') %>
45
+ </small>
43
46
  <% unless defined?(SpreeI18n) %>
44
47
  <small class="form-text text-muted">
45
48
  <%= raw(Spree.t('admin.store_form.locales_help')) %>
@@ -0,0 +1,8 @@
1
+ <% content_for :page_title do %>
2
+ <%= Spree.t(:store) %>
3
+ <%= render partial: 'spree/admin/stores/tabs', locals: {current: :translations} %>
4
+ <% end %>
5
+
6
+ <div class="row" style="display: block">
7
+ <%= render 'spree/admin/translations/form', resource: @store %>
8
+ </div>
@@ -0,0 +1,3 @@
1
+ <div class="row" style="display: block">
2
+ <%= render 'spree/admin/translations/form', resource: @object %>
3
+ </div>
@@ -0,0 +1,26 @@
1
+ <% content_for :page_title do %>
2
+ <%= link_to Spree.t(:taxonomies), spree.admin_taxonomies_url %> /
3
+
4
+ <%= link_to @taxonomy.root.name, spree.edit_admin_taxonomy_url(@taxonomy) %>
5
+ <% unless @taxon.root? %>
6
+ / <%= @taxon.name %>
7
+ <% end %>
8
+ <% end %>
9
+
10
+ <% content_for(:page_tabs) do %>
11
+ <%= content_tag :li, class: 'nav-item' do %>
12
+ <%= link_to_with_icon 'edit.svg',
13
+ Spree.t(:details),
14
+ spree.edit_admin_taxonomy_taxon_path(@taxonomy, @taxon.id),
15
+ class: "nav-link #{'active' if current == :details}" %>
16
+
17
+ <% end if can?(:admin, Spree::Taxonomy) %>
18
+
19
+ <%= content_tag :li, class: 'nav-item' do %>
20
+ <%= link_to_with_icon 'translate.svg',
21
+ Spree.t(:translations),
22
+ translations_admin_taxonomy_taxon_path(@taxonomy, @taxon.id),
23
+ class: "nav-link #{'active' if current == :translations}" %>
24
+
25
+ <% end if can?(:admin, Spree::Taxonomy) %>
26
+ <% end %>
@@ -1,11 +1,4 @@
1
- <% content_for :page_title do %>
2
- <%= link_to Spree.t(:taxonomies), spree.admin_taxonomies_url %> /
3
-
4
- <%= link_to @taxonomy.root.name, spree.edit_admin_taxonomy_url(@taxonomy) %>
5
- <% unless @taxon.root? %>
6
- / <%= @taxon.name %>
7
- <% end %>
8
- <% end %>
1
+ <%= render partial: 'spree/admin/taxons/tabs', locals: {current: :details} %>
9
2
 
10
3
  <% content_for :page_actions do %>
11
4
  <%= external_page_preview_link(@taxon) %>
@@ -0,0 +1,5 @@
1
+ <%= render partial: 'spree/admin/taxons/tabs', locals: {current: :translations} %>
2
+
3
+ <div class="row" style="display: block">
4
+ <%= render 'spree/admin/translations/form', resource: @object %>
5
+ </div>
@@ -0,0 +1,16 @@
1
+ <% if current_store.supported_locales_list.size > 1 %>
2
+ <div data-hook="translations_form">
3
+ <%= form_tag nil, { class: 'form-horizontal' } do %>
4
+ <div class="my-3">
5
+ <%= render 'spree/admin/translations/translation_table', resource: resource %>
6
+ </div>
7
+ <div class="form-actions" data-hook="buttons">
8
+ <%= button Spree.t('actions.update'), 'update.svg' %>
9
+ <span class="or"><%= Spree.t(:or) %></span>
10
+ <%= button_link_to Spree.t('actions.cancel'), admin_product_path(resource), icon: 'delete.svg' %>
11
+ </div>
12
+ <% end %>
13
+ </div>
14
+ <% else %>
15
+ <%= render partial: 'spree/admin/translations/translations_unavailable' %>
16
+ <% end %>
@@ -0,0 +1,31 @@
1
+ <div class="table-responsive border rounded bg-white">
2
+ <div id="translations-table-wrapper">
3
+ <table class="table">
4
+ <% locales = current_store.supported_locales_list.sort %>
5
+ <thead class="text-muted">
6
+ <tr data-hook="translations_header">
7
+ <th scope="col" class="text-center" style="min-width: 12.5rem; position: absolute; background-color: white;"><%= Spree.t(:field) %></th>
8
+ <th style="min-width: 12.5rem; display: block; height: 100%"></th>
9
+ <% locales.each do |locale| %>
10
+ <th scope="col" class="text-center" style="min-width: 12.5rem"><%= locale %></th>
11
+ <% end %>
12
+ </tr>
13
+ </thead>
14
+ <tbody id="translations_body" data-hook="translations_body">
15
+ <% resource.class.translatable_fields.each do |field| %>
16
+ <tr id="translates_field_row" data-hook="translates_field_row">
17
+ <td class="text-left" style="min-width: 12.5rem; position: absolute; background-color: white; height: 3.5rem">
18
+ <span><%= Spree.t(field) %></span>
19
+ </td>
20
+ <td style="min-width: 12.5rem; display: block; height: 100%"></td>
21
+ <% locales.each do |locale| %>
22
+ <td style="height: 3.5rem">
23
+ <%= text_field_tag "translation[#{field}][#{locale}]", resource.get_field_with_locale(locale, field), class: 'form-control' %>
24
+ </td>
25
+ <% end %>
26
+ </tr>
27
+ <% end %>
28
+ </tbody>
29
+ </table>
30
+ </div>
31
+ </div>
@@ -0,0 +1,11 @@
1
+ <div class="container">
2
+ <div class="card">
3
+ <div class="card-body">
4
+ <p>To use translations, configure more than one locale for the store.</p>
5
+
6
+ <% if can?(:edit, current_store) %>
7
+ <%= button_link_to('Configure store', spree.edit_admin_store_path(current_store)) %>
8
+ <% end %>
9
+ </div>
10
+ </div>
11
+ </div>
@@ -32,7 +32,7 @@
32
32
  </td>
33
33
  <% end %>
34
34
  <td><%= active_badge(webhooks_subscriber.active) %></td>
35
- <td><%= webhooks_subscriber.subscriptions&.join(', ') %></td>
35
+ <td><%= webhooks_subscriber.subscriptions&.sort&.join(', ') %></td>
36
36
  <td><%= webhooks_subscriber.events.order(:created_at).last&.created_at %></td>
37
37
  <td><%= link_to Spree.t(:view), admin_webhooks_subscriber_path(webhooks_subscriber) %></td>
38
38
  <td class="actions">
@@ -16,7 +16,7 @@
16
16
  </tr>
17
17
  <tr>
18
18
  <td><strong><%= Spree.t('admin.webhooks_subscribers.subscriptions') %></strong></td>
19
- <td><%= @webhooks_subscriber.subscriptions&.join(', ') %></td>
19
+ <td><%= @webhooks_subscriber.subscriptions&.sort&.join(', ') %></td>
20
20
  </tr>
21
21
  </table>
22
22
  </div>
@@ -80,6 +80,11 @@ en:
80
80
  square_image: Please use an image with an aspect ratio of 18:13 (1080px x 780px).
81
81
  tall_image: Please use an image with an aspect ratio of 27:40 (1080px x 1600px).
82
82
  copy_to_clipboard: Copy to clipboard
83
+ data_feeds:
84
+ data_feeds: Data Feeds
85
+ type: Type
86
+ slug_label: Slug (leave blank to generate)
87
+ new_data_feed: New Data Feed
83
88
  digitals:
84
89
  digital: Digital
85
90
  add_new_file: Add a new digital asset.
@@ -173,6 +178,7 @@ en:
173
178
  For more information <a href='https://guides.spreecommerce.org/user/configuration/configuring_geography.html#zones' target='_blank' class='alert-link'>please see documentation</a>"
174
179
  currencies_help: "You can accept payments in multiple currencies. Each product and product variant can have different price in different currency"
175
180
  locales_help: "Install <a href='https://github.com/spree-contrib/spree_i18n' target='_blank' class='alert-link'>Spree I18n extension</a> to add more locales"
181
+ default_locale_notice: "Warning: Before changing the default locale, ensure that all products, taxons and stores have translations in the new locale"
176
182
  social_help: "If you want to link to your social accounts in the footer part of your website please fill below fields"
177
183
  default_country_help: "This is the Country that will be pre-selected on the Checkout Address form"
178
184
  footer_help: "This content is visible in the footer section of your Store"
@@ -309,3 +315,22 @@ en:
309
315
  deleted: Deleted
310
316
  draft: Draft
311
317
  pre_order: Pre-order
318
+ gettting_started:
319
+ lets_get_you_started: Let's get you started
320
+ add_products: Add products
321
+ setup_shipping: Setup shipping
322
+ setup_payment_method: Setup payment methods
323
+ setup_taxes: Setup taxes
324
+ setup_taxes_calculation: Setup tax calculation
325
+ products_section:
326
+ message_with_products_html: You have added <strong> %{count} products</strong> so far - good job!</p>
327
+ message_without_products: You can add products manually through API or import from a CSV file.
328
+ shipping_section:
329
+ message_with_shipping: You have setup shipping for
330
+ message_without_shipping: You can add multiple shipping methods, different for each country, continent or region.
331
+ payment_methods_section:
332
+ message_with_payment_method: You're ready to accept payments!
333
+ message_without_payment_method: You can setup multiple payment methods such as Stripe, PayPal, ApplePay, etc.
334
+ taxes_section:
335
+ message_with_taxes: You're tax calculation is setup!
336
+ message_without_taxes: You can use tax services such as TaxJar or setup tax calculation manually
data/config/routes.rb CHANGED
@@ -12,7 +12,12 @@ Spree::Core::Engine.add_routes do
12
12
 
13
13
  resources :zones
14
14
 
15
- resources :stores, except: %i[index show]
15
+ resources :stores, except: %i[index show] do
16
+ member do
17
+ get :translations
18
+ post :translations, to: 'stores#edit_translations'
19
+ end
20
+ end
16
21
 
17
22
  resources :countries do
18
23
  resources :states
@@ -43,6 +48,10 @@ Spree::Core::Engine.add_routes do
43
48
  resources :variants_including_master, only: [:update]
44
49
  resources :prices, only: [:index, :create]
45
50
  resources :digitals, only: [:index, :create, :destroy]
51
+ member do
52
+ get :translations
53
+ post :translations, to: 'products#edit_translations'
54
+ end
46
55
  end
47
56
 
48
57
  resources :option_types do
@@ -50,6 +59,16 @@ Spree::Core::Engine.add_routes do
50
59
  post :update_positions
51
60
  post :update_values_positions
52
61
  end
62
+ member do
63
+ get :translations
64
+ post :translations, to: 'option_types#edit_translations'
65
+ end
66
+ resources :option_values do
67
+ member do
68
+ get :translations
69
+ post :translations, to: 'option_values#edit_translations'
70
+ end
71
+ end
53
72
  end
54
73
 
55
74
  delete '/option_values/:id', to: 'option_values#destroy', as: :option_value
@@ -128,9 +147,15 @@ Spree::Core::Engine.add_routes do
128
147
  collection do
129
148
  post :update_positions
130
149
  end
150
+ member do
151
+ get :translations
152
+ post :translations, to: 'taxonomies#edit_translations'
153
+ end
131
154
  resources :taxons do
132
155
  member do
133
156
  delete :remove_icon
157
+ get :translations
158
+ post :translations, to: 'taxons#edit_translations'
134
159
  end
135
160
  end
136
161
  end
@@ -190,6 +215,8 @@ Spree::Core::Engine.add_routes do
190
215
  end
191
216
  end
192
217
 
218
+ resources :data_feeds
219
+
193
220
  resources :webhooks_subscribers
194
221
 
195
222
  get '/forbidden', to: 'errors#forbidden', as: :forbidden
@@ -1,6 +1,6 @@
1
1
  module Spree
2
2
  module Backend
3
- VERSION = '4.5.0'.freeze
3
+ VERSION = '4.6.0'.freeze
4
4
 
5
5
  def self.version
6
6
  VERSION
Binary file
@@ -25,7 +25,7 @@ Gem::Specification.new do |s|
25
25
  s.require_path = 'lib'
26
26
  s.requirements << 'none'
27
27
 
28
- s.add_dependency 'spree', ">= 4.4.0"
28
+ s.add_dependency 'spree', ">= 4.6.0"
29
29
 
30
30
  s.add_dependency 'babel-transpiler', '~> 0.7'
31
31
  s.add_dependency 'bootstrap', '~> 4.0'
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.5.0
4
+ version: 4.6.0
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: 2022-12-01 00:00:00.000000000 Z
12
+ date: 2023-05-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: spree
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: 4.4.0
20
+ version: 4.6.0
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.4.0
27
+ version: 4.6.0
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: babel-transpiler
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -1904,6 +1904,7 @@ files:
1904
1904
  - app/assets/stylesheets/spree/backend/components/_filters.scss
1905
1905
  - app/assets/stylesheets/spree/backend/components/_icons.scss
1906
1906
  - app/assets/stylesheets/spree/backend/components/_main.scss
1907
+ - app/assets/stylesheets/spree/backend/components/_nav.scss
1907
1908
  - app/assets/stylesheets/spree/backend/components/_navbar.scss
1908
1909
  - app/assets/stylesheets/spree/backend/components/_navigation.scss
1909
1910
  - app/assets/stylesheets/spree/backend/components/_page_header.scss
@@ -1933,6 +1934,7 @@ files:
1933
1934
  - app/assets/stylesheets/spree/backend/views/_taxonomies.scss
1934
1935
  - app/controllers/concerns/spree/admin/order_concern.rb
1935
1936
  - app/controllers/concerns/spree/admin/product_concern.rb
1937
+ - app/controllers/concerns/spree/admin/translatable.rb
1936
1938
  - app/controllers/spree/admin/adjustments_controller.rb
1937
1939
  - app/controllers/spree/admin/base_controller.rb
1938
1940
  - app/controllers/spree/admin/cms_pages_controller.rb
@@ -1940,6 +1942,7 @@ files:
1940
1942
  - app/controllers/spree/admin/countries_controller.rb
1941
1943
  - app/controllers/spree/admin/customer_returns_controller.rb
1942
1944
  - app/controllers/spree/admin/dashboard_controller.rb
1945
+ - app/controllers/spree/admin/data_feeds_controller.rb
1943
1946
  - app/controllers/spree/admin/digitals_controller.rb
1944
1947
  - app/controllers/spree/admin/errors_controller.rb
1945
1948
  - app/controllers/spree/admin/images_controller.rb
@@ -2066,6 +2069,10 @@ files:
2066
2069
  - app/views/spree/admin/dashboard/_apis.html.erb
2067
2070
  - app/views/spree/admin/dashboard/_getting_started.html.erb
2068
2071
  - app/views/spree/admin/dashboard/show.html.erb
2072
+ - app/views/spree/admin/data_feeds/_form.html.erb
2073
+ - app/views/spree/admin/data_feeds/edit.html.erb
2074
+ - app/views/spree/admin/data_feeds/index.html.erb
2075
+ - app/views/spree/admin/data_feeds/new.html.erb
2069
2076
  - app/views/spree/admin/digitals/_form.html.erb
2070
2077
  - app/views/spree/admin/digitals/index.html.erb
2071
2078
  - app/views/spree/admin/errors/forbidden.html.erb
@@ -2089,9 +2096,12 @@ files:
2089
2096
  - app/views/spree/admin/oauth_applications/new.html.erb
2090
2097
  - app/views/spree/admin/option_types/_form.html.erb
2091
2098
  - app/views/spree/admin/option_types/_option_value_fields.html.erb
2099
+ - app/views/spree/admin/option_types/_tabs.html.erb
2092
2100
  - app/views/spree/admin/option_types/edit.html.erb
2093
2101
  - app/views/spree/admin/option_types/index.html.erb
2094
2102
  - app/views/spree/admin/option_types/new.html.erb
2103
+ - app/views/spree/admin/option_types/translations.html.erb
2104
+ - app/views/spree/admin/option_values/translations.html.erb
2095
2105
  - app/views/spree/admin/orders/_add_line_item.html.erb
2096
2106
  - app/views/spree/admin/orders/_add_product.html.erb
2097
2107
  - app/views/spree/admin/orders/_adjustments.html.erb
@@ -2140,6 +2150,7 @@ files:
2140
2150
  - app/views/spree/admin/products/index.html.erb
2141
2151
  - app/views/spree/admin/products/new.html.erb
2142
2152
  - app/views/spree/admin/products/stock.html.erb
2153
+ - app/views/spree/admin/products/translations.html.erb
2143
2154
  - app/views/spree/admin/promotion_actions/create.js.erb
2144
2155
  - app/views/spree/admin/promotion_actions/destroy.js.erb
2145
2156
  - app/views/spree/admin/promotion_categories/_form.html.erb
@@ -2300,6 +2311,7 @@ files:
2300
2311
  - app/views/spree/admin/store_credits/index.html.erb
2301
2312
  - app/views/spree/admin/store_credits/new.html.erb
2302
2313
  - app/views/spree/admin/stores/_form.html.erb
2314
+ - app/views/spree/admin/stores/_tabs.html.erb
2303
2315
  - app/views/spree/admin/stores/edit.html.erb
2304
2316
  - app/views/spree/admin/stores/form/_basic.html.erb
2305
2317
  - app/views/spree/admin/stores/form/_digitals.html.erb
@@ -2311,6 +2323,7 @@ files:
2311
2323
  - app/views/spree/admin/stores/form/_social.html.erb
2312
2324
  - app/views/spree/admin/stores/index.html.erb
2313
2325
  - app/views/spree/admin/stores/new.html.erb
2326
+ - app/views/spree/admin/stores/translations.html.erb
2314
2327
  - app/views/spree/admin/tax_categories/_form.html.erb
2315
2328
  - app/views/spree/admin/tax_categories/edit.html.erb
2316
2329
  - app/views/spree/admin/tax_categories/index.html.erb
@@ -2325,12 +2338,18 @@ files:
2325
2338
  - app/views/spree/admin/taxonomies/edit.html.erb
2326
2339
  - app/views/spree/admin/taxonomies/index.html.erb
2327
2340
  - app/views/spree/admin/taxonomies/new.html.erb
2341
+ - app/views/spree/admin/taxonomies/translations.html.erb
2328
2342
  - app/views/spree/admin/taxons/_assets_form.html.erb
2329
2343
  - app/views/spree/admin/taxons/_form.html.erb
2344
+ - app/views/spree/admin/taxons/_tabs.html.erb
2330
2345
  - app/views/spree/admin/taxons/_taxon_table.html.erb
2331
2346
  - app/views/spree/admin/taxons/edit.html.erb
2332
2347
  - app/views/spree/admin/taxons/index.html.erb
2333
2348
  - app/views/spree/admin/taxons/new.html.erb
2349
+ - app/views/spree/admin/taxons/translations.html.erb
2350
+ - app/views/spree/admin/translations/_form.html.erb
2351
+ - app/views/spree/admin/translations/_translation_table.html.erb
2352
+ - app/views/spree/admin/translations/_translations_unavailable.html.erb
2334
2353
  - app/views/spree/admin/users/_addresses_form.html.erb
2335
2354
  - app/views/spree/admin/users/_form.html.erb
2336
2355
  - app/views/spree/admin/users/_lifetime_stats.html.erb
@@ -2408,9 +2427,9 @@ licenses:
2408
2427
  - BSD-3-Clause
2409
2428
  metadata:
2410
2429
  bug_tracker_uri: https://github.com/spree/spree_backend/issues
2411
- changelog_uri: https://github.com/spree/spree_backend/releases/tag/v4.5.0
2430
+ changelog_uri: https://github.com/spree/spree_backend/releases/tag/v4.6.0
2412
2431
  documentation_uri: https://dev-docs.spreecommerce.org/
2413
- source_code_uri: https://github.com/spree/spree_backend/tree/v4.5.0
2432
+ source_code_uri: https://github.com/spree/spree_backend/tree/v4.6.0
2414
2433
  post_install_message:
2415
2434
  rdoc_options: []
2416
2435
  require_paths:
@@ -2427,7 +2446,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
2427
2446
  version: '0'
2428
2447
  requirements:
2429
2448
  - none
2430
- rubygems_version: 3.0.9
2449
+ rubygems_version: 3.4.1
2431
2450
  signing_key:
2432
2451
  specification_version: 4
2433
2452
  summary: Admin Dashboard for Spree eCommerce platform