workarea-one_theme 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (346) hide show
  1. checksums.yaml +7 -0
  2. data/.editorconfig +20 -0
  3. data/.eslintignore +1 -0
  4. data/.eslintrc +25 -0
  5. data/.github/ISSUE_TEMPLATE/bug_report.md +37 -0
  6. data/.github/ISSUE_TEMPLATE/documentation-request.md +17 -0
  7. data/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  8. data/.github/workflows/ci.yml +60 -0
  9. data/.gitignore +21 -0
  10. data/.rubocop.yml +3 -0
  11. data/.stylelintrc.json +8 -0
  12. data/CHANGELOG.md +267 -0
  13. data/CODE_OF_CONDUCT.md +3 -0
  14. data/CONTRIBUTING.md +3 -0
  15. data/Gemfile +20 -0
  16. data/LICENSE.md +3 -0
  17. data/README.md +173 -0
  18. data/Rakefile +63 -0
  19. data/app/assets/fonts/workarea/storefront/Hind/hind_bold_webfont.woff +0 -0
  20. data/app/assets/fonts/workarea/storefront/Hind/hind_bold_webfont.woff2 +0 -0
  21. data/app/assets/fonts/workarea/storefront/Hind/hind_regular_webfont.woff +0 -0
  22. data/app/assets/fonts/workarea/storefront/Hind/hind_regular_webfont.woff2 +0 -0
  23. data/app/assets/fonts/workarea/storefront/Muli/muli_bold_webfont.woff +0 -0
  24. data/app/assets/fonts/workarea/storefront/Muli/muli_bold_webfont.woff2 +0 -0
  25. data/app/assets/fonts/workarea/storefront/Muli/muli_bolditalic_webfont.woff +0 -0
  26. data/app/assets/fonts/workarea/storefront/Muli/muli_bolditalic_webfont.woff2 +0 -0
  27. data/app/assets/fonts/workarea/storefront/Muli/muli_italic_webfont.woff +0 -0
  28. data/app/assets/fonts/workarea/storefront/Muli/muli_italic_webfont.woff2 +0 -0
  29. data/app/assets/fonts/workarea/storefront/Muli/muli_regular_webfont.woff +0 -0
  30. data/app/assets/fonts/workarea/storefront/Muli/muli_regular_webfont.woff2 +0 -0
  31. data/app/assets/fonts/workarea/storefront/Playfair_Display/playfairdisplay_bold_webfont.woff +0 -0
  32. data/app/assets/fonts/workarea/storefront/Playfair_Display/playfairdisplay_bold_webfont.woff2 +0 -0
  33. data/app/assets/fonts/workarea/storefront/Playfair_Display/playfairdisplay_bolditalic_webfont.woff +0 -0
  34. data/app/assets/fonts/workarea/storefront/Playfair_Display/playfairdisplay_bolditalic_webfont.woff2 +0 -0
  35. data/app/assets/fonts/workarea/storefront/Playfair_Display/playfairdisplay_italic_webfont.woff +0 -0
  36. data/app/assets/fonts/workarea/storefront/Playfair_Display/playfairdisplay_italic_webfont.woff2 +0 -0
  37. data/app/assets/fonts/workarea/storefront/Playfair_Display/playfairdisplay_regular_webfont.woff +0 -0
  38. data/app/assets/fonts/workarea/storefront/Playfair_Display/playfairdisplay_regular_webfont.woff2 +0 -0
  39. data/app/assets/fonts/workarea/storefront/Source_Serif_Pro/source_serif_pro_bold_webfont.woff +0 -0
  40. data/app/assets/fonts/workarea/storefront/Source_Serif_Pro/source_serif_pro_bold_webfont.woff2 +0 -0
  41. data/app/assets/fonts/workarea/storefront/Source_Serif_Pro/source_serif_pro_regular_webfont.woff +0 -0
  42. data/app/assets/fonts/workarea/storefront/Source_Serif_Pro/source_serif_pro_regular_webfont.woff2 +0 -0
  43. data/app/assets/fonts/workarea/storefront/lora/lora_bold_webfont.woff +0 -0
  44. data/app/assets/fonts/workarea/storefront/lora/lora_bold_webfont.woff2 +0 -0
  45. data/app/assets/fonts/workarea/storefront/lora/lora_bolditalic_webfont.woff +0 -0
  46. data/app/assets/fonts/workarea/storefront/lora/lora_bolditalic_webfont.woff2 +0 -0
  47. data/app/assets/fonts/workarea/storefront/lora/lora_italic_webfont.woff +0 -0
  48. data/app/assets/fonts/workarea/storefront/lora/lora_italic_webfont.woff2 +0 -0
  49. data/app/assets/fonts/workarea/storefront/lora/lora_regular_webfont.woff +0 -0
  50. data/app/assets/fonts/workarea/storefront/lora/lora_regular_webfont.woff2 +0 -0
  51. data/app/assets/fonts/workarea/storefront/roboto/roboto_bold_webfont.woff +0 -0
  52. data/app/assets/fonts/workarea/storefront/roboto/roboto_bold_webfont.woff2 +0 -0
  53. data/app/assets/fonts/workarea/storefront/roboto/roboto_italic_webfont.woff +0 -0
  54. data/app/assets/fonts/workarea/storefront/roboto/roboto_italic_webfont.woff2 +0 -0
  55. data/app/assets/fonts/workarea/storefront/roboto/roboto_regular_webfont.woff +0 -0
  56. data/app/assets/fonts/workarea/storefront/roboto/roboto_regular_webfont.woff2 +0 -0
  57. data/app/assets/images/workarea/admin/content_block_types/hero_slider.svg +1 -0
  58. data/app/assets/images/workarea/admin/content_block_types/taxonomy_with_category_summary.svg +1 -0
  59. data/app/assets/images/workarea/admin/content_block_types/taxonomy_with_products.svg +1 -0
  60. data/app/assets/images/workarea/storefront/dialog_close.svg +1 -0
  61. data/app/assets/images/workarea/storefront/icons/account.svg +1 -0
  62. data/app/assets/images/workarea/storefront/icons/arrow_left.svg +1 -0
  63. data/app/assets/images/workarea/storefront/icons/arrow_right.svg +1 -0
  64. data/app/assets/images/workarea/storefront/icons/cart.svg +1 -0
  65. data/app/assets/images/workarea/storefront/icons/chevron_down.svg +1 -0
  66. data/app/assets/images/workarea/storefront/icons/chevron_right.svg +1 -0
  67. data/app/assets/images/workarea/storefront/icons/search.svg +1 -0
  68. data/app/assets/images/workarea/storefront/logo.png +0 -0
  69. data/app/assets/javascripts/workarea/storefront/application.js.erb +147 -0
  70. data/app/assets/javascripts/workarea/storefront/clothing/modules/product_details_color_buttons.js +86 -0
  71. data/app/assets/javascripts/workarea/storefront/dependencies/jquery.payment.js +655 -0
  72. data/app/assets/javascripts/workarea/storefront/modules/address_region_fields.js +93 -0
  73. data/app/assets/javascripts/workarea/storefront/modules/cart_indicator.js +35 -0
  74. data/app/assets/javascripts/workarea/storefront/modules/checkout_primary_payments.js +136 -0
  75. data/app/assets/javascripts/workarea/storefront/modules/header_search_ui.js +64 -0
  76. data/app/assets/javascripts/workarea/storefront/modules/mobile_filters.js +79 -0
  77. data/app/assets/javascripts/workarea/storefront/modules/mobile_nav_button.js +137 -0
  78. data/app/assets/javascripts/workarea/storefront/modules/quantity_control.js +56 -0
  79. data/app/assets/javascripts/workarea/storefront/modules/utility_nav_dropdown.js +43 -0
  80. data/app/assets/javascripts/workarea/storefront/one_theme/config.js +20 -0
  81. data/app/assets/javascripts/workarea/storefront/product_quickview/templates/quickview_button.jst.ejs +3 -0
  82. data/app/assets/javascripts/workarea/storefront/reviews/modules/product_reviews_sort_menus.js +82 -0
  83. data/app/assets/javascripts/workarea/storefront/reviews/templates/sort_by_property.jst.ejs +19 -0
  84. data/app/assets/javascripts/workarea/storefront/templates/log_out_link.jst.ejs +1 -0
  85. data/app/assets/javascripts/workarea/storefront/templates/saved_addresses_property.jst.ejs +23 -0
  86. data/app/assets/stylesheets/jquery_ui/storefront/_ui_autocomplete.scss +17 -0
  87. data/app/assets/stylesheets/jquery_ui/storefront/_ui_dialog.scss +150 -0
  88. data/app/assets/stylesheets/jquery_ui/storefront/_ui_menu.scss +42 -0
  89. data/app/assets/stylesheets/one_theme/.keep +0 -0
  90. data/app/assets/stylesheets/workarea/storefront/base/_forms.scss +197 -0
  91. data/app/assets/stylesheets/workarea/storefront/base/_tables.scss +32 -0
  92. data/app/assets/stylesheets/workarea/storefront/blog/components/_blog_entry.scss +139 -0
  93. data/app/assets/stylesheets/workarea/storefront/blog/components/_blog_entry_summary.scss +90 -0
  94. data/app/assets/stylesheets/workarea/storefront/clothing/components/_color_options.scss +57 -0
  95. data/app/assets/stylesheets/workarea/storefront/clothing/components/_size_options.scss +123 -0
  96. data/app/assets/stylesheets/workarea/storefront/components/_account_dashboard.scss +33 -0
  97. data/app/assets/stylesheets/workarea/storefront/components/_box.scss +45 -0
  98. data/app/assets/stylesheets/workarea/storefront/components/_breadcrumbs.scss +27 -0
  99. data/app/assets/stylesheets/workarea/storefront/components/_button.scss +72 -0
  100. data/app/assets/stylesheets/workarea/storefront/components/_button_property.scss +41 -0
  101. data/app/assets/stylesheets/workarea/storefront/components/_cart.scss +26 -0
  102. data/app/assets/stylesheets/workarea/storefront/components/_category_summary_content_block.scss +78 -0
  103. data/app/assets/stylesheets/workarea/storefront/components/_checkout_addresses.scss +21 -0
  104. data/app/assets/stylesheets/workarea/storefront/components/_checkout_payment.scss +58 -0
  105. data/app/assets/stylesheets/workarea/storefront/components/_checkout_progress.scss +47 -0
  106. data/app/assets/stylesheets/workarea/storefront/components/_checkout_shipping.scss +15 -0
  107. data/app/assets/stylesheets/workarea/storefront/components/_checkout_step_summary.scss +47 -0
  108. data/app/assets/stylesheets/workarea/storefront/components/_color_box.scss +48 -0
  109. data/app/assets/stylesheets/workarea/storefront/components/_data_card.scss +70 -0
  110. data/app/assets/stylesheets/workarea/storefront/components/_hamburger.scss +107 -0
  111. data/app/assets/stylesheets/workarea/storefront/components/_header.scss +31 -0
  112. data/app/assets/stylesheets/workarea/storefront/components/_hero_slider_content_block.scss +75 -0
  113. data/app/assets/stylesheets/workarea/storefront/components/_loading.scss +92 -0
  114. data/app/assets/stylesheets/workarea/storefront/components/_mobile_filters.scss +42 -0
  115. data/app/assets/stylesheets/workarea/storefront/components/_mobile_nav.scss +146 -0
  116. data/app/assets/stylesheets/workarea/storefront/components/_option_button.scss +45 -0
  117. data/app/assets/stylesheets/workarea/storefront/components/_order_help_menu.scss +33 -0
  118. data/app/assets/stylesheets/workarea/storefront/components/_order_summary.scss +19 -0
  119. data/app/assets/stylesheets/workarea/storefront/components/_page_container.scss +31 -0
  120. data/app/assets/stylesheets/workarea/storefront/components/_page_content.scss +30 -0
  121. data/app/assets/stylesheets/workarea/storefront/components/_page_footer.scss +96 -0
  122. data/app/assets/stylesheets/workarea/storefront/components/_page_header.scss +188 -0
  123. data/app/assets/stylesheets/workarea/storefront/components/_page_messages.scss +36 -0
  124. data/app/assets/stylesheets/workarea/storefront/components/_page_sub_footer.scss +39 -0
  125. data/app/assets/stylesheets/workarea/storefront/components/_pagination.scss +10 -0
  126. data/app/assets/stylesheets/workarea/storefront/components/_payment_icon.scss +29 -0
  127. data/app/assets/stylesheets/workarea/storefront/components/_primary_nav.scss +99 -0
  128. data/app/assets/stylesheets/workarea/storefront/components/_product_detail_container.scss +19 -0
  129. data/app/assets/stylesheets/workarea/storefront/components/_product_details.scss +94 -0
  130. data/app/assets/stylesheets/workarea/storefront/components/_product_list.scss +182 -0
  131. data/app/assets/stylesheets/workarea/storefront/components/_product_list_content_block.scss +20 -0
  132. data/app/assets/stylesheets/workarea/storefront/components/_product_media.scss +109 -0
  133. data/app/assets/stylesheets/workarea/storefront/components/_product_prices.scss +45 -0
  134. data/app/assets/stylesheets/workarea/storefront/components/_product_summary.scss +92 -0
  135. data/app/assets/stylesheets/workarea/storefront/components/_promo_code_accordion.scss +13 -0
  136. data/app/assets/stylesheets/workarea/storefront/components/_property.scss +68 -0
  137. data/app/assets/stylesheets/workarea/storefront/components/_quantity_control.scss +77 -0
  138. data/app/assets/stylesheets/workarea/storefront/components/_result_filters.scss +57 -0
  139. data/app/assets/stylesheets/workarea/storefront/components/_select_menu.scss +68 -0
  140. data/app/assets/stylesheets/workarea/storefront/components/_svg_icon.scss +78 -0
  141. data/app/assets/stylesheets/workarea/storefront/components/_taxonomy_content_block.scss +173 -0
  142. data/app/assets/stylesheets/workarea/storefront/components/_text_box.scss +57 -0
  143. data/app/assets/stylesheets/workarea/storefront/components/_text_button.scss +19 -0
  144. data/app/assets/stylesheets/workarea/storefront/components/_utility_nav.scss +49 -0
  145. data/app/assets/stylesheets/workarea/storefront/components/_value.scss +51 -0
  146. data/app/assets/stylesheets/workarea/storefront/email/_settings.scss +23 -0
  147. data/app/assets/stylesheets/workarea/storefront/generic/_fonts.scss.erb +11 -0
  148. data/app/assets/stylesheets/workarea/storefront/objects/_content_wrapper.scss +23 -0
  149. data/app/assets/stylesheets/workarea/storefront/product_quickview/components/_quickview_button.scss +33 -0
  150. data/app/assets/stylesheets/workarea/storefront/reviews/components/_reviews.scss +66 -0
  151. data/app/assets/stylesheets/workarea/storefront/reviews/components/_write_review.scss +71 -0
  152. data/app/assets/stylesheets/workarea/storefront/settings/_colors.scss.erb +21 -0
  153. data/app/assets/stylesheets/workarea/storefront/settings/_font_families.scss.erb +6 -0
  154. data/app/assets/stylesheets/workarea/storefront/settings/_global.scss +39 -0
  155. data/app/assets/stylesheets/workarea/storefront/settings/_typography.scss +8 -0
  156. data/app/assets/stylesheets/workarea/storefront/settings/_z_indexes.scss +43 -0
  157. data/app/assets/stylesheets/workarea/storefront/share/components/_share_buttons.scss +22 -0
  158. data/app/assets/stylesheets/workarea/storefront/slick_slider/components/_slick_slider.scss +171 -0
  159. data/app/assets/stylesheets/workarea/storefront/swatches/components/_swatch_facet.scss +26 -0
  160. data/app/assets/stylesheets/workarea/storefront/swatches/components/_swatch_options.scss +55 -0
  161. data/app/assets/stylesheets/workarea/storefront/theme_config/_midnight_color_scheme.scss +110 -0
  162. data/app/assets/stylesheets/workarea/storefront/theme_config/_one_color_scheme.scss +104 -0
  163. data/app/assets/stylesheets/workarea/storefront/theme_config/_workarea_color_scheme.scss +105 -0
  164. data/app/assets/stylesheets/workarea/storefront/theme_config/fonts/_hind.scss +19 -0
  165. data/app/assets/stylesheets/workarea/storefront/theme_config/fonts/_lora.scss +33 -0
  166. data/app/assets/stylesheets/workarea/storefront/theme_config/fonts/_muli.scss +33 -0
  167. data/app/assets/stylesheets/workarea/storefront/theme_config/fonts/_playfair_display.scss +33 -0
  168. data/app/assets/stylesheets/workarea/storefront/theme_config/fonts/_roboto.scss +26 -0
  169. data/app/assets/stylesheets/workarea/storefront/theme_config/fonts/_source_serif_pro.scss +19 -0
  170. data/app/assets/stylesheets/workarea/storefront/tools/_checkout_section.scss +12 -0
  171. data/app/assets/stylesheets/workarea/storefront/tools/_full_bleed_container.scss +15 -0
  172. data/app/assets/stylesheets/workarea/storefront/typography/_headings.scss +81 -0
  173. data/app/assets/stylesheets/workarea/storefront/typography/_links.scss +27 -0
  174. data/app/assets/stylesheets/workarea/storefront/typography/_text.scss +30 -0
  175. data/app/helpers/workarea/storefront/one_theme_helper.rb +71 -0
  176. data/app/seeds/workarea/browse_navigation_seeds.rb +35 -0
  177. data/app/seeds/workarea/content_block_page_seeds.rb +22 -0
  178. data/app/seeds/workarea/theme_home_page_seeds.rb +58 -0
  179. data/app/seeds/workarea/theme_layout_content_seeds.rb +41 -0
  180. data/app/view_models/workarea/storefront/content_blocks/category_summary_view_model.decorator +21 -0
  181. data/app/view_models/workarea/storefront/content_blocks/hero_slider_block_view_model.rb +44 -0
  182. data/app/view_models/workarea/storefront/content_blocks/product_list_view_model.decorator +50 -0
  183. data/app/view_models/workarea/storefront/content_blocks/taxonomy_with_category_view_model.rb +49 -0
  184. data/app/view_models/workarea/storefront/content_blocks/taxonomy_with_products_view_model.rb +21 -0
  185. data/app/view_models/workarea/storefront/product_view_model.decorator +11 -0
  186. data/app/views/layouts/workarea/storefront/_wish_lists_link.html.haml +4 -0
  187. data/app/views/layouts/workarea/storefront/application.html.haml +211 -0
  188. data/app/views/layouts/workarea/storefront/checkout.html.haml +97 -0
  189. data/app/views/workarea/storefront/blog_comments/index.html.haml +31 -0
  190. data/app/views/workarea/storefront/blog_entries/_summary.html.haml +26 -0
  191. data/app/views/workarea/storefront/blog_entries/show.html.haml +85 -0
  192. data/app/views/workarea/storefront/blogs/_blog_navigation.html.haml +7 -0
  193. data/app/views/workarea/storefront/blogs/index.html.haml +47 -0
  194. data/app/views/workarea/storefront/cart_items/create.html.haml +66 -0
  195. data/app/views/workarea/storefront/carts/show.html.haml +175 -0
  196. data/app/views/workarea/storefront/categories/show.html.haml +105 -0
  197. data/app/views/workarea/storefront/checkouts/_gift_card_payment.html.haml +38 -0
  198. data/app/views/workarea/storefront/checkouts/_summary.html.haml +102 -0
  199. data/app/views/workarea/storefront/checkouts/addresses.html.haml +56 -0
  200. data/app/views/workarea/storefront/checkouts/confirmation.html.haml +58 -0
  201. data/app/views/workarea/storefront/checkouts/payment.html.haml +186 -0
  202. data/app/views/workarea/storefront/checkouts/shipping.html.haml +38 -0
  203. data/app/views/workarea/storefront/content_blocks/_blog_entry.html.haml +19 -0
  204. data/app/views/workarea/storefront/content_blocks/_category_summary.html.haml +20 -0
  205. data/app/views/workarea/storefront/content_blocks/_hero_slider.html.haml +15 -0
  206. data/app/views/workarea/storefront/content_blocks/_product_list.html.haml +11 -0
  207. data/app/views/workarea/storefront/content_blocks/_social_networks.html.haml +17 -0
  208. data/app/views/workarea/storefront/content_blocks/_taxonomy_with_category_summary.html.haml +26 -0
  209. data/app/views/workarea/storefront/content_blocks/_taxonomy_with_products.html.haml +26 -0
  210. data/app/views/workarea/storefront/menus/index.html.haml +17 -0
  211. data/app/views/workarea/storefront/orders/_summary.html.haml +286 -0
  212. data/app/views/workarea/storefront/products/_media.html.haml +22 -0
  213. data/app/views/workarea/storefront/products/_media_carousel.html.haml +25 -0
  214. data/app/views/workarea/storefront/products/_pricing.html.haml +40 -0
  215. data/app/views/workarea/storefront/products/_reviews.html.haml +27 -0
  216. data/app/views/workarea/storefront/products/_subscription_fields.html.haml +15 -0
  217. data/app/views/workarea/storefront/products/_summary.html.haml +16 -0
  218. data/app/views/workarea/storefront/products/_swatch_summary.html.haml +17 -0
  219. data/app/views/workarea/storefront/products/package_show.html.haml +46 -0
  220. data/app/views/workarea/storefront/products/show.html.haml +53 -0
  221. data/app/views/workarea/storefront/products/templates/_generic.html.haml +61 -0
  222. data/app/views/workarea/storefront/products/templates/_gift_card.html.haml +68 -0
  223. data/app/views/workarea/storefront/products/templates/_option_selects.html.haml +61 -0
  224. data/app/views/workarea/storefront/products/templates/_option_thumbnails.html.haml +67 -0
  225. data/app/views/workarea/storefront/products/templates/_swatches.html.haml +78 -0
  226. data/app/views/workarea/storefront/reviews/new.html.haml +72 -0
  227. data/app/views/workarea/storefront/searches/content.html.haml +78 -0
  228. data/app/views/workarea/storefront/searches/show.html.haml +97 -0
  229. data/app/views/workarea/storefront/shared/_address_fields.html.haml +109 -0
  230. data/app/views/workarea/storefront/shares/_share_buttons.html.haml +17 -0
  231. data/app/views/workarea/storefront/style_guides/base/_forms.html.haml +91 -0
  232. data/app/views/workarea/storefront/style_guides/components/_breadcrumbs.html.haml +13 -0
  233. data/app/views/workarea/storefront/style_guides/components/_button.html.haml +69 -0
  234. data/app/views/workarea/storefront/style_guides/components/_category_summary_content_block.html.haml +54 -0
  235. data/app/views/workarea/storefront/style_guides/components/_header.html.haml +18 -0
  236. data/app/views/workarea/storefront/style_guides/components/_hero_slider_content_block.html.haml +46 -0
  237. data/app/views/workarea/storefront/style_guides/components/_mobile_filters.html.haml +17 -0
  238. data/app/views/workarea/storefront/style_guides/components/_product_list_content_block.html.haml +46 -0
  239. data/app/views/workarea/storefront/style_guides/components/_product_summary.html.haml +47 -0
  240. data/app/views/workarea/storefront/style_guides/components/_svg_icon.html.haml +63 -0
  241. data/app/views/workarea/storefront/style_guides/components/_taxonomy_with_category_summary_content_block.html.haml +33 -0
  242. data/app/views/workarea/storefront/style_guides/components/_taxonomy_with_products_content_block.html.haml +33 -0
  243. data/app/views/workarea/storefront/style_guides/components/_text_box.html.haml +63 -0
  244. data/app/views/workarea/storefront/style_guides/settings/_color_variables.html.haml +79 -0
  245. data/app/views/workarea/storefront/style_guides/settings/color_schemes/_midnight_color_scheme.html.haml +7 -0
  246. data/app/views/workarea/storefront/style_guides/settings/color_schemes/_one_color_scheme.html.haml +7 -0
  247. data/app/views/workarea/storefront/style_guides/settings/color_schemes/_workarea_color_scheme.html.haml +8 -0
  248. data/app/views/workarea/storefront/style_guides/typography/_headings.html.haml +47 -0
  249. data/app/views/workarea/storefront/style_guides/typography/_links.html.haml +27 -0
  250. data/app/views/workarea/storefront/users/accounts/_wish_list_summary.html.haml +16 -0
  251. data/app/views/workarea/storefront/users/accounts/edit.html.haml +41 -0
  252. data/app/views/workarea/storefront/users/accounts/show.html.haml +118 -0
  253. data/app/views/workarea/storefront/users/credit_cards/edit.html.haml +74 -0
  254. data/app/views/workarea/storefront/users/credit_cards/new.html.haml +66 -0
  255. data/app/views/workarea/storefront/users/orders/index.html.haml +22 -0
  256. data/app/views/workarea/storefront/users/orders/show.html.haml +31 -0
  257. data/app/views/workarea/storefront/users/wish_lists/show.html.haml +136 -0
  258. data/app/views/workarea/storefront/wish_lists/show.html.haml +99 -0
  259. data/bin/rails +20 -0
  260. data/config/initializers/appends.rb +62 -0
  261. data/config/initializers/configuration.rb +9 -0
  262. data/config/initializers/content_block_types.rb +91 -0
  263. data/config/initializers/dragonfly.rb +50 -0
  264. data/config/initializers/seeds.rb +5 -0
  265. data/config/initializers/theme.rb +16 -0
  266. data/config/initializers/workarea.rb +3 -0
  267. data/config/locales/en.yml +26 -0
  268. data/config/routes.rb +2 -0
  269. data/lib/tasks/one_theme_tasks.rake +4 -0
  270. data/lib/workarea/one_theme.rb +24 -0
  271. data/lib/workarea/one_theme/engine.rb +13 -0
  272. data/lib/workarea/one_theme/version.rb +5 -0
  273. data/package.json +9 -0
  274. data/test/dummy/Rakefile +6 -0
  275. data/test/dummy/app/assets/config/manifest.js +4 -0
  276. data/test/dummy/app/assets/images/.keep +0 -0
  277. data/test/dummy/app/assets/javascripts/application.js +13 -0
  278. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  279. data/test/dummy/app/controllers/application_controller.rb +3 -0
  280. data/test/dummy/app/controllers/concerns/.keep +0 -0
  281. data/test/dummy/app/helpers/application_helper.rb +2 -0
  282. data/test/dummy/app/jobs/application_job.rb +2 -0
  283. data/test/dummy/app/mailers/application_mailer.rb +4 -0
  284. data/test/dummy/app/models/concerns/.keep +0 -0
  285. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  286. data/test/dummy/app/views/layouts/mailer.html.erb +13 -0
  287. data/test/dummy/app/views/layouts/mailer.text.erb +1 -0
  288. data/test/dummy/bin/bundle +3 -0
  289. data/test/dummy/bin/rails +4 -0
  290. data/test/dummy/bin/rake +4 -0
  291. data/test/dummy/bin/setup +38 -0
  292. data/test/dummy/bin/update +29 -0
  293. data/test/dummy/bin/yarn +11 -0
  294. data/test/dummy/config.ru +5 -0
  295. data/test/dummy/config/application.rb +29 -0
  296. data/test/dummy/config/boot.rb +5 -0
  297. data/test/dummy/config/cable.yml +10 -0
  298. data/test/dummy/config/environment.rb +5 -0
  299. data/test/dummy/config/environments/development.rb +54 -0
  300. data/test/dummy/config/environments/production.rb +91 -0
  301. data/test/dummy/config/environments/test.rb +44 -0
  302. data/test/dummy/config/initializers/application_controller_renderer.rb +8 -0
  303. data/test/dummy/config/initializers/assets.rb +14 -0
  304. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  305. data/test/dummy/config/initializers/cookies_serializer.rb +5 -0
  306. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  307. data/test/dummy/config/initializers/inflections.rb +16 -0
  308. data/test/dummy/config/initializers/mime_types.rb +4 -0
  309. data/test/dummy/config/initializers/workarea.rb +5 -0
  310. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  311. data/test/dummy/config/locales/en.yml +33 -0
  312. data/test/dummy/config/puma.rb +56 -0
  313. data/test/dummy/config/routes.rb +5 -0
  314. data/test/dummy/config/secrets.yml +32 -0
  315. data/test/dummy/config/spring.rb +6 -0
  316. data/test/dummy/db/seeds.rb +2 -0
  317. data/test/dummy/lib/assets/.keep +0 -0
  318. data/test/dummy/log/.keep +0 -0
  319. data/test/dummy/package.json +5 -0
  320. data/test/helpers/workarea/storefront/reviews_helper_test.decorator +11 -0
  321. data/test/integration/workarea/blog/wordpress_import_integration_test.decorator +27 -0
  322. data/test/integration/workarea/storefront/sharing_integration_test.decorator +40 -0
  323. data/test/integration/workarea/storefront/swatches_integration_test.decorator +28 -0
  324. data/test/system/workarea/admin/guest_browsing_system_test.decorator +40 -0
  325. data/test/system/workarea/storefront/analytics_system_test.decorator +51 -0
  326. data/test/system/workarea/storefront/browse_swatches_system_test.decorator +48 -0
  327. data/test/system/workarea/storefront/cart_items_system_test.decorator +98 -0
  328. data/test/system/workarea/storefront/categories_system_test.decorator +100 -0
  329. data/test/system/workarea/storefront/content_search_autocomplete_system_test.decorator +33 -0
  330. data/test/system/workarea/storefront/content_search_system_test.decorator +21 -0
  331. data/test/system/workarea/storefront/content_system_test.decorator +21 -0
  332. data/test/system/workarea/storefront/guest_checkout_system_test.decorator +37 -0
  333. data/test/system/workarea/storefront/logged_in_checkout_system_test.decorator +34 -0
  334. data/test/system/workarea/storefront/login_system_test.decorator +94 -0
  335. data/test/system/workarea/storefront/navigation_system_test.decorator +28 -0
  336. data/test/system/workarea/storefront/passwords_system_test.decorator +59 -0
  337. data/test/system/workarea/storefront/review_system_test.decorator +23 -0
  338. data/test/system/workarea/storefront/search_autocomplete_system_test.decorator +46 -0
  339. data/test/system/workarea/storefront/search_system_test.decorator +71 -0
  340. data/test/teaspoon_env.rb +6 -0
  341. data/test/test_helper.rb +10 -0
  342. data/test/view_models/workarea/storefront/taxonomy_with_category_view_model_test.rb +35 -0
  343. data/test/view_models/workarea/storefront/taxonomy_with_products_view_model_test.rb +28 -0
  344. data/workarea-one_theme.gemspec +33 -0
  345. data/yarn.lock +3290 -0
  346. metadata +582 -0
@@ -0,0 +1,105 @@
1
+ - @title = @category.browser_title
2
+ - @breadcrumbs = @category.breadcrumbs
3
+
4
+ - add_css(@category.css)
5
+ - add_javascript(@category.javascript)
6
+ - add_head_content(@category.head_content)
7
+
8
+ - content_for :head do
9
+ - cache "#{@category.cache_key}/head", expires_in: 1.hour do
10
+ %meta{ property: 'global-id', content: @category.to_global_id.to_param }
11
+
12
+ - if @category.first_page? && !@category.has_filters?
13
+ %meta{ name: 'robots', content: 'index, follow' }
14
+ - else
15
+ %meta{ name: 'robots', content: 'noindex, follow' }
16
+
17
+ - if @category.first_page?
18
+ %link{ href: category_url(@category), rel: 'canonical' }
19
+ - else
20
+ %link{ href: category_url(@category, page: @category.page), rel: 'canonical' }
21
+
22
+ - if @category.second_page?
23
+ %link{ href: category_url(@category), rel: 'prev' }
24
+ - elsif !@category.first_page?
25
+ %link{ href: url_for(page: @category.prev_page, only_path: false), rel: 'prev' }
26
+
27
+ - unless @category.last_page?
28
+ %link{ href: url_for(page: @category.next_page, only_path: false), rel: 'next' }
29
+
30
+ %meta{ name: :description, content: @category.meta_description }
31
+
32
+ %meta{ property: 'og:url', content: url_for(only_path: false) }
33
+ %meta{ property: 'og:title', content: page_title }
34
+ %meta{ property: 'og:type', content: 'website' }
35
+ %meta{ property: 'og:image', content: @category.open_graph_asset.url }
36
+ %meta{ property: 'og:image:secure_url', content: @category.open_graph_asset.url }
37
+
38
+ = append_partials('storefront.category_head', category: @category)
39
+
40
+ - content_for :drawer do
41
+ - cache "#{@category.cache_key}/aside", expires_in: Workarea.config.cache_expirations.categories_fragment_cache do
42
+ - if @category.facets.any?
43
+ #mobile-filters-overlay.mobile-filters-overlay.hidden
44
+ #mobile-filter-drawer.mobile-filters
45
+ .mobile-filters__content
46
+ .result-filters
47
+ - @category.facets.each do |facet|
48
+ = render "workarea/storefront/facets/#{facet.type}", facet: facet
49
+
50
+ - cache @category.cache_key, expires_in: Workarea.config.cache_expirations.categories_fragment_cache do
51
+ .view{ data: { analytics: category_view_analytics_data(@category).to_json } }
52
+ .product-browse
53
+ .header.header--center-at-small
54
+ .grid.grid--middle
55
+ .grid__cell.grid__cell--50-at-medium
56
+ .header__title
57
+ %h1= @category.name
58
+ - unless @category.products.any?
59
+ .grid__cell.grid__cell--50-at-medium
60
+ %p
61
+ = t('workarea.storefront.products.none_found')
62
+ - if @category.has_filters?
63
+ = link_to t('workarea.storefront.products.reset_filters'), category_path(@category)
64
+ - else
65
+ .grid__cell.grid__cell--50-at-medium
66
+ .grid.grid--right.grid--middle
67
+ .grid__cell.grid__cell--50-at-medium
68
+ - cache "#{@category.cache_key}/aside", expires_in: Workarea.config.cache_expirations.categories_fragment_cache do
69
+ - if @category.facets.any?
70
+ .header__filter-button
71
+ %button.button{ data: { mobile_filters: ''} }= t('workarea.storefront.products.filter_results')
72
+
73
+ .grid__cell.grid__cell--50-at-medium
74
+ = form_tag request.path, method: :get do
75
+ = facet_hidden_inputs(@category.facets)
76
+
77
+ .property
78
+ = label_tag 'sort_top', nil, class: 'property__name' do
79
+ %span.property__text= t('workarea.storefront.searches.sort_by')
80
+ .value
81
+ = select_tag :sort, options_for_select(@category.sorts, selected: @category.sort), id: 'sort_top', data: { form_submitting_control: '' }
82
+ .hidden-if-js-enabled
83
+ = button_tag t('workarea.storefront.searches.sort'), value: 'sort_products_top', class: 'button'
84
+
85
+ = append_partials('storefront.category_browse_controls', category: @category)
86
+
87
+ - if @category.content_blocks_for(:above_results).present?
88
+ = render_content_blocks(@category.content_blocks_for(:above_results))
89
+
90
+ .pagination{ data: { analytics: product_list_analytics_data(@category.name).to_json, pagination: pagination_data(@category.products), back_to_top_button: '' } }
91
+ .grid.grid--flush
92
+ - @category.products.each_with_index do |product, position|
93
+ = render_schema_org(product_schema(product))
94
+ = append_partials('storefront.category_browse_grid_item', product: product, position: position)
95
+
96
+ .grid__cell.grid__cell--50.grid__cell--33-at-medium.grid__cell--20-at-wide{ data: { pagination_item: '' } }
97
+ .product-summary
98
+ = render 'workarea/storefront/products/summary', product: product
99
+ - if show_pagination?(@category.products)
100
+ .pagination__button
101
+ = link_to t('workarea.storefront.pagination.next_page'), pagination_path_for(page: @category.next_page), class: 'button', data: { pagination_button: '' }
102
+
103
+
104
+ - if @category.content_blocks_for(:below_results).present?
105
+ = render_content_blocks(@category.content_blocks_for(:below_results))
@@ -0,0 +1,38 @@
1
+ .grid__cell
2
+ .checkout-payment__secondary-method{ class: step.gift_card? ? 'checkout-payment__secondary-method--visible' : nil }
3
+
4
+ - if step.gift_card?
5
+ .message.message--info
6
+ %p.message__type
7
+ %span.message__icon= t('workarea.storefront.messages.info')
8
+ %p.message__text
9
+ #{t('workarea.storefront.gift_cards.balance_html', amount: number_to_currency(step.gift_card_balance))}
10
+ #{t('workarea.storefront.gift_cards.applied_to_order_html', amount: number_to_currency(step.gift_card_amount))}
11
+
12
+ - if step.tender_required?
13
+ #{t('workarea.storefront.gift_cards.tender_required_html', amount: number_to_currency(step.order_balance))}
14
+ - else
15
+ #{t('workarea.storefront.gift_cards.place_order')}
16
+
17
+ = optional_field(t('workarea.storefront.gift_cards.enter_gift_card_prompt'), step.gift_cards, step.failed_gift_card) do
18
+
19
+ %h2.checkout-payment__heading= t('workarea.storefront.gift_cards.gift_card')
20
+
21
+ = form_tag checkout_gift_cards_path, method: 'patch', id: 'gift_card_form', class: 'inline-form' do
22
+
23
+ .grid.grid--middle
24
+ .grid__cell.grid__cell--66
25
+ .value
26
+ = text_field_tag 'gift_card_number', step.failed_gift_card&.number, class: 'text-box', autocomplete: 'off', title: t('workarea.storefront.gift_cards.gift_card_number'), placeholder: t('workarea.storefront.gift_cards.gift_card_number')
27
+ - if step.failed_gift_card && step.failed_gift_card.errors[:number].present?
28
+ %span.value__error= step.failed_gift_card.errors[:number].first
29
+ .grid__cell.grid__cell--33
30
+ = button_tag t('workarea.storefront.gift_cards.apply_gift_card'), value: 'apply_gift_card', class: 'button button--full-width'
31
+
32
+ .applied-gift-cards
33
+ - step.gift_cards.each do |gift_card|
34
+ %p.applied-gift-card
35
+ %strong.applied-gift-card__number= gift_card.display_number
36
+ = link_to t('workarea.storefront.gift_cards.remove'), checkout_gift_cards_path(gift_card_id: gift_card.id), data: { method: :delete, confirm: t('workarea.storefront.gift_cards.remove_confirmation') }, class: 'applied-gift-card__remove-link'
37
+ %br
38
+ %span.applied-gift-card__applied= t('workarea.storefront.gift_cards.balance_applied_html', amount: number_to_currency(gift_card.amount), balance: number_to_currency(gift_card.balance))
@@ -0,0 +1,102 @@
1
+ .checkout-step-summary
2
+
3
+ .checkout-step-summary__step.checkout-step-summary__step--hidden-for-small
4
+
5
+ - if summary.show_addresses?
6
+ %h2.checkout-step-summary__step-heading= t('workarea.storefront.checkouts.addresses')
7
+
8
+ .checkout-step-summary__section
9
+ %h3.checkout-step-summary__step-section-heading= t('workarea.storefront.checkouts.email')
10
+ %p.checkout-step-summary__step-section-content= summary.email
11
+
12
+ - if summary.show_shipping_address?
13
+ .checkout-step-summary__section
14
+ %h3.checkout-step-summary__step-section-heading= t('workarea.storefront.checkouts.shipping_address')
15
+ %p.checkout-step-summary__step-section-content= formatted_address(summary.shipping_address)
16
+
17
+ .checkout-step-summary__section
18
+ %h3.checkout-step-summary__step-section-heading= t('workarea.storefront.checkouts.billing_address')
19
+ %p.checkout-step-summary__step-section-content= formatted_address(summary.billing_address)
20
+
21
+ - unless current_page?(checkout_addresses_path)
22
+ %p.checkout-step-summary__step-action= link_to t('workarea.storefront.forms.edit'), checkout_addresses_path, class: 'button', data: { analytics: checkout_edit_analytics_data('addresses') }
23
+
24
+ = append_partials('storefront.checkout_summary_addresses', summary: summary)
25
+
26
+ .checkout-step-summary__step.checkout-step-summary__step--hidden-for-small
27
+
28
+ - if summary.show_shipping_options?
29
+ %h2.checkout-step-summary__step-heading= t('workarea.storefront.checkouts.shipping_options')
30
+
31
+ - summary.shippings.each_with_index do |shipping, index|
32
+ - if shipping.show_options?
33
+ .checkout-step-summary__section
34
+ %h3.checkout-step-summary__step-section-heading
35
+ - if shipping.partial?
36
+ = t('workarea.storefront.checkouts.shipping_service_with_index', index: index + 1)
37
+ - else
38
+ = t('workarea.storefront.checkouts.shipping_service')
39
+ %p #{shipping.shipping_service.name} - #{number_to_currency(shipping.shipping_total)}
40
+ - if shipping.instructions.present?
41
+ %p= shipping.instructions
42
+
43
+ = append_partials('storefront.checkout_summary_shipping_attributes', summary: summary, shipping: shipping, index: index)
44
+
45
+ - unless checkout_shipping_path == request.original_fullpath
46
+ %p.checkout-step-summary__step-action= link_to t('workarea.storefront.forms.edit'), checkout_shipping_path, class: 'button', data: { analytics: checkout_edit_analytics_data('shipping') }
47
+
48
+ = append_partials('storefront.checkout_summary_shipping', summary: summary)
49
+
50
+ .checkout-step-summary__step
51
+
52
+ %h2.checkout-step-summary__step-heading= t('workarea.storefront.checkouts.totals')
53
+ %table.table.table--totals
54
+ %tbody
55
+ %tr
56
+ %th
57
+ %span= t('workarea.storefront.orders.subtotal')
58
+ %td= number_to_currency(cart.subtotal_price)
59
+ - if cart.total_adjustments.any?
60
+ - cart.total_adjustments.each do |adjustment|
61
+ %tr
62
+ %th
63
+ %span= adjustment.description
64
+ %td
65
+ - if adjustment.discount?
66
+ %strong= number_to_currency(adjustment.amount)
67
+ - else
68
+ %span= number_to_currency(adjustment.amount)
69
+
70
+ %tr
71
+ %th
72
+ %span= t('workarea.storefront.orders.shipping')
73
+ %td
74
+ - if !cart.requires_shipping?
75
+ = t('workarea.storefront.checkouts.not_applicable')
76
+ - elsif !summary.shipping_determined?
77
+ = t('workarea.storefront.checkouts.to_be_determined')
78
+ - else
79
+ = number_to_currency(cart.shipping_total)
80
+
81
+ %tr
82
+ %th
83
+ %span= t('workarea.storefront.orders.tax')
84
+ %td
85
+ - if summary.taxes_determined?
86
+ = number_to_currency(cart.tax_total)
87
+ - else
88
+ = t('workarea.storefront.checkouts.to_be_determined')
89
+
90
+ - if summary.store_credit?
91
+ %tr
92
+ %th
93
+ %span= t('workarea.storefront.orders.store_credit')
94
+ %td
95
+ %strong.table__price-discount −#{number_to_currency(summary.store_credit_amount)}
96
+
97
+ = append_partials('storefront.checkout_summary_payment', summary: summary)
98
+
99
+ %tr.table__total
100
+ %th
101
+ %span= t('workarea.storefront.orders.total')
102
+ %td= number_to_currency(summary.order_balance)
@@ -0,0 +1,56 @@
1
+ - @title = t('workarea.storefront.checkouts.addresses_title')
2
+ - @checkout_step = 'addresses'
3
+
4
+ - content_for :page_aside do
5
+ %h1.visually-hidden= t('workarea.storefront.checkouts.addresses_title')
6
+ = render 'summary', cart: @cart, summary: @summary
7
+
8
+ .checkout-addresses.view{ data: { analytics: checkout_addresses_view_analytics_data(@cart).to_json } }
9
+ - unless request.get?
10
+ - if @step.order.errors.any?
11
+ - @step.order.errors.full_messages.each do |message|
12
+ = render_message 'error', message, data: { analytics: validation_error_analytics_data('order').to_json }
13
+ - if @step.billing_address.errors.any?
14
+ - @step.billing_address.errors.full_messages.each do |message|
15
+ = render_message 'error', data: { analytics: validation_error_analytics_data('billing_address').to_json } do
16
+ #{t('workarea.storefront.checkouts.billing_address')}: #{message}
17
+ - if @step.shipping_address.errors.any?
18
+ - @step.shipping_address.errors.full_messages.each do |message|
19
+ = render_message 'error', data: { analytics: validation_error_analytics_data('shipping_address').to_json } do
20
+ #{t('workarea.storefront.checkouts.shipping_address')}: #{message}
21
+
22
+ = append_partials('storefront.checkout_addresses_top', step: @step)
23
+
24
+ = form_tag checkout_addresses_path, method: :patch, id: 'checkout_form', data: { checkout_addresses_form: { defaultShippingAddressId: @step.default_shipping_address_id, defaultBillingAddressId: @step.default_billing_address_id, savedAddresses: @step.saved_addresses }.to_json } do
25
+
26
+ - if @step.show_email_field?
27
+ .checkout-addresses__section.checkout-addresses__section--email
28
+ %h2.checkout-addresses__heading= t('workarea.storefront.checkouts.email')
29
+ .property
30
+ = label_tag 'email', nil, class: 'property__name' do
31
+ %span.property__requirement.property__requirement--required= t('workarea.storefront.forms.required')
32
+ %span.property__text= t('workarea.storefront.checkouts.email')
33
+ .value
34
+ = email_field_tag 'email', @step.email, class: 'text-box', required: true, autocapitalize: 'off', autocomplete: 'email', placeholder: t('workarea.storefront.forms.email_placeholder')
35
+ - if @step.order.errors[:email].present?
36
+ %span.value__error= @step.order.errors[:email].first
37
+ %p
38
+ = t('workarea.storefront.checkouts.login_prompt')
39
+ = link_to t('workarea.storefront.checkouts.login_title'), login_path(return_to: checkout_path), data: { analytics: checkout_login_analytics_data.to_json }
40
+
41
+ - if @step.show_shipping_address?
42
+ .checkout-addresses__section.checkout-addresses__section--shipping
43
+ %h2.checkout-addresses__heading= t('workarea.storefront.checkouts.shipping_address')
44
+ = append_partials('storefront.checkout_shipping_address_top', step: @step)
45
+ .checkout-addresses__fields= render 'workarea/storefront/shared/address_fields', label: 'shipping_address', address: @step.shipping_address
46
+
47
+ .checkout-addresses__section.checkout-addresses__section--billing
48
+ %h2.checkout-addresses__heading= t('workarea.storefront.checkouts.billing_address')
49
+ .checkout-addresses__fields.hidden-if-js-enabled= render 'workarea/storefront/shared/address_fields', label: 'billing_address', address: @step.billing_address
50
+
51
+ = append_partials('storefront.checkout_addresses_form', step: @step)
52
+
53
+ - if @step.show_shipping_address?
54
+ %p= button_tag t('workarea.storefront.checkouts.continue_to_shipping'), value: 'continue', class: 'button button--large', data: { disable_with: loading_indicator(t('workarea.storefront.checkouts.continue_to_shipping_disabled_text'), 'light') }
55
+ - else
56
+ %p= button_tag t('workarea.storefront.checkouts.continue_to_payment'), value: 'continue', class: 'button button--large', data: { disable_with: loading_indicator(t('workarea.storefront.checkouts.continue_to_payment_disabled_text'), 'light') }
@@ -0,0 +1,58 @@
1
+ - @title = @content.title
2
+
3
+ .view{ data: { analytics: checkout_order_placed_analytics_data(@order).to_json } }
4
+
5
+ %h1= @content.title
6
+
7
+ - if @content.content_blocks_for('confirmation').present?
8
+ = render_content_blocks(@content.content_blocks_for('confirmation'))
9
+
10
+ = append_partials('storefront.checkout_confirmation_text')
11
+
12
+ .order-summary
13
+ .grid
14
+ .grid__cell.grid__cell--50-at-medium
15
+ .order-summary__data-section
16
+ - if @order.user.present?
17
+
18
+ %p= link_to t('workarea.storefront.checkouts.go_to_account'), users_account_path, class: 'button'
19
+
20
+ - elsif @order.render_signup_form?
21
+
22
+ - if @content.content_blocks_for('confirmation_signup').present?
23
+ = render_content_blocks(@content.content_blocks_for('confirmation_signup'))
24
+
25
+ = form_tag users_account_path, id: 'signup_form', method: :post, data: { analytics: checkout_signup_analytics_data.to_json } do
26
+ = hidden_field_tag :email, @order.email
27
+ = hidden_field_tag :first_name, @order.billing_address.first_name
28
+ = hidden_field_tag :last_name, @order.billing_address.last_name
29
+ .property
30
+ = label_tag :password, nil, class: 'property__name' do
31
+ %span.property__requirement.property__requirement--required= t('workarea.storefront.forms.required')
32
+ %span.property__text= t('workarea.storefront.users.password')
33
+ .value= password_field_tag :password, nil, class: 'text-box', required: true, minlength: minimum_password_length
34
+ .grid
35
+ .grid__cell.grid__cell--50-at-medium
36
+ .button-property
37
+ .value= check_box_tag :email_signup, true, params[:email_signup]
38
+ = label_tag :email_signup, nil, class: 'button-property__name' do
39
+ %span.button-property__text= t('workarea.storefront.users.sign_up_for_email')
40
+ .grid__cell.grid__cell--50-at-medium
41
+ %p= button_tag t('workarea.storefront.users.create_account'), value: 'sign_up', class: 'button button--full-width', data: { disable_with: loading_indicator(t('workarea.storefront.users.create_account_disabled_text'), 'light') }
42
+ .grid__cell.grid__cell--50-at-medium
43
+ .order-summary__data-section
44
+ %table.table
45
+ %tbody
46
+ %tr
47
+ %th= t('workarea.storefront.orders.id')
48
+ %td= @order.id
49
+ %tr
50
+ %th= t('workarea.storefront.orders.placed_at')
51
+ %td= local_time(@order.placed_at, :short_date_at_time)
52
+ %tr
53
+ %th= t('workarea.storefront.orders.status')
54
+ %td= @order.fulfillment_status
55
+
56
+ = render 'workarea/storefront/orders/summary', order: @order
57
+
58
+ = append_partials('storefront.checkout_confirmation')
@@ -0,0 +1,186 @@
1
+ - @title = t('workarea.storefront.checkouts.payment_title')
2
+ - @checkout_step = 'payment'
3
+
4
+ - content_for :page_aside do
5
+ %h1.visually-hidden= t('workarea.storefront.checkouts.payment_title')
6
+ = render 'summary', cart: @cart, summary: @summary
7
+
8
+ .checkout-payment.view{ data: { analytics: checkout_payment_view_analytics_data(@cart).to_json } }
9
+
10
+ - unless request.get?
11
+ - if @step.payment.errors.any?
12
+ - @step.payment.errors.full_messages.each do |message|
13
+ = render_message 'error', message, data: { analytics: validation_error_analytics_data('payment').to_json }
14
+ - if @step.credit_card? && @step.credit_card.errors.any?
15
+ - @step.credit_card.errors.full_messages.each do |message|
16
+ = render_message 'error', message, data: { analytics: validation_error_analytics_data('credit_card').to_json }
17
+ = append_partials('storefront.payment_error', step: @step)
18
+
19
+ .checkout-payment__section
20
+
21
+ .checkout-payment__secondary.checkout-payment__secondary--promo-code
22
+ .grid
23
+ .grid__cell
24
+ .checkout-payment__secondary-method
25
+ .promo-code-accordion{ data: { accordion: { uiAccordionOptions: { active: false, animate: 150, collapsible: true } }.to_json } }
26
+ %h2.promo-code-accordion__heading= t('workarea.storefront.checkouts.promo_code_toggle')
27
+ .promo-code-accordion__content
28
+ %h2.checkout-payment__heading= t('workarea.storefront.orders.promo_code')
29
+ = form_tag add_promo_code_to_cart_path, id: 'promo_code_form', class: 'inline-form', method: 'post' do
30
+
31
+ .grid.grid--middle
32
+ .grid__cell.grid__cell--66
33
+ .value
34
+ = text_field_tag :promo_code, params[:promo_code], class: 'text-box', autocomplete: 'off', autocorrect: 'off', autocapitalize: 'off', required: true, placeholder: t('workarea.storefront.orders.promo_code'), title: t('workarea.storefront.orders.promo_code')
35
+ .grid__cell.grid__cell--33
36
+ = button_tag t('workarea.storefront.carts.add'), value: 'add_promo_code', class: 'button button--full-width'
37
+
38
+ = append_partials('storefront.secondary_payment', step: @step)
39
+
40
+ .checkout-payment__section
41
+ .checkout-payment__primary{ data: { checkout_primary_payment: '' } }
42
+
43
+ %h2#aria_payment_radiogroup.checkout-payment__heading= t('workarea.storefront.checkouts.payment_method')
44
+
45
+ - if @step.store_credit?
46
+ = render_message 'success' do
47
+ = t('workarea.storefront.checkouts.store_credit_applied', amount: number_to_currency(@step.store_credit_amount))
48
+ - if @step.order_covered_by_store_credit?
49
+ = t('workarea.storefront.checkouts.store_credit_balance', amount: number_to_currency(@step.store_credit_balance))
50
+
51
+ = form_tag checkout_place_order_path, method: :patch, id: 'checkout_form', data: { single_submit_form: '' } do
52
+ - unless @step.order_covered_by_advance_payments?
53
+ .checkout-payment__primary-method-group{ role: 'radiogroup', aria: { labelledby: 'aria_payment_radiogroup' } }
54
+
55
+ -# Saved Cards
56
+ - if @step.credit_cards.present?
57
+ - @step.credit_cards.each do |card|
58
+ .checkout-payment__primary-method.checkout-payment__primary-method--credit_card{ class: card.selected? ? 'checkout-payment__primary-method--selected': nil }
59
+ .button-property
60
+ .value= radio_button_tag 'payment', card.id, card.selected?, data: { analytics: checkout_payment_selected_analytics_data('saved card').to_json }
61
+ = label_tag "payment[#{card.id}]", nil, class: 'button-property__name' do
62
+ %span.button-property__text= t('workarea.storefront.credit_cards.summary', issuer: card.issuer, number: card.display_number.slice(-4, 4))
63
+ %p.checkout-payment__primary-method-description
64
+ = credit_card_issuer_icon(card_icon_name(card.issuer))
65
+ %span= t('workarea.storefront.credit_cards.expires')
66
+ %span= t('workarea.storefront.credit_cards.expiry', month: card.month, year: card.year)
67
+
68
+ -# New Card
69
+ .checkout-payment__primary-method.checkout-payment__primary-method--credit_card.checkout-payment__primary-method--new{ class: @step.using_new_card? ? 'checkout-payment__primary-method--selected': nil}
70
+ .button-property
71
+ .value= radio_button_tag 'payment', 'new_card', @step.using_new_card?, data: { analytics: checkout_payment_selected_analytics_data('new card').to_json }
72
+ = label_tag 'payment[new_card]', nil, class: 'button-property__name' do
73
+ %span.button-property__text= t('workarea.storefront.checkouts.new_credit_card')
74
+ .checkout-payment__primary-method-edit
75
+ .grid
76
+ .grid__cell
77
+ .property
78
+ = label_tag 'credit_card[number]', nil, class: 'property__name' do
79
+ %span.property__requirement.property__requirement--required= t('workarea.storefront.forms.required')
80
+ %span.property__text= t('workarea.storefront.credit_cards.card_number')
81
+ .value
82
+ = text_field_tag 'credit_card[number]', nil, class: 'text-box', inputmode: 'numeric', pattern: '[0-9\s]*', required: true, autocorrect: 'off', autocomplete: 'cc-number'
83
+ - if @step.credit_card? && @step.credit_card.errors[:number].present?
84
+ %span.value__error= @step.credit_card.errors[:number].first
85
+ .grid__cell.grid__cell--66-at-medium.grid__cell--50-at-wide
86
+ .property
87
+ %strong.property__name
88
+ %span= t('workarea.storefront.credit_cards.expiration_date')
89
+ .value
90
+ .grid
91
+ .grid__cell.grid__cell--50
92
+ = select_tag 'credit_card[month]', options_for_select(1..12, @step.credit_card.try(:month)), title: t('workarea.storefront.credit_cards.expiration_month'), aria: { label: t('workarea.storefront.credit_cards.expiration_month') }
93
+ .grid__cell.grid__cell--50
94
+ = select_tag 'credit_card[year]', options_for_select(Time.now.year..Time.now.year + 10, @step.credit_card.try(:year)), title: t('workarea.storefront.credit_cards.expiration_year'), aria: { label: t('workarea.storefront.credit_cards.expiration_year') }
95
+ - if @step.credit_card? && @step.credit_card.errors[:year].present?
96
+ %span.value__error= @step.credit_card.errors[:year].first
97
+ .grid__cell.grid__cell--33
98
+ .property
99
+ = label_tag 'credit_card[cvv]', nil, class: 'property__name' do
100
+ %span.property__requirement.property__requirement--required
101
+ = t('workarea.storefront.forms.required')
102
+ %span.property__text
103
+ = t('workarea.storefront.credit_cards.security_code')
104
+ .value
105
+ = text_field_tag 'credit_card[cvv]', nil, class: 'text-box text-box--small', required: true, inputmode: 'numeric', pattern: '[0-9]*', autocorrect: 'off', autocomplete: 'cc-csc'
106
+ - if @step.saved_card_id.blank? && @step.credit_card && @step.credit_card.errors[:cvv].present?
107
+ %span.value__error= @step.credit_card.errors[:cvv].first
108
+ %span.value__note= link_to t('workarea.storefront.credit_cards.whats_this'), page_path('credit-card-security-code'), data: { dialog_button: '' }
109
+ %p.checkout-payment__primary-method-description
110
+ = all_payment_icons
111
+ = append_partials('storefront.payment_method', step: @step)
112
+
113
+ %p.checkout-payment__place-order= button_tag t('workarea.storefront.checkouts.place_order'), value: 'place_order', class: 'button button--large', data: { disable_with: loading_indicator(t('workarea.storefront.checkouts.place_order_disabled_text'), 'light') }
114
+
115
+ .checkout-payment__section
116
+ .checkout-payment__cart-items
117
+ %h2.checkout-payment__heading= t('workarea.storefront.orders.items')
118
+ %ul.product-list
119
+ - @cart.items.each do |item|
120
+ %li.product-list__item
121
+ .product-list__item-cell
122
+ .product-list__summary
123
+ %p.product-list__media= link_to image_tag(product_image_url(item.image, :small_thumb), alt: item.product_name, class: 'product-list__media-image'), product_url(item.product, sku: item.sku), class: 'product-list__media-link'
124
+ .product-list__info
125
+ %p.product-list__name= link_to item.product_name, product_path(item.product, sku: item.sku)
126
+ %p.product-list__id= item.sku_name
127
+ %p.product-list__inventory-status= item.inventory_status
128
+ - if item.has_options?
129
+ .product-list__option-group
130
+ - item.details.each do |name, value|
131
+ %p.product-list__option #{name.titleize}: #{value}
132
+ = append_partials('storefront.checkout_cart_summary_item_details', item: item)
133
+ .product-list__item-cell
134
+ %table.table
135
+ %thead
136
+ %tr
137
+ %th.table__prices= t('workarea.storefront.orders.price')
138
+ %th.table__quantity= t('workarea.storefront.orders.quantity')
139
+ %th.table__prices= t('workarea.storefront.orders.total')
140
+ %tbody
141
+ %tr
142
+ %td.table__prices
143
+ = render 'workarea/storefront/carts/pricing', item: item, css_block: 'table'
144
+ %td.table__quantity
145
+ %p= item.quantity
146
+ %td.table__prices
147
+ - item.total_adjustments.each do |adjustment|
148
+ %p.table__price
149
+ - if item.total_adjustments.many?
150
+ %span.table__price-label= adjustment.description
151
+
152
+ - if adjustment.discount?
153
+ %strong.table__price-discount= number_to_currency(adjustment.amount)
154
+ - else
155
+ %span= number_to_currency(adjustment.amount)
156
+
157
+ - if item.total_adjustments.many?
158
+ %p.table__price
159
+ %span.table__price-label= t('workarea.storefront.orders.item_total')
160
+ %span= number_to_currency(item.total_price)
161
+
162
+ - @cart.free_gifts.each do |item|
163
+ %li.product-list__item
164
+ .product-list__item-cell
165
+ .product-list__summary
166
+ %p.product-list__media= link_to image_tag(product_image_url(item.image, :small_thumb), alt: item.product_name, class: 'product-list__media-image'), product_url(item.product, sku: item.sku), class: 'product-list__media-link'
167
+ .product-list__info
168
+ %p.product-list__name= link_to item.product_name, product_path(item.product, sku: item.sku)
169
+ %p.product-list__id= item.sku
170
+ .product-list__item-cell
171
+ %table.table
172
+ %thead
173
+ %tr
174
+ %th.table__prices= t('workarea.storefront.orders.price')
175
+ %th.table__quantity= t('workarea.storefront.orders.quantity')
176
+ %th.table__prices= t('workarea.storefront.orders.total')
177
+ %tbody
178
+ %tr
179
+ %td.table__prices
180
+ %p.table__price
181
+ %span= t('workarea.storefront.carts.free_gift')
182
+ %td.table__quantity
183
+ %p= item.quantity
184
+ %td.table__prices
185
+ %p.table__price
186
+ %span= t('workarea.storefront.carts.free_gift')