spree_backend 4.3.0 → 4.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (263) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +222 -0
  3. data/.codeclimate.yml +36 -0
  4. data/.editorconfig +22 -0
  5. data/.eslintignore +7 -0
  6. data/.eslintrc.cjs +29 -0
  7. data/.gem_release.yml +4 -0
  8. data/.github/CONTRIBUTING.md +1 -0
  9. data/.github/ISSUE_TEMPLATE/bug_report.md +47 -0
  10. data/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  11. data/.github/ISSUE_TEMPLATE.md +39 -0
  12. data/.github/dependabot.yml +7 -0
  13. data/.github/workflows/spelling_lint.yml +34 -0
  14. data/.gitignore +64 -0
  15. data/.rubocop.yml +197 -0
  16. data/.solargraph.yml +20 -0
  17. data/.stylelintignore +4 -0
  18. data/.stylelintrc +6 -0
  19. data/CODE_OF_CONDUCT.md +22 -0
  20. data/Gemfile +59 -3
  21. data/README.md +123 -0
  22. data/SECURITY.md +1 -0
  23. data/app/assets/config/spree_backend_manifest.js +1 -1
  24. data/app/assets/images/backend-cloud-arrow-up.svg +4 -0
  25. data/app/assets/images/backend-eye-open.svg +1 -1
  26. data/app/assets/images/backend-file-earmark-font.svg +4 -0
  27. data/app/assets/images/backend-file-earmark-image.svg +4 -0
  28. data/app/assets/images/backend-file-earmark-music.svg +4 -0
  29. data/app/assets/images/backend-file-earmark-pdf.svg +4 -0
  30. data/app/assets/images/backend-file-earmark-play.svg +4 -0
  31. data/app/assets/images/backend-file-earmark-spreadsheet.svg +3 -0
  32. data/app/assets/images/backend-file-earmark-zip.svg +4 -0
  33. data/app/assets/images/backend-file-earmark.svg +3 -0
  34. data/app/assets/images/backend-hdd.svg +4 -0
  35. data/app/assets/images/backend-link.svg +4 -0
  36. data/app/assets/images/backend-view.svg +1 -1
  37. data/app/assets/javascripts/spree/backend/address_states.es6 +2 -0
  38. data/app/assets/javascripts/spree/backend/adjustments.js +5 -5
  39. data/app/assets/javascripts/spree/backend/admin.js +4 -6
  40. data/app/assets/javascripts/spree/backend/calculator.js +1 -1
  41. data/app/assets/javascripts/spree/backend/checkouts/edit.js +1 -1
  42. data/app/assets/javascripts/spree/backend/cms/links.es6 +1 -1
  43. data/app/assets/javascripts/spree/backend/cms/live_preview.es6 +1 -1
  44. data/app/assets/javascripts/spree/backend/cms/page.es6 +22 -40
  45. data/app/assets/javascripts/spree/backend/cms/section.es6 +1 -1
  46. data/app/assets/javascripts/spree/backend/gateway.js +1 -1
  47. data/app/assets/javascripts/spree/backend/general_settings.js +1 -1
  48. data/app/assets/javascripts/spree/backend/global/_index.js +3 -1
  49. data/app/assets/javascripts/spree/backend/global/alerts.es6 +1 -1
  50. data/app/assets/javascripts/spree/backend/global/animate_css.es6 +19 -0
  51. data/app/assets/javascripts/spree/backend/global/fetch_request_utility.es6 +114 -0
  52. data/app/assets/javascripts/spree/backend/global/flatpickr.es6 +8 -1
  53. data/app/assets/javascripts/spree/backend/global/info_alert.es6 +1 -1
  54. data/app/assets/javascripts/spree/backend/global/radio_panel_toggle.es6 +1 -1
  55. data/app/assets/javascripts/spree/backend/global/ransack.es6 +7 -5
  56. data/app/assets/javascripts/spree/backend/global/responsive_menus.es6 +1 -1
  57. data/app/assets/javascripts/spree/backend/global/select2_autocomplete.es6 +11 -4
  58. data/app/assets/javascripts/spree/backend/global/select2_populate.es6 +2 -2
  59. data/app/assets/javascripts/spree/backend/global/side_scroll_indication.es6 +2 -2
  60. data/app/assets/javascripts/spree/backend/global/sortable.es6 +1 -1
  61. data/app/assets/javascripts/spree/backend/global/tinymce.es6 +3 -2
  62. data/app/assets/javascripts/spree/backend/line_items.js +7 -9
  63. data/app/assets/javascripts/spree/backend/line_items_on_order_edit.js +23 -28
  64. data/app/assets/javascripts/spree/backend/menus/_index.es6 +0 -1
  65. data/app/assets/javascripts/spree/backend/menus/menu_item.es6 +1 -1
  66. data/app/assets/javascripts/spree/backend/multi_currency.js +2 -2
  67. data/app/assets/javascripts/spree/backend/option_type_autocomplete.js +1 -1
  68. data/app/assets/javascripts/spree/backend/orders/edit.js +1 -1
  69. data/app/assets/javascripts/spree/backend/payments/edit.js +32 -22
  70. data/app/assets/javascripts/spree/backend/payments/new.js +1 -1
  71. data/app/assets/javascripts/spree/backend/product_picker.js +16 -25
  72. data/app/assets/javascripts/spree/backend/progress.js +5 -3
  73. data/app/assets/javascripts/spree/backend/promotions.js +3 -1
  74. data/app/assets/javascripts/spree/backend/returns/expedited_exchanges_warning.js +1 -1
  75. data/app/assets/javascripts/spree/backend/returns/return_item_selection.js +1 -1
  76. data/app/assets/javascripts/spree/backend/shipments.js +80 -79
  77. data/app/assets/javascripts/spree/backend/spree-select2.js +8 -1
  78. data/app/assets/javascripts/spree/backend/states.js +1 -1
  79. data/app/assets/javascripts/spree/backend/stock_location.js +1 -1
  80. data/app/assets/javascripts/spree/backend/stock_management.js +1 -1
  81. data/app/assets/javascripts/spree/backend/stock_movement.js +58 -13
  82. data/app/assets/javascripts/spree/backend/stock_transfer.js +62 -32
  83. data/app/assets/javascripts/spree/backend/taxon_autocomplete.js +9 -8
  84. data/app/assets/javascripts/spree/backend/taxons.js +17 -14
  85. data/app/assets/javascripts/spree/backend/user_picker.js +1 -1
  86. data/app/assets/javascripts/spree/backend/users/edit.js +1 -1
  87. data/app/assets/javascripts/spree/backend/variant_autocomplete.js +19 -11
  88. data/app/assets/javascripts/spree/backend/variant_management.js +1 -1
  89. data/app/assets/javascripts/spree/backend/zone.js +1 -1
  90. data/app/assets/javascripts/spree/backend.js +13 -33
  91. data/app/assets/javascripts/spree.js +2 -9
  92. data/app/assets/stylesheets/spree/backend/components/_main.scss +8 -0
  93. data/app/assets/stylesheets/spree/backend/plugins/_nav_x.scss +1 -1
  94. data/app/assets/stylesheets/spree/backend/plugins/_select2_custom.scss +1 -1
  95. data/app/assets/stylesheets/spree/backend/shared/_forms.scss +1 -1
  96. data/app/assets/stylesheets/spree/backend/shared/_sortable_tree.scss +62 -0
  97. data/app/assets/stylesheets/spree/backend/spree_admin.css.scss +3 -0
  98. data/app/assets/stylesheets/spree/backend/views/_digitals.scss +33 -0
  99. data/app/assets/stylesheets/spree/backend/views/{prototypes.scss → _prototypes.scss} +0 -0
  100. data/app/assets/stylesheets/spree/backend/views/_taxonomies.scss +3 -0
  101. data/app/controllers/spree/admin/base_controller.rb +4 -13
  102. data/app/controllers/spree/admin/digitals_controller.rb +33 -0
  103. data/app/controllers/spree/admin/general_settings_controller.rb +0 -5
  104. data/app/controllers/spree/admin/images_controller.rb +1 -1
  105. data/app/controllers/spree/admin/oauth_applications_controller.rb +17 -0
  106. data/app/controllers/spree/admin/orders/customer_details_controller.rb +2 -2
  107. data/app/controllers/spree/admin/orders_controller.rb +10 -2
  108. data/app/controllers/spree/admin/payment_methods_controller.rb +2 -2
  109. data/app/controllers/spree/admin/payments_controller.rb +1 -1
  110. data/app/controllers/spree/admin/products_controller.rb +4 -2
  111. data/app/controllers/spree/admin/promotions_controller.rb +1 -1
  112. data/app/controllers/spree/admin/properties_controller.rb +1 -1
  113. data/app/controllers/spree/admin/resource_controller.rb +9 -4
  114. data/app/controllers/spree/admin/return_index_controller.rb +3 -4
  115. data/app/controllers/spree/admin/stock_transfers_controller.rb +2 -2
  116. data/app/controllers/spree/admin/store_credits_controller.rb +2 -2
  117. data/app/controllers/spree/admin/stores_controller.rb +2 -2
  118. data/app/controllers/spree/admin/taxons_controller.rb +23 -38
  119. data/app/controllers/spree/admin/users_controller.rb +6 -19
  120. data/app/controllers/spree/admin/variants_controller.rb +1 -2
  121. data/app/controllers/spree/admin/webhooks_subscribers_controller.rb +48 -0
  122. data/app/helpers/spree/admin/base_helper.rb +27 -9
  123. data/app/helpers/spree/admin/digital_helper.rb +28 -0
  124. data/app/helpers/spree/admin/menu_helper.rb +0 -21
  125. data/app/helpers/spree/admin/navigation_helper.rb +19 -9
  126. data/app/helpers/spree/admin/sortable_tree_helper.rb +31 -0
  127. data/app/helpers/spree/admin/stores_helper.rb +1 -1
  128. data/app/helpers/spree/admin/webhooks_subscribers_helper.rb +31 -0
  129. data/app/javascript/spree/dashboard/controllers/clipboard_controller.js +12 -0
  130. data/app/javascript/spree/dashboard/controllers/password_toggle_controller.js +14 -0
  131. data/app/javascript/spree/dashboard/controllers/sortable_tree_controller.js +55 -0
  132. data/app/javascript/spree/dashboard/controllers/spree_controller.js +25 -0
  133. data/app/javascript/spree/dashboard/controllers/upload_button_controller.js +13 -0
  134. data/app/javascript/spree/dashboard/controllers/webhooks_subscriber_events_controller.js +19 -0
  135. data/app/javascript/spree/dashboard/index.js +49 -0
  136. data/app/{assets/javascripts/spree/backend/global/bootstrap.es6 → javascript/spree/dashboard/utilities/bootstrap.js} +6 -2
  137. data/app/javascript/spree/dashboard/utilities/request_utility.js +54 -0
  138. data/app/models/spree/backend_configuration.rb +11 -0
  139. data/app/views/spree/admin/adjustments/_form.html.erb +2 -2
  140. data/app/views/spree/admin/adjustments/index.html.erb +1 -0
  141. data/app/views/spree/admin/cms_pages/_form.html.erb +8 -8
  142. data/app/views/spree/admin/cms_pages/edit.html.erb +1 -6
  143. data/app/views/spree/admin/cms_sections/_form.html.erb +2 -2
  144. data/app/views/spree/admin/cms_sections/types/_featured_article.html.erb +6 -6
  145. data/app/views/spree/admin/cms_sections/types/_hero_image.html.erb +6 -6
  146. data/app/views/spree/admin/cms_sections/types/_image_gallery.html.erb +12 -12
  147. data/app/views/spree/admin/cms_sections/types/_rich_text_content.html.erb +1 -1
  148. data/app/views/spree/admin/cms_sections/types/_side_by_side_images.html.erb +12 -12
  149. data/app/views/spree/admin/countries/_form.html.erb +4 -4
  150. data/app/views/spree/admin/customer_returns/new.html.erb +1 -1
  151. data/app/views/spree/admin/digitals/_form.html.erb +35 -0
  152. data/app/views/spree/admin/digitals/index.html.erb +25 -0
  153. data/app/views/spree/admin/general_settings/edit.html.erb +1 -22
  154. data/app/views/spree/admin/menu_items/_form.html.erb +6 -6
  155. data/app/views/spree/admin/menus/_form.html.erb +3 -3
  156. data/app/views/spree/admin/menus/edit.html.erb +18 -18
  157. data/app/views/spree/admin/oauth_applications/_form.html.erb +22 -0
  158. data/app/views/spree/admin/oauth_applications/create.turbo_stream.erb +38 -0
  159. data/app/views/spree/admin/oauth_applications/edit.html.erb +13 -0
  160. data/app/views/spree/admin/oauth_applications/index.html.erb +51 -0
  161. data/app/views/spree/admin/oauth_applications/new.html.erb +15 -0
  162. data/app/views/spree/admin/option_types/_form.html.erb +3 -3
  163. data/app/views/spree/admin/option_types/_option_value_fields.html.erb +2 -2
  164. data/app/views/spree/admin/orders/_channel_form.html.erb +1 -1
  165. data/app/views/spree/admin/orders/_form.html.erb +1 -0
  166. data/app/views/spree/admin/orders/_line_items_edit_form.html.erb +1 -0
  167. data/app/views/spree/admin/orders/_order_actions.html.erb +6 -0
  168. data/app/views/spree/admin/orders/_search.html.erb +151 -0
  169. data/app/views/spree/admin/orders/index.html.erb +2 -151
  170. data/app/views/spree/admin/payment_methods/_form.html.erb +2 -2
  171. data/app/views/spree/admin/payments/_list.html.erb +1 -1
  172. data/app/views/spree/admin/products/_form.html.erb +19 -20
  173. data/app/views/spree/admin/products/index.html.erb +2 -1
  174. data/app/views/spree/admin/products/new.html.erb +6 -6
  175. data/app/views/spree/admin/promotion_actions/create.js.erb +1 -1
  176. data/app/views/spree/admin/promotion_categories/_form.html.erb +2 -2
  177. data/app/views/spree/admin/promotions/_form.html.erb +5 -5
  178. data/app/views/spree/admin/properties/_form.html.erb +3 -3
  179. data/app/views/spree/admin/prototypes/_form.html.erb +4 -4
  180. data/app/views/spree/admin/refunds/new.html.erb +2 -2
  181. data/app/views/spree/admin/reimbursement_types/_form.html.erb +2 -2
  182. data/app/views/spree/admin/return_authorizations/_form.html.erb +3 -3
  183. data/app/views/spree/admin/roles/_form.html.erb +1 -1
  184. data/app/views/spree/admin/shared/_account_nav.html.erb +1 -1
  185. data/app/views/spree/admin/shared/_address_form.html.erb +4 -4
  186. data/app/views/spree/admin/shared/_head.html.erb +4 -8
  187. data/app/views/spree/admin/shared/_main_menu.html.erb +12 -0
  188. data/app/views/spree/admin/shared/_new_resource_links.html.erb +1 -1
  189. data/app/views/spree/admin/shared/_product_tabs.html.erb +8 -0
  190. data/app/views/spree/admin/shared/_version.html.erb +1 -1
  191. data/app/views/spree/admin/shared/cms/_spree_product.html.erb +2 -2
  192. data/app/views/spree/admin/shared/cms/_spree_taxon.html.erb +2 -2
  193. data/app/views/spree/admin/shared/linkables/_spree_cms_page.erb +2 -2
  194. data/app/views/spree/admin/shared/linkables/_spree_product.html.erb +2 -2
  195. data/app/views/spree/admin/shared/linkables/_spree_taxon.html.erb +2 -2
  196. data/app/views/spree/admin/shared/linkables/_url.html.erb +1 -1
  197. data/app/views/spree/admin/shared/named_types/_form.html.erb +1 -1
  198. data/app/views/spree/admin/{menus/nested_menu_items/_item_bar.html.erb → shared/sortable_tree/_menu.html.erb} +10 -7
  199. data/app/views/spree/admin/shared/sortable_tree/_taxonomy.html.erb +34 -0
  200. data/app/views/spree/admin/shared/sub_menu/_apps.html.erb +3 -0
  201. data/app/views/spree/admin/shared/sub_menu/_integrations.html.erb +3 -0
  202. data/app/views/spree/admin/shipping_categories/_form.html.erb +1 -1
  203. data/app/views/spree/admin/shipping_methods/_form.html.erb +8 -8
  204. data/app/views/spree/admin/states/_form.html.erb +2 -2
  205. data/app/views/spree/admin/stock_locations/_form.html.erb +2 -2
  206. data/app/views/spree/admin/stock_movements/_form.html.erb +3 -3
  207. data/app/views/spree/admin/store_credit_categories/_form.html.erb +1 -1
  208. data/app/views/spree/admin/store_credits/_form.html.erb +4 -4
  209. data/app/views/spree/admin/stores/_form.html.erb +280 -227
  210. data/app/views/spree/admin/tax_categories/_form.html.erb +4 -4
  211. data/app/views/spree/admin/tax_rates/_form.html.erb +4 -3
  212. data/app/views/spree/admin/taxonomies/_form.html.erb +2 -2
  213. data/app/views/spree/admin/taxonomies/edit.html.erb +34 -29
  214. data/app/views/spree/admin/taxons/_form.html.erb +101 -57
  215. data/app/views/spree/admin/taxons/edit.html.erb +6 -3
  216. data/app/views/spree/admin/taxons/index.html.erb +1 -1
  217. data/app/views/spree/admin/taxons/new.html.erb +16 -0
  218. data/app/views/spree/admin/users/_form.html.erb +3 -3
  219. data/app/views/spree/admin/users/edit.html.erb +0 -40
  220. data/app/views/spree/admin/variants/_autocomplete.js.erb +5 -5
  221. data/app/views/spree/admin/variants/_autocomplete_line_items_stock.js.erb +2 -2
  222. data/app/views/spree/admin/variants/_autocomplete_stock.js.erb +6 -6
  223. data/app/views/spree/admin/variants/_split.js.erb +1 -1
  224. data/app/views/spree/admin/variants/index.html.erb +4 -1
  225. data/app/views/spree/admin/webhooks_subscribers/_form.html.erb +101 -0
  226. data/app/views/spree/admin/webhooks_subscribers/edit.html.erb +13 -0
  227. data/app/views/spree/admin/webhooks_subscribers/index.html.erb +47 -0
  228. data/app/views/spree/admin/webhooks_subscribers/new.html.erb +13 -0
  229. data/app/views/spree/admin/webhooks_subscribers/show.html.erb +59 -0
  230. data/app/views/spree/admin/zones/_country_members.html.erb +1 -1
  231. data/app/views/spree/admin/zones/_form.html.erb +2 -2
  232. data/app/views/spree/admin/zones/_state_members.html.erb +1 -1
  233. data/app/views/spree/layouts/admin.html.erb +1 -11
  234. data/codespell.txt +8 -0
  235. data/config/locales/en.yml +273 -0
  236. data/config/routes.rb +6 -2
  237. data/lib/generators/spree/backend/install/install_generator.rb +4 -2
  238. data/lib/generators/spree/backend/install/templates/app/javascript/spree-dashboard.js +7 -0
  239. data/lib/spree/backend/engine.rb +2 -1
  240. data/lib/spree/backend/testing_support/capybara_utils.rb +53 -0
  241. data/lib/spree/backend/testing_support/flash.rb +38 -0
  242. data/lib/spree/backend/testing_support/flatpickr_capybara.rb +126 -0
  243. data/lib/spree/backend/version.rb +9 -0
  244. data/lib/spree/backend.rb +2 -1
  245. data/lib/spree_backend.rb +17 -0
  246. data/license.md +13 -0
  247. data/package.json +45 -0
  248. data/rollup.config.js +41 -0
  249. data/spree_backend.gemspec +17 -16
  250. data/vendor/assets/javascripts/purify.js +1 -1
  251. data/vendor/assets/stylesheets/animate.css +2 -4
  252. data/yarn.lock +944 -0
  253. metadata +118 -36
  254. data/app/assets/javascripts/spree/backend/menus/menu.es6 +0 -57
  255. data/app/assets/javascripts/spree/backend/taxon_permalink_preview.js +0 -11
  256. data/app/assets/javascripts/spree/backend/taxon_tree_menu.js +0 -35
  257. data/app/assets/javascripts/spree/backend/taxonomy.js +0 -178
  258. data/app/views/spree/admin/taxonomies/_js_head.html.erb +0 -7
  259. data/vendor/assets/javascripts/jquery.jstree/jquery.jstree.js +0 -4564
  260. data/vendor/assets/javascripts/js.cookie.js +0 -163
  261. data/vendor/assets/javascripts/modernizr.js +0 -3
  262. data/vendor/assets/stylesheets/jquery.jstree/themes/spree/style.scss +0 -230
  263. data/vendor/assets/stylesheets/jquery.jstree/themes/spree/throbber.gif +0 -0
@@ -3,7 +3,7 @@
3
3
 
4
4
  <div class="col-12 col-md-8" data-hook="admin_product_form_left">
5
5
  <div data-hook="admin_product_form_name">
6
- <%= f.field_container :name, class: ['form-group'] do %>
6
+ <%= f.field_container :name do %>
7
7
  <%= f.label :name, raw(Spree.t(:name) + required_span_tag) %>
8
8
  <%= f.text_field :name, class: 'form-control title' %>
9
9
  <%= f.error_message_on :name %>
@@ -11,7 +11,7 @@
11
11
  </div>
12
12
 
13
13
  <div data-hook="admin_product_form_slug">
14
- <%= f.field_container :slug, class: ['form-group'] do %>
14
+ <%= f.field_container :slug do %>
15
15
  <%= f.label :slug, raw(Spree.t(:slug) + required_span_tag) %>
16
16
  <%= f.text_field :slug, class: 'form-control title' %>
17
17
  <%= f.error_message_on :slug %>
@@ -19,7 +19,7 @@
19
19
  </div>
20
20
 
21
21
  <div data-hook="admin_product_form_description">
22
- <%= f.field_container :description, class: ['form-group'] do %>
22
+ <%= f.field_container :description do %>
23
23
  <%= f.label :description, Spree.t(:description) %>
24
24
  <%= f.text_area :description, { rows: "#{unless @product.has_variants? then '29' else '30' end}", class: "form-control #{"spree-rte" if product_wysiwyg_editor_enabled? }" } %>
25
25
  <%= f.error_message_on :description %>
@@ -29,7 +29,7 @@
29
29
 
30
30
  <div class="col-12 col-md-4" data-hook="admin_product_form_right">
31
31
  <div data-hook="admin_product_form_price">
32
- <%= f.field_container :price, class: ['form-group'] do %>
32
+ <%= f.field_container :price do %>
33
33
  <%= f.label :price, raw(Spree.t(:master_price) + required_span_tag) %>
34
34
  <div class="input-group">
35
35
  <div class="input-group-prepend">
@@ -42,7 +42,7 @@
42
42
  </div>
43
43
 
44
44
  <div>
45
- <%= f.field_container :compare_at_price, class: ['form-group'] do %>
45
+ <%= f.field_container :compare_at_price do %>
46
46
  <%= f.label :compare_at_price, Spree.t(:compare_at_price) %>
47
47
  <div class="input-group">
48
48
  <div class="input-group-prepend">
@@ -55,14 +55,14 @@
55
55
  </div>
56
56
 
57
57
  <div data-hook="admin_product_form_cost_price" class="alpha two columns">
58
- <%= f.field_container :cost_price, class: ['form-group'] do %>
58
+ <%= f.field_container :cost_price do %>
59
59
  <%= f.label :cost_price, Spree.t(:cost_price) %>
60
60
  <%= f.text_field :cost_price, value: number_to_currency(@product.cost_price, unit: ''), class: 'form-control' %>
61
61
  <%= f.error_message_on :cost_price %>
62
62
  <% end %>
63
63
  </div>
64
64
  <div data-hook="admin_product_form_cost_currency" class="omega two columns">
65
- <%= f.field_container :cost_currency, class: ['form-group'] do %>
65
+ <%= f.field_container :cost_currency do %>
66
66
  <%= f.label :cost_currency, Spree.t(:cost_currency) %>
67
67
  <%= f.select :cost_currency, currency_options(@product.cost_currency), {}, { class: 'select2' } %>
68
68
  <%= f.error_message_on :cost_currency %>
@@ -70,7 +70,7 @@
70
70
  </div>
71
71
 
72
72
  <div data-hook="admin_product_form_available_on">
73
- <%= f.field_container :available_on, class: ['form-group'] do %>
73
+ <%= f.field_container :available_on do %>
74
74
  <%= f.label :available_on, Spree.t(:available_on) %>
75
75
  <%= f.error_message_on :available_on %>
76
76
 
@@ -91,7 +91,7 @@
91
91
  </div>
92
92
 
93
93
  <div data-hook="admin_product_form_discontinue_on">
94
- <%= f.field_container :discontinue_on, class: ['form-group'] do %>
94
+ <%= f.field_container :discontinue_on do %>
95
95
  <%= f.label :discontinue_on, Spree.t(:discontinue_on) %>
96
96
  <%= f.error_message_on :discontinue_on %>
97
97
 
@@ -112,7 +112,7 @@
112
112
  </div>
113
113
 
114
114
  <div data-hook="admin_product_form_promotionable">
115
- <%= f.field_container :promotionable, class: ['form-group'] do %>
115
+ <%= f.field_container :promotionable do %>
116
116
  <%= f.check_box :promotionable %>
117
117
  <%= f.label :promotionable, Spree.t(:promotionable) %>
118
118
  <%= f.error_message_on :promotionable %>
@@ -120,7 +120,7 @@
120
120
  </div>
121
121
 
122
122
  <div data-hook="admin_product_form_sku">
123
- <%= f.field_container :master_sku, class: ['form-group'] do %>
123
+ <%= f.field_container :master_sku do %>
124
124
  <%= f.label :master_sku, Spree.t(:master_sku) %>
125
125
  <%= f.text_field :sku, size: 16, class: 'form-control' %>
126
126
  <% end %>
@@ -181,7 +181,7 @@
181
181
  <% end %>
182
182
 
183
183
  <div data-hook="admin_product_form_shipping_categories">
184
- <%= f.field_container :shipping_category, class: ['form-group'] do %>
184
+ <%= f.field_container :shipping_category do %>
185
185
  <%= f.label :shipping_category_id, Spree.t(:shipping_category) %>
186
186
  <%= f.collection_select(:shipping_category_id, @shipping_categories, :id, :name, { include_blank: Spree.t('match_choices.none') }, { class: 'select2' }) %>
187
187
  <%= f.error_message_on :shipping_category %>
@@ -189,7 +189,7 @@
189
189
  </div>
190
190
 
191
191
  <div data-hook="admin_product_form_tax_category">
192
- <%= f.field_container :tax_category, class: ['form-group'] do %>
192
+ <%= f.field_container :tax_category do %>
193
193
  <%= f.label :tax_category_id, Spree.t(:tax_category) %>
194
194
  <%= f.collection_select(:tax_category_id, @tax_categories, :id, :name, { include_blank: Spree.t('match_choices.none') }, { class: 'select2' }) %>
195
195
  <%= f.error_message_on :tax_category %>
@@ -200,7 +200,7 @@
200
200
  </div>
201
201
 
202
202
  <div data-hook="admin_product_form_taxons">
203
- <%= f.field_container :taxons, class: ['form-group'] do %>
203
+ <%= f.field_container :taxons do %>
204
204
  <%= f.label :taxon_ids, Spree.t(:taxons) %>
205
205
 
206
206
  <% if can? :modify, Spree::Classification %>
@@ -224,14 +224,13 @@
224
224
  </div>
225
225
 
226
226
  <div data-hook="admin_product_form_option_types">
227
- <%= f.field_container :option_types, class: ['form-group'] do %>
227
+ <%= f.field_container :option_types do %>
228
228
  <%= f.label :option_type_ids, Spree.t(:option_types) %>
229
229
 
230
230
  <% if can? :modify, Spree::ProductOptionType %>
231
231
  <%= f.select :option_type_ids, options_from_collection_for_select(@product.option_types, :id, :name, @product.option_type_ids),
232
232
  { include_hidden: true },
233
233
  multiple: true,
234
- class: 'select2-hidden-accessible',
235
234
  data: { autocomplete_url_value: 'option_types_api_v2',
236
235
  autocomplete_return_attr_value: 'name',
237
236
  autocomplete_multiple_value: true } %>
@@ -250,7 +249,7 @@
250
249
 
251
250
  <% if @stores.count > 1 %>
252
251
  <div data-hook="admin_product_form_stores">
253
- <%= f.field_container :stores, class: ['form-group'] do %>
252
+ <%= f.field_container :stores do %>
254
253
  <%= f.label :product_stores, Spree.t(:stores) %>
255
254
  <%= collection_select(:product, :store_ids, @stores, :id, :unique_name, {}, { multiple: true, class: 'select2' }) %>
256
255
  <% end %>
@@ -259,21 +258,21 @@
259
258
 
260
259
  <div data-hook="admin_product_form_meta">
261
260
  <div data-hook="admin_product_form_meta_title">
262
- <%= f.field_container :meta_title, class: ['form-group'] do %>
261
+ <%= f.field_container :meta_title do %>
263
262
  <%= f.label :meta_title, Spree.t(:meta_title) %>
264
263
  <%= f.text_field :meta_title, class: 'form-control' %>
265
264
  <% end %>
266
265
  </div>
267
266
 
268
267
  <div data-hook="admin_product_form_meta_keywords">
269
- <%= f.field_container :meta_keywords, class: ['form-group'] do %>
268
+ <%= f.field_container :meta_keywords do %>
270
269
  <%= f.label :meta_keywords, Spree.t(:meta_keywords) %>
271
270
  <%= f.text_field :meta_keywords, class: 'form-control' %>
272
271
  <% end %>
273
272
  </div>
274
273
 
275
274
  <div data-hook="admin_product_form_meta_description">
276
- <%= f.field_container :meta_description, class: ['form-group'] do %>
275
+ <%= f.field_container :meta_description do %>
277
276
  <%= f.label :meta_description, Spree.t(:meta_description) %>
278
277
  <%= f.text_area :meta_description, class: 'form-control' %>
279
278
  <% end %>
@@ -10,7 +10,6 @@
10
10
  <div data-hook="admin_products_sidebar">
11
11
 
12
12
  <%= search_form_for [:admin, @search] do |f| %>
13
- <%- locals = {f: f} %>
14
13
  <div data-hook="admin_products_index_search" class="row">
15
14
  <div class="col-12 col-lg-6">
16
15
  <div class="form-group">
@@ -55,6 +54,7 @@
55
54
  <tr data-hook="admin_products_index_headers">
56
55
  <th scope="col" colspan="2"><%= sort_link @search,:name, Spree.t(:name), { default_order: "desc" }, {title: 'admin_products_listing_name_title'} %></th>
57
56
  <th scope="col"><%= Spree.t(:sku) %></th>
57
+ <th scope="col"><%= Spree.t('admin.digitals.digital') %></th>
58
58
  <th scope="col"><%= Spree.t(:status) %></th>
59
59
  <th scope="col" class="text-center">
60
60
  <%= sort_link @search, :master_default_price_amount, Spree.t(:master_price), {}, {title: 'admin_products_listing_price_title'} %>
@@ -73,6 +73,7 @@
73
73
  </td>
74
74
  <td><%= link_to product.try(:name), edit_admin_product_path(product) %></td>
75
75
  <td class="sku"><%= product.sku rescue '' %></td>
76
+ <td class="text-center"><%= active_badge(product.digitals.any?) %></td>
76
77
  <td class="status"><%= active_badge(available_status == Spree.t(:available), label: available_status) %></td>
77
78
  <td class="text-center"><%= display_price(product) %></td>
78
79
 
@@ -7,7 +7,7 @@
7
7
 
8
8
  <%= form_for [:admin, @product], html: { multipart: true } do |f| %>
9
9
  <fieldset data-hook="new_product">
10
- <%= f.field_container :name, class: ['form-group'] do %>
10
+ <%= f.field_container :name do %>
11
11
  <%= f.label :name, Spree.t(:name) %> <span class="required">*</span>
12
12
  <%= f.text_field :name, class: 'form-control title', required: :required %>
13
13
  <%= f.error_message_on :name %>
@@ -16,7 +16,7 @@
16
16
  <div data-hook="new_product_attrs" class="row">
17
17
  <% unless @product.has_variants? %>
18
18
  <div data-hook="new_product_sku" class="col-12 col-md-4">
19
- <%= f.field_container :sku, class: ['form-group'] do %>
19
+ <%= f.field_container :sku do %>
20
20
  <%= f.label :sku, Spree.t(:sku) %>
21
21
  <%= f.text_field :sku, size: 16, class: 'form-control' %>
22
22
  <%= f.error_message_on :sku %>
@@ -25,14 +25,14 @@
25
25
  <% end %>
26
26
 
27
27
  <div data-hook="new_product_prototype" class="col-12 col-md-4">
28
- <%= f.field_container :prototype, class: ['form-group'] do %>
28
+ <%= f.field_container :prototype do %>
29
29
  <%= f.label :prototype_id, Spree.t(:prototype) %>
30
30
  <%= f.collection_select :prototype_id, Spree::Prototype.all, :id, :name, { include_blank: true }, { class: 'select2-clear w-100' } %>
31
31
  <% end %>
32
32
  </div>
33
33
 
34
34
  <div data-hook="new_product_price" class="col-12 col-md-4">
35
- <%= f.field_container :price, class: ['form-group'] do %>
35
+ <%= f.field_container :price do %>
36
36
  <%= f.label :price, Spree.t(:master_price) %> <span class="required">*</span>
37
37
  <div class="input-group">
38
38
  <div class="input-group-prepend">
@@ -45,7 +45,7 @@
45
45
  </div>
46
46
 
47
47
  <div data-hook="new_product_available_on" class="col-12 col-md-4">
48
- <%= f.field_container :available_on, class: ['form-group'] do %>
48
+ <%= f.field_container :available_on do %>
49
49
  <%= f.label :available_on, Spree.t(:available_on) %>
50
50
  <%= f.error_message_on :available_on %>
51
51
 
@@ -64,7 +64,7 @@
64
64
  </div>
65
65
 
66
66
  <div data-hook="new_product_shipping_category" class="col-12 col-md-4">
67
- <%= f.field_container :shipping_category, class: ['form-group'] do %>
67
+ <%= f.field_container :shipping_category do %>
68
68
  <%= f.label :shipping_category_id, Spree.t(:shipping_categories) %><span class="required">*</span>
69
69
  <%= f.collection_select(:shipping_category_id, @shipping_categories, :id, :name, { include_blank: Spree.t('match_choices.none') }, { class: 'select2 w-100' }) %>
70
70
  <%= f.error_message_on :shipping_category_id %>
@@ -1,6 +1,6 @@
1
1
  $('#actions').append('<%= escape_javascript( render(partial: 'spree/admin/promotions/promotion_action', object: @promotion_action) ) %>');
2
2
  $('#actions .no-objects-found').hide();
3
- $(document).ready(function(){
3
+ $(document).ready(function() {
4
4
  $(".variant_autocomplete").variantAutocomplete();
5
5
  //enable select2 functions for recently added box
6
6
  $('.type-select.select2').last().select2();
@@ -1,11 +1,11 @@
1
1
  <%= render partial: 'spree/admin/shared/error_messages', locals: { target: @promotion_category } %>
2
2
 
3
- <%= f.field_container :name, class: ['form-group'] do %>
3
+ <%= f.field_container :name do %>
4
4
  <%= f.label :name %>
5
5
  <%= f.text_field :name, class: 'form-control' %>
6
6
  <%= f.error_message_on :name %>
7
7
  <% end %>
8
- <%= f.field_container :code, class: ['form-group'] do %>
8
+ <%= f.field_container :code do %>
9
9
  <%= f.label :code %>
10
10
  <%= f.text_field :code, class: 'form-control' %>
11
11
  <% end %>
@@ -2,7 +2,7 @@
2
2
 
3
3
  <div class="row" id="general_fields">
4
4
  <div class="col-12 col-lg-4">
5
- <%= f.field_container :name, class: ['form-group'] do %>
5
+ <%= f.field_container :name do %>
6
6
  <%= f.label :name %>
7
7
  <%= f.text_field :name, class: 'form-control' %>
8
8
  <%= f.error_message_on :name %>
@@ -22,7 +22,7 @@
22
22
  <% end %>
23
23
  </div>
24
24
 
25
- <%= f.field_container :path, class: ['form-group'] do %>
25
+ <%= f.field_container :path do %>
26
26
  <%= f.label :path %>
27
27
  <%= f.text_field :path, class: 'form-control' %>
28
28
  <% end %>
@@ -36,18 +36,18 @@
36
36
  </div>
37
37
 
38
38
  <div class="col-12 col-lg-4">
39
- <%= f.field_container :description, class: ['form-group'] do %>
39
+ <%= f.field_container :description do %>
40
40
  <%= f.label :description %>
41
41
  <%= f.text_area :description, rows: 7, class: 'form-control' %>
42
42
  <% end %>
43
43
 
44
- <%= f.field_container :category, class: ['form-group'] do %>
44
+ <%= f.field_container :category do %>
45
45
  <%= f.label :promotion_category %>
46
46
  <%= f.collection_select(:promotion_category_id, @promotion_categories, :id, :name, { include_blank: Spree.t('match_choices.none') }, { class: 'select2 w-100' }) %>
47
47
  <% end %>
48
48
 
49
49
  <% if @stores.count > 1 %>
50
- <%= f.field_container :stores, class: ['form-group'] do %>
50
+ <%= f.field_container :stores do %>
51
51
  <%= f.label :promotion_stores, Spree.t(:stores) %>
52
52
  <%= collection_select(:promotion, :store_ids, @stores, :id, :unique_name, {}, { multiple: true, class: 'select2' }) %>
53
53
  <% end %>
@@ -1,20 +1,20 @@
1
1
  <div data-hook="admin_property_form" class="row">
2
2
  <div class="col-12 col-md-6">
3
- <%= f.field_container :name, class: ['form-group'] do %>
3
+ <%= f.field_container :name do %>
4
4
  <%= f.label :name, Spree.t(:name) %> <span class="required">*</span>
5
5
  <%= f.text_field :name, class: 'form-control' %>
6
6
  <%= f.error_message_on :name %>
7
7
  <% end %>
8
8
  </div>
9
9
  <div class="col-12 col-md-6">
10
- <%= f.field_container :presentation, class: ['form-group'] do %>
10
+ <%= f.field_container :presentation do %>
11
11
  <%= f.label :presentation, Spree.t(:presentation) %> <span class="required">*</span>
12
12
  <%= f.text_field :presentation, class: 'form-control' %>
13
13
  <%= f.error_message_on :presentation %>
14
14
  <% end %>
15
15
  </div>
16
16
  <div class="col-12 col-md-6">
17
- <%= f.field_container :filterable, class: ['form-group'] do %>
17
+ <%= f.field_container :filterable do %>
18
18
  <%= f.label :filterable, Spree.t(:filterable) %>
19
19
  <%= f.check_box :filterable %>
20
20
  <% end %>
@@ -1,26 +1,26 @@
1
1
  <div data-hook="admin_prototype_form_fields">
2
- <%= f.field_container :name, class: ['form-group'] do %>
2
+ <%= f.field_container :name do %>
3
3
  <%= f.label :name, Spree.t(:name) %> <span class="required">*</span><br>
4
4
  <%= f.text_field :name, class: 'form-control' %>
5
5
  <%= f.error_message_on :name %>
6
6
  <% end %>
7
7
 
8
8
  <div id='properties' data-hook>
9
- <%= f.field_container :property_ids, class: ['form-group'] do %>
9
+ <%= f.field_container :property_ids do %>
10
10
  <%= f.label :property_ids, Spree.t(:properties) %><br>
11
11
  <%= f.select :property_ids, Spree::Property.all.map { |p| ["#{p.presentation} (#{p.name})", p.id] }, {}, { multiple: true, class: "select2" } %>
12
12
  <% end %>
13
13
  </div>
14
14
 
15
15
  <div id="option_types" data-hook>
16
- <%= f.field_container :option_type_ids, class: ['form-group'] do %>
16
+ <%= f.field_container :option_type_ids do %>
17
17
  <%= f.label :option_type_ids, Spree.t(:option_types) %><br>
18
18
  <%= f.select :option_type_ids, Spree::OptionType.all.map { |ot| ["#{ot.presentation} (#{ot.name})", ot.id] }, {}, { multiple: true, class: "select2" } %>
19
19
  <% end %>
20
20
  </div>
21
21
 
22
22
  <div id='taxons' data-hook>
23
- <%= f.field_container :taxon_ids, class: ['form-group'] do %>
23
+ <%= f.field_container :taxon_ids do %>
24
24
  <%= f.label :taxon_ids, Spree.t(:taxons) %><br>
25
25
  <%= f.select :taxon_ids, current_store.taxons.pluck(:name, :id), {}, { multiple: true, class: "select2" } %>
26
26
  <% end %>
@@ -18,12 +18,12 @@
18
18
  <%= f.label :credit_allowed, Spree.t(:credit_allowed) %><br>
19
19
  <%= @refund.payment.credit_allowed %>
20
20
  </div>
21
- <%= f.field_container :amount, class: ['form-group'] do %>
21
+ <%= f.field_container :amount do %>
22
22
  <%= f.label :amount, Spree.t(:amount) %>
23
23
  <%= f.text_field :amount, class: 'form-control' %>
24
24
  <%= f.error_message_on :amount %>
25
25
  <% end %>
26
- <%= f.field_container :reason, class: ['form-group'] do %>
26
+ <%= f.field_container :reason do %>
27
27
  <%= f.label :refund_reason_id, Spree.t(:reason) %>
28
28
  <%= f.collection_select(:refund_reason_id, refund_reasons, :id, :name, {include_blank: true}, {class: 'select2-clear'}) %>
29
29
  <%= f.error_message_on :reason %>
@@ -1,6 +1,6 @@
1
1
  <div data-hook="admin_reimbursement_type_form_fields" class="row">
2
2
  <div class="col-12 col-md-8">
3
- <%= f.field_container :name, class: ['form-group'] do %>
3
+ <%= f.field_container :name do %>
4
4
  <%= f.label :name, Spree.t(:name) %>
5
5
  <%= f.text_field :name, class:'form-control' %>
6
6
  <%= f.error_message_on :name %>
@@ -8,7 +8,7 @@
8
8
  </div>
9
9
  <%- if @reimbursement_type.new_record? %>
10
10
  <div class="col-12 col-md-8">
11
- <%= f.field_container :type, class: ['form-group'] do %>
11
+ <%= f.field_container :type do %>
12
12
  <%= f.label :type, Spree.t(:type) %>
13
13
  <%= f.select :type, options_for_select(Spree::ReimbursementType::KINDS), {:include_blank => false}, { :class => 'select2' } %>
14
14
  <%= f.error_message_on :type %>
@@ -82,19 +82,19 @@
82
82
  <%= Spree.t(:total_pre_tax_refund) %>: <span id="total_pre_tax_refund">0.00</span>
83
83
  <% end %>
84
84
 
85
- <%= f.field_container :stock_location, class: ['form-group'] do %>
85
+ <%= f.field_container :stock_location do %>
86
86
  <%= f.label :stock_location, Spree.t(:stock_location) %> <span class="required">*</span>
87
87
  <%= f.select :stock_location_id, Spree::StockLocation.order_default.active.to_a.collect{|l|[l.name, l.id]}, {include_blank: true}, {class: 'select2-clear', "data-placeholder" => Spree.t(:select_a_stock_location)} %>
88
88
  <%= f.error_message_on :stock_location %>
89
89
  <% end %>
90
90
 
91
- <%= f.field_container :reason, class: ['form-group'] do %>
91
+ <%= f.field_container :reason do %>
92
92
  <%= f.label :reason, Spree.t(:reason) %> <span class="required">*</span>
93
93
  <%= f.select :return_authorization_reason_id, @reasons.collect{|r|[r.name, r.id]}, {include_blank: true}, {class: 'select2-clear', "data-placeholder" => Spree.t(:select_a_return_authorization_reason)} %>
94
94
  <%= f.error_message_on :reason %>
95
95
  <% end %>
96
96
 
97
- <%= f.field_container :memo, class: ['form-group'] do %>
97
+ <%= f.field_container :memo do %>
98
98
  <%= f.label :memo, Spree.t(:memo) %>
99
99
  <%= f.text_area :memo, class: 'form-control' %>
100
100
  <%= f.error_message_on :memo %>
@@ -1,5 +1,5 @@
1
1
  <div data-hook="admin_role_form_fields">
2
- <%= f.field_container :name, class: ["form-group"], 'data-hook' => "role_name" do %>
2
+ <%= f.field_container :name, 'data-hook' => "role_name" do %>
3
3
  <%= f.label :name, Spree.t(:name) %> <span class="required">*</span>
4
4
  <%= f.text_field :name, class: 'form-control' %>
5
5
  <%= f.error_message_on :name %>
@@ -12,7 +12,7 @@
12
12
  <div class="dropdown-divider m-0"></div>
13
13
 
14
14
  <% if spree.respond_to? :root_path %>
15
- <%= link_to spree.root_path, target: :blank, class: 'd-block text-dark py-3 px-4 dropdown-item' do %>
15
+ <%= link_to spree.root_path, target: :blank, class: 'd-block text-dark py-3 px-4 dropdown-item', data: { turbo: false } do %>
16
16
  <%= svg_icon name: "store.svg", width: '18', height: '18' %>
17
17
  &nbsp;
18
18
  <%= Spree.t(:back_to_store) %>
@@ -2,14 +2,14 @@
2
2
  <div id="<%= type %>" data-hook="address_fields">
3
3
  <% Spree::Address::ADDRESS_FIELDS.each do |field| %>
4
4
  <% if field == "country" %>
5
- <%= field_container (s_or_b + '_' + field), nil, class: ["form-group", "#{type}-row"] do %>
5
+ <%= field_container (s_or_b + '_' + field), nil, class: ["#{type}-row"] do %>
6
6
  <%= f.label :country_id, Spree.t(:country) %>
7
7
  <div id="<%= s_or_b %>country">
8
8
  <%= f.collection_select :country_id, all_countries, :id, :name, {}, { class: 'select2 w-100' } %>
9
9
  </div>
10
10
  <% end %>
11
11
  <% elsif field == "state" %>
12
- <%= field_container (s_or_b + '_' + field), :state, class: ["form-group", "#{type}-row"] do %>
12
+ <%= field_container (s_or_b + '_' + field), :state, class: ["#{type}-row"] do %>
13
13
  <%= f.label :state_id, Spree.t(:state) %>
14
14
  <div id="<%= s_or_b %>state">
15
15
  <% if f.object.country.try(:states) %>
@@ -26,7 +26,7 @@
26
26
  <%= error_message_on f.object, :state_id %>
27
27
  <% end %>
28
28
  <% else %>
29
- <%= field_container (s_or_b + '_' + field), nil, class: ["form-group", "#{type}-row"] do %>
29
+ <%= field_container (s_or_b + '_' + field), nil, class: ["#{type}-row"] do %>
30
30
  <%= f.label field, Spree.t(field) %>
31
31
  <%= f.text_field field, class: 'form-control' %>
32
32
  <%= error_message_on f.object, field %>
@@ -37,7 +37,7 @@
37
37
 
38
38
  <% content_for :head do %>
39
39
  <script>
40
- document.addEventListener('DOMContentLoaded', function() {
40
+ document.addEventListener("spree:load", function() {
41
41
  updateAddressState('<%= s_or_b %>');
42
42
  $('#<%= s_or_b %>country select').on('change', function() { updateAddressState('<%= s_or_b %>'); });
43
43
  })
@@ -15,18 +15,14 @@
15
15
 
16
16
  <%= stylesheet_link_tag 'spree/backend/all', media: :all %>
17
17
 
18
- <%= render 'spree/admin/shared/paths' %>
19
- <%= javascript_include_tag 'spree/backend/all' %>
20
- <%= render "spree/admin/shared/translations" %>
21
-
22
18
  <script>
23
19
  <%== "var AUTH_TOKEN = #{form_authenticity_token.inspect};" %>
24
- <%== "Spree.api_key = '#{try_spree_current_user.spree_api_key}';" if try_spree_current_user %>
25
20
  <%== "var OAUTH_TOKEN = '#{admin_oauth_token}';" if defined?(admin_oauth_token) %>
26
21
  <%== "var ADDRESS_FIELDS = #{Spree::Address::ADDRESS_FIELDS}" %>
27
- <% if Rails.env.test? %>
28
- jQuery.fx.off = false
29
- <% end %>
30
22
  </script>
23
+ <%= render 'spree/admin/shared/paths' %>
24
+ <%= javascript_include_tag "spree-dashboard", defer: true, data: { turbo_track: "reload" } %>
25
+ <%= javascript_include_tag 'spree/backend/all', data: { turbo_track: "reload" } %>
26
+ <%= render "spree/admin/shared/translations" %>
31
27
 
32
28
  <%= yield :head %>
@@ -61,6 +61,18 @@
61
61
  </ul>
62
62
  <% end %>
63
63
 
64
+ <% if can? :admin, Spree::Webhooks::Subscriber %>
65
+ <ul class="nav nav-sidebar border-bottom" id="sidebarIntegrations">
66
+ <%= main_menu_tree Spree.t('admin.tab.integrations'), icon: "enter.svg", sub_menu: "integrations", url: "#sidebar-integrations" %>
67
+ </ul>
68
+ <% end %>
69
+
70
+ <% if can? :admin, Spree::OauthApplication %>
71
+ <ul class="nav nav-sidebar border-bottom" id="sidebarApps">
72
+ <%= main_menu_tree Spree.t('admin.tab.apps'), icon: "extensions.svg", sub_menu: "apps", url: "#sidebar-apps" %>
73
+ </ul>
74
+ <% end %>
75
+
64
76
  <% if can? :admin, current_store %>
65
77
  <ul class="nav nav-sidebar border-bottom" id="sidebarConfiguration">
66
78
  <%= main_menu_tree Spree.t(:configurations), icon: "settings.svg", sub_menu: "configuration", url: "#sidebar-configuration" %>
@@ -1,5 +1,5 @@
1
1
  <div class="form-actions" data-hook="buttons">
2
2
  <%= button Spree.t('actions.create'), 'save.svg', 'submit', {class: 'btn-success', data: { disable_with: "#{ Spree.t(:saving) }..." }} %>
3
3
  <span class="or"><%= Spree.t(:or) %></span>
4
- <%= button_link_to Spree.t('actions.cancel'), collection_url, icon: 'cancel.svg' %>
4
+ <%= button_link_to Spree.t('actions.cancel'), collection_url, icon: 'cancel.svg', data: { turbo: false } %>
5
5
  </div>
@@ -52,5 +52,13 @@
52
52
  class: "nav-link #{'active' if current == :prices}" %>
53
53
 
54
54
  <% end if can?(:admin, Spree::Price) && !@product.deleted? %>
55
+
56
+ <%= content_tag :li do %>
57
+ <%= link_to_with_icon 'hdd.svg',
58
+ Spree.t('admin.digitals.digital_assets'),
59
+ admin_product_digitals_path(@product),
60
+ class: "nav-link #{'active' if current == :digitals} #{current}" %>
61
+
62
+ <% end if can?(:admin, Spree::Digital) && !@product.deleted? %>
55
63
  </ul>
56
64
  <% end %>
@@ -1,4 +1,4 @@
1
- <% if can?(:admin, current_store) && Spree::Config[:admin_show_version] %>
1
+ <% if can?(:admin, current_store) && Spree::Backend::Config[:admin_show_version] %>
2
2
  <small
3
3
  class="spree-version font-weight-bold ml-3 my-3 text-muted"
4
4
  aria-label="Spree Commerce version">
@@ -1,8 +1,8 @@
1
- <%= f.field_container save_to, class: ['form-group'] do %>
1
+ <%= f.field_container save_to do %>
2
2
  <%= f.label save_to, Spree.t('admin.cms.link_to_product') %>
3
3
  <%= f.select save_to, options_from_collection_for_select([resource], save_to, save_to, resource.send(save_to) || nil), { include_blank: true },
4
4
  id: "cms_section_#{save_to}",
5
- data: { autocomplete_placeholder_value: Spree.t('admin.navigation.seach_for_a_product'),
5
+ data: { autocomplete_placeholder_value: Spree.t('admin.navigation.search_for_a_product'),
6
6
  autocomplete_clear_value: true,
7
7
  autocomplete_url_value: 'products_api_v2',
8
8
  autocomplete_return_attr_value: 'name',
@@ -1,8 +1,8 @@
1
- <%= f.field_container save_to, class: ['form-group'] do %>
1
+ <%= f.field_container save_to do %>
2
2
  <%= f.label save_to, Spree.t('admin.cms.link_to_taxon') %>
3
3
  <%= f.select save_to, options_from_collection_for_select([resource], save_to, save_to, resource.send(save_to) || nil), { include_blank: true },
4
4
  id: "cms_section_#{save_to}",
5
- data: { autocomplete_placeholder_value: Spree.t('admin.navigation.seach_for_a_taxon'),
5
+ data: { autocomplete_placeholder_value: Spree.t('admin.navigation.search_for_a_taxon'),
6
6
  autocomplete_clear_value: true,
7
7
  autocomplete_url_value: 'taxons_api_v2',
8
8
  autocomplete_return_attr_value: 'pretty_name',
@@ -4,14 +4,14 @@
4
4
  <% name_holder = :title %>
5
5
  <% active_id_holder = resource.linked_resource.id %>
6
6
  <% end %>
7
- <%= f.field_container :linked_resource_id, class: ['form-group'] do %>
7
+ <%= f.field_container :linked_resource_id do %>
8
8
  <%= f.label :linked_resource_id, Spree.t('page') %>
9
9
  <%= f.select :linked_resource_id,
10
10
  options_from_collection_for_select(resorce_holder || [],
11
11
  id_holder, name_holder, active_id_holder || nil),
12
12
  { include_blank: true },
13
13
  class: 'select2autocomplete',
14
- data: { autocomplete_placeholder_value: Spree.t('admin.linkable.seach_for_a_page'),
14
+ data: { autocomplete_placeholder_value: Spree.t('admin.linkable.search_for_a_page'),
15
15
  autocomplete_clear_value: true,
16
16
  autocomplete_url_value: 'pages_api_v2',
17
17
  autocomplete_return_attr_value: 'title',
@@ -4,14 +4,14 @@
4
4
  <% name_holder = :name %>
5
5
  <% active_id_holder = resource.linked_resource.id %>
6
6
  <% end %>
7
- <%= f.field_container :linked_resource_id, class: ['form-group'] do %>
7
+ <%= f.field_container :linked_resource_id do %>
8
8
  <%= f.label :linked_resource_id, Spree.t('product') %>
9
9
  <%= f.select :linked_resource_id,
10
10
  options_from_collection_for_select(resorce_holder || [],
11
11
  id_holder, name_holder, active_id_holder || nil),
12
12
  { include_blank: true },
13
13
  class: 'select2autocomplete',
14
- data: { autocomplete_placeholder_value: Spree.t('admin.navigation.seach_for_a_product'),
14
+ data: { autocomplete_placeholder_value: Spree.t('admin.navigation.search_for_a_product'),
15
15
  autocomplete_clear_value: true,
16
16
  autocomplete_url_value: 'products_api_v2' } %>
17
17
 
@@ -5,14 +5,14 @@
5
5
  <% active_id_holder = resource.linked_resource.id %>
6
6
  <% end %>
7
7
 
8
- <%= f.field_container :linked_resource_field, class: ['form-group'] do %>
8
+ <%= f.field_container :linked_resource_field do %>
9
9
  <%= f.label :linked_resource_id, Spree.t('taxon') %>
10
10
  <%= f.select :linked_resource_id,
11
11
  options_from_collection_for_select(resource_holder || [],
12
12
  id_holder, name_holder, active_id_holder || nil),
13
13
  { include_blank: true },
14
14
  class: 'select2autocomplete',
15
- data: { autocomplete_placeholder_value: Spree.t('admin.navigation.seach_for_a_taxon'),
15
+ data: { autocomplete_placeholder_value: Spree.t('admin.navigation.search_for_a_taxon'),
16
16
  autocomplete_clear_value: true,
17
17
  autocomplete_url_value: 'taxons_api_v2',
18
18
  autocomplete_return_attr_value: 'pretty_name' } %>