spree_frontend 4.1.0 → 4.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (314) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +120 -0
  3. data/.codeclimate.yml +36 -0
  4. data/.deepsource.toml +19 -0
  5. data/.editorconfig +22 -0
  6. data/.eslintignore +7 -0
  7. data/.eslintrc +36 -0
  8. data/.gem_release.yml +7 -0
  9. data/.github/CONTRIBUTING.md +1 -0
  10. data/.github/ISSUE_TEMPLATE/bug_report.md +47 -0
  11. data/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  12. data/.github/ISSUE_TEMPLATE.md +39 -0
  13. data/.github/dependabot.yml +32 -0
  14. data/.gitignore +58 -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 +57 -3
  21. data/LICENSE +1 -1
  22. data/README.md +89 -0
  23. data/Rakefile +1 -1
  24. data/SECURITY.md +1 -0
  25. data/app/assets/config/spree_frontend_manifest.js +5 -0
  26. data/app/assets/images/arrow-down.svg +12 -0
  27. data/app/assets/images/arrow-right-circle-fill.svg +3 -0
  28. data/app/assets/images/card-image.svg +4 -0
  29. data/app/assets/images/edit.svg +1 -1
  30. data/app/assets/images/favicon.ico +0 -0
  31. data/app/assets/images/file-image.svg +4 -0
  32. data/app/assets/images/global.svg +1 -0
  33. data/app/assets/images/image.svg +4 -0
  34. data/app/assets/images/info.svg +7 -0
  35. data/app/assets/images/logo/spree_50.png +0 -0
  36. data/app/assets/images/logo-spree.png +0 -0
  37. data/app/assets/images/logo.png +0 -0
  38. data/app/assets/images/logo.svg +10 -1
  39. data/app/assets/images/logo@2x.png +0 -0
  40. data/app/assets/images/logo@3x.png +0 -0
  41. data/app/assets/images/noimage/large.png +0 -0
  42. data/app/assets/images/noimage/mini.png +0 -0
  43. data/app/assets/images/noimage/plp.png +0 -0
  44. data/app/assets/images/noimage/plp.svg +16 -0
  45. data/app/assets/images/noimage/product.png +0 -0
  46. data/app/assets/images/noimage/small.png +0 -0
  47. data/app/assets/images/pagination-arrow-right.svg +3 -10
  48. data/app/assets/images/pagination-double-arrow-right.svg +6 -13
  49. data/app/assets/images/plus.svg +1 -1
  50. data/app/assets/images/search.svg +1 -1
  51. data/app/assets/javascripts/spree/frontend/account.js +1 -1
  52. data/app/assets/javascripts/spree/frontend/api/main.js +36 -0
  53. data/app/assets/javascripts/spree/frontend/api/storefront/cart.js +49 -0
  54. data/app/assets/javascripts/spree/frontend/cart.js +24 -2
  55. data/app/assets/javascripts/spree/frontend/checkout/address.js +78 -52
  56. data/app/assets/javascripts/spree/frontend/checkout/address_book.js +38 -40
  57. data/app/assets/javascripts/spree/frontend/checkout/payment.js +63 -23
  58. data/app/assets/javascripts/spree/frontend/checkout/shipment.js +15 -2
  59. data/app/assets/javascripts/spree/frontend/checkout.js +17 -1
  60. data/app/assets/javascripts/spree/frontend/coupon_manager.js +1 -1
  61. data/app/assets/javascripts/spree/frontend/currency.js +44 -0
  62. data/app/assets/javascripts/spree/frontend/locale.es6 +12 -0
  63. data/app/assets/javascripts/spree/frontend/login.js +5 -0
  64. data/app/assets/javascripts/spree/frontend/main.js +78 -0
  65. data/app/assets/javascripts/spree/frontend/main_nav_bar.js +86 -0
  66. data/app/assets/javascripts/spree/frontend/{turbolinks_scroll_fix.js → turbo_scroll_fix.js} +3 -3
  67. data/app/assets/javascripts/spree/frontend/views/spree/home/product_carousels.js +4 -4
  68. data/app/assets/javascripts/spree/frontend/views/spree/product/related.js +3 -3
  69. data/app/assets/javascripts/spree/frontend/views/spree/products/cart_form.js +67 -18
  70. data/app/assets/javascripts/spree/frontend/views/spree/products/description.js +1 -1
  71. data/app/assets/javascripts/spree/frontend/views/spree/products/index.js +76 -15
  72. data/app/assets/javascripts/spree/frontend/views/spree/products/price_filters.es6 +46 -0
  73. data/app/assets/javascripts/spree/frontend/views/spree/shared/mobile_navigation.js +9 -10
  74. data/app/assets/javascripts/spree/frontend/views/spree/shared/product_added_modal.js +7 -0
  75. data/app/assets/javascripts/spree/frontend/views/spree/shared/variant_select.js +93 -0
  76. data/app/assets/javascripts/spree/frontend.js +68 -11
  77. data/app/assets/stylesheets/spree/frontend/application.scss +5 -2
  78. data/app/assets/stylesheets/spree/frontend/components-bootstrap/button.scss +8 -0
  79. data/app/assets/stylesheets/spree/frontend/components-bootstrap/carousel.scss +4 -0
  80. data/app/assets/stylesheets/spree/frontend/components-custom/inputs.scss +80 -1
  81. data/app/assets/stylesheets/spree/frontend/flags/_flag-icon-base.scss +23 -0
  82. data/app/assets/stylesheets/spree/frontend/flags/_flag-icon-list.scss +265 -0
  83. data/app/assets/stylesheets/spree/frontend/flags/_variables.scss +2 -0
  84. data/app/assets/stylesheets/spree/frontend/flags/flag-icon.scss +3 -0
  85. data/app/assets/stylesheets/spree/frontend/functions.scss +1 -0
  86. data/app/assets/stylesheets/spree/frontend/helpers/spree/frontend_helper.scss +48 -0
  87. data/app/assets/stylesheets/spree/frontend/variables/bootstrap-overrides.scss +2 -2
  88. data/app/assets/stylesheets/spree/frontend/variables/helper-variables.scss +1 -0
  89. data/app/assets/stylesheets/spree/frontend/variables/variables.scss +54 -0
  90. data/app/assets/stylesheets/spree/frontend/views/spree/checkout/confirm.scss +27 -26
  91. data/app/assets/stylesheets/spree/frontend/views/spree/checkout/delivery.scss +6 -0
  92. data/app/assets/stylesheets/spree/frontend/views/spree/checkout/edit.scss +24 -10
  93. data/app/assets/stylesheets/spree/frontend/views/spree/cms_sections/_index.scss +1 -0
  94. data/app/assets/stylesheets/spree/frontend/views/spree/cms_sections/product_buy_bar.scss +20 -0
  95. data/app/assets/stylesheets/spree/frontend/views/spree/home/index.scss +54 -67
  96. data/app/assets/stylesheets/spree/frontend/views/spree/orders/edit.scss +4 -3
  97. data/app/assets/stylesheets/spree/frontend/views/spree/orders/show.scss +3 -0
  98. data/app/assets/stylesheets/spree/frontend/views/spree/products/cart_form.scss +8 -0
  99. data/app/assets/stylesheets/spree/frontend/views/spree/products/gallery_modal.scss +7 -0
  100. data/app/assets/stylesheets/spree/frontend/views/spree/products/index.scss +55 -26
  101. data/app/assets/stylesheets/spree/frontend/views/spree/products/show.scss +7 -0
  102. data/app/assets/stylesheets/spree/frontend/views/spree/shared/_color_select.scss +10 -9
  103. data/app/assets/stylesheets/spree/frontend/views/spree/shared/carousel/single.scss +1 -1
  104. data/app/assets/stylesheets/spree/frontend/views/spree/shared/carousel/thumbnails.scss +1 -0
  105. data/app/assets/stylesheets/spree/frontend/views/spree/shared/cart.scss +9 -4
  106. data/app/assets/stylesheets/spree/frontend/views/spree/shared/category_nav_bar.scss +3 -3
  107. data/app/assets/stylesheets/spree/frontend/views/spree/shared/change_store.scss +7 -0
  108. data/app/assets/stylesheets/spree/frontend/views/spree/shared/footer.scss +4 -0
  109. data/app/assets/stylesheets/spree/frontend/views/spree/shared/main_nav_bar.scss +42 -26
  110. data/app/assets/stylesheets/spree/frontend/views/spree/shared/mobile_navigation.scss +34 -3
  111. data/app/assets/stylesheets/spree/frontend/views/spree/shared/nav_bar.scss +24 -7
  112. data/app/assets/stylesheets/spree/frontend/views/spree/shared/quantity_select.scss +9 -12
  113. data/app/assets/stylesheets/spree/frontend/views/spree/shared/search_form.scss +12 -0
  114. data/app/assets/stylesheets/spree/frontend/views/spree/users/show.scss +7 -13
  115. data/app/assets/stylesheets/spree/frontend.css +0 -1
  116. data/app/controllers/concerns/spree/checkout/address_book.rb +9 -7
  117. data/app/controllers/concerns/spree/locale_urls.rb +21 -0
  118. data/app/controllers/spree/addresses_controller.rb +16 -33
  119. data/app/controllers/spree/checkout_controller.rb +15 -13
  120. data/app/controllers/spree/cms_pages_controller.rb +29 -0
  121. data/app/controllers/spree/content_controller.rb +0 -2
  122. data/app/controllers/spree/currency_controller.rb +17 -0
  123. data/app/controllers/spree/errors_controller.rb +11 -0
  124. data/app/controllers/spree/home_controller.rb +38 -1
  125. data/app/controllers/spree/locale_controller.rb +35 -6
  126. data/app/controllers/spree/orders_controller.rb +12 -10
  127. data/app/controllers/spree/products_controller.rb +46 -28
  128. data/app/controllers/spree/store_controller.rb +77 -12
  129. data/app/controllers/spree/taxons_controller.rb +16 -8
  130. data/app/helpers/spree/addresses_helper.rb +64 -12
  131. data/app/helpers/spree/cache_helper.rb +7 -0
  132. data/app/helpers/spree/cms_pages_helper.rb +23 -0
  133. data/app/helpers/spree/frontend_helper.rb +170 -18
  134. data/app/helpers/spree/navigation_helper.rb +81 -4
  135. data/app/helpers/spree/products_filters_helper.rb +168 -0
  136. data/app/helpers/spree/store_helper.rb +41 -0
  137. data/app/helpers/spree/structured_data_helper.rb +6 -2
  138. data/app/helpers/spree/taxons_helper.rb +2 -2
  139. data/app/services/spree/build_localized_redirect_url.rb +141 -0
  140. data/app/views/kaminari/twitter-bootstrap-4/_first_page.html.erb +3 -3
  141. data/app/views/kaminari/twitter-bootstrap-4/_gap.html.erb +2 -2
  142. data/app/views/kaminari/twitter-bootstrap-4/_last_page.html.erb +3 -3
  143. data/app/views/kaminari/twitter-bootstrap-4/_next_page.html.erb +3 -3
  144. data/app/views/kaminari/twitter-bootstrap-4/_page.html.erb +2 -2
  145. data/app/views/kaminari/twitter-bootstrap-4/_paginator.html.erb +2 -2
  146. data/app/views/kaminari/twitter-bootstrap-4/_prev_page.html.erb +3 -3
  147. data/app/views/spree/address/_form.html.erb +26 -27
  148. data/app/views/spree/addresses/_form.html.erb +15 -6
  149. data/app/views/spree/addresses/edit.html.erb +13 -8
  150. data/app/views/spree/addresses/new.html.erb +8 -4
  151. data/app/views/spree/checkout/_address.html.erb +19 -23
  152. data/app/views/spree/checkout/_confirm.html.erb +1 -75
  153. data/app/views/spree/checkout/_credit_card.html.erb +3 -2
  154. data/app/views/spree/checkout/_delivery.html.erb +11 -4
  155. data/app/views/spree/checkout/_delivery_informations.html.erb +51 -0
  156. data/app/views/spree/checkout/_payment.html.erb +5 -24
  157. data/app/views/spree/checkout/_payment_sources.html.erb +17 -0
  158. data/app/views/spree/checkout/_summary.html.erb +22 -19
  159. data/app/views/spree/checkout/edit.html.erb +22 -2
  160. data/app/views/spree/checkout/payment/_gateway.html.erb +2 -2
  161. data/app/views/spree/checkout/registration.html.erb +3 -3
  162. data/app/views/spree/cms_pages/show.html.erb +16 -0
  163. data/app/views/spree/errors/not_found.html.erb +2 -2
  164. data/app/views/spree/home/index.html.erb +17 -123
  165. data/app/views/spree/layouts/checkout.html.erb +3 -1
  166. data/app/views/spree/layouts/spree_application.html.erb +3 -2
  167. data/app/views/spree/locale/index.html.erb +1 -0
  168. data/app/views/spree/orders/_coupon_code.html.erb +3 -4
  169. data/app/views/spree/orders/_line_item.html.erb +4 -4
  170. data/app/views/spree/orders/_line_item_data.html.erb +3 -3
  171. data/app/views/spree/orders/edit.html.erb +2 -3
  172. data/app/views/spree/orders/show.html.erb +2 -72
  173. data/app/views/spree/products/_cart_form.html.erb +5 -2
  174. data/app/views/spree/products/_color_option_type.html.erb +14 -14
  175. data/app/views/spree/products/_description.html.erb +19 -14
  176. data/app/views/spree/products/_filters_desktop.html.erb +80 -40
  177. data/app/views/spree/products/_filters_mobile.html.erb +47 -15
  178. data/app/views/spree/products/_gallery.html.erb +4 -6
  179. data/app/views/spree/products/_gallery_modal.html.erb +4 -6
  180. data/app/views/spree/products/_option_type.html.erb +1 -3
  181. data/app/views/spree/products/_product.html.erb +1 -1
  182. data/app/views/spree/products/_properties.html.erb +6 -4
  183. data/app/views/spree/products/_sort_desktop.html.erb +20 -14
  184. data/app/views/spree/products/_sort_mobile.html.erb +24 -8
  185. data/app/views/spree/products/_thumbnails.html.erb +2 -2
  186. data/app/views/spree/products/index.html.erb +7 -4
  187. data/app/views/spree/products/related.html.erb +11 -5
  188. data/app/views/spree/products/show.html.erb +2 -3
  189. data/app/views/spree/shared/_breadcrumbs.html.erb +2 -2
  190. data/app/views/spree/shared/_carousel_4_products.html.erb +14 -20
  191. data/app/views/spree/shared/_cart.html.erb +1 -1
  192. data/app/views/spree/shared/_checkout_header.html.erb +22 -21
  193. data/app/views/spree/shared/_color_select.html.erb +3 -3
  194. data/app/views/spree/shared/_copyright.html.erb +1 -10
  195. data/app/views/spree/shared/_currency_dropdown.html.erb +13 -0
  196. data/app/views/spree/shared/_delete_address_popup.html.erb +1 -2
  197. data/app/views/spree/shared/_error_messages.html.erb +2 -2
  198. data/app/views/spree/shared/_footer.html.erb +31 -21
  199. data/app/views/spree/shared/_get_started.html.erb +32 -0
  200. data/app/views/spree/shared/_head.html.erb +8 -5
  201. data/app/views/spree/shared/_header.html.erb +4 -4
  202. data/app/views/spree/shared/_internationalization_options.html.erb +31 -0
  203. data/app/views/spree/shared/_line_item.html.erb +3 -3
  204. data/app/views/spree/shared/_link_to_account.html.erb +7 -4
  205. data/app/views/spree/shared/_link_to_cart.html.erb +1 -2
  206. data/app/views/spree/shared/_locale_and_currency.html.erb +6 -0
  207. data/app/views/spree/shared/_locale_dropdown.html.erb +13 -0
  208. data/app/views/spree/shared/_login.html.erb +5 -5
  209. data/app/views/spree/shared/_main_nav_bar.html.erb +69 -45
  210. data/app/views/spree/shared/_mobile_internationalization_options.html.erb +37 -0
  211. data/app/views/spree/shared/_mobile_navigation.html.erb +48 -63
  212. data/app/views/spree/shared/_nav_bar.html.erb +9 -19
  213. data/app/views/spree/shared/_no_product_available.html.erb +1 -1
  214. data/app/views/spree/shared/_option_values.html.erb +2 -21
  215. data/app/views/spree/shared/_order_details.html.erb +117 -174
  216. data/app/views/spree/shared/_paths.html.erb +8 -0
  217. data/app/views/spree/shared/_payment.html.erb +2 -2
  218. data/app/views/spree/shared/_payment_sources.html.erb +2 -2
  219. data/app/views/spree/shared/_product_added_modal.html.erb +3 -3
  220. data/app/views/spree/shared/_properties.html.erb +4 -0
  221. data/app/views/spree/shared/_quantity_select.html.erb +2 -2
  222. data/app/views/spree/shared/_search.html.erb +9 -13
  223. data/app/views/spree/shared/_translations.html.erb +8 -7
  224. data/app/views/spree/shared/carousel/_single.html.erb +9 -14
  225. data/app/views/spree/shared/carousel/_thumbnails.html.erb +35 -39
  226. data/app/views/spree/shared/cms/pages/_edit_mode.html.erb +13 -0
  227. data/app/views/spree/shared/cms/sections/_featured_article.html.erb +27 -0
  228. data/app/views/spree/shared/cms/sections/_hero_image.html.erb +60 -0
  229. data/app/views/spree/shared/cms/sections/_image_gallery.html.erb +171 -0
  230. data/app/views/spree/shared/cms/sections/_product_carousel.html.erb +5 -0
  231. data/app/views/spree/shared/cms/sections/_rich_text_content.html.erb +3 -0
  232. data/app/views/spree/shared/cms/sections/_side_by_side_images.html.erb +118 -0
  233. data/app/views/spree/taxons/_header.html.erb +7 -2
  234. data/app/views/spree/users/_address.html.erb +16 -24
  235. data/app/views/spree/users/_address_controls.html.erb +10 -0
  236. data/app/views/spree/users/show.html.erb +21 -16
  237. data/config/initializers/admin_actions.rb +18 -0
  238. data/config/initializers/assets.rb +4 -13
  239. data/config/initializers/canonical_rails.rb +1 -1
  240. data/config/routes.rb +30 -26
  241. data/lib/generators/spree/frontend/copy_storefront/copy_storefront_generator.rb +1 -7
  242. data/lib/generators/spree/frontend/install/install_generator.rb +34 -0
  243. data/lib/generators/spree/frontend/install/templates/app/assets/config/manifest.js +2 -0
  244. data/lib/generators/spree/frontend/install/templates/vendor/assets/javascripts/spree/frontend/all.js +8 -0
  245. data/lib/generators/spree/frontend/install/templates/vendor/assets/stylesheets/spree/frontend/all.css +9 -0
  246. data/lib/spree/frontend/configuration.rb +18 -0
  247. data/lib/spree/frontend/engine.rb +3 -1
  248. data/lib/spree/frontend/version.rb +9 -0
  249. data/lib/spree/frontend.rb +8 -4
  250. data/license.md +13 -0
  251. data/spec/fixtures/files/store_favicon.ico +0 -0
  252. data/spree_frontend.gemspec +26 -14
  253. data/vendor/assets/javascripts/cleave.js +8 -0
  254. data/vendor/assets/javascripts/fetch.umd.js +531 -0
  255. data/vendor/assets/javascripts/jquery.payment.js +652 -0
  256. data/vendor/assets/javascripts/jsuri.js +458 -0
  257. data/vendor/assets/javascripts/polyfill.min.js +1 -0
  258. metadata +224 -86
  259. data/app/assets/images/homepage/big_category_banner.jpg +0 -0
  260. data/app/assets/images/homepage/big_category_banner_mobile.jpg +0 -0
  261. data/app/assets/images/homepage/big_category_banner_tablet_landscape.jpg +0 -0
  262. data/app/assets/images/homepage/big_category_banner_tablet_portrait.jpg +0 -0
  263. data/app/assets/images/homepage/category_banner_lower.jpg +0 -0
  264. data/app/assets/images/homepage/category_banner_lower_mobile.jpg +0 -0
  265. data/app/assets/images/homepage/category_banner_lower_tablet_landscape.jpg +0 -0
  266. data/app/assets/images/homepage/category_banner_lower_tablet_portrait.jpg +0 -0
  267. data/app/assets/images/homepage/category_banner_upper.jpg +0 -0
  268. data/app/assets/images/homepage/category_banner_upper_mobile.jpg +0 -0
  269. data/app/assets/images/homepage/category_banner_upper_tablet_landscape.jpg +0 -0
  270. data/app/assets/images/homepage/category_banner_upper_tablet_portrait.jpg +0 -0
  271. data/app/assets/images/homepage/main_banner.jpg +0 -0
  272. data/app/assets/images/homepage/main_banner_mobile.jpg +0 -0
  273. data/app/assets/images/homepage/main_banner_tablet_landscape.jpg +0 -0
  274. data/app/assets/images/homepage/main_banner_tablet_portrait.jpg +0 -0
  275. data/app/assets/images/homepage/promo_banner_left.jpg +0 -0
  276. data/app/assets/images/homepage/promo_banner_left_mobile.jpg +0 -0
  277. data/app/assets/images/homepage/promo_banner_left_tablet_landscape.jpg +0 -0
  278. data/app/assets/images/homepage/promo_banner_left_tablet_portrait.jpg +0 -0
  279. data/app/assets/images/homepage/promo_banner_right.jpg +0 -0
  280. data/app/assets/images/homepage/promo_banner_right_mobile.jpg +0 -0
  281. data/app/assets/images/homepage/promo_banner_right_tablet_landscape.jpg +0 -0
  282. data/app/assets/images/homepage/promo_banner_right_tablet_portrait.jpg +0 -0
  283. data/app/assets/images/meganav/promo_banner_left-first-category.jpg +0 -0
  284. data/app/assets/images/meganav/promo_banner_left-second-category.jpg +0 -0
  285. data/app/assets/images/meganav/promo_banner_left-third-category.jpg +0 -0
  286. data/app/assets/images/meganav/promo_banner_right-first-category.jpg +0 -0
  287. data/app/assets/images/meganav/promo_banner_right-second-category.jpg +0 -0
  288. data/app/assets/images/meganav/promo_banner_right-third-category.jpg +0 -0
  289. data/app/assets/images/noimage/big_category_banner.jpg +0 -0
  290. data/app/assets/images/noimage/big_category_banner_mobile.jpg +0 -0
  291. data/app/assets/images/noimage/big_category_banner_tablet_landscape.jpg +0 -0
  292. data/app/assets/images/noimage/big_category_banner_tablet_portrait.jpg +0 -0
  293. data/app/assets/images/noimage/category_banner.jpg +0 -0
  294. data/app/assets/images/noimage/category_banner_mobile.jpg +0 -0
  295. data/app/assets/images/noimage/category_banner_plp.jpg +0 -0
  296. data/app/assets/images/noimage/category_banner_tablet_landscape.jpg +0 -0
  297. data/app/assets/images/noimage/category_banner_tablet_portrait.jpg +0 -0
  298. data/app/assets/images/noimage/main_banner.jpg +0 -0
  299. data/app/assets/images/noimage/main_banner_mobile.jpg +0 -0
  300. data/app/assets/images/noimage/main_banner_tablet_landscape.jpg +0 -0
  301. data/app/assets/images/noimage/main_banner_tablet_portrait.jpg +0 -0
  302. data/app/assets/images/noimage/product_photo.jpg +0 -0
  303. data/app/assets/images/noimage/promo_banner.jpg +0 -0
  304. data/app/assets/images/noimage/promo_banner_megamenu.jpg +0 -0
  305. data/app/assets/images/noimage/promo_banner_mobile.jpg +0 -0
  306. data/app/assets/images/noimage/promo_banner_tablet_landscape.jpg +0 -0
  307. data/app/assets/images/noimage/promo_banner_tablet_portrait.jpg +0 -0
  308. data/app/assets/images/spark-logo@3x.png +0 -0
  309. data/app/assets/stylesheets/spree/frontend/_glyphicons_urls_fix.scss +0 -10
  310. data/app/assets/stylesheets/spree/frontend/address_book.scss +0 -8
  311. data/app/models/spree/frontend_configuration.rb +0 -7
  312. data/app/views/spree/shared/_taxonomies.html.erb +0 -16
  313. /data/app/views/spree/{shared → errors}/forbidden.html.erb +0 -0
  314. /data/app/views/spree/{shared → errors}/unauthorized.html.erb +0 -0
@@ -0,0 +1,60 @@
1
+ <% if section.fullscreen? %>
2
+ <% if section.gutters? %>
3
+ <% section_padding = 'px-3' %>
4
+ <% else %>
5
+ <% section_padding = 'px-0' %>
6
+ <% end %>
7
+ <% else %>
8
+ <% section_padding = 'px-2' %>
9
+ <% end %>
10
+ <div class="col-12 homepage-hero-image position-relative p-0 <%= section_padding %>">
11
+
12
+ <div class="bg-light" style="--aspect-ratio:12/5;">
13
+ <% if section.image_one&.attachment&.attached? %>
14
+
15
+ <!-- SM to MD -->
16
+ <img class="d-block d-md-none lazyload"
17
+ data-src="<%= main_app.cdn_image_url(section.img_one_sm) %>"
18
+ data-srcset="<%= main_app.cdn_image_url(section.img_one_sm) %>"
19
+ alt="<%= section&.title %>">
20
+
21
+ <!-- MD to LG -->
22
+ <img class="d-none d-md-block d-lg-none lazyload"
23
+ data-src="<%= main_app.cdn_image_url(section.img_one_md) %>"
24
+ data-srcset="<%= main_app.cdn_image_url(section.img_one_md) %>"
25
+ alt="<%= section&.title %>">
26
+
27
+ <!-- LG to XL -->
28
+ <img class="d-none d-lg-block d-xl-none lazyload"
29
+ data-src="<%= main_app.cdn_image_url(section.img_one_lg) %>"
30
+ data-srcset="<%= main_app.cdn_image_url(section.img_one_lg) %>"
31
+ alt="<%= section&.title %>">
32
+
33
+ <!-- XL UP -->
34
+ <img class="d-none d-xl-block lazyload"
35
+ data-src="<%= main_app.cdn_image_url(section.img_one_xl) %>"
36
+ data-srcset="<%= main_app.cdn_image_url(section.img_one_xl) %>"
37
+ alt="<%= section&.title %>">
38
+
39
+ <% else %>
40
+ <%= icon( name: 'card-image',
41
+ classes: 'text-black-50',
42
+ width: 26,
43
+ height: 26) %>
44
+ <% end %>
45
+
46
+ <div class="hero-content position-absolute-y-center">
47
+ <% if section.title.present? %>
48
+ <div class="homepage-hero-image-text mx-auto pb-0 pb-sm-2 pb-md-3">
49
+ <%= section.title %>
50
+ </div>
51
+ <% end %>
52
+
53
+ <% if section.link.present? && section.button_text.present? %>
54
+ <div>
55
+ <%= link_to section.button_text, spree_localized_link(section), class: 'btn btn-primary spree-btn px-5' %>
56
+ </div>
57
+ <% end %>
58
+ </div>
59
+ </div>
60
+ </div>
@@ -0,0 +1,171 @@
1
+ <% if section.fullscreen? %>
2
+ <% if section.default_layout? %>
3
+ <% section_one_padding = 'pl-3' %>
4
+ <% section_two_padding = 'pr-3' %>
5
+ <% else %>
6
+ <% section_one_padding = 'pr-3 order-2' %>
7
+ <% section_two_padding = 'pl-3 order-1' %>
8
+ <% end %>
9
+ <% else %>
10
+ <% if section.default_layout? %>
11
+ <% section_one_padding = '' %>
12
+ <% section_two_padding = '' %>
13
+ <% else %>
14
+ <% section_one_padding = 'order-2' %>
15
+ <% section_two_padding = 'order-1' %>
16
+ <% end %>
17
+ <% end %>
18
+
19
+ <% if section.show_labels? %>
20
+ <% labels_class = 'homepage-taxon-box-text' %>
21
+ <% else %>
22
+ <% labels_class = 'd-none' %>
23
+ <% end %>
24
+
25
+ <% if section.link_one.present? && section.link_type_one == 'Spree::Taxon' %>
26
+ <% link_one = spree.nested_taxons_path(section.link_one) %>
27
+ <% link_one_classes = 'homepage-taxon-box bg-light' %>
28
+ <% elsif section.link_one.present? && section.link_type_one == 'Spree::Product' %>
29
+ <% link_one = spree.product_path(section.link_one) %>
30
+ <% link_one_classes = 'homepage-taxon-box bg-light' %>
31
+ <% else %>
32
+ <% link_one = nil %>
33
+ <% link_one_classes = 'homepage-taxon-box bg-light pointer-events-none cursor-default' %>
34
+ <% end %>
35
+
36
+ <% if section.link_two.present? && section.link_type_two == 'Spree::Taxon' %>
37
+ <% link_two = spree.nested_taxons_path(section.link_two) %>
38
+ <% link_two_classes = 'homepage-taxon-box bg-light' %>
39
+ <% elsif section.link_two.present? && section.link_type_two == 'Spree::Product' %>
40
+ <% link_two = spree.product_path(section.link_two) %>
41
+ <% link_two_classes = 'homepage-taxon-box bg-light' %>
42
+ <% else %>
43
+ <% link_two = nil %>
44
+ <% link_two_classes = 'homepage-taxon-box bg-light pointer-events-none cursor-default' %>
45
+ <% end %>
46
+
47
+ <% if section.link_three.present? && section.link_type_three == 'Spree::Taxon' %>
48
+ <% link_three = spree.nested_taxons_path(section.link_three) %>
49
+ <% link_three_classes = 'homepage-taxon-box bg-light' %>
50
+ <% elsif section.link_three.present? && section.link_type_three == 'Spree::Product' %>
51
+ <% link_three = spree.product_path(section.link_three) %>
52
+ <% link_three_classes = 'homepage-taxon-box bg-light' %>
53
+ <% else %>
54
+ <% link_three = nil %>
55
+ <% link_three_classes = 'homepage-taxon-box bg-light pointer-events-none cursor-default' %>
56
+ <% end %>
57
+
58
+ <!-- Left Block -->
59
+ <div class="col-6 <%= section_one_padding %>">
60
+
61
+ <!-- Top Left Block SQUARE -->
62
+ <!-- margin-bottom: 3.7% is important for keeping the bottom of the sections aligned -->
63
+ <div class="row" style="margin-bottom: 3.7%;">
64
+ <div class="col-12">
65
+
66
+ <%= link_to link_one, class: link_one_classes, style: '--aspect-ratio:18/13;' do %>
67
+ <% if section.image_one&.attachment&.attached? && section.image_one&.attachment&.variable? %>
68
+
69
+ <!-- XS to MD -->
70
+ <img class="d-md-none lazyload"
71
+ data-src="<%= main_app.cdn_image_url(section.img_one_md) %>"
72
+ data-srcset="<%= main_app.cdn_image_url(section.img_one_md) %>"
73
+ alt="<%= section&.title_one %>">
74
+
75
+ <!-- MD to XL -->
76
+ <img class="d-none d-md-block d-xl-none lazyload"
77
+ data-src="<%= main_app.cdn_image_url(section.img_one_lg) %>"
78
+ data-srcset="<%= main_app.cdn_image_url(section.img_one_lg) %>"
79
+ alt="<%= section&.title_one %>">
80
+
81
+ <!-- XL UP -->
82
+ <img class="d-none d-xl-block lazyload"
83
+ data-src="<%= main_app.cdn_image_url(section.img_one_xl) %>"
84
+ data-srcset="<%= main_app.cdn_image_url(section.img_one_xl) %>"
85
+ alt="<%= section&.title_one %>">
86
+ <% else %>
87
+ <%= icon( name: 'card-image',
88
+ classes: 'homepage-taxon-box text-black-50',
89
+ width: 26,
90
+ height: 26) %>
91
+ <% end %>
92
+ <div class="<%= labels_class %>" aria-label="<%= section&.title_one %>">
93
+ <h3 class="homepage-hpb"><%= section&.title_one %></h3>
94
+ </div>
95
+ <% end %>
96
+
97
+ </div>
98
+ </div>
99
+
100
+ <!-- Bottom Left Block SQUARE -->
101
+ <div class="row">
102
+ <div class="col-12">
103
+
104
+ <%= link_to link_three, class: link_three_classes, style: '--aspect-ratio:18/13;' do %>
105
+ <% if section.image_three&.attachment&.attached? && section.image_three&.attachment&.variable? %>
106
+
107
+ <!-- XS to MD -->
108
+ <img class="d-md-none lazyload"
109
+ data-src="<%= main_app.cdn_image_url(section.img_three_md) %>"
110
+ data-srcset="<%= main_app.cdn_image_url(section.img_three_md) %>"
111
+ alt="<%= section&.title_three %>">
112
+
113
+ <!-- MD to XL -->
114
+ <img class="d-none d-md-block d-xl-none lazyload"
115
+ data-src="<%= main_app.cdn_image_url(section.img_three_lg) %>"
116
+ data-srcset="<%= main_app.cdn_image_url(section.img_three_lg) %>"
117
+ alt="<%= section&.title_three %>">
118
+
119
+ <!-- XL UP -->
120
+ <img class="d-none d-xl-block lazyload"
121
+ data-src="<%= main_app.cdn_image_url(section.img_three_xl) %>"
122
+ data-srcset="<%= main_app.cdn_image_url(section.img_three_xl) %>"
123
+ alt="<%= section&.title_three %>">
124
+ <% else %>
125
+ <%= icon( name: 'card-image',
126
+ classes: 'homepage-taxon-box text-black-50',
127
+ width: 26,
128
+ height: 26) %>
129
+ <% end %>
130
+ <div class="<%= labels_class %>" aria-label="<%= section&.title_three %>">
131
+ <h3 class="homepage-hpb"><%= section&.title_three %></h3>
132
+ </div>
133
+ <% end %>
134
+
135
+ </div>
136
+ </div>
137
+ </div>
138
+
139
+ <!-- Right Block TALL -->
140
+ <div class="col-6 <%= section_two_padding %>">
141
+ <%= link_to link_two, class: link_two_classes, style: '--aspect-ratio:27/40;' do %>
142
+ <% if section.image_two&.attachment&.attached? && section.image_two&.attachment&.variable? %>
143
+
144
+ <!-- XS to MD -->
145
+ <img class="d-md-none lazyload"
146
+ data-src="<%= main_app.cdn_image_url(section.img_two_md) %>"
147
+ data-srcset="<%= main_app.cdn_image_url(section.img_two_md) %>"
148
+ alt="<%= section&.title_two %>">
149
+
150
+ <!-- MD to XL -->
151
+ <img class="d-none d-md-block d-xl-none lazyload"
152
+ data-src="<%= main_app.cdn_image_url(section.img_two_lg) %>"
153
+ data-srcset="<%= main_app.cdn_image_url(section.img_two_lg) %>"
154
+ alt="<%= section&.title_two %>">
155
+
156
+ <!-- XL UP -->
157
+ <img class="d-none d-xl-block lazyload"
158
+ data-src="<%= main_app.cdn_image_url(section.img_two_xl) %>"
159
+ data-srcset="<%= main_app.cdn_image_url(section.img_two_xl) %>"
160
+ alt="<%= section&.title_two %>">
161
+ <% else %>
162
+ <%= icon( name: 'file-image',
163
+ classes: 'homepage-taxon-box text-black-50',
164
+ width: 26,
165
+ height: 26) %>
166
+ <% end %>
167
+ <div class="<%= labels_class %>" aria-label="<%= section&.title_two %>">
168
+ <h3 class="homepage-hpb"><%= section&.title_two %></h3>
169
+ </div>
170
+ <% end %>
171
+ </div>
@@ -0,0 +1,5 @@
1
+ <div class="col-12">
2
+ <% if section.linked_resource %>
3
+ <div data-product-carousel-taxon-id='<%= section.linked_resource.id %>' class="my-3"></div>
4
+ <% end %>
5
+ </div>
@@ -0,0 +1,3 @@
1
+ <div class="col-12">
2
+ <%= raw section.rte_content %>
3
+ </div>
@@ -0,0 +1,118 @@
1
+ <% if section.gutters? %>
2
+ <% section_one_padding = 'pr-md-2' %>
3
+ <% section_two_padding = 'pl-md-2' %>
4
+ <% if section.fullscreen? %>
5
+ <% section_one_padding = 'px-3 pr-md-2' %>
6
+ <% section_two_padding = 'px-3 pl-md-2' %>
7
+ <% end %>
8
+ <% else %>
9
+ <% if section.fullscreen? %>
10
+ <% section_one_padding = 'px-0' %>
11
+ <% section_two_padding = 'px-0' %>
12
+ <% else %>
13
+ <% section_one_padding = 'pr-md-0' %>
14
+ <% section_two_padding = 'pl-md-0' %>
15
+ <% end %>
16
+ <% end %>
17
+
18
+ <% if section.link_one.present? && section.link_type_one == 'Spree::Taxon' %>
19
+ <% link_one = spree.nested_taxons_path(section.link_one) %>
20
+ <% elsif section.link_one.present? && section.link_type_one == 'Spree::Product' %>
21
+ <% link_one = spree.product_path(section.link_one) %>
22
+ <% else %>
23
+ <% link_one = nil %>
24
+ <% end %>
25
+
26
+ <% if section.link_two.present? && section.link_type_two == 'Spree::Taxon' %>
27
+ <% link_two = spree.nested_taxons_path(section.link_two) %>
28
+ <% elsif section.link_two.present? && section.link_type_two == 'Spree::Product' %>
29
+ <% link_two = spree.product_path(section.link_two) %>
30
+ <% else %>
31
+ <% link_two = nil %>
32
+ <% end %>
33
+
34
+ <div class="col-12 col-md-6 mb-3 mb-md-0 <%= section_one_padding %>">
35
+ <%= link_to link_one,
36
+ class: "d-flex align-items-end justify-content-center bg-light text-center overflow-hidden homepage-bottom-box #{'pointer-events-none cursor-default' unless link_one}",
37
+ style: '--aspect-ratio:54/35;' do %>
38
+
39
+ <% if section.image_one&.attachment&.attached? %>
40
+ <!-- XS to MD -->
41
+ <img class="d-md-none lazyload"
42
+ data-src="<%= main_app.cdn_image_url(section.img_one_md) %>"
43
+ data-srcset="<%= main_app.cdn_image_url(section.img_one_md) %>"
44
+ alt="<%= section&.title_one %>">
45
+
46
+ <!-- MD to XL -->
47
+ <img class="d-none d-md-block d-xl-none lazyload"
48
+ data-src="<%= main_app.cdn_image_url(section.img_one_lg) %>"
49
+ data-srcset="<%= main_app.cdn_image_url(section.img_one_lg) %>"
50
+ alt="<%= section&.title_one %>">
51
+
52
+ <!-- XL UP -->
53
+ <img class="d-none d-xl-block lazyload"
54
+ data-src="<%= main_app.cdn_image_url(section.img_one_xl) %>"
55
+ data-srcset="<%= main_app.cdn_image_url(section.img_one_xl) %>"
56
+ alt="<%= section&.title_one %>">
57
+ <% else %>
58
+ <%= icon( name: 'card-image',
59
+ classes: 'text-black-50',
60
+ width: 26,
61
+ height: 26) %>
62
+ <% end %>
63
+
64
+ <% if section.title_one.present? || section.subtitle_one.present? %>
65
+ <div class="homepage-bottom-box-inner p-1 p-sm-2 p-md-4 homepage-hpb" role="img" aria-label="New Collection">
66
+ <div class="homepage-bottom-box-inner-small-text">
67
+ <%= section&.title_one %>
68
+ </div>
69
+ <div class="homepage-bottom-box-inner-big-text">
70
+ <%= section.subtitle_one %>
71
+ </div>
72
+ </div>
73
+ <% end %>
74
+ <% end %>
75
+ </div>
76
+
77
+ <div class="col-12 col-md-6 <%= section_two_padding %>">
78
+ <%= link_to link_two,
79
+ class: "d-flex align-items-end justify-content-center bg-light text-center overflow-hidden homepage-bottom-box #{'pointer-events-none cursor-default' unless link_two}",
80
+ style: '--aspect-ratio:54/35;' do %>
81
+
82
+ <% if section.image_two&.attachment&.attached? %>
83
+ <!-- XS to MD -->
84
+ <img class="d-md-none lazyload"
85
+ data-src="<%= main_app.cdn_image_url(section.img_two_md) %>"
86
+ data-srcset="<%= main_app.cdn_image_url(section.img_two_md) %>"
87
+ alt="<%= section&.title_two %>">
88
+
89
+ <!-- MD to XL -->
90
+ <img class="d-none d-md-block d-xl-none lazyload"
91
+ data-src="<%= main_app.cdn_image_url(section.img_two_lg) %>"
92
+ data-srcset="<%= main_app.cdn_image_url(section.img_two_lg) %>"
93
+ alt="<%= section&.title_two %>">
94
+
95
+ <!-- XL UP -->
96
+ <img class="d-none d-xl-block lazyload"
97
+ data-src="<%= main_app.cdn_image_url(section.img_two_xl) %>"
98
+ data-srcset="<%= main_app.cdn_image_url(section.img_two_xl) %>"
99
+ alt="<%= section&.title_two %>">
100
+ <% else %>
101
+ <%= icon( name: 'card-image',
102
+ classes: 'text-black-50',
103
+ width: 26,
104
+ height: 26) %>
105
+ <% end %>
106
+
107
+ <% if section.title_two.present? || section.subtitle_two.present? %>
108
+ <div class="homepage-bottom-box-inner p-1 p-sm-2 p-md-4 homepage-hpb" role="img" aria-label="New Collection">
109
+ <div class="homepage-bottom-box-inner-small-text">
110
+ <%= section&.title_two %>
111
+ </div>
112
+ <div class="homepage-bottom-box-inner-big-text">
113
+ <%= section.subtitle_two %>
114
+ </div>
115
+ </div>
116
+ <% end %>
117
+ <% end %>
118
+ </div>
@@ -3,12 +3,17 @@
3
3
  <%= @taxon.name %>
4
4
  </div>
5
5
  <% unless @taxon.description.blank? %>
6
- <div class="py-3 py-md-0 taxon-description"><%= @taxon.description %></div>
6
+ <div class="py-3 py-md-0 taxon-description">
7
+ <% if taxon_wysiwyg_editor_enabled? %>
8
+ <%= raw @taxon.description %>
9
+ <% else %>
10
+ <%= @taxon.description %>
11
+ <% end %>
7
12
  <% end %>
8
13
  <% if @taxon.icon&.attachment %>
9
14
  <div class="d-none d-md-block pt-4 taxon-icon">
10
15
  <%= lazy_image(
11
- src: main_app.url_for(@taxon.icon.attachment),
16
+ src: main_app.cdn_image_url(@taxon.icon.attachment),
12
17
  alt: @taxon.description || Spree.t('taxon_missing_alt'),
13
18
  width: 1110,
14
19
  height: 300,
@@ -1,25 +1,17 @@
1
- <div class="row">
2
- <address class="mb-0 col-10">
3
- <span class="account-page-user-full-name">
4
- <%= address.full_name %>
5
- </span>
6
-
7
- <div><%= "#{address.address1} #{address.address2}" %>,</div>
8
- <div><%= "#{address.city}, #{address.state&.abbr} #{address.zipcode}" %>,</div>
9
- <div><%= address.country.name %></div>
10
- </address>
11
- <div class="col-2">
12
- <div class="row">
13
- <div class="col-5 offset-md-2 order-1">
14
- <%= link_to spree.edit_address_path(address), method: :get, class: 'address-button', data: { hook: 'edit_address' } do %>
15
- <%= inline_svg_tag 'edit.svg', class: "delete-address-img" %>
16
- <% end %>
17
- </div>
18
- <div class="col-5 offset-2 offset-md-0 order-0">
19
- <div class="bg-transparent border-0 p-0 m-0 address-button delete-button js-delete-address-link" data-address="<%= spree.address_path(address) %>">
20
- <%= inline_svg_tag 'garbage_2.svg', class: "delete-address-img" %>
21
- </div>
22
- </div>
23
- </div>
1
+ <address class="mb-0 col-12">
2
+ <% if address.label&.present? %>
3
+ <h4 class="m-0 truncate"><%= address.label %></h4>
4
+ <% end %>
5
+ <span class="account-page-user-full-name">
6
+ <%= address.full_name %>
7
+ </span>
8
+ <div>
9
+ <%= "#{address.address1} #{address.address2}" %>,
24
10
  </div>
25
- </div>
11
+ <div>
12
+ <%= "#{address.city}, #{address.state_text} #{address.zipcode}" %>,
13
+ </div>
14
+ <div>
15
+ <%= address.country.name %>
16
+ </div>
17
+ </address>
@@ -0,0 +1,10 @@
1
+ <%= link_to(spree.edit_address_path(address), method: :get, class: 'ml-1 d-inline-block', data: { hook: 'edit_address' }) do %>
2
+ <%= inline_svg_tag('edit.svg', width: 24, height: 24) %>
3
+ <% end %>
4
+
5
+ <%= link_to '#', class: 'js-delete-address-link ml-3', data: { turbo: false, hook: 'remove_address', address: spree.address_path(address) }, aria: { label: Spree.t('address_book.remove_address') } do %>
6
+ <%= icon(name: 'garbage_2',
7
+ classes: '',
8
+ width: 24,
9
+ height: 24) %>
10
+ <% end %>
@@ -1,35 +1,41 @@
1
1
  <div class="container account-page">
2
- <h3 class="text-uppercase spree-mb-large spree-mt-large spree-header" ><%= accurate_title %></h3>
2
+ <h3 class="text-uppercase spree-mb-large spree-mt-large spree-header"><%= accurate_title %></h3>
3
3
 
4
4
  <div class="row">
5
5
  <div class="col-xs-12 col-lg-4">
6
6
  <dt class="text-uppercase account-page-user-info-item-title">
7
- <%= Spree.t(:email) %>
8
- <%= link_to spree.edit_user_path(@user), class: "account-page-user-info-item-title-edit" do %>
9
- <%= inline_svg_tag 'edit.svg', class: "account-page-user-info-item-title-edit-img" %>
7
+ <%= Spree.t(:account_info) %>
8
+ <%= link_to spree.edit_user_path(@user), class: "account-page-user-info-item-title-edit" do %>
9
+ <%= inline_svg_tag('edit.svg', width: 27.6, height: 24) %>
10
10
  <% end %>
11
11
  </dt>
12
12
  <dd class="account-page-user-info-item-definition"><%= @user.email %></dd>
13
13
 
14
14
  <div class="d-lg-inline-block account-page-user-info-item-store-credits">
15
15
  <p class="my-0 text-uppercase text-center">
16
- <%= Spree.t(:store_credit_name) %>: <b class="account-page-user-info-item-store-credits-amount"><%= Spree::Money.new(@user.total_available_store_credit).to_s.gsub('.00', '') %></b>
16
+ <%= Spree.t(:store_credit_name) %>
17
+ <% @user.available_store_credits(current_store).each do |value| %>
18
+ <br><b class="account-page-user-info-item-store-credits-amount"><%= value %></b>
19
+ <% end %>
17
20
  </p>
18
21
  </div>
19
22
  </div>
20
23
  <div class="col-xs-12 col-lg-8 mt-sm-5 mt-lg-0">
21
- <%= link_to Spree.t(:add_new_address), spree.new_address_path, class: 'account-page-new-address-link', method: :get %>
22
-
24
+ <h4 class="mb-3"><%= link_to Spree.t(:add_new_address), spree.new_address_path, method: :get %></h4>
23
25
  <div class="row">
24
26
  <% @user.addresses.each_with_index do |address, index| %>
25
- <div class="col-xs-12 col-lg-6">
27
+ <div class="col-12 col-sm-6 mb-3">
26
28
  <% index += 1 %>
27
29
  <% if index % 3 == 0 %>
28
- <div class="account-page-user-info-item">
29
- </div>
30
+ <div class="account-page-user-info-item my-4"></div>
30
31
  <% end %>
31
- <div class="account-page-user-info-item">
32
- <%= render "spree/users/address", address: address %>
32
+ <div class="row">
33
+ <div class="col-8 col-lg-6">
34
+ <%= render "spree/users/address", address: address %>
35
+ </div>
36
+ <div class="col">
37
+ <%= render "spree/users/address_controls", address: address %>
38
+ </div>
33
39
  </div>
34
40
  </div>
35
41
  <% end %>
@@ -38,8 +44,7 @@
38
44
  </div>
39
45
 
40
46
  <div data-hook="account_my_orders" class="account-page-orders" id="account-my-orders">
41
-
42
- <h3 class="text-uppercase spree-mb-medium spree-mt-medium spree-header" ><%= Spree.t(:my_orders) %></h3>
47
+ <h3 class="text-uppercase spree-mb-medium spree-mt-medium spree-header"><%= Spree.t(:my_orders) %></h3>
43
48
  <% if @orders.present? %>
44
49
  <table>
45
50
  <thead class="active">
@@ -55,7 +60,7 @@
55
60
  <tbody>
56
61
  <% @orders.each do |order| %>
57
62
  <tr>
58
- <td class="account-page-order-number"><%= link_to order.number, order_url(order), class: "text-primary" %></td>
63
+ <td class="account-page-order-number"><%= link_to order.number, spree.order_path(order), class: "text-primary" %></td>
59
64
  <td class="account-page-order-date"><%= l order.completed_at.to_date %></td>
60
65
  <td class="account-page-order-status"><%= Spree.t("order_state.#{order.state}").titleize %></td>
61
66
  <td class="account-page-order-payment-state"><%= Spree.t("payment_states.#{order.payment_state}").titleize if order.payment_state %></td>
@@ -71,7 +76,7 @@
71
76
  <% else %>
72
77
  <p class="text-center"><%= Spree.t(:you_have_no_orders_yet) %></p>
73
78
  <% end %>
74
- <br />
79
+ <br>
75
80
  </div>
76
81
  <div id="delete-address-popup" class="delete-address-popup-dropdown hide-on-esc">
77
82
  <%= render 'spree/shared/delete_address_popup' %>
@@ -0,0 +1,18 @@
1
+ Rails.application.config.after_initialize do
2
+ if Spree::Core::Engine.backend_available?
3
+ action = ::Spree::Admin::Actions::ActionBuilder.new('preview', ->(resource) { "/products/#{resource.slug}" }).
4
+ with_icon_key('view.svg').
5
+ with_label_translation_key('admin.utilities.preview').
6
+ with_id('adminPreviewProduct').
7
+ with_target(:blank).
8
+ with_data_attributes({ turbo: false }).
9
+ build
10
+
11
+ Rails.application.config.spree_backend.actions[:product].add(action)
12
+ Rails.application.config.spree_backend.actions[:images].add(action)
13
+ Rails.application.config.spree_backend.actions[:variants].add(action)
14
+ Rails.application.config.spree_backend.actions[:prices].add(action)
15
+ Rails.application.config.spree_backend.actions[:stock].add(action)
16
+ Rails.application.config.spree_backend.actions[:product_properties].add(action)
17
+ end
18
+ end
@@ -1,13 +1,4 @@
1
- Rails.application.config.assets.precompile += %w(
2
- favicon.ico
3
- credit_cards/*
4
- spree/frontend/checkout/shipment
5
- homepage/*
6
- meganav/*
7
- noimage/*
8
- logo@3x.png
9
- spark-logo@3x.png
10
- arrow.svg
11
- check-mark-circle.svg
12
- error.svg
13
- )
1
+ Rails.application.config.assets.precompile << 'spree_frontend_manifest.js'
2
+ Rails.application.config.assets.configure do |env|
3
+ env.export_concurrent = false
4
+ end
@@ -10,5 +10,5 @@ CanonicalRails.setup do |config|
10
10
  # Parameter spamming can cause index dilution by creating seemingly different URLs with identical or near-identical content.
11
11
  # Unless whitelisted, these parameters will be omitted
12
12
 
13
- config.whitelisted_parameters = [:keywords, :page, :search, :taxon]
13
+ config.allowed_parameters = [:keywords, :search, :taxon]
14
14
  end
data/config/routes.rb CHANGED
@@ -1,38 +1,42 @@
1
1
  Spree::Core::Engine.add_routes do
2
- root to: 'home#index'
2
+ scope '(:locale)', locale: /#{Spree.available_locales.join('|')}/, defaults: { locale: nil } do
3
+ root to: 'home#index'
3
4
 
4
- resources :products, only: [:index, :show]
5
+ resources :products, only: [:index, :show], path: '/products'
5
6
 
6
- get '/locale/set', to: 'locale#set'
7
+ get '/products/:id/related', to: 'products#related'
8
+ # route globbing for pretty nested taxon and product paths
9
+ get '/t/*id', to: 'taxons#show', as: :nested_taxons
10
+ get '/product_carousel/:id', to: 'taxons#product_carousel'
7
11
 
8
- # non-restful checkout stuff
9
- patch '/checkout/update/:state', to: 'checkout#update', as: :update_checkout
10
- get '/checkout/:state', to: 'checkout#edit', as: :checkout_state
11
- get '/checkout', to: 'checkout#edit', as: :checkout
12
+ # non-restful checkout stuff
13
+ patch '/checkout/update/:state', to: 'checkout#update', as: :update_checkout
14
+ get '/checkout/:state', to: 'checkout#edit', as: :checkout_state
15
+ get '/checkout', to: 'checkout#edit', as: :checkout
12
16
 
13
- get '/orders/populate', to: 'orders#populate_redirect'
17
+ resources :orders, except: [:index, :new, :create, :destroy]
14
18
 
15
- resources :orders, except: [:index, :new, :create, :destroy] do
16
- post :populate, on: :collection
17
- end
19
+ resources :addresses, except: [:index, :show]
20
+
21
+ get '/cart', to: 'orders#edit', as: :cart
22
+ patch '/cart', to: 'orders#update', as: :update_cart
23
+ put '/cart/empty', to: 'orders#empty', as: :empty_cart
18
24
 
19
- resources :addresses, except: [:show]
25
+ get '/content/cvv', to: 'content#cvv', as: :cvv
26
+ get '/content/test', to: 'content#test'
27
+ get '/cart_link', to: 'store#cart_link', as: :cart_link
28
+ get '/account_link', to: 'store#account_link', as: :account_link
20
29
 
21
- get '/cart', to: 'orders#edit', as: :cart
22
- patch '/cart', to: 'orders#update', as: :update_cart
23
- put '/cart/empty', to: 'orders#empty', as: :empty_cart
30
+ get '/locales', to: 'locale#index', as: :locales
31
+ get '/locale/set', to: 'locale#set', as: :set_locale
32
+ get '/currency/set', to: 'currency#set', as: :set_currency
24
33
 
25
- # route globbing for pretty nested taxon and product paths
26
- get '/t/*id', to: 'taxons#show', as: :nested_taxons
27
- get '/product_carousel/:id', to: 'taxons#product_carousel'
34
+ get '/api_tokens', to: 'store#api_tokens'
35
+ post '/ensure_cart', to: 'store#ensure_cart'
28
36
 
29
- get '/unauthorized', to: 'home#unauthorized', as: :unauthorized
30
- get '/content/cvv', to: 'content#cvv', as: :cvv
31
- get '/content/test', to: 'content#test'
32
- get '/cart_link', to: 'store#cart_link', as: :cart_link
33
- get '/account_link', to: 'store#account_link', as: :account_link
37
+ get '/pages/:slug', to: 'cms_pages#show', as: :page
34
38
 
35
- get '/api_tokens', to: 'store#api_tokens'
36
- post '/ensure_cart', to: 'store#ensure_cart'
37
- get '/products/:id/related', to: 'products#related'
39
+ get '/forbidden', to: 'errors#forbidden', as: :forbidden
40
+ get '/unauthorized', to: 'errors#unauthorized', as: :unauthorized
41
+ end
38
42
  end