workarea-admin 3.4.45 → 3.5.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (388) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +52 -0
  3. data/app/assets/images/workarea/admin/email_logo.png +0 -0
  4. data/app/assets/javascripts/workarea/admin/application.js.erb +11 -1
  5. data/app/assets/javascripts/workarea/admin/config.js.erb +96 -0
  6. data/app/assets/javascripts/workarea/admin/modules/active_by_segment_tooltips.js +108 -0
  7. data/app/assets/javascripts/workarea/admin/modules/calendars.js +1 -1
  8. data/app/assets/javascripts/workarea/admin/modules/categorized_autocomplete_fields.js +1 -1
  9. data/app/assets/javascripts/workarea/admin/modules/impersonation_notification.js +44 -0
  10. data/app/assets/javascripts/workarea/admin/modules/jump_to_menus.js +74 -0
  11. data/app/assets/javascripts/workarea/admin/modules/new_navigation_taxons.js +1 -2
  12. data/app/assets/javascripts/workarea/admin/modules/release_reminder.js +1 -0
  13. data/app/assets/javascripts/workarea/admin/modules/selects.js +33 -0
  14. data/app/assets/javascripts/workarea/admin/modules/style_guide_autocomplete_fields.js +42 -0
  15. data/app/assets/javascripts/workarea/admin/modules/timeline_report_chart.js +105 -0
  16. data/app/assets/javascripts/workarea/admin/modules/toggle_elements.js +27 -0
  17. data/app/assets/javascripts/workarea/admin/modules/tribute_areas.js +91 -0
  18. data/app/assets/javascripts/workarea/admin/templates/chart_legend.jst.ejs +17 -9
  19. data/app/assets/javascripts/workarea/admin/templates/jump_to_menu.jst.ejs +13 -0
  20. data/app/assets/stylesheets/workarea/admin/application.scss.erb +3 -0
  21. data/app/assets/stylesheets/workarea/admin/base/_forms.scss +2 -2
  22. data/app/assets/stylesheets/workarea/admin/components/_activity.scss +24 -16
  23. data/app/assets/stylesheets/workarea/admin/components/_activity_group.scss +3 -19
  24. data/app/assets/stylesheets/workarea/admin/components/_box.scss +21 -5
  25. data/app/assets/stylesheets/workarea/admin/components/_calendar.scss +102 -140
  26. data/app/assets/stylesheets/workarea/admin/components/_chart_legend.scss +10 -13
  27. data/app/assets/stylesheets/workarea/admin/components/_checkbox.scss +49 -23
  28. data/app/assets/stylesheets/workarea/admin/components/_content_block_list.scss +5 -3
  29. data/app/assets/stylesheets/workarea/admin/components/_date_marker.scss +24 -3
  30. data/app/assets/stylesheets/workarea/admin/components/_index_table.scss +5 -0
  31. data/app/assets/stylesheets/workarea/admin/components/_jump_to_menu.scss +57 -0
  32. data/app/assets/stylesheets/workarea/admin/components/_product_summary.scss +46 -0
  33. data/app/assets/stylesheets/workarea/admin/components/_toggle_button.scss +1 -4
  34. data/app/assets/stylesheets/workarea/admin/email/_base.scss +30 -2
  35. data/app/assets/stylesheets/workarea/admin/email/_components.scss +66 -5
  36. data/app/assets/stylesheets/workarea/admin/email/_helpers.scss +16 -5
  37. data/app/assets/stylesheets/workarea/admin/email/{_settings.scss → _settings.scss.erb} +4 -4
  38. data/app/controllers/workarea/admin/application_controller.rb +2 -4
  39. data/app/controllers/workarea/admin/bulk_action_sequential_product_edits_controller.rb +4 -6
  40. data/app/controllers/workarea/admin/bulk_variant_saving.rb +1 -2
  41. data/app/controllers/workarea/admin/catalog_products_controller.rb +4 -6
  42. data/app/controllers/workarea/admin/catalog_variants_controller.rb +2 -3
  43. data/app/controllers/workarea/admin/comments_controller.rb +9 -0
  44. data/app/controllers/workarea/admin/configurations_controller.rb +29 -0
  45. data/app/controllers/workarea/admin/content_assets_controller.rb +3 -1
  46. data/app/controllers/workarea/admin/content_blocks_controller.rb +1 -7
  47. data/app/controllers/workarea/admin/create_catalog_products_controller.rb +2 -8
  48. data/app/controllers/workarea/admin/create_release_undos_controller.rb +43 -0
  49. data/app/controllers/workarea/admin/create_segments_controller.rb +68 -0
  50. data/app/controllers/workarea/admin/dashboards_controller.rb +2 -0
  51. data/app/controllers/workarea/admin/data_file_imports_controller.rb +7 -2
  52. data/app/controllers/workarea/admin/fulfillment_skus_controller.rb +58 -0
  53. data/app/controllers/workarea/admin/fulfillment_tokens_controller.rb +56 -0
  54. data/app/controllers/workarea/admin/guest_browsings_controller.rb +2 -2
  55. data/app/controllers/workarea/admin/impersonations_controller.rb +3 -4
  56. data/app/controllers/workarea/admin/orders_controller.rb +3 -0
  57. data/app/controllers/workarea/admin/pricing_discount_redemptions_controller.rb +13 -0
  58. data/app/controllers/workarea/admin/pricing_overrides_controller.rb +1 -1
  59. data/app/controllers/workarea/admin/product_rules_controller.rb +1 -2
  60. data/app/controllers/workarea/admin/releases_controller.rb +8 -13
  61. data/app/controllers/workarea/admin/reports_controller.rb +18 -0
  62. data/app/controllers/workarea/admin/segment_overrides_controller.rb +19 -0
  63. data/app/controllers/workarea/admin/segment_rules_controller.rb +62 -0
  64. data/app/controllers/workarea/admin/segments_controller.rb +48 -0
  65. data/app/controllers/workarea/admin/tax_rates_controller.rb +62 -1
  66. data/app/controllers/workarea/admin/unsubscribes_controller.rb +40 -0
  67. data/app/controllers/workarea/admin/users_controller.rb +19 -0
  68. data/app/helpers/workarea/admin/application_helper.rb +2 -12
  69. data/app/helpers/workarea/admin/configurations_helper.rb +9 -0
  70. data/app/helpers/workarea/admin/content_helper.rb +2 -3
  71. data/app/helpers/workarea/admin/fulfillment_helper.rb +10 -0
  72. data/app/helpers/workarea/admin/icons_helper.rb +26 -0
  73. data/app/helpers/workarea/admin/navigation_helper.rb +1 -0
  74. data/app/helpers/workarea/admin/pricing_overrides_helper.rb +1 -1
  75. data/app/helpers/workarea/admin/products_helper.rb +13 -0
  76. data/app/helpers/workarea/admin/releases_helper.rb +5 -21
  77. data/app/helpers/workarea/admin/segments_helper.rb +68 -0
  78. data/app/helpers/workarea/admin/settings_helper.rb +11 -3
  79. data/app/mailers/workarea/admin/comment_mailer.rb +3 -3
  80. data/app/mailers/workarea/admin/status_report_mailer.rb +19 -6
  81. data/app/view_models/workarea/admin/bulk_action_product_edit_view_model.rb +5 -0
  82. data/app/view_models/workarea/admin/changeset_view_model.rb +15 -3
  83. data/app/view_models/workarea/admin/code_list_view_model.rb +1 -1
  84. data/app/view_models/workarea/admin/commentable_view_model.rb +4 -0
  85. data/app/view_models/workarea/admin/content_view_model.rb +2 -0
  86. data/app/view_models/workarea/admin/dashboards/marketing_view_model.rb +5 -9
  87. data/app/view_models/workarea/admin/dashboards/reports_view_model.rb +25 -0
  88. data/app/view_models/workarea/admin/discounts/buy_some_get_some_view_model.rb +6 -0
  89. data/app/view_models/workarea/admin/discounts/category_view_model.rb +6 -0
  90. data/app/view_models/workarea/admin/discounts/free_gift_view_model.rb +6 -0
  91. data/app/view_models/workarea/admin/discounts/order_total_view_model.rb +6 -0
  92. data/app/view_models/workarea/admin/discounts/product_attribute_view_model.rb +6 -0
  93. data/app/view_models/workarea/admin/discounts/product_view_model.rb +6 -0
  94. data/app/view_models/workarea/admin/discounts/quantity_fixed_price_view_model.rb +6 -0
  95. data/app/view_models/workarea/admin/discounts/shipping_view_model.rb +6 -0
  96. data/app/view_models/workarea/admin/featured_products_view_model.rb +6 -12
  97. data/app/view_models/workarea/admin/fulfillment_sku_view_model.rb +22 -0
  98. data/app/view_models/workarea/admin/fulfillment_token_view_model.rb +15 -0
  99. data/app/view_models/workarea/admin/fulfillment_view_model.rb +14 -0
  100. data/app/view_models/workarea/admin/insight_view_model.rb +2 -2
  101. data/app/view_models/workarea/admin/insights/product_view_model.rb +2 -2
  102. data/app/view_models/workarea/admin/insights/segment_view_model.rb +25 -0
  103. data/app/view_models/workarea/admin/order_view_model.rb +4 -0
  104. data/app/view_models/workarea/admin/pricing_sku_view_model.rb +0 -51
  105. data/app/view_models/workarea/admin/product_rules_preview_view_model.rb +2 -2
  106. data/app/view_models/workarea/admin/product_view_model.rb +26 -5
  107. data/app/view_models/workarea/admin/recommendations_view_model.rb +3 -11
  108. data/app/view_models/workarea/admin/release_calendar_view_model.rb +4 -9
  109. data/app/view_models/workarea/admin/release_event_view_model.rb +8 -41
  110. data/app/view_models/workarea/admin/release_view_model.rb +10 -17
  111. data/app/view_models/workarea/admin/releases_feed_view_model.rb +5 -13
  112. data/app/view_models/workarea/admin/reports/customers_view_model.rb +4 -2
  113. data/app/view_models/workarea/admin/reports/low_inventory_view_model.rb +2 -5
  114. data/app/view_models/workarea/admin/reports/sales_by_category_view_model.rb +2 -5
  115. data/app/view_models/workarea/admin/reports/sales_by_discount_view_model.rb +2 -5
  116. data/app/view_models/workarea/admin/reports/sales_by_product_view_model.rb +2 -5
  117. data/app/view_models/workarea/admin/reports/sales_by_tender_view_model.rb +13 -0
  118. data/app/view_models/workarea/admin/reports/timeline_view_model.rb +74 -0
  119. data/app/view_models/workarea/admin/search_customization_product_rules_view_model.rb +1 -1
  120. data/app/view_models/workarea/admin/segment_view_model.rb +19 -0
  121. data/app/view_models/workarea/admin/user_view_model.rb +6 -9
  122. data/app/view_models/workarea/admin/variant_view_model.rb +8 -0
  123. data/app/views/layouts/workarea/admin/application.html.haml +1 -1
  124. data/app/views/layouts/workarea/admin/email.html.haml +35 -41
  125. data/app/views/workarea/admin/activities/_configuration_admin_update.html.haml +10 -0
  126. data/app/views/workarea/admin/activities/_fulfillment_sku_create.html.haml +12 -0
  127. data/app/views/workarea/admin/activities/_fulfillment_sku_destroy.html.haml +10 -0
  128. data/app/views/workarea/admin/activities/_fulfillment_sku_update.html.haml +10 -0
  129. data/app/views/workarea/admin/activities/_segment_create.html.haml +12 -0
  130. data/app/views/workarea/admin/activities/_segment_destroy.html.haml +10 -0
  131. data/app/views/workarea/admin/activities/_segment_update.html.haml +10 -0
  132. data/app/views/workarea/admin/activities/show.html.haml +18 -11
  133. data/app/views/workarea/admin/bulk_action_product_edits/edit.html.haml +4 -0
  134. data/app/views/workarea/admin/bulk_action_product_edits/review.html.haml +11 -4
  135. data/app/views/workarea/admin/bulk_action_sequential_product_edits/product.html.haml +1 -1
  136. data/app/views/workarea/admin/catalog_categories/_cards.html.haml +3 -1
  137. data/app/views/workarea/admin/catalog_categories/edit.html.haml +1 -4
  138. data/app/views/workarea/admin/catalog_categories/index.html.haml +1 -0
  139. data/app/views/workarea/admin/catalog_product_images/edit.html.haml +1 -1
  140. data/app/views/workarea/admin/catalog_products/_cards.html.haml +2 -4
  141. data/app/views/workarea/admin/catalog_products/edit.html.haml +2 -1
  142. data/app/views/workarea/admin/catalog_products/index.html.haml +4 -2
  143. data/app/views/workarea/admin/catalog_products/insights.html.haml +2 -0
  144. data/app/views/workarea/admin/catalog_variants/edit.html.haml +6 -1
  145. data/app/views/workarea/admin/catalog_variants/index.html.haml +2 -0
  146. data/app/views/workarea/admin/catalog_variants/new.html.haml +5 -0
  147. data/app/views/workarea/admin/changesets/fields/_active_segment_ids.html.haml +4 -0
  148. data/app/views/workarea/admin/comment_mailer/notify.html.haml +27 -19
  149. data/app/views/workarea/admin/comments/index.html.haml +18 -12
  150. data/app/views/workarea/admin/configurations/_overridden.html.haml +2 -0
  151. data/app/views/workarea/admin/configurations/show.html.haml +49 -0
  152. data/app/views/workarea/admin/configurations/types/_array.html.haml +3 -0
  153. data/app/views/workarea/admin/configurations/types/_boolean.html.haml +1 -0
  154. data/app/views/workarea/admin/configurations/types/_duration.html.haml +2 -0
  155. data/app/views/workarea/admin/configurations/types/_encrypted.html.haml +1 -0
  156. data/app/views/workarea/admin/configurations/types/_float.html.haml +1 -0
  157. data/app/views/workarea/admin/configurations/types/_hash.html.haml +17 -0
  158. data/app/views/workarea/admin/configurations/types/_integer.html.haml +1 -0
  159. data/app/views/workarea/admin/configurations/types/_select.html.haml +1 -0
  160. data/app/views/workarea/admin/configurations/types/_string.html.haml +1 -0
  161. data/app/views/workarea/admin/configurations/types/_symbol.html.haml +1 -0
  162. data/app/views/workarea/admin/content/_edit.html.haml +8 -1
  163. data/app/views/workarea/admin/content/_form.html.haml +13 -7
  164. data/app/views/workarea/admin/content/advanced.html.haml +18 -10
  165. data/app/views/workarea/admin/content_assets/_cards.html.haml +3 -0
  166. data/app/views/workarea/admin/content_assets/_summary.html.haml +1 -1
  167. data/app/views/workarea/admin/content_assets/edit.html.haml +6 -0
  168. data/app/views/workarea/admin/content_assets/index.html.haml +7 -2
  169. data/app/views/workarea/admin/content_assets/new.html.haml +10 -3
  170. data/app/views/workarea/admin/content_blocks/_asset.html.haml +8 -1
  171. data/app/views/workarea/admin/content_pages/_cards.html.haml +1 -0
  172. data/app/views/workarea/admin/content_pages/edit.html.haml +1 -1
  173. data/app/views/workarea/admin/content_pages/index.html.haml +1 -0
  174. data/app/views/workarea/admin/create_catalog_categories/publish.html.haml +1 -0
  175. data/app/views/workarea/admin/create_catalog_products/content.html.haml +1 -1
  176. data/app/views/workarea/admin/create_catalog_products/publish.html.haml +1 -0
  177. data/app/views/workarea/admin/create_content_pages/publish.html.haml +1 -0
  178. data/app/views/workarea/admin/create_pricing_discounts/publish.html.haml +1 -0
  179. data/app/views/workarea/admin/create_release_undos/new.html.haml +45 -0
  180. data/app/views/workarea/admin/create_release_undos/review.html.haml +51 -0
  181. data/app/views/workarea/admin/create_releases/plan.html.haml +4 -3
  182. data/app/views/workarea/admin/create_releases/setup.html.haml +8 -12
  183. data/app/views/workarea/admin/create_segments/rules.html.haml +55 -0
  184. data/app/views/workarea/admin/create_segments/setup.html.haml +42 -0
  185. data/app/views/workarea/admin/create_users/admin.html.haml +0 -2
  186. data/app/views/workarea/admin/dashboards/catalog.html.haml +1 -0
  187. data/app/views/workarea/admin/dashboards/people.html.haml +1 -1
  188. data/app/views/workarea/admin/dashboards/reports.html.haml +31 -0
  189. data/app/views/workarea/admin/dashboards/settings.html.haml +23 -3
  190. data/app/views/workarea/admin/data_file_imports/new.html.haml +4 -2
  191. data/app/views/workarea/admin/data_file_mailer/export.html.haml +2 -0
  192. data/app/views/workarea/admin/data_file_mailer/import.html.haml +2 -0
  193. data/app/views/workarea/admin/data_file_mailer/import_failure.html.haml +2 -0
  194. data/app/views/workarea/admin/facets/_applied.html.haml +1 -1
  195. data/app/views/workarea/admin/featured_products/_selected.html.haml +3 -2
  196. data/app/views/workarea/admin/featured_products/_unselected.html.haml +3 -1
  197. data/app/views/workarea/admin/featured_products/edit.html.haml +3 -3
  198. data/app/views/workarea/admin/featured_products/select.html.haml +0 -1
  199. data/app/views/workarea/admin/fulfillment_skus/_aux_navigation.html.haml +3 -0
  200. data/app/views/workarea/admin/fulfillment_skus/_cards.html.haml +57 -0
  201. data/app/views/workarea/admin/fulfillment_skus/_summary.html.haml +6 -0
  202. data/app/views/workarea/admin/fulfillment_skus/edit.html.haml +53 -0
  203. data/app/views/workarea/admin/fulfillment_skus/index.html.haml +75 -0
  204. data/app/views/workarea/admin/fulfillment_skus/new.html.haml +41 -0
  205. data/app/views/workarea/admin/fulfillment_skus/show.html.haml +17 -0
  206. data/app/views/workarea/admin/fulfillment_tokens/index.html.haml +73 -0
  207. data/app/views/workarea/admin/fulfillments/show.html.haml +41 -6
  208. data/app/views/workarea/admin/insights/_most_discounted_products.html.haml +4 -4
  209. data/app/views/workarea/admin/inventory_skus/show.html.haml +1 -1
  210. data/app/views/workarea/admin/navigation_menus/_summary.html.haml +1 -1
  211. data/app/views/workarea/admin/navigation_menus/edit.html.haml +1 -1
  212. data/app/views/workarea/admin/navigation_menus/index.html.haml +3 -1
  213. data/app/views/workarea/admin/navigation_redirects/index.html.haml +0 -5
  214. data/app/views/workarea/admin/navigation_taxons/index.html.haml +20 -4
  215. data/app/views/workarea/admin/orders/_cards.html.haml +23 -5
  216. data/app/views/workarea/admin/orders/attributes.html.haml +4 -1
  217. data/app/views/workarea/admin/orders/fraud.html.haml +43 -0
  218. data/app/views/workarea/admin/orders/index.html.haml +1 -0
  219. data/app/views/workarea/admin/orders/timeline.html.haml +1 -1
  220. data/app/views/workarea/admin/pricing_discount_code_lists/_cards.html.haml +1 -1
  221. data/app/views/workarea/admin/pricing_discount_code_lists/promo_codes.html.haml +1 -1
  222. data/app/views/workarea/admin/pricing_discount_redemptions/index.html.haml +44 -0
  223. data/app/views/workarea/admin/pricing_discounts/_cards.html.haml +22 -0
  224. data/app/views/workarea/admin/pricing_discounts/conditions/_segments.html.haml +5 -0
  225. data/app/views/workarea/admin/pricing_discounts/edit.html.haml +5 -15
  226. data/app/views/workarea/admin/pricing_discounts/index.html.haml +1 -0
  227. data/app/views/workarea/admin/pricing_discounts/properties/_buy_some_get_some.html.haml +1 -0
  228. data/app/views/workarea/admin/pricing_discounts/properties/_category.html.haml +1 -0
  229. data/app/views/workarea/admin/pricing_discounts/properties/_free_gift.html.haml +1 -0
  230. data/app/views/workarea/admin/pricing_discounts/properties/_order_total.html.haml +1 -0
  231. data/app/views/workarea/admin/pricing_discounts/properties/_product.html.haml +1 -0
  232. data/app/views/workarea/admin/pricing_discounts/properties/_product_attribute.html.haml +2 -1
  233. data/app/views/workarea/admin/pricing_discounts/properties/_quantity_fixed_price.html.haml +1 -0
  234. data/app/views/workarea/admin/pricing_discounts/properties/_shipping.html.haml +1 -0
  235. data/app/views/workarea/admin/pricing_skus/_cards.html.haml +7 -7
  236. data/app/views/workarea/admin/pricing_skus/edit.html.haml +5 -5
  237. data/app/views/workarea/admin/pricing_skus/index.html.haml +4 -4
  238. data/app/views/workarea/admin/pricing_skus/new.html.haml +6 -9
  239. data/app/views/workarea/admin/product_rules/_card.html.haml +2 -2
  240. data/app/views/workarea/admin/product_rules/_form.html.haml +1 -0
  241. data/app/views/workarea/admin/product_rules/index.html.haml +2 -0
  242. data/app/views/workarea/admin/releases/_cards.html.haml +50 -12
  243. data/app/views/workarea/admin/releases/_publish.html.haml +1 -1
  244. data/app/views/workarea/admin/releases/edit.html.haml +33 -46
  245. data/app/views/workarea/admin/releases/index.html.haml +81 -90
  246. data/app/views/workarea/admin/releases/list.html.haml +107 -0
  247. data/app/views/workarea/admin/releases/original.html.haml +50 -0
  248. data/app/views/workarea/admin/releases/show.html.haml +3 -17
  249. data/app/views/workarea/admin/releases/undo.html.haml +64 -0
  250. data/app/views/workarea/admin/reports/average_order_value.html.haml +1 -1
  251. data/app/views/workarea/admin/reports/customers.html.haml +4 -0
  252. data/app/views/workarea/admin/reports/first_time_vs_returning_sales.html.haml +1 -1
  253. data/app/views/workarea/admin/reports/reference.html.haml +19 -60
  254. data/app/views/workarea/admin/reports/sales_by_country.html.haml +6 -0
  255. data/app/views/workarea/admin/reports/sales_by_product.html.haml +6 -0
  256. data/app/views/workarea/admin/reports/sales_by_sku.html.haml +6 -0
  257. data/app/views/workarea/admin/reports/sales_by_tender.html.haml +30 -0
  258. data/app/views/workarea/admin/reports/sales_over_time.html.haml +5 -1
  259. data/app/views/workarea/admin/reports/timeline.html.haml +20 -0
  260. data/app/views/workarea/admin/search_customizations/_cards.html.haml +1 -0
  261. data/app/views/workarea/admin/search_customizations/edit.html.haml +1 -1
  262. data/app/views/workarea/admin/search_customizations/index.html.haml +1 -0
  263. data/app/views/workarea/admin/searches/show.html.haml +6 -5
  264. data/app/views/workarea/admin/segment_overrides/show.html.haml +29 -0
  265. data/app/views/workarea/admin/segment_rules/_form.html.haml +13 -0
  266. data/app/views/workarea/admin/segment_rules/fields/_browser_info.html.haml +13 -0
  267. data/app/views/workarea/admin/segment_rules/fields/_geolocation.html.haml +4 -0
  268. data/app/views/workarea/admin/segment_rules/fields/_last_order.html.haml +3 -0
  269. data/app/views/workarea/admin/segment_rules/fields/_logged_in.html.haml +2 -0
  270. data/app/views/workarea/admin/segment_rules/fields/_orders.html.haml +5 -0
  271. data/app/views/workarea/admin/segment_rules/fields/_revenue.html.haml +9 -0
  272. data/app/views/workarea/admin/segment_rules/fields/_sessions.html.haml +5 -0
  273. data/app/views/workarea/admin/segment_rules/fields/_tags.html.haml +4 -0
  274. data/app/views/workarea/admin/segment_rules/fields/_traffic_referrer.html.haml +13 -0
  275. data/app/views/workarea/admin/segment_rules/geolocation_options.json.jbuilder +4 -0
  276. data/app/views/workarea/admin/segment_rules/index.html.haml +25 -0
  277. data/app/views/workarea/admin/segment_rules/summaries/_browser_info.html.haml +11 -0
  278. data/app/views/workarea/admin/segment_rules/summaries/_geolocation.html.haml +2 -0
  279. data/app/views/workarea/admin/segment_rules/summaries/_last_order.html.haml +2 -0
  280. data/app/views/workarea/admin/segment_rules/summaries/_logged_in.html.haml +5 -0
  281. data/app/views/workarea/admin/segment_rules/summaries/_orders.html.haml +6 -0
  282. data/app/views/workarea/admin/segment_rules/summaries/_revenue.html.haml +7 -0
  283. data/app/views/workarea/admin/segment_rules/summaries/_sessions.html.haml +6 -0
  284. data/app/views/workarea/admin/segment_rules/summaries/_tags.html.haml +2 -0
  285. data/app/views/workarea/admin/segment_rules/summaries/_traffic_referrer.html.haml +10 -0
  286. data/app/views/workarea/admin/segments/_cards.html.haml +81 -0
  287. data/app/views/workarea/admin/segments/_publish.html.haml +10 -0
  288. data/app/views/workarea/admin/segments/edit.html.haml +41 -0
  289. data/app/views/workarea/admin/segments/index.html.haml +64 -0
  290. data/app/views/workarea/admin/segments/insights.html.haml +52 -0
  291. data/app/views/workarea/admin/segments/show.html.haml +20 -0
  292. data/app/views/workarea/admin/shared/_active_field.html.haml +17 -0
  293. data/app/views/workarea/admin/shared/_bulk_actions.html.haml +10 -8
  294. data/app/views/workarea/admin/shared/_primary_nav.html.haml +5 -2
  295. data/app/views/workarea/admin/shared/_toggle_button.html.haml +1 -1
  296. data/app/views/workarea/admin/shipping_services/edit.html.haml +0 -4
  297. data/app/views/workarea/admin/shipping_services/new.html.haml +0 -4
  298. data/app/views/workarea/admin/status_report_mailer/report.html.haml +83 -86
  299. data/app/views/workarea/admin/style_guides/components/_activity.html.haml +3 -5
  300. data/app/views/workarea/admin/style_guides/components/_activity_group.html.haml +9 -15
  301. data/app/views/workarea/admin/style_guides/components/_box.html.haml +12 -7
  302. data/app/views/workarea/admin/style_guides/components/_checkbox.html.haml +21 -2
  303. data/app/views/workarea/admin/style_guides/components/_release_changeset.html.haml +3 -5
  304. data/app/views/workarea/admin/tax_rates/edit.html.haml +64 -0
  305. data/app/views/workarea/admin/tax_rates/index.html.haml +59 -20
  306. data/app/views/workarea/admin/tax_rates/new.html.haml +62 -0
  307. data/app/views/workarea/admin/timeline/show.html.haml +34 -41
  308. data/app/views/workarea/admin/toolbar/show.html.haml +11 -1
  309. data/app/views/workarea/admin/trash/index.html.haml +1 -1
  310. data/app/views/workarea/admin/users/edit.html.haml +60 -57
  311. data/app/views/workarea/admin/users/index.html.haml +1 -3
  312. data/app/views/workarea/admin/users/index.json.jbuilder +8 -0
  313. data/app/views/workarea/admin/users/insights.html.haml +31 -23
  314. data/app/views/workarea/admin/users/permissions.html.haml +10 -1
  315. data/app/views/workarea/admin/users/show.html.haml +7 -0
  316. data/config/locales/en.yml +569 -124
  317. data/config/routes.rb +57 -5
  318. data/lib/workarea/mailer_previews/admin/status_report_mailer_preview.rb +3 -1
  319. data/public/workarea/import_samples/tax_rates.csv +3 -3
  320. data/test/dummy/config/initializers/session_store.rb +1 -1
  321. data/test/helpers/workarea/admin/application_helper_test.rb +0 -16
  322. data/test/helpers/workarea/admin/icons_helper_test.rb +9 -0
  323. data/test/helpers/workarea/admin/products_helper_test.rb +73 -0
  324. data/test/helpers/workarea/admin/releases_helper_test.rb +0 -49
  325. data/test/helpers/workarea/admin/settings_helper_test.rb +22 -1
  326. data/test/integration/workarea/admin/assets_integration_test.rb +2 -5
  327. data/test/integration/workarea/admin/comments_integration_test.rb +27 -7
  328. data/test/integration/workarea/admin/configurations_integration_test.rb +21 -0
  329. data/test/integration/workarea/admin/create_release_undos_integration_test.rb +29 -0
  330. data/test/integration/workarea/admin/create_segments_integration_test.rb +26 -0
  331. data/test/integration/workarea/admin/data_file_imports_integration_test.rb +34 -8
  332. data/test/integration/workarea/admin/fulfillment_skus_integration_test.rb +55 -0
  333. data/test/integration/workarea/admin/fulfillment_tokens_integration_test.rb +43 -0
  334. data/test/integration/workarea/admin/guest_browsings_integration_test.rb +8 -32
  335. data/test/integration/workarea/admin/impersonations_integration_test.rb +13 -57
  336. data/test/integration/workarea/admin/jump_to_integration_test.rb +0 -29
  337. data/test/integration/workarea/admin/pricing_overrides_integration_test.rb +11 -0
  338. data/test/integration/workarea/admin/products_integration_test.rb +0 -13
  339. data/test/integration/workarea/admin/releases_integration_test.rb +71 -87
  340. data/test/integration/workarea/admin/segment_overrides_integration_test.rb +28 -0
  341. data/test/integration/workarea/admin/segment_rules_integration_test.rb +49 -0
  342. data/test/integration/workarea/admin/segments_integration_test.rb +31 -0
  343. data/test/integration/workarea/admin/shipping_service_integration_test.rb +1 -3
  344. data/test/integration/workarea/admin/tax_categories_integration_test.rb +1 -1
  345. data/test/integration/workarea/admin/unsubscribes_integration_test.rb +32 -0
  346. data/test/integration/workarea/admin/users_integration_test.rb +32 -0
  347. data/test/javascripts/fixtures/release_reminder.html.haml +3 -3
  348. data/test/javascripts/new_navigation_taxons_spec.js +1 -12
  349. data/test/mailers/workarea/admin/comment_mailer_test.rb +35 -0
  350. data/test/mailers/workarea/admin/status_report_mailer_test.rb +30 -25
  351. data/test/system/workarea/admin/alerts_system_test.rb +2 -1
  352. data/test/system/workarea/admin/bulk_actions_system_test.rb +1 -1
  353. data/test/system/workarea/admin/comments_system_test.rb +43 -0
  354. data/test/system/workarea/admin/content_system_test.rb +6 -0
  355. data/test/system/workarea/admin/dashboard_system_test.rb +8 -9
  356. data/test/system/workarea/admin/data_files_system_test.rb +1 -1
  357. data/test/system/workarea/admin/discounts_system_test.rb +18 -0
  358. data/test/system/workarea/admin/featured_products_system_test.rb +3 -0
  359. data/test/system/workarea/admin/fulfillment_skus_system_test.rb +48 -0
  360. data/test/system/workarea/admin/impersonation_system_test.rb +5 -2
  361. data/test/system/workarea/admin/orders_system_test.rb +32 -21
  362. data/test/system/workarea/admin/payment_transactions_system_test.rb +34 -32
  363. data/test/system/workarea/admin/releases_system_test.rb +151 -37
  364. data/test/system/workarea/admin/reports_system_test.rb +29 -0
  365. data/test/system/workarea/admin/segments_system_test.rb +124 -0
  366. data/test/system/workarea/admin/tax_categories_system_test.rb +166 -16
  367. data/test/system/workarea/admin/users_system_test.rb +15 -0
  368. data/test/view_models/workarea/admin/changeset_view_model_test.rb +59 -9
  369. data/test/view_models/workarea/admin/code_list_view_model_test.rb +0 -5
  370. data/test/view_models/workarea/admin/content_view_model_test.rb +13 -11
  371. data/test/view_models/workarea/admin/insights/product_view_model_test.rb +4 -4
  372. data/test/view_models/workarea/admin/insights/segment_view_model_test.rb +73 -0
  373. data/test/view_models/workarea/admin/product_rules_preview_view_model_test.rb +37 -0
  374. data/test/view_models/workarea/admin/product_view_model_test.rb +13 -19
  375. data/test/view_models/workarea/admin/release_calendar_view_model_test.rb +16 -0
  376. data/test/view_models/workarea/admin/release_view_model_test.rb +13 -56
  377. data/test/view_models/workarea/admin/releases_feed_view_model_test.rb +8 -21
  378. data/test/view_models/workarea/admin/reports/timeline_view_model_test.rb +76 -0
  379. data/test/view_models/workarea/admin/search_analysis_view_model_test.rb +14 -16
  380. data/test/view_models/workarea/admin/timeline_view_model_test.rb +1 -1
  381. metadata +128 -17
  382. data/app/views/workarea/admin/featured_products/_release_preview_warning.html.haml +0 -4
  383. data/app/views/workarea/admin/releases/calendar.html.haml +0 -54
  384. data/test/dummy/tmp/screenshots/.keep +0 -0
  385. data/test/helpers/workarea/admin/content_helper_test.rb +0 -17
  386. data/test/integration/workarea/admin/index_tracking_integration_test.rb +0 -21
  387. data/test/javascripts/fixtures/existing_navigation_taxon.html.haml +0 -10
  388. data/test/view_models/workarea/admin/pricing_sku_view_model_test.rb +0 -84
@@ -11,6 +11,7 @@
11
11
  %li
12
12
  %strong= t('workarea.admin.fields.active')
13
13
  = check_box_tag 'category', 'active', model.active, disabled: true
14
+ = inline_svg('workarea/admin/icons/user.svg', class: 'svg-icon svg-icon--small svg-icon--blue') if model.active? && model.segments.any?
14
15
  %li
15
16
  %strong #{t('workarea.admin.fields.client_id')}:
16
17
  = model.client_id.presence || t('workarea.admin.cards.attributes.no_value')
@@ -38,7 +39,8 @@
38
39
 
39
40
  .grid__cell
40
41
  .card{ class: card_classes(:featured_products, local_assigns[:active]) }
41
- = link_to select_featured_product_path(model.to_global_id), class: 'card__header' do
42
+ - link_path = model.featured_products.any? ? edit_featured_product_path(model.to_global_id) : select_featured_product_path(model.to_global_id)
43
+ = link_to link_path, class: 'card__header' do
42
44
  %span.card__header-text= t('workarea.admin.catalog_categories.cards.featured_products.title')
43
45
  = inline_svg 'workarea/admin/icons/featured_products.svg', class: 'card__icon'
44
46
 
@@ -32,7 +32,7 @@
32
32
  %span.property__name
33
33
  = t('workarea.admin.fields.active')
34
34
  = inline_svg('workarea/admin/i18n.svg', class: 'svg-icon svg-icon--small') if locale_options.many? && Workarea.config.localized_active_fields
35
- = toggle_button_for 'category[active]', @category.active?
35
+ = render 'workarea/admin/shared/active_field', scope: 'category', model: @category
36
36
 
37
37
  .property
38
38
  = label_tag 'category[slug]', nil, class: 'property__name' do
@@ -60,9 +60,6 @@
60
60
  .property
61
61
  = label_tag 'category_default_sort', t('workarea.admin.fields.default_sort'), class: 'property__name'
62
62
  = select_tag 'category[default_sort]', options_for_select(@category.sort_options, selected: @category.default_sort)
63
- - if @category.featured_products?
64
- %span.property__note
65
- = t('workarea.admin.catalog_categories.edit.default_sort_note')
66
63
 
67
64
  .property
68
65
  = label_tag 'category_terms_facets_list', t('workarea.admin.fields.terms_facets_list'), class: 'property__name'
@@ -63,6 +63,7 @@
63
63
  = upcoming_changesets_icon_for(result)
64
64
  = comments_icon_for(result)
65
65
  = top_icon_for(result)
66
+ = segments_icon_for(result)
66
67
  %td
67
68
  - if result.breadcrumbs.blank?
68
69
  %em= t('workarea.admin.fields.no_taxonomy')
@@ -25,7 +25,7 @@
25
25
  .product-images__image-group
26
26
  .product-images__image
27
27
  .product-images__image-summary
28
- .product-images__image-summary-container= image_tag product_image_url(@image, :small), alt: "#{@image.option} #{t('workarea.admin.catalog_product_images.edit.image')}", class: 'product-images__image-summary-image'
28
+ .product-images__image-summary-container= image_tag product_image_url(@image, :small), alt: "#{@image.option} #{t('workarea.admin.catalog_product_images.edit.image')}", id: @image.option.parameterize, class: 'product-images__image-summary-image'
29
29
 
30
30
  .section
31
31
  %h2= t('workarea.admin.catalog_product_images.edit.edit_image')
@@ -14,6 +14,7 @@
14
14
  %li
15
15
  %strong= t('workarea.admin.fields.active')
16
16
  = check_box_tag 'product', 'active', model.active?, disabled: true
17
+ = inline_svg('workarea/admin/icons/user.svg', class: 'svg-icon svg-icon--small svg-icon--blue') if model.active? && model.segments.any?
17
18
  %li
18
19
  %strong= t('workarea.admin.fields.template')
19
20
  = model.template.try(:titleize)
@@ -23,9 +24,6 @@
23
24
  %li
24
25
  %strong= t('workarea.admin.fields.filters')
25
26
  = model.filters.values.flatten.join(', ').presence || t('workarea.admin.cards.attributes.no_value')
26
- %li
27
- %strong= t('workarea.admin.fields.digital')
28
- = model.digital?.to_s.titleize
29
27
  %li
30
28
  %strong= t('workarea.admin.fields.customizations')
31
29
  = model.customizations.try(:titleize).presence || t('workarea.admin.cards.attributes.no_value')
@@ -110,7 +108,7 @@
110
108
  %p.align-center= t('workarea.admin.fields.inventory')
111
109
 
112
110
  %span.heading.heading--3.heading--no-margin.align-center
113
- = model.variant_details.keys.to_sentence
111
+ = model.options.keys.to_sentence
114
112
  %p.align-center= t('workarea.admin.fields.options')
115
113
 
116
114
  = link_to catalog_product_variants_path(model), class: 'card__button' do
@@ -51,7 +51,8 @@
51
51
  = inline_svg('workarea/admin/i18n.svg', class: 'svg-icon svg-icon--small') if locale_options.many? && Workarea.config.localized_active_fields
52
52
  = link_to '#product-active-info', data: { tooltip: '' } do
53
53
  = inline_svg('workarea/admin/icons/help.svg', class: 'svg-icon svg-icon--small svg-icon--blue', title: t('workarea.admin.catalog_products.edit.active_info_title'))
54
- = toggle_button_for 'product[active]', @product.active
54
+
55
+ = render 'workarea/admin/shared/active_field', scope: 'product', model: @product
55
56
  #product-active-info.tooltip-content
56
57
  %p= t('workarea.admin.catalog_products.edit.active_info')
57
58
 
@@ -8,8 +8,9 @@
8
8
  = link_to "↑ #{t('workarea.admin.catalog.dashboard_link')}", catalog_dashboards_path, class: 'view__dashboard-button'
9
9
  %h1= t('workarea.admin.catalog_products.index.heading')
10
10
  .grid__cell.grid__cell--25
11
- .align-right
12
- = link_to t('workarea.admin.catalog_products.index.upload_images'), product_images_direct_uploads_path
11
+ - if s3?
12
+ .align-right
13
+ = link_to t('workarea.admin.catalog_products.index.upload_images'), product_images_direct_uploads_path
13
14
 
14
15
  .view__container
15
16
  .browsing-controls.browsing-controls--with-divider.browsing-controls--center{ class: ('browsing-controls--filters-displayed' unless @search.toggle_facets?) }
@@ -72,6 +73,7 @@
72
73
  = comments_icon_for(result)
73
74
  = top_icon_for(result)
74
75
  = trending_icon_for(result)
76
+ = segments_icon_for(result)
75
77
  %td.align-center= result.id
76
78
  %td= result.template.humanize
77
79
  %td.align-center
@@ -73,6 +73,7 @@
73
73
  %th= t('workarea.admin.fields.sku')
74
74
  %th.align-center= t('workarea.admin.fields.orders')
75
75
  %th.align-center= t('workarea.admin.fields.units_sold')
76
+ %th.align-center= t('workarea.admin.fields.units_canceled')
76
77
  %th.align-right= t('workarea.admin.fields.revenue')
77
78
  %tbody
78
79
  - @product.insights.skus.each do |sku|
@@ -80,6 +81,7 @@
80
81
  %td= sku._id
81
82
  %td.align-center= number_with_delimiter sku.orders
82
83
  %td.align-center= number_with_delimiter sku.units_sold
84
+ %td.align-center= number_with_delimiter sku.units_canceled
83
85
  %td.align-right= number_to_currency sku.revenue
84
86
 
85
87
  - if @product.insights.feed.any?
@@ -34,7 +34,7 @@
34
34
  %span.property__name
35
35
  = t('workarea.admin.fields.active')
36
36
  = inline_svg('workarea/admin/i18n.svg', class: 'svg-icon svg-icon--small') if locale_options.many? && Workarea.config.localized_active_fields
37
- = toggle_button_for 'variant[active]', @variant.active?
37
+ = render 'workarea/admin/shared/active_field', scope: 'variant', model: @variant
38
38
 
39
39
  = append_partials('admin.variant_fields', variant: @variant)
40
40
 
@@ -63,6 +63,11 @@
63
63
  .property
64
64
  = text_field_tag 'new_details[]', nil, id: nil, class: 'text-box text-box--i18n', title: t('workarea.admin.catalog_variants.edit.options.new_attribute_value'), placeholder: t('workarea.admin.catalog_variants.edit.options.new_attribute_value_placeholder')
65
65
  %span.property__note= t('workarea.admin.catalog_variants.edit.options.new_attribute_value_note')
66
+ %span.property__note
67
+ = t('workarea.admin.catalog_variants.edit.options.new_attribute_value_csv')
68
+ = link_to '#csv-help', data: { tooltip: '' } do
69
+ = inline_svg('workarea/admin/icons/help.svg', class: 'svg-icon svg-icon--small svg-icon--blue', title: t('workarea.admin.catalog_variants.edit.options.learn_more'))
70
+ = render 'workarea/admin/shared/csv_formatting_tooltip'
66
71
  %td.align-center -
67
72
 
68
73
  .workflow-bar
@@ -31,6 +31,7 @@
31
31
  %th= t('workarea.admin.fields.sku')
32
32
  %th= t('workarea.admin.fields.display_name')
33
33
  %th= t('workarea.admin.fields.options')
34
+ %th= t('workarea.admin.fields.fulfillment')
34
35
  %th.align-center= t('workarea.admin.fields.inventory')
35
36
  %th.align-right= t('workarea.admin.fields.pricing')
36
37
  %th
@@ -41,6 +42,7 @@
41
42
  %td= link_to variant.sku, edit_catalog_product_variant_path(@product, variant)
42
43
  %td= variant.name
43
44
  %td= format_variant_options(variant.details)
45
+ %td= link_to variant.fulfillment_policy, fulfillment_sku_path(variant.sku)
44
46
  %td.align-center
45
47
  = link_to inventory_sku_path(variant.sku) do
46
48
  = variant.available_inventory
@@ -55,6 +55,11 @@
55
55
  .property
56
56
  = text_field_tag 'new_details[]', nil, id: nil, class: 'text-box text-box--i18n', title: t('workarea.admin.catalog_variants.new.options.new_attribute_value'), placeholder: t('workarea.admin.catalog_variants.new.options.new_attribute_value_placeholder')
57
57
  %span.property__note= t('workarea.admin.catalog_variants.new.options.new_attribute_value_note')
58
+ %span.property__note
59
+ = t('workarea.admin.catalog_variants.new.options.new_attribute_value_csv')
60
+ = link_to '#csv-help', data: { tooltip: '' } do
61
+ = inline_svg('workarea/admin/icons/help.svg', class: 'svg-icon svg-icon--small svg-icon--blue', title: t('workarea.admin.catalog_variants.new.options.learn_more'))
62
+ = render 'workarea/admin/shared/csv_formatting_tooltip'
58
63
  %td.align-center -
59
64
 
60
65
  .workflow-bar
@@ -0,0 +1,4 @@
1
+ %p.release-changeset__content
2
+ %span.release-changeset__field= t('workarea.admin.fields.active_segments')
3
+ %span.release-changeset__old!= segment_links(old_value).join(', ')
4
+ %span.release-changeset__new!= segment_links(new_value).join(', ')
@@ -1,36 +1,44 @@
1
1
  %tr
2
2
  %td
3
- %h1
4
- = @comment.author_name
5
- = t('workarea.admin.comment_mailer.notify.posted_a_comment_about')
6
- = @commentable.name
3
+ %h1= t('workarea.admin.comment_mailer.notify.title', site: Workarea.config.site_name)
4
+ %p
5
+ - if @comment.author.present?
6
+ %strong= @comment.author_name
7
+ = t('workarea.admin.comment_mailer.notify.posted_a_comment_about')
8
+ - else
9
+ = t('workarea.admin.comment_mailer.notify.new_comment_about')
10
+ = link_to @commentable.name, url_for(@commentable)
7
11
 
8
- %p
9
- = @comment.body
10
- %br
12
+ .comment
13
+ = @comment.body
14
+ %span.comment__author-info
11
15
  - if @comment.author.present?
12
16
  = t('workarea.admin.comment_mailer.notify.by')
13
17
  = link_to @comment.author_name, edit_user_url(@comment.author)
14
- %p
18
+ |
15
19
  = t('workarea.admin.comment_mailer.notify.posted_at')
16
20
  = @comment.created_at.to_s(:long)
17
- = link_to t('workarea.admin.comment_mailer.notify.reply_to_this_comment'), commentable_comments_url(@commentable.to_global_id)
18
21
 
19
- - if @comments.any?
20
- %h2= t('workarea.admin.comment_mailer.notify.discussion_history')
22
+ .align-center.section
23
+ = link_to t('workarea.admin.comment_mailer.notify.reply_to_this_comment'), commentable_comments_url(@commentable.to_global_id), class: 'button'
21
24
 
22
- - @comments.each_with_index do |comment, i|
23
- %p
24
- = comment.body
25
- %br
25
+ - if @comments.any?
26
+ %h2= t('workarea.admin.comment_mailer.notify.discussion_history')
27
+
28
+ - @comments.each_with_index do |comment, i|
29
+ .comment
30
+ = comment.body
31
+ %span.comment__author-info
26
32
  - if comment.author.present?
27
33
  = t('workarea.admin.comment_mailer.notify.by')
28
34
  = link_to comment.author_name, edit_user_url(comment.author)
29
- %p
35
+ |
30
36
  = t('workarea.admin.comment_mailer.notify.posted_at')
31
37
  = comment.created_at.to_s(:long)
32
38
 
33
- - if @comments.length > 5
34
- %p= link_to t('workarea.admin.comment_mailer.notify.post_a_comment'), commentable_comments_url(@commentable.to_global_id)
39
+ - if @comments.length > 5
40
+ .align-center.section
41
+ = link_to t('workarea.admin.comment_mailer.notify.post_a_comment'), commentable_comments_url(@commentable.to_global_id), class: 'button'
35
42
 
36
- %p= link_to t('workarea.admin.comment_mailer.notify.unsubscribe_from_notifications', commentable_name: @commentable.name), commentable_unsubscribe_url(@commentable.to_global_id)
43
+ %p.align-center
44
+ = link_to t('workarea.admin.comment_mailer.notify.unsubscribe_from_notifications', commentable_name: @commentable.name), commentable_unsubscribe_url(@user.token, commentable_id: @commentable.to_global_id)
@@ -19,10 +19,11 @@
19
19
  - @comments.each do |comment|
20
20
  %li.comments__comment
21
21
  .comments__comment-header
22
- .comments__comment-avatar
23
- = link_to user_path(comment.author) do
24
- = avatar_for comment.author, additional_css_class: 'avatar'
25
- %h3.comments__comment-author= link_to comment.author_name, user_path(comment.author)
22
+ - if comment.author.present?
23
+ .comments__comment-avatar
24
+ = link_to user_path(comment.author) do
25
+ = avatar_for comment.author, additional_css_class: 'avatar'
26
+ %h3.comments__comment-author= link_to comment.author_name, user_path(comment.author)
26
27
  %p.comments__comment-time #{time_ago_in_words(comment.created_at)} ago
27
28
  .comments__comment-actions
28
29
  - if comment.author == current_user
@@ -40,24 +41,29 @@
40
41
  .comments__comment-body
41
42
  %p= comment.body
42
43
 
44
+ .section
45
+ - if @commentable.subscribed_user_ids.include?(current_user.id.to_s)
46
+ = form_tag unsubscribe_commentable_comments_path(@commentable.to_global_id), method: :put, id: 'comment_unsubscribe_form' do
47
+ = button_tag t('workarea.admin.comments.index.unsubscribe'), value: 'comments_unsubscribe', class: 'button button--small'
48
+ %span= t('workarea.admin.comments.index.subscribe_message')
49
+ - else
50
+ = form_tag subscribe_commentable_comments_path(@commentable.to_global_id), method: :put, id: 'comment_unsubscribe_form' do
51
+ = button_tag t('workarea.admin.comments.index.subscribe'), value: 'comments_subscribe', class: 'button button--small'
52
+ %span= t('workarea.admin.comments.index.unsubscribe_message')
53
+
54
+
43
55
  .section
44
56
  .comments__new-comment
45
57
  %h2= t('workarea.admin.comments.index.new')
46
-
47
58
  - if @comment.errors.present?
48
59
  - @comment.errors.full_messages.each do |message|
49
60
  = render_message 'error', message
50
61
 
51
62
  = form_tag commentable_comments_path(@commentable.to_global_id), method: 'post', id: 'comment_form', data: { unsaved_changes: '' } do
52
-
53
63
  .property.property--required
54
64
  = label_tag 'comment[body]', t('workarea.admin.fields.body'), class: 'property__name'
55
- = text_area_tag 'comment[body]', @comment.body, class: 'text-box text-box--multi-line', required: true
56
-
57
- .property
58
- = label_tag 'subscribed_user_ids', t('workarea.admin.fields.subscribed_user_ids'), class: 'property__name'
59
- = select_tag 'subscribed_user_ids', nil, multiple: true, data: { remote_select: { source: users_path(exclude_current_user: true, format: :json) } }
60
- %span.property__note= t('workarea.admin.comments.index.email_authentication')
65
+ = text_area_tag 'comment[body]', @comment.body, class: 'text-box text-box--multi-line', required: true, data: { tribute_area: users_path(exclude_current_user: true, format: :json) }
66
+ %span.property__note= t('workarea.admin.comments.index.mention_note')
61
67
 
62
68
  .workflow-bar
63
69
  .grid.grid--auto.grid--right.grid--middle
@@ -0,0 +1,2 @@
1
+ #overridden-field.tooltip-content
2
+ %p= t('workarea.admin.configurations.show.field_overridden_message')
@@ -0,0 +1,49 @@
1
+ - @page_title = t('workarea.admin.configurations.show.title')
2
+
3
+ .view
4
+ .view__header
5
+ .grid.grid--middle.grid--center
6
+ .grid__cell.grid__cell--50
7
+ .view__heading
8
+ = link_to "↑ #{t('workarea.admin.configurations.show.dashboard_link')}", settings_dashboards_path, class: 'view__dashboard-button'
9
+ %h1.heading--no-margin= t('workarea.admin.configurations.show.title')
10
+ %p= t('workarea.admin.configurations.show.description')
11
+
12
+
13
+ .view__container.view__container--narrow{ data: { jump_to_menu: '' } }
14
+ = form_tag configuration_path, method: :patch do
15
+ - @configuration.definition.fieldsets.each do |fieldset|
16
+ - next if fieldset.fields.none?
17
+
18
+ .box.box--rounded
19
+ - unless fieldset.id == :application
20
+ .box__head
21
+ %h2.box__heading{ data: { jump_to_menu_heading: 1 }, id: fieldset.name.systemize }= fieldset.name
22
+ .box__body.box__body--pad-top
23
+ - fieldset.fields.each do |field|
24
+ .box__section
25
+ .grid.grid--huge
26
+ .grid__cell.grid__cell--50
27
+ %strong
28
+ - if field.overridden?
29
+ = link_to '#overridden-field', data: { tooltip: '' } do
30
+ = inline_svg('workarea/admin/icons/alert.svg', class: 'svg-icon svg-icon--small svg-icon--red', title: t('workarea.admin.configurations.show.field_overridden'))
31
+ = field.name
32
+ - if field.description.present?
33
+ %br
34
+ = field.description
35
+ .grid__cell.grid__cell--50
36
+ - if field.values.present?
37
+ = render 'workarea/admin/configurations/types/select', field: field, value: @configuration.send(field.key)
38
+ - elsif field.encrypted?
39
+ = render 'workarea/admin/configurations/types/encrypted', field: field, value: @configuration.send(field.key)
40
+ - else
41
+ = render "workarea/admin/configurations/types/#{field.type}", field: field, value: @configuration.send(field.key)
42
+
43
+
44
+ .workflow-bar
45
+ .grid.grid--auto.grid--right.grid--middle
46
+ .grid__cell= button_tag t('workarea.admin.configurations.show.save'), value: 'save_configuration', class: 'workflow-bar__button workflow-bar__button--update'
47
+
48
+ = render 'workarea/admin/shared/csv_formatting_tooltip'
49
+ = render 'workarea/admin/configurations/overridden'
@@ -0,0 +1,3 @@
1
+ = text_field_tag "configuration[#{field.key}]", value.join(','), class: 'text-box text-box--wide', required: !field.allow_blank?
2
+ = link_to '#csv-help', data: { tooltip: '' } do
3
+ = inline_svg('workarea/admin/icons/help.svg', class: 'svg-icon svg-icon--small svg-icon--blue', title: t('workarea.admin.catalog_products.edit.filters.learn_more'))
@@ -0,0 +1 @@
1
+ = toggle_button_for("configuration[#{field.key}]", value)
@@ -0,0 +1,2 @@
1
+ = number_field_tag "configuration[#{field.key}][]", value.parts.values.first, id: nil, class: 'text-box text-box--small', step: 1, required: !field.allow_blank?
2
+ = select_tag "configuration[#{field.key}][]", options_for_select(duration_field_options, value.parts.keys.first.to_s), id: nil
@@ -0,0 +1 @@
1
+ .property= password_field_tag "configuration[#{field.key}]", value, class: 'text-box', required: !field.allow_blank?
@@ -0,0 +1 @@
1
+ = text_field_tag "configuration[#{field.key}]", value, class: 'text-box', step: 0.01, required: !field.allow_blank?
@@ -0,0 +1,17 @@
1
+ - field_name = "configuration[#{field.key}]"
2
+
3
+ %table
4
+ %tbody
5
+ - value.each do |name, value|
6
+ %tr
7
+ %td= name
8
+ %td
9
+ = hidden_field_tag "#{field_name}[]", name, id: nil
10
+ = text_field_tag "#{field_name}[]", hash_editing_value(value), id: nil, class: 'text-box text-box--i18n', placeholder: value
11
+ %tr{ data: { cloneable_row: '' } }
12
+ %td
13
+ .property
14
+ = text_field_tag "#{field_name}[]", nil, id: nil, class: 'text-box text-box--i18n', title: "New #{field.name} Name", placeholder: "Name"
15
+ %td
16
+ .property
17
+ = text_field_tag "#{field_name}[]", nil, id: nil, class: 'text-box text-box--i18n', title: "New #{field.name} Value", placeholder: "Value"
@@ -0,0 +1 @@
1
+ = number_field_tag "configuration[#{field.key}]", value, class: 'text-box text-box--small', step: 1, required: !field.allow_blank?
@@ -0,0 +1 @@
1
+ = select_tag "configuration[#{field.key}]", options_for_select(field.values, value), include_blank: field.allow_blank?
@@ -0,0 +1 @@
1
+ = text_field_tag "configuration[#{field.key}]", value, class: 'text-box', required: !field.allow_blank?
@@ -0,0 +1 @@
1
+ = text_field_tag "configuration[#{field.key}]", value, class: 'text-box', required: !field.allow_blank?
@@ -7,7 +7,7 @@
7
7
  .grid.grid--middle
8
8
  .grid__cell.grid__cell--50
9
9
  - if content.show_areas?
10
- %span #{t('workarea.admin.content.edit.current_area')}:
10
+ %span= content.name
11
11
  = inline_svg('workarea/admin/icons/navigate_next.svg', class: 'svg-icon svg-icon--small svg-icon--white')
12
12
  = form_tag request.path, method: 'get', class: 'content-editor__area-select-form' do
13
13
  = select_tag 'area_id', options_for_select(content.area_options, content.current_area), data: { form_submitting_control: '' }
@@ -41,6 +41,7 @@
41
41
  = link_to inline_svg('workarea/admin/icons/add_circle.svg', class: 'content-block__add-icon svg-icon svg-icon--extra-large svg-icon--green', title: t('workarea.admin.content.edit.add_block_above')), content_area_blocks_path(content, content.current_area, position: block.position, return_to: params.to_h), class: 'content-block__add-button content-block__add-button--top', data: { add_content_block_button: '' }
42
42
  .content-block__iframe-placeholder
43
43
  = link_to inline_svg('workarea/admin/icons/add_circle.svg', class: 'content-block__add-icon svg-icon svg-icon--extra-large svg-icon--green', title: t('workarea.admin.content.edit.add_block_below')), content_area_blocks_path(content, content.current_area, position: block.position + 1, return_to: params.to_h), class: 'content-block__add-button content-block__add-button--bottom', data: { add_content_block_button: '' }
44
+
44
45
  .content-block__floating-actions
45
46
  - unless block.new_record?
46
47
  .content-block__action
@@ -73,3 +74,9 @@
73
74
  = inline_svg("workarea/admin/icons/grip.svg", title: t('workarea.admin.actions.drag'), class: 'content-block-list__icon content-block-list__icon--move')
74
75
  = content_block_icon(block.icon, title: block.name, class: 'content-block-list__icon')
75
76
  %span.content-block-list__name= block.name
77
+
78
+ - if block.segments.any?
79
+ = link_to "##{dom_id(block, :segments_tooltip)}", data: { tooltip: { interactive: true } }, class: 'content-block-list__segments' do
80
+ = inline_svg('workarea/admin/icons/user.svg', class: 'svg-icon svg-icon--small svg-icon--blue')
81
+ .tooltip-content{ id: dom_id(block, :segments_tooltip) }
82
+ %span= t('workarea.admin.content.edit.active_for_html', segments: block.segments.map(&:name).to_sentence)
@@ -27,14 +27,20 @@
27
27
 
28
28
  .tabs__panel
29
29
  %h2.tabs__heading= t('workarea.admin.content.form.display')
30
- %span.heading.heading--4= t('workarea.admin.content.form.hide_for')
31
-
32
- - Workarea.config.storefront_break_points.each_key do |breakpoint|
30
+ .section
31
+ %span.heading.heading--4= t('workarea.admin.content.form.segments')
33
32
  .property
34
- = hidden_field_tag 'block[hidden_breakpoints][]', '', id: nil
35
- = check_box_tag 'block[hidden_breakpoints][]', breakpoint.to_s, block.hidden_breakpoints.include?(breakpoint.to_s), id: dom_id(block, "hidden_breakpoint_#{breakpoint.to_s}")
36
- = label_tag dom_id(block, "hidden_breakpoint_#{breakpoint.to_s}"), nil, class: 'property__name' do
37
- #{breakpoint.to_s.titleize} #{t('workarea.admin.content.form.devices')}
33
+ = label_tag 'block_active_segment_ids', t('workarea.admin.content.form.exclusive_segments'), class: 'property__name'
34
+ = select_tag 'block[active_segment_ids]', options_from_collection_for_select(segments, :id, :name, block.active_segment_ids), multiple: true, data: { select: { placeholder: t('workarea.admin.shared.active_field.select_segments'), allowClear: true } }, id: nil
35
+
36
+ .section
37
+ %span.heading.heading--4= t('workarea.admin.content.form.hide_for')
38
+ - Workarea.config.storefront_break_points.each_key do |breakpoint|
39
+ .property
40
+ = hidden_field_tag 'block[hidden_breakpoints][]', '', id: nil
41
+ = check_box_tag 'block[hidden_breakpoints][]', breakpoint.to_s, block.hidden_breakpoints.include?(breakpoint.to_s), id: dom_id(block, "hidden_breakpoint_#{breakpoint.to_s}")
42
+ = label_tag dom_id(block, "hidden_breakpoint_#{breakpoint.to_s}"), nil, class: 'property__name' do
43
+ #{breakpoint.to_s.titleize} #{t('workarea.admin.content.form.devices')}
38
44
 
39
45
  .content-editor__form-actions
40
46
  .grid.grid--auto.grid--center.grid--middle
@@ -20,26 +20,34 @@
20
20
 
21
21
  .property
22
22
  %span.property__name= t('workarea.admin.fields.automate_metadata')
23
- = toggle_button_for 'content[automate_metadata]', @content.automate_metadata?, title_true: t('workarea.admin.content.advanced.automate'), title_false: t('workarea.admin.content.advanced.do_not_automate') do
23
+ = toggle_button_for 'content[automate_metadata]', @content.automate_metadata?, title_true: t('workarea.admin.content.advanced.automate'), title_false: t('workarea.admin.content.advanced.do_not_automate'), data: { toggle_button: '' } do
24
24
  = link_to '#automation-help', data: { tooltip: '' } do
25
25
  = inline_svg('workarea/admin/icons/help.svg', class: 'svg-icon svg-icon--small svg-icon--blue', title: t('workarea.admin.content.advanced.learn_more'))
26
- %span#automation-help.tooltip-content= t('workarea.admin.content.advanced.automation_help_content')
26
+ %span#automation-help.tooltip-content= t('workarea.admin.content.advanced.automation_help_content')
27
27
 
28
- .property
29
- = label_tag 'content_browser_title', t('workarea.admin.fields.browser_title'), class: 'property__name'
30
- = text_field_tag 'content[browser_title]', @content.browser_title, class: 'text-box text-box--i18n', placeholder: t('workarea.admin.content.advanced.browser_title_placeholder')
31
- %span.property__note= t('workarea.admin.content.advanced.browser_title_note')
28
+ .toggle-button__more.toggle-button__more--below{ data: { toggle_button_positive_element: '' } }
29
+ %span.toggle-button__note= t('workarea.admin.content.advanced.automation_note_content')
30
+ .toggle-button__more.toggle-button__more--below{ data: { toggle_button_negative_element: '' } }
31
+ .property
32
+ = label_tag 'content_browser_title', t('workarea.admin.fields.browser_title'), class: 'property__name'
33
+ = text_field_tag 'content[browser_title]', @content.browser_title, class: 'text-box text-box--i18n', placeholder: t('workarea.admin.content.advanced.browser_title_placeholder')
34
+ %span.property__note= t('workarea.admin.content.advanced.browser_title_note')
32
35
 
33
- .property
34
- = label_tag 'content_meta_description', t('workarea.admin.fields.meta_description'), class: 'property__name'
35
- = text_field_tag 'content[meta_description]', @content.meta_description, class: 'text-box text-box--i18n'
36
- %span.property__note= t('workarea.admin.content.advanced.metadata_description_note')
36
+ .property
37
+ = label_tag 'content_meta_description', t('workarea.admin.fields.meta_description'), class: 'property__name'
38
+ = text_field_tag 'content[meta_description]', @content.meta_description, class: 'text-box text-box--i18n'
39
+ %span.property__note= t('workarea.admin.content.advanced.metadata_description_note')
37
40
 
38
41
  .property
39
42
  = label_tag 'content_css', t('workarea.admin.fields.css'), class: 'property__name'
40
43
  = text_area_tag 'content[css]', @content.css, class: 'text-box text-box--code text-box--multi-line'
41
44
  %span.property__note= t('workarea.admin.content.advanced.css_note')
42
45
 
46
+ .property
47
+ = label_tag 'content_head_content', t('workarea.admin.fields.head_content'), class: 'property__name'
48
+ = text_area_tag 'content[head_content]', @content.head_content, class: 'text-box text-box--code text-box--multi-line'
49
+ %span.property__note= t('workarea.admin.content.advanced.head_content_note')
50
+
43
51
  .property
44
52
  = label_tag 'content_javascript', t('workarea.admin.fields.javascript'), class: 'property__name'
45
53
  = text_area_tag 'content[javascript]', @content.javascript, class: 'text-box text-box--code text-box--multi-line'
@@ -11,6 +11,9 @@
11
11
  %li
12
12
  %strong= t('workarea.admin.fields.file_name')
13
13
  = link_to model.file_name, model.url, target: '_blank', rel: 'noopener'
14
+ %li
15
+ %strong= t('workarea.admin.fields.alt_text')
16
+ = model.alt_text
14
17
  %li
15
18
  %strong= t('workarea.admin.fields.type')
16
19
  = model.type.titleize
@@ -1,7 +1,7 @@
1
1
  = link_to content_asset_path(model), class: 'summary', data: { asset: { id: model.id.to_s, name: model.name, url: model.url } } do
2
2
  .summary__image-container
3
3
  - if model.image?
4
- = image_tag model.file.process(:medium).url, alt: model.name, class: 'summary__image'
4
+ = image_tag model.file.process(:medium).url, alt: model.name, class: 'summary__image', title: model.alt_text
5
5
  %span.summary__name= model.name
6
6
  .summary__info-container
7
7
  .summary__info= local_time_ago(model.updated_at)
@@ -33,6 +33,12 @@
33
33
  .property
34
34
  = label_tag 'asset[file]', t('workarea.admin.fields.file'), class: 'property__name'
35
35
  = file_field_tag 'asset[file]'
36
+
37
+ .property
38
+ = label_tag 'asset[alt_text]', t('workarea.admin.fields.alt_text'), class: 'property__name'
39
+ = text_field_tag 'asset[alt_text]', @asset.alt_text, class: 'text-box'
40
+ %span.property__note= t('workarea.admin.content_assets.edit.alt_text_note')
41
+
36
42
  .property
37
43
  = label_tag 'asset_type', t('workarea.admin.content_assets.edit.type_label'), class: 'property__name'
38
44
  = @asset.type.titleize
@@ -10,8 +10,7 @@
10
10
  %p= t('workarea.admin.content_assets.index.description')
11
11
 
12
12
  .view__container
13
-
14
- - if Workarea::Configuration::S3.configured?
13
+ - if s3?
15
14
  .direct-upload{ data: { direct_upload: { type: 'asset' }.to_json, unsaved_changes: '' } }
16
15
  .direct-upload__content
17
16
  .direct-upload__heading= t('workarea.admin.direct_uploads.drop_files_here')
@@ -55,6 +54,7 @@
55
54
  = label_tag 'select_all', t('workarea.admin.bulk_actions.select_all'), class: 'checkbox__label'
56
55
  %th= t('workarea.admin.fields.image')
57
56
  %th= t('workarea.admin.fields.name')
57
+ %th= t('workarea.admin.fields.alt_text')
58
58
  %th= t('workarea.admin.fields.file_name')
59
59
  %th= t('workarea.admin.fields.type')
60
60
  %th.align-center= t('workarea.admin.fields.dimensions')
@@ -77,6 +77,11 @@
77
77
  = upcoming_changesets_icon_for(result)
78
78
  = comments_icon_for(result)
79
79
  = favicon_icon_for(result)
80
+ %td
81
+ - if result.image? && result.alt_text.present?
82
+ %span{ title: result.alt_text }= result.alt_text.truncate(30)
83
+ - else
84
+ \-
80
85
  %td= result.file_name
81
86
  %td= result.type
82
87
  %td.align-center
@@ -22,9 +22,16 @@
22
22
  = label_tag 'asset_name', t('workarea.admin.fields.name'), class: 'property__name'
23
23
  = text_field_tag 'asset[name]', @asset.name, class: 'text-box'
24
24
 
25
- .property
26
- = label_tag 'asset[file]', t('workarea.admin.fields.file'), class: 'property__name'
27
- = file_field_tag 'asset[file]', required: true
25
+ .grid
26
+ .grid__cell.grid__cell--50-at-medium
27
+ .property
28
+ = label_tag 'asset[file]', t('workarea.admin.fields.file'), class: 'property__name'
29
+ = file_field_tag 'asset[file]', required: true
30
+ .grid__cell.grid__cell--50-at-medium
31
+ .property
32
+ = label_tag 'asset[alt_text]', t('workarea.admin.fields.alt_text'), class: 'property__name'
33
+ = text_field_tag 'asset[alt_text]', @asset.alt_text, class: 'text-box'
34
+ %span.property__note= t('workarea.admin.content_assets.new.alt_text_note')
28
35
 
29
36
  .property
30
37
  = label_tag 'asset_tag_list', t('workarea.admin.fields.tags'), class: 'property__name'