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,67 @@
1
+ .grid
2
+ .grid__cell.grid__cell--50-at-medium
3
+ = render 'workarea/storefront/products/media_carousel', product: product
4
+
5
+ .grid__cell.grid__cell--50-at-medium
6
+ .product-details__name
7
+ %h1.product-details__heading= product.name
8
+
9
+ .product-prices.product-prices--details
10
+ = render 'workarea/storefront/products/pricing', product: product
11
+
12
+ = form_tag cart_items_path, method: 'post', class: 'product-details__add-to-cart-form', data: { dialog_form: { dialogOptions: { closeAll: true, initModules: true } }, analytics: add_to_cart_analytics_data(product).to_json } do
13
+ = hidden_field_tag :product_id, product.id, id: dom_id(product, 'product_id')
14
+ = hidden_field_tag :sku, product.current_sku
15
+ = hidden_field_tag :via, params[:via], id: dom_id(product, 'via')
16
+
17
+ .grid.grid--middle
18
+ .grid__cell.grid__cell--60
19
+ .grid
20
+ .grid__cell
21
+ - product.options_for_selection.each_with_index do |option, index|
22
+ .property
23
+ = label_tag option.slug, nil, class: 'property__name', for: "#{option.slug}_#{dom_id(product)}", id: "aria_product_option_#{option.slug}_#{index}" do
24
+ %span.property__text= option_label(option)
25
+ .value
26
+ - option.selections.each do |selection|
27
+ = radio_button_tag option.slug, selection, option.current == selection, required: true, title: selection, class: 'visually-hidden', aria: { labelledby: "aria_product_option_#{option.slug}_#{index}" }
28
+ = link_to option_selection_url_for(product, option, selection), title: selection, class: "option-button option-button--#{selection.downcase.dasherize}#{' option-button--active' if option.current == selection}", data: { option_button: '' } do
29
+ - if product.images_by_option[selection.optionize].present?
30
+ = image_tag(product_image_url(product.images_by_option[selection.optionize].first, :swatch_thumb), alt: selection, class: 'option-button__image')
31
+ - else
32
+ %span.option-button__text= selection
33
+
34
+ = append_partials('storefront.add_to_cart_form', product: product)
35
+
36
+ - if product.purchasable?
37
+ .grid__cell
38
+ .product-details__quantity
39
+ .property
40
+ = label_tag :quantity, nil, class: 'property__name', for: "quantity#{dom_id(product)}" do
41
+ %span.property__text= t('workarea.storefront.products.quantity')
42
+ .quantity-control
43
+ = button_tag '-', { type: 'button', data: { quantity_control: { 'direction': 'dec', 'autosubmit': false }.to_json }, class: 'quantity-control__button quantity-control__decrement'}
44
+ .value= number_field_tag :quantity, params[:quantity] || 1, class: 'quantity-control__input text-box text-box--x-small', required: true, min: 1, id: "quantity#{dom_id(product)}"
45
+ = button_tag '+', { type: 'button', data: { quantity_control: { 'direction': 'inc', 'autosubmit': false }.to_json }, class: 'quantity-control__button quantity-control__increment'}
46
+
47
+ - unless product.currently_selected_options.blank?
48
+ = link_to t('workarea.storefront.products.clear_selections'), product_path(product), data: { option_button: '' }
49
+
50
+ .grid__cell
51
+ %p.product-details__add-to-cart-action= button_tag t('workarea.storefront.products.add_to_cart'), value: 'add_to_cart', class: 'button'
52
+
53
+ - else
54
+ .grid__cell
55
+ = hidden_field_tag :quantity, params[:quantity] || 1, id: "quantity#{dom_id(product)}"
56
+ %p.product-details__unavailable= t('workarea.storefront.products.unavailable')
57
+
58
+ - if product.current_sku.present?
59
+ %p.product-details__inventory-status= product.inventory_status
60
+
61
+ - if product.description.present?
62
+ .product-details__description
63
+ %p= truncated_product_description(product, t('workarea.storefront.products.read_more'))
64
+
65
+ = append_partials('storefront.product_details', product: product)
66
+
67
+ %p.product-details__full-details=link_to t('workarea.storefront.products.view_full_details'), product_path(product, color: params[:color]), class: 'text-button'
@@ -0,0 +1,78 @@
1
+ .grid
2
+ .grid__cell.grid__cell--50-at-medium
3
+ = render 'workarea/storefront/products/media_carousel', product: product
4
+
5
+ .grid__cell.grid__cell--50-at-medium
6
+ .product-details__name
7
+ %h1.product-details__heading= product.name
8
+
9
+ .product-prices.product-prices--details
10
+ = render 'workarea/storefront/products/pricing', product: product
11
+
12
+ = append_partials('storefront.product_pricing_details', product: product)
13
+
14
+ - if product.description.present?
15
+ .product-details__description
16
+ %p= truncated_product_description(product, t('workarea.storefront.products.read_more'))
17
+
18
+ = form_tag cart_items_path, method: 'post', class: 'product-details__add-to-cart-form', data: { dialog_form: { dialogOptions: { closeAll: true, initModules: true } }, analytics: add_to_cart_analytics_data(product).to_json } do
19
+ = hidden_field_tag :product_id, product.id, id: dom_id(product, 'product_id')
20
+ = hidden_field_tag :sku, product.current_sku
21
+ = hidden_field_tag :via, params[:via], id: dom_id(product, 'via')
22
+
23
+ .grid.grid--middle
24
+ .grid__cell.grid__cell--60
25
+ .grid
26
+ .grid__cell
27
+ - product.options_for_selection.each do |option|
28
+ .property
29
+ = label_tag option.slug, nil, class: 'property__name', for: "#{option.slug}_#{dom_id(product)}" do
30
+ %span.property__text= option_label(option)
31
+ .value
32
+ - option.selections.each do |selection|
33
+ = radio_button_tag option.slug, selection, option.current == selection, required: true, title: selection, class: 'visually-hidden'
34
+ = link_to option_selection_url_for(product, option, selection), title: selection, class: "option-button option-button--#{selection.downcase.dasherize} option-button--#{option.name.downcase}#{' option-button--active' if option.current == selection}", data: { option_button: '' } do
35
+ - swatch_content = render_swatch_option(selection, product.swatches_by_option[selection.optionize])
36
+
37
+ - if swatch_content.present?
38
+ = swatch_content
39
+ - elsif product.images_by_option[selection.optionize].present?
40
+ = image_tag(product_image_url(product.images_by_option[selection.optionize].first, :swatch_thumb), alt: selection, class: 'option-button__image')
41
+ - else
42
+ %span.option-button__text= selection
43
+
44
+ = append_partials('storefront.add_to_cart_form', product: product)
45
+
46
+ - if product.purchasable?
47
+ .grid__cell
48
+ .product-details__quantity
49
+ .property
50
+ = label_tag :quantity, nil, class: 'property__name', for: "quantity#{dom_id(product)}" do
51
+ %span.property__text= t('workarea.storefront.products.quantity')
52
+ .quantity-control
53
+ = button_tag '-', { type: 'button', data: { quantity_control: { 'direction': 'dec', 'autosubmit': false }.to_json }, class: 'quantity-control__button quantity-control__decrement'}
54
+ .value= number_field_tag :quantity, params[:quantity] || 1, class: 'quantity-control__input text-box text-box--x-small', required: true, min: 1, id: "quantity#{dom_id(product)}"
55
+ = button_tag '+', { type: 'button', data: { quantity_control: { 'direction': 'inc', 'autosubmit': false }.to_json }, class: 'quantity-control__button quantity-control__increment'}
56
+
57
+ - unless product.currently_selected_options.blank?
58
+ .grid__cell
59
+ = link_to t('workarea.storefront.products.clear_selections'), product_path(product), data: { option_button: '' }
60
+
61
+ .grid__cell
62
+ %p.product-details__add-to-cart-action= button_tag t('workarea.storefront.products.add_to_cart'), value: 'add_to_cart', class: 'button'
63
+
64
+ - else
65
+ .grid__cell
66
+ = hidden_field_tag :quantity, params[:quantity] || 1, id: "quantity#{dom_id(product)}"
67
+ %p.product-details__unavailable= t('workarea.storefront.products.unavailable')
68
+
69
+ - if product.current_sku.present?
70
+ %p.product-details__inventory-status= product.inventory_status
71
+
72
+ - if product.description.present?
73
+ .product-details__description
74
+ %p= truncated_product_description(product, t('workarea.storefront.products.read_more'))
75
+
76
+ = append_partials('storefront.product_details', product: product)
77
+
78
+ %p.product-details__full-details=link_to t('workarea.storefront.products.view_full_details'), product_path(product, color: params[:color]), class: 'text-button'
@@ -0,0 +1,72 @@
1
+ - @title = t('workarea.storefront.reviews.write_a_review_title', name: @product.browser_title)
2
+
3
+ .write-review.view
4
+ %h1.heading.heading--3= t('workarea.storefront.reviews.write_a_review_title', name: @product.browser_title)
5
+
6
+ - unless request.get?
7
+ - if @create_review.errors.any?
8
+ - @create_review.errors.full_messages.each do |message|
9
+ = render_message 'error', message, data: { analytics: validation_error_analytics_data('review').to_json }
10
+
11
+ = form_tag create_product_review_path(@product), method: 'post', id: 'review_form', data: { product_review_ajax_submit: '' } do
12
+ = hidden_field_tag 'review[product_id]', @product.id
13
+
14
+ - if display_purchase_requirement_message
15
+ %span.write-review__purchase-requirement= t('workarea.storefront.reviews.purchase_requirement')
16
+
17
+ - if @review.requires_public_info?
18
+ .grid
19
+ .grid__cell.grid__cell--50-at-medium
20
+ .property
21
+ = label_tag 'review[first_name]', nil, class: 'property__name' do
22
+ %span.property__requirement.property__requirement--required= t('workarea.storefront.forms.required')
23
+ %span.property__text= t('workarea.storefront.users.first_name')
24
+ .value
25
+ = text_field_tag 'review[first_name]', @review.first_name, class: 'text-box', required: true
26
+ .value__note= t('workarea.storefront.reviews.notes.display_name')
27
+
28
+ .grid__cell.grid__cell--50-at-medium
29
+ .property
30
+ = label_tag 'review[last_name]', 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.last_name')
33
+ .value
34
+ = text_field_tag 'review[last_name]', @review.last_name, class: 'text-box', required: true
35
+ .value__note= t('workarea.storefront.reviews.notes.display_name')
36
+
37
+ - if @review.anonymous?
38
+ .property
39
+ = label_tag 'review[email]', nil, class: 'property__name' do
40
+ %span.property__text= t('workarea.storefront.users.email')
41
+ %span.property__requirement.property__requirement--optional= t('workarea.storefront.forms.optional')
42
+ .value
43
+ = email_field_tag 'review[email]', @review.email, class: 'text-box', autocapitalize: 'off', autocorrect: 'off', autocomplete: 'email'
44
+ .value__note= t('workarea.storefront.reviews.notes.email')
45
+
46
+ %fieldset.write-review__rating-fieldset
47
+ %legend.write-review__rating-ledgend= t('workarea.storefront.reviews.rating')
48
+ %ul.write-review__ratings
49
+ - (1..5).each do |i|
50
+ %li.write-review__rating
51
+ = radio_button_tag 'review[rating]', i, i == 5 ? true : false, class: 'write-review__rating-input', data: { rating_button: '' }
52
+ = label_tag "review[rating][#{i}]", nil, class: 'write-review__star' do
53
+ = inline_svg 'workarea/storefront/icons/star.svg', class: 'write-review__star-icon', title: t('workarea.storefront.reviews.stars', count: i)
54
+
55
+ .property
56
+ = label_tag 'review[title]', nil, class: 'property__name' do
57
+ %span.property__text= t('workarea.storefront.reviews.review_title')
58
+ .value= text_field_tag 'review[title]', nil, class: 'text-box', required: true
59
+
60
+ .property
61
+ = label_tag 'review[body]', nil, class: 'property__name' do
62
+ %span.property__text= t('workarea.storefront.reviews.your_review')
63
+ .value= text_area_tag 'review[body]', nil, class: 'text-box text-box--multi-line', required: true
64
+
65
+ .property= recaptcha_tags
66
+
67
+ .grid.grid--middle
68
+ .grid__cell.grid__cell--50
69
+ = link_to t('workarea.storefront.forms.cancel'), product_path(@product), data: { dialog_close_button: '' }
70
+ .grid__cell.grid__cell--50
71
+ .grid.grid--auto.grid--right.grid--middle
72
+ .grid__cell= button_tag t('workarea.storefront.reviews.submit'), value: 'submit_review', class: 'button'
@@ -0,0 +1,78 @@
1
+ - @title = t('workarea.storefront.searches.title')
2
+
3
+ - content_for :head do
4
+ %meta{ property: 'recent-view', content: recent_view_content(search: @search.query_string) }
5
+ = append_partials('storefront.search_head', search: @search)
6
+
7
+ - if @search.first_page?
8
+ %link{ href: search_path(q: @search.query_string), rel: 'canonical' }
9
+ %meta{ name: 'robots', content: 'noindex, follow' }
10
+ - unless @search.last_page?
11
+ %link{ href: url_for(q: @search.query_string, page: @search.next_page), rel: 'next' }
12
+ - unless @search.first_page?
13
+ %link{ href: url_for(q: @search.query_string, page: @search.prev_page), rel: 'prev' }
14
+
15
+ %meta{ property: 'og:url', content: url_for }
16
+ %meta{ property: 'og:title', content: page_title }
17
+ %meta{ property: 'og:type', content: 'website' }
18
+ %meta{ property: 'og:image', content: root_path + image_path('workarea/storefront/logo.png') }
19
+
20
+ - content_for :breadcrumbs do
21
+ %p.breadcrumbs__node-group
22
+ %span.breadcrumbs__node{ itemprop: 'breadcrumb' }
23
+ = link_to t('workarea.storefront.layouts.home'), root_path, rel: 'home'
24
+ %span.breadcrumbs__node{ itemprop: 'breadcrumb' }
25
+ %span= t('workarea.storefront.searches.title')
26
+ %span.breadcrumbs__node{ itemprop: 'breadcrumb' }
27
+ %span= @search.query_string
28
+
29
+ .view{ data: { analytics: search_results_view_analytics_data(@search).to_json } }
30
+
31
+ .search-results
32
+ .header.header--center-at-small
33
+ .grid.grid--middle
34
+ .grid__cell.grid__cell--50-at-medium
35
+ .header__title
36
+ - if @search.multiple_result_types?
37
+ %h1.visually-hidden= pluralize(@search.total, t('workarea.storefront.searches.content_result'))
38
+
39
+ %ul.search-result-types
40
+ - if @search.product_total > 0
41
+ %li= link_to pluralize(@search.product_total, t('workarea.storefront.searches.product_result')), search_path(q: @search.query_string, type: 'show')
42
+ %li= pluralize(@search.content_total, t('workarea.storefront.searches.content_result'))
43
+ - else
44
+ %h1= pluralize(@search.total, t('workarea.storefront.searches.result'))
45
+
46
+ .grid__cell.grid__cell--50-at-medium
47
+ .grid.grid--right.grid--middle
48
+ .grid__cell.grid__cell--50-at-medium
49
+ = form_tag content_search_path, method: 'get' do
50
+ = hidden_field_tag :q, @search.query_string
51
+ .property
52
+ = label_tag 'sort_top', nil, class: 'property__name' do
53
+ %span.property__text= t('workarea.storefront.searches.sort_by')
54
+ %span.value= select_tag :sort, options_for_select(@search.sorts, selected: @search.sort), id: 'sort_top', data: { form_submitting_control: '' }
55
+ .hidden-if-js-enabled= button_tag t('workarea.storefront.searches.sort'), value: 'sort_content_top', class: 'button'
56
+
57
+ = append_partials('storefront.search_browse_controls', search: @search)
58
+
59
+ - if @search.customization_content_blocks_for('above_results').present?
60
+ .search-query-content= render_content_blocks(@search.customization_content_blocks_for('above_results'))
61
+
62
+ - if @search.query_suggestions.any?
63
+ .search-results__related
64
+ %span.search-results__related-title= t('workarea.storefront.searches.suggestions')
65
+ .grid.grid--auto
66
+ - @search.query_suggestions.each do |search|
67
+ .grid__cell
68
+ %span.search-results__related-term= link_to search, content_search_path(q: search)
69
+
70
+ .pagination{ data: { pagination: pagination_data(@search.content) } }
71
+ %ul
72
+ - @search.content.each do |result|
73
+ %li{ data: { pagination_item: '' } }
74
+ = link_to result.name, send("#{result.resource_name}_path", result)
75
+ %p= truncate(result.summary, length: 100)
76
+ - if show_pagination?(@search.content)
77
+ .pagination__button
78
+ = link_to t('workarea.storefront.pagination.next_page'), pagination_path_for(page: @search.next_page), class: 'button button--large', data: { pagination_button: '' }
@@ -0,0 +1,97 @@
1
+ - @title = t('workarea.storefront.searches.title')
2
+
3
+ - content_for :head do
4
+ %meta{ name: 'robots', content: 'noindex' }
5
+ = append_partials('storefront.search_head', search: @search)
6
+
7
+ %meta{ property: 'og:url', content: url_for(only_path: false) }
8
+ %meta{ property: 'og:title', content: page_title }
9
+ %meta{ property: 'og:type', content: 'website' }
10
+ %meta{ property: 'og:image', content: @search.open_graph_asset.url }
11
+ %meta{ property: 'og:image:secure_url', content: @search.open_graph_asset.url }
12
+
13
+ - content_for :breadcrumbs do
14
+ %p.breadcrumbs__node-group
15
+ %span.breadcrumbs__node
16
+ = link_to t('workarea.storefront.layouts.home'), root_path, rel: 'home'
17
+ %span.breadcrumbs__node
18
+ %span= t('workarea.storefront.searches.title')
19
+ %span.breadcrumbs__node
20
+ %span= @search.query_string
21
+
22
+ - content_for :drawer do
23
+ - if @search.facets.any?
24
+ #mobile-filters-overlay.mobile-filters-overlay.hidden
25
+ #mobile-filter-drawer.mobile-filters
26
+ .mobile-filters__content
27
+ - if @search.facets.any?
28
+ .result-filters
29
+ - @search.facets.each do |facet|
30
+ - unless @search.autoselected_filter?(facet.system_name)
31
+ = render "workarea/storefront/facets/#{facet.type}", facet: facet
32
+
33
+ .view{ data: { analytics: search_results_view_analytics_data(@search).to_json } }
34
+
35
+ .search-results
36
+ .header.header--center-at-small
37
+ .grid.grid--middle
38
+ .grid__cell.grid__cell--50-at-medium
39
+ .header__title
40
+ %h1= pluralize(@search.total, t('workarea.storefront.searches.result'))
41
+
42
+ - if @search.message.present?
43
+ = render_message 'info', @search.message
44
+
45
+ = append_partials('storefront.above_search_results', search: @search)
46
+
47
+ - if @search.total.zero?
48
+ .grid__cell.grid__cell--50-at-medium
49
+ %p
50
+ = t('workarea.storefront.products.none_found')
51
+ = link_to t('workarea.storefront.products.reset_filters'), search_path(q: @search.query_string)
52
+
53
+ - else
54
+ .grid__cell.grid__cell--50-at-medium
55
+ .grid.grid--right.grid--middle
56
+ .grid__cell.grid__cell--50-at-medium
57
+ - if @search.facets.any?
58
+ .header__filter-button
59
+ %button.button{ data: { mobile_filters: ''} }= t('workarea.storefront.products.filter_results')
60
+
61
+ .grid__cell.grid__cell--50-at-medium
62
+ = form_tag search_path, method: 'get' do
63
+ = facet_hidden_inputs(@search.facets)
64
+ = hidden_field_tag :q, @search.query_string
65
+ .property
66
+ = label_tag 'sort_top', nil, class: 'property__name' do
67
+ %span.property__text= t('workarea.storefront.searches.sort_by')
68
+ .value
69
+ = select_tag :sort, options_for_select(@search.sorts, selected: @search.sort), id: 'sort_top', data: { form_submitting_control: '' }
70
+ .hidden-if-js-enabled= button_tag t('workarea.storefront.searches.sort'), value: 'sort_products_top', class: 'button'
71
+
72
+ = append_partials('storefront.search_browse_controls', search: @search)
73
+
74
+ - if @search.results_content.present?
75
+ .search-results__content= render_content_blocks(@search.results_content)
76
+
77
+ - if @search.customization_content_blocks_for('above_results').present?
78
+ .search-results__content= render_content_blocks(@search.customization_content_blocks_for('above_results'))
79
+
80
+ - if @search.query_suggestions.any?
81
+ .search-results__related
82
+ %span.search-results__related-title= t('workarea.storefront.searches.suggestions')
83
+
84
+ .grid.grid--auto
85
+ - @search.query_suggestions.each do |search|
86
+ .grid__cell
87
+ %span.search-results__related-term= link_to search, search_path(q: search), class: 'search-results__related-link'
88
+
89
+ .pagination{ data: { analytics: product_list_analytics_data("Search Results for \"#{@search.query_string}\"").to_json, pagination: pagination_data(@search.products), back_to_top_button: '' } }
90
+ .grid
91
+ - @search.products.each_with_index do |product, position|
92
+ .grid__cell.grid__cell--50.grid__cell--25-at-medium.grid__cell--20-at-wide{ data: { pagination_item: '' } }
93
+ .product-summary{ data: { search_results_product_grid_summary: { id: product.catalog_id, position: position }.to_json } }
94
+ = render 'workarea/storefront/products/summary', product: product
95
+ - if show_pagination?(@search.products)
96
+ .pagination__button
97
+ = link_to t('workarea.storefront.pagination.next_page'), pagination_path_for(page: @search.next_page), class: 'button button--large', data: { pagination_button: '' }
@@ -0,0 +1,109 @@
1
+ - title_label = label.gsub(/_/, ' ').capitalize
2
+ .address-fields
3
+ .grid
4
+ .grid__cell.grid__cell--50-at-medium
5
+ .property
6
+ = label_tag "#{label}[first_name]", nil, class: 'property__name' do
7
+ %span.property__text= t('workarea.storefront.addresses.first_name')
8
+ .value
9
+ = text_field_tag "#{label}[first_name]", address.first_name, class: 'text-box', required: true, title: "#{title_label} First Name", autocomplete: 'given-name'
10
+ - if address.errors[:first_name].present?
11
+ %span.value__error= address.errors[:first_name].first
12
+
13
+ .grid__cell.grid__cell--50-at-medium
14
+ .property
15
+ = label_tag "#{label}[last_name]", nil, class: 'property__name' do
16
+ %span.property__text= t('workarea.storefront.addresses.last_name')
17
+ .value
18
+ = text_field_tag "#{label}[last_name]", address.last_name, class: 'text-box', required: true, autocomplete: 'family-name', title: "#{title_label} Last Name"
19
+ - if address.errors[:last_name].present?
20
+ %span.value__error= address.errors[:last_name].first
21
+
22
+ .grid__cell
23
+ = optional_field(t('workarea.storefront.addresses.company_prompt'), address.company) do
24
+ .property
25
+ = label_tag "#{label}[company]", nil, class: 'property__name' do
26
+ %span.property__text= t('workarea.storefront.addresses.company')
27
+ %span.property__requirement.property__requirement--optional= t('workarea.storefront.forms.optional')
28
+ .value= text_field_tag "#{label}[company]", address.company, class: 'text-box', title: "#{title_label} #{t('workarea.storefront.addresses.company')}", autocomplete: 'organization'
29
+
30
+ .grid__cell
31
+ .property
32
+ = label_tag "#{label}[street]", nil, class: 'property__name' do
33
+ %span.property__requirement.property__requirement--required= t('workarea.storefront.forms.required')
34
+ %span.property__text= t('workarea.storefront.addresses.street')
35
+ .value
36
+ = text_field_tag "#{label}[street]", address.street, class: 'text-box', required: true, autocomplete: 'address-line1', title: "#{title_label} Street Line 1"
37
+ - if address.errors[:street].present?
38
+ %span.value__error= address.errors[:street].first
39
+ - unless address.allow_po_box?
40
+ %span.value__note= t('workarea.storefront.addresses.no_po_boxes')
41
+
42
+ .grid__cell
43
+ .property
44
+ = label_tag "#{label}[street_2]", nil, class: 'property__name' do
45
+ %span.property__text= t('workarea.storefront.addresses.street_2')
46
+ %span.property__requirement.property__requirement--optional= t('workarea.storefront.forms.optional')
47
+ .value
48
+ = text_field_tag "#{label}[street_2]", address.street_2, class: 'text-box', autocomplete: 'address-line2', title: "#{title_label} Street Line 2"
49
+ - if address.errors[:street_2].present?
50
+ %span.value__error= address.errors[:street_2].first
51
+
52
+ .grid__cell
53
+ .property{ data: { address_region_fields: 'country' } }
54
+ = label_tag "#{label}[country]", nil, class: 'property__name' do
55
+ %span.property__requirement.property__requirement--required= t('workarea.storefront.forms.required')
56
+ %span.property__text= t('workarea.storefront.addresses.country')
57
+ .value
58
+ - options = options_for_select(country_options, address.country.try(:alpha2))
59
+ = select_tag "#{label}[country]", options, title: "#{title_label} Country"
60
+ - if address.errors[:country].present?
61
+ %span.value__error= address.errors[:country].first
62
+
63
+ .grid__cell.grid__cell--33-at-medium
64
+ .property
65
+ = label_tag "#{label}[city]", nil, class: 'property__name' do
66
+ %span.property__requirement.property__requirement--required= t('workarea.storefront.forms.required')
67
+ %span.property__text= t('workarea.storefront.addresses.city')
68
+ .value
69
+ = text_field_tag "#{label}[city]", address.city, class: 'text-box', required: true, autocomplete: 'address-level2', title: "#{title_label} City"
70
+ - if address.errors[:city].present?
71
+ %span.value__error= address.errors[:city].first
72
+
73
+ .grid__cell.grid__cell--33-at-medium
74
+ .property{ data: { address_region_fields: 'region' } }
75
+ = label_tag "#{label}[region]", nil, class: 'property__name' do
76
+ %span.property__requirement.property__requirement--required= t('workarea.storefront.forms.required')
77
+ %span.property__text= t('workarea.storefront.addresses.region')
78
+ .value
79
+ - options = grouped_options_for_select(region_options, address.region)
80
+ = select_tag "#{label}_region_select", options, required: true, title: "#{title_label} Region", class: 'hidden', prompt: t('workarea.storefront.addresses.select_state'), aria: { label: "#{title_label} #{t('workarea.storefront.addresses.region')}"}
81
+ = text_field_tag "#{label}[region]", address.region, class: 'text-box', title: "#{title_label} Region"
82
+ - if address.errors[:region].present?
83
+ %span.value__error= address.errors[:region].first
84
+
85
+ .grid__cell.grid__cell--33-at-medium
86
+ .property
87
+ = label_tag "#{label}[postal_code]", nil, class: 'property__name' do
88
+ %span.property__requirement.property__requirement--required= t('workarea.storefront.forms.required')
89
+ %span.property__text= t('workarea.storefront.addresses.postal_code')
90
+ .value
91
+ = text_field_tag "#{label}[postal_code]", address.postal_code, class: 'text-box', required: true, autocomplete: 'postal-code', title: "#{title_label} Postal Code"
92
+ - if address.errors[:postal_code].present?
93
+ %span.value__error= address.errors[:postal_code].first
94
+
95
+ .grid__cell
96
+ .grid.grid--auto.grid--bottom
97
+ .grid__cell
98
+ .property
99
+ = label_tag "#{label}[phone_number]", nil, class: 'property__name' do
100
+ %span.property__text= t('workarea.storefront.addresses.phone_number')
101
+ %span.property__requirement.property__requirement--optional= t('workarea.storefront.forms.optional')
102
+ .value= telephone_field_tag "#{label}[phone_number]", number_to_phone(address.phone_number), autocomplete: 'tel', class: 'text-box', placeholder: '555-555-5555', title: "#{title_label} #{t('workarea.storefront.addresses.phone_number')}", pattern: '[0-9-]+'
103
+ .grid__cell
104
+ .property
105
+ .grid.grid--auto.grid--middle
106
+ .grid__cell
107
+ = label_tag "#{label}[phone_extension]", nil, class: 'property__name' do
108
+ %span.property__text= t('workarea.storefront.addresses.phone_extension')
109
+ .value= telephone_field_tag "#{label}[phone_extension]", address.phone_extension, autocomplete: 'tel-extension', class: 'text-box text-box--x-small', title: "#{title_label} #{t('workarea.storefront.addresses.phone_extension')}", pattern: '\d+'