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
@@ -1,98 +1,89 @@
1
- - @page_title = t('workarea.admin.releases.index.page_title')
1
+ - @page_title = t('workarea.admin.releases.calendar.title')
2
2
 
3
3
  .view
4
4
  .view__header
5
- .grid.grid--center
5
+ .grid.grid--middle.grid--right
6
6
  .grid__cell.grid__cell--50
7
7
  .view__heading
8
8
  = link_to "↑ #{t('workarea.admin.releases.index.dashboard_link')}", root_path
9
- %h1.heading--no-margin= t('workarea.admin.releases.index.title')
9
+ %h1.heading.heading--no-margin= t('workarea.admin.releases.calendar.title')
10
+ %p
11
+ - if @calendar.unscheduled.any?
12
+ = t('workarea.admin.releases.index.there_are_unscheduled', count: @calendar.unscheduled.count)
13
+ = link_to t('workarea.admin.releases.index.view_all'), list_releases_path
14
+
15
+ .grid__cell.grid__cell--25
16
+ .grid.grid--auto.grid--right.grid--middle
17
+ .grid__cell= link_to t('workarea.admin.releases.index.view_all_releases'), list_releases_path
10
18
 
11
19
  .view__container
12
- .browsing-controls.browsing-controls--with-divider.browsing-controls--center{ class: ('browsing-controls--filters-displayed' unless @search.toggle_facets?) }
13
- = form_tag releases_path, method: 'get', id: 'release_search_form', class: 'browsing-controls__form' do
14
- = facet_hidden_inputs(@search.facets)
15
- .browsing-controls__sort
16
- .property.property--inline
17
- = label_tag 'sort', t('workarea.admin.search.sort_by'), class: 'property__name'
18
- = select_tag :sort, options_for_select(@search.sorts, selected: @search.sort), data: { form_submitting_control: '' }
19
-
20
- .browsing-controls__search
21
- .search-form
22
- = text_field_tag :q, params[:q], class: 'search-form__input', id: 'search_releases', title: t('workarea.admin.search.keywords'), placeholder: t('workarea.admin.search.keywords')
23
- = submit_tag 'search_releases', class: 'search-form__button'
24
-
25
- = render 'workarea/admin/shared/creation_date', search: @search, form_path: releases_path
26
-
27
- - if @search.facets.present?
28
- - @search.facets.each do |facet|
29
- = render "workarea/admin/facets/#{facet.type}", facet: facet
30
-
31
- - if @search.toggle_facets?
32
- .browsing-controls__toggle-filters
33
- %button.text-button{ type: 'button', data: { toggle_filters: '' } }= t('workarea.admin.search.show_filters')
34
-
35
- = render 'workarea/admin/facets/applied', search: @search, reset_path: releases_path
36
-
37
- %p.browsing-controls__count= pluralize(@search.total, 'release')
38
-
39
- - if @search.results.any?
40
- %table.index-table
41
- %thead
42
- %tr
43
- %th= t('workarea.admin.fields.name')
44
- %th.align-center= t('workarea.admin.fields.publishes')
45
- %th.align-center= t('workarea.admin.fields.undo_at')
46
- %th= t('workarea.admin.fields.last_published')
47
- %th= t('workarea.admin.fields.updated_at')
48
- %tbody
49
- - @search.results.each do |result|
50
- %tr.index-table__row{ class: ('index-table__row--inactive' unless result.upcoming?) }
51
- %td
52
- = link_to result.name, result
53
- = comments_icon_for(result)
54
- %td.align-center
55
- - if result.publish_at.present?
56
- #{local_time_ago(result.publish_at)}
57
- - else
58
- = t('workarea.admin.releases.index.unscheduled')
59
- %td.align-center
60
- - if result.undo_at.present?
61
- #{local_time_ago(result.undo_at)}
62
- - else
63
- = t('workarea.admin.releases.index.unscheduled')
64
- %td
65
- - if result.published_at.present?
66
- = local_time_ago(result.published_at)
67
- - else
68
- = t('workarea.admin.releases.index.never')
69
- %td= local_time_ago(result.updated_at)
70
-
71
- - if @search.results.total_pages > 1
72
- = render 'workarea/admin/shared/pagination', collection: @search.results
73
-
74
- .workflow-bar
75
- .grid.grid--auto.grid--right
76
- - calendar_feed_url = calendar_feed_releases_url(token: current_user.token, protocol: 'webcal')
77
- .grid__cell= button_tag t('workarea.admin.releases.index.add_to_calendar.link_text'), class: 'workflow-bar__button', data: { add_to_calendar_button: { initial: '#calendar-tooltip', moreInfo: '#google-calendar-info' }.as_json }
78
- .grid__cell= link_to t('workarea.admin.releases.index.add_new_release'), create_releases_path, id: 'add_release', class: 'workflow-bar__button workflow-bar__button--create'
79
- #calendar-tooltip.tooltip-content.tooltip-content--no-padding
80
- .add-to-calendar
81
- %ul.add-to-calendar__list
82
- %li.add-to-calendar__item
83
- = link_to calendar_feed_url, class: 'grid grid--auto grid--middle grid--large', data: { add_to_calendar_button_toggle: '' } do
84
- %span.grid__cell= image_tag 'workarea/admin/icons/google_calendar.svg', size: '24x24'
85
- %span.grid__cell
86
- %span.add-to-calendar__link= t('workarea.admin.releases.index.add_to_calendar.tooltip.google_calendar')
87
- %li.add-to-calendar__item
88
- = link_to calendar_feed_url, class: 'grid grid--auto grid--middle grid--large' do
89
- %span.grid__cell= image_tag 'workarea/admin/icons/apple_calendar.svg', size: '24x24'
90
- %span.grid__cell
91
- %span.add-to-calendar__link= t('workarea.admin.releases.index.add_to_calendar.tooltip.apple_calendar')
92
- %li.add-to-calendar__item
93
- = link_to calendar_feed_url, class: 'grid grid--auto grid--middle grid--large' do
94
- %span.grid__cell= image_tag 'workarea/admin/icons/outlook.svg', size: '24x24'
95
- %span.grid__cell
96
- %span.add-to-calendar__link= t('workarea.admin.releases.index.add_to_calendar.tooltip.outlook')
97
- .hidden
98
- #google-calendar-info= t('workarea.admin.releases.index.add_to_calendar.tooltip.google_calendar_instructions_html', calendar_feed_url: calendar_feed_url)
20
+ .section
21
+ .calendar
22
+
23
+ = link_to inline_svg('workarea/admin/icons/arrow_up.svg', title: t('workarea.admin.releases.calendar.previous_week'), class: 'calendar__control-icon'), releases_path(start_date: @calendar.prev_week), class: 'calendar__control calendar__control--prev'
24
+
25
+ .calendar__today-button
26
+ = button_tag t('workarea.admin.releases.calendar.today'), type: 'button', class: 'button button--small', data: { calendar_today_button: '' }
27
+
28
+ %table.calendar__table
29
+ %thead
30
+ %tr
31
+ - @calendar.weekdays.each do |weekday|
32
+ %th.calendar__weekday
33
+ %span.calendar__weekday-name= weekday
34
+
35
+ %tbody
36
+ - @calendar.days.each_slice(7).with_index do |week, i|
37
+ %tr
38
+ - week.each do |day|
39
+ %td.calendar__header= month_name_needed?(day.first, @calendar.days) ? month_and_year_from_date(day.first.to_date) : ' '.html_safe
40
+ %tr
41
+ - week.each do |day, releases|
42
+ %td{ class: calendar_day_classes(day) }
43
+ .calendar__day-header
44
+ .calendar__day-header-cell
45
+ .calendar__day-number= calendar_day_number(day)
46
+
47
+ .calendar__day-header-cell
48
+ - if current_user.can_publish_now?
49
+ - if Date.parse(day).today?
50
+ = link_to create_releases_path(release: { publish_at: Time.current.end_of_day - 4.minutes }), class: 'calendar__new-release' do
51
+ %span.calendar__new-release-text= t('workarea.admin.releases.calendar.add_new_release')
52
+ = inline_svg('workarea/admin/icons/add.svg', title: t('workarea.admin.releases.calendar.add_new_release'), class: 'calendar__new-release-icon')
53
+
54
+ - elsif Time.zone.parse(day).future?
55
+ = link_to create_releases_path(release: { publish_at: Time.parse(day) }), class: 'calendar__new-release' do
56
+ %span.calendar__new-release-text= t('workarea.admin.releases.calendar.add_new_release')
57
+ = inline_svg('workarea/admin/icons/add.svg', title: t('workarea.admin.releases.calendar.add_new_release'), class: 'calendar__new-release-icon')
58
+
59
+ - if releases.size > 5
60
+ - releases.take(4).each do |release|
61
+ = link_to release_path(release), class: 'calendar__release', title: release.name, data: { calendar_release_id: release.id } do
62
+ %span.calendar__release-text
63
+ %span.calendar__release-time= local_time(release.calendar_at, '%l:%M%P')
64
+ %span.calendar__release-name= release.name
65
+
66
+ = link_to "#more-releases-#{day.to_s}", data: { tooltip: { interactive: true }.to_json }, class: 'calendar__release' do
67
+ %span.calendar__release-text
68
+ %strong= t('workarea.admin.releases.calendar.plus_more_releases', count: releases.size - 4)
69
+
70
+ .tooltip-content{ id: "more-releases-#{day.to_s}" }
71
+ %div{ class: calendar_day_classes(day) }
72
+ .calendar__day-header
73
+ %span.calendar__day-number= calendar_day_number(day)
74
+
75
+ - releases.each do |release|
76
+ = link_to release_path(release), class: 'calendar__release', title: release.name, data: { calendar_release_id: release.id } do
77
+ %span.calendar__release-text
78
+ %span.calendar__release-time= local_time(release.calendar_at, '%l:%M%P')
79
+ %span.calendar__release-name= release.name
80
+
81
+ - else
82
+ - releases.each do |release|
83
+ = link_to release_path(release), class: 'calendar__release', title: release.name, data: { calendar_release_id: release.id } do
84
+ %span.calendar__release-text
85
+ %span.calendar__release-time= local_time(release.calendar_at, '%l:%M%P')
86
+ %span.calendar__release-name= release.name
87
+
88
+
89
+ = link_to inline_svg('workarea/admin/icons/arrow_down.svg', title: t('workarea.admin.releases.calendar.next_week'), class: 'calendar__control-icon'), releases_path(start_date: @calendar.next_week), class: 'calendar__control calendar__control--next'
@@ -0,0 +1,107 @@
1
+ - @page_title = t('workarea.admin.releases.index.page_title')
2
+
3
+ .view
4
+ .view__header
5
+ .grid.grid--center
6
+ .grid__cell.grid__cell--50
7
+ .view__heading
8
+ = link_to "↑ #{t('workarea.admin.releases.index.index_link')}", releases_path
9
+ %h1.heading--no-margin= t('workarea.admin.releases.index.title')
10
+
11
+ .view__container
12
+ .browsing-controls.browsing-controls--with-divider.browsing-controls--center{ class: ('browsing-controls--filters-displayed' unless @search.toggle_facets?) }
13
+ = form_tag list_releases_path, method: 'get', id: 'release_search_form', class: 'browsing-controls__form' do
14
+ = facet_hidden_inputs(@search.facets)
15
+ .browsing-controls__sort
16
+ .property.property--inline
17
+ = label_tag 'sort', t('workarea.admin.search.sort_by'), class: 'property__name'
18
+ = select_tag :sort, options_for_select(@search.sorts, selected: @search.sort), data: { form_submitting_control: '' }
19
+
20
+ .browsing-controls__search
21
+ .search-form
22
+ = text_field_tag :q, params[:q], class: 'search-form__input', id: 'search_releases', title: t('workarea.admin.search.keywords'), placeholder: t('workarea.admin.search.keywords')
23
+ = submit_tag 'search_releases', class: 'search-form__button'
24
+
25
+ = render 'workarea/admin/shared/creation_date', search: @search, form_path: releases_path
26
+
27
+ - if @search.facets.present?
28
+ - @search.facets.each do |facet|
29
+ = render "workarea/admin/facets/#{facet.type}", facet: facet
30
+
31
+ - if @search.toggle_facets?
32
+ .browsing-controls__toggle-filters
33
+ %button.text-button{ type: 'button', data: { toggle_filters: '' } }= t('workarea.admin.search.show_filters')
34
+
35
+ = render 'workarea/admin/facets/applied', search: @search, reset_path: releases_path
36
+
37
+ %p.browsing-controls__count{ data: { browsing_controls_count: @search.total } }
38
+ = pluralize(@search.total, 'release')
39
+
40
+ - if @search.results.any?
41
+ %table.index-table
42
+ %thead
43
+ %tr
44
+ %th.index-table__control-cell
45
+ .checkbox
46
+ = check_box_tag 'select_all', nil, false, id: 'select_all', class: 'checkbox__input', data: { bulk_action_select_all: '' }
47
+ = label_tag 'select_all', t('workarea.admin.bulk_actions.select_all'), class: 'checkbox__label'
48
+ %th= t('workarea.admin.fields.name')
49
+ %th.align-center= t('workarea.admin.fields.publishes')
50
+ %th.align-center= t('workarea.admin.fields.changes')
51
+ %th= t('workarea.admin.fields.last_published')
52
+ %th= t('workarea.admin.fields.updated_at')
53
+ %tbody
54
+ - @search.results.each do |result|
55
+ %tr.index-table__row{ class: ('index-table__row--inactive' unless result.upcoming?) }
56
+ %td.index-table__control-cell
57
+ .checkbox
58
+ = check_box_tag 'global_id', result.to_gid_param, false, class: 'checkbox__input', id: dom_id(result), data: { bulk_action_item: '' }
59
+ = label_tag dom_id(result), '', class: 'checkbox__label', title: t('workarea.admin.bulk_actions.add_summary_button')
60
+ %td
61
+ = link_to result.name, result
62
+ = comments_icon_for(result)
63
+ %td.align-center
64
+ - if result.publish_at.present?
65
+ #{local_time_ago(result.publish_at)}
66
+ - else
67
+ = t('workarea.admin.releases.index.unscheduled')
68
+ %td.align-center= result.changesets_with_releasable.count || 0
69
+ %td
70
+ - if result.published_at.present?
71
+ = local_time_ago(result.published_at)
72
+ - else
73
+ = t('workarea.admin.releases.index.never')
74
+ %td= local_time_ago(result.updated_at)
75
+
76
+ - if @search.results.total_pages > 1
77
+ = render 'workarea/admin/shared/pagination', collection: @search.results
78
+
79
+ .workflow-bar
80
+ .grid
81
+ .grid__cell.grid__cell--80
82
+ = render 'workarea/admin/shared/bulk_actions', klass: Workarea::Release, search: @search, import: false, export: false
83
+ .grid__cell.grid__cell--20
84
+ .grid.grid--auto.grid--right
85
+ - calendar_feed_url = calendar_feed_releases_url(token: current_user.token, protocol: 'webcal')
86
+ .grid__cell= button_tag t('workarea.admin.releases.index.add_to_calendar.link_text'), class: 'workflow-bar__button', data: { add_to_calendar_button: { initial: '#calendar-tooltip', moreInfo: '#google-calendar-info' }.as_json }
87
+ .grid__cell= link_to t('workarea.admin.releases.index.add_new_release'), create_releases_path, id: 'add_release', class: 'workflow-bar__button workflow-bar__button--create'
88
+ #calendar-tooltip.tooltip-content.tooltip-content--no-padding
89
+ .add-to-calendar
90
+ %ul.add-to-calendar__list
91
+ %li.add-to-calendar__item
92
+ = link_to calendar_feed_url, class: 'grid grid--auto grid--middle grid--large', data: { add_to_calendar_button_toggle: '' } do
93
+ %span.grid__cell= image_tag 'workarea/admin/icons/google_calendar.svg', size: '24x24'
94
+ %span.grid__cell
95
+ %span.add-to-calendar__link= t('workarea.admin.releases.index.add_to_calendar.tooltip.google_calendar')
96
+ %li.add-to-calendar__item
97
+ = link_to calendar_feed_url, class: 'grid grid--auto grid--middle grid--large' do
98
+ %span.grid__cell= image_tag 'workarea/admin/icons/apple_calendar.svg', size: '24x24'
99
+ %span.grid__cell
100
+ %span.add-to-calendar__link= t('workarea.admin.releases.index.add_to_calendar.tooltip.apple_calendar')
101
+ %li.add-to-calendar__item
102
+ = link_to calendar_feed_url, class: 'grid grid--auto grid--middle grid--large' do
103
+ %span.grid__cell= image_tag 'workarea/admin/icons/outlook.svg', size: '24x24'
104
+ %span.grid__cell
105
+ %span.add-to-calendar__link= t('workarea.admin.releases.index.add_to_calendar.tooltip.outlook')
106
+ .hidden
107
+ #google-calendar-info= t('workarea.admin.releases.index.add_to_calendar.tooltip.google_calendar_instructions_html', calendar_feed_url: calendar_feed_url)
@@ -0,0 +1,50 @@
1
+ - @page_title = t('workarea.admin.releases.original.page_title', name: @release.name)
2
+
3
+ .view
4
+ .view__header
5
+ .grid.grid--middle.grid--right
6
+ .grid__cell.grid__cell--50
7
+ .view__heading
8
+ = link_to "↑ #{t('workarea.admin.releases.original.index_link')}", releases_path
9
+ %h1= link_to @release.name, url_for(@release)
10
+ .grid__cell.grid__cell--25
11
+ = render_aux_navigation_for(@release)
12
+
13
+ .view__container
14
+ = render_cards_for(@release, :original)
15
+
16
+ .view__container.view__container--narrow
17
+ .section
18
+ .grid.grid--center
19
+ .grid__cell.grid__cell--25
20
+ %p.text.text--large= t('workarea.admin.releases.original.created_description_html', undo: link_to(@release.name, @release), original: link_to(@release.undoes.name, @release.undoes), at: local_time_ago(@release.created_at))
21
+ .grid__cell.grid__cell--25.align-center
22
+ .card{ class: card_classes(:planned_changes) }
23
+ = link_to @release.undoes, class: 'card__header' do
24
+ %span.card__header-text= @release.undoes.name
25
+ = inline_svg 'workarea/admin/icons/planned_changes.svg', class: 'card__icon'
26
+
27
+ .card__body
28
+ - if @release.undoes.changesets_with_releasable.empty?
29
+ %p.card__empty-note= t('workarea.admin.releases.original.no_changes_for_this_release')
30
+ - else
31
+ - @release.undoes.changesets_with_releasable.take(3).each do |changeset|
32
+ .activity
33
+ .activity__header
34
+ .activity__avatar
35
+ = changeset_icon changeset, { class: 'svg-icon'}
36
+ .activity__name= changeset.release.name
37
+ .activity__time
38
+ = changeset.publish_humanized
39
+ - if changeset.release_date.present?
40
+ = local_time(changeset.release_date, :long)
41
+ .activity__message
42
+ .release-changeset.release-changeset--activity
43
+ .release-changeset__body
44
+ - changeset.changed_fields.each do |field|
45
+ = render_changeset_field(changeset, field)
46
+
47
+ = link_to @release.undoes, class: 'card__button' do
48
+ %span.button.button--small= t('workarea.admin.releases.original.view_the_original_release')
49
+
50
+
@@ -21,7 +21,7 @@
21
21
  .grid.grid--auto.grid--right
22
22
  - if !@release.has_changes?
23
23
  .grid__cell
24
- = link_to t('workarea.admin.releases.show.start_preview_in_storefront'), '#no-changes-to-preview-info', disabled: 'disabled', data: { tooltip: '' }, class: 'workflow-bar__button workflow-bar__button--update'
24
+ = link_to t('workarea.admin.releases.show.visit_storefront_to_preview'), '#no-changes-to-preview-info', disabled: 'disabled', data: { tooltip: '' }, class: 'workflow-bar__button workflow-bar__button--update'
25
25
  #no-changes-to-preview-info.tooltip-content
26
26
  %p= t('workarea.admin.releases.show.no_changes_to_preview')
27
27
 
@@ -30,11 +30,6 @@
30
30
  #no-changes-to-publish-info.tooltip-content
31
31
  %p= t('workarea.admin.releases.show.no_changes_to_publish')
32
32
 
33
- .grid__cell
34
- = link_to t('workarea.admin.releases.show.undo'), '#no-changes-to-undo-info', disabled: 'disabled', data: { tooltip: '' }, class: 'workflow-bar__button workflow-bar__button--update'
35
- #no-changes-to-undo-info.tooltip-content
36
- %p= t('workarea.admin.releases.show.no_changes_to_undo')
37
-
38
33
  - else
39
34
  .grid__cell
40
35
  - if current_release.try(:id) == @release.id
@@ -43,23 +38,14 @@
43
38
  = form_tag release_session_path, method: :post do
44
39
  = hidden_field_tag :release_id, @release.id
45
40
  = hidden_field_tag :return_to, storefront.root_path
46
- = button_tag t('workarea.admin.releases.show.start_preview_in_storefront'), value: 'browse', class: 'workflow-bar__button workflow-bar__button--update'
41
+ = button_tag t('workarea.admin.releases.show.visit_storefront_to_preview'), value: 'browse', class: 'workflow-bar__button workflow-bar__button--update'
47
42
 
48
43
  .grid__cell
49
44
  - publish_text = @release.published? ? t('workarea.admin.releases.show.republish_now') : t('workarea.admin.releases.show.publish_now')
50
45
  - if current_user.can_publish_now?
51
- = form_tag publish_release_path(@release), method: :patch, class: 'grid__cell' do
46
+ = form_tag publish_release_path(@release), method: :patch do
52
47
  = button_tag publish_text, value: 'publish', class: 'workflow-bar__button workflow-bar__button--update'
53
48
  - else
54
49
  = link_to publish_text, '#cannot-publish-info', disabled: 'disabled', data: { tooltip: '' }, class: 'workflow-bar__button workflow-bar__button--update'
55
50
  #cannot-publish-info.tooltip-content
56
51
  %p= t('workarea.admin.releases.show.user_cannot_publish_info')
57
-
58
- .grid__cell
59
- - if @release.can_undo? && current_user.can_publish_now?
60
- = form_tag undo_release_path(@release), method: :patch do
61
- = button_tag t('workarea.admin.releases.show.undo'), value: 'undo', class: 'workflow-bar__button workflow-bar__button--update'
62
- - else
63
- = link_to t('workarea.admin.releases.show.undo'), '#cannot-undo-info', disabled: 'disabled', data: { tooltip: '' }, class: 'workflow-bar__button workflow-bar__button--update'
64
- #cannot-undo-info.tooltip-content
65
- %p= !@release.can_undo? ? t('workarea.admin.releases.show.cannot_undo_info') : t('workarea.admin.releases.show.user_cannot_undo_info')
@@ -0,0 +1,64 @@
1
+ - @page_title = t('workarea.admin.releases.undo.page_title', name: @release.name)
2
+
3
+ .view
4
+ .view__header
5
+ .grid.grid--middle.grid--right
6
+ .grid__cell.grid__cell--50
7
+ .view__heading
8
+ = link_to "↑ #{t('workarea.admin.releases.undo.index_link')}", releases_path
9
+ %h1= link_to @release.name, url_for(@release)
10
+ .grid__cell.grid__cell--25
11
+ = render_aux_navigation_for(@release)
12
+
13
+ .view__container
14
+ = render_cards_for(@release, :undo)
15
+
16
+ .view__container.view__container--narrow
17
+ .section
18
+ - if @release.changesets_with_releasable.empty?
19
+ .grid.grid--center
20
+ .grid__cell.grid__cell--50
21
+ %h2.align-center= t('workarea.admin.releases.undo.undoing')
22
+ %p.align-center= t('workarea.admin.releases.undo.no_changes_html', plan_changes: link_to(t('workarea.releases.undo.plan_changes'), release_releasables_path(@release)))
23
+
24
+ - elsif @release.undo.blank?
25
+ .grid.grid--center
26
+ .grid__cell.grid__cell--50
27
+ %h2.align-center= t('workarea.admin.releases.undo.undoing')
28
+ %p.align-center= t('workarea.admin.releases.undo.description')
29
+ %p.align-center= link_to "#{t('workarea.admin.releases.undo.build_an_undo_now')} →", new_release_undo_path(@release), class: 'button'
30
+ - else
31
+ .grid.grid--center
32
+ .grid__cell.grid__cell--25
33
+ %p.text.text--large= t('workarea.admin.releases.undo.created_description_html', undo: link_to(@release.undo.name, @release.undo), original: link_to(@release.name, @release), at: local_time_ago(@release.created_at))
34
+ .grid__cell.grid__cell--25.align-center
35
+ .card{ class: card_classes(:planned_changes) }
36
+ = link_to @release.undo, class: 'card__header' do
37
+ %span.card__header-text= @release.undo.name
38
+ = inline_svg 'workarea/admin/icons/planned_changes.svg', class: 'card__icon'
39
+
40
+ .card__body
41
+ - if @release.undo.changesets_with_releasable.empty?
42
+ %p.card__empty-note= t('workarea.admin.releases.undo.no_changes_for_this_release')
43
+ - else
44
+ - @release.undo.changesets_with_releasable.take(3).each do |changeset|
45
+ .activity
46
+ .activity__header
47
+ .activity__avatar
48
+ = changeset_icon changeset, { class: 'svg-icon'}
49
+ .activity__name= changeset.release.name
50
+ .activity__time
51
+ = changeset.publish_humanized
52
+ - if changeset.release_date.present?
53
+ = local_time(changeset.release_date, :long)
54
+ .activity__message
55
+ .release-changeset.release-changeset--activity
56
+ .release-changeset__body
57
+ - changeset.changed_fields.each do |field|
58
+ = render_changeset_field(changeset, field)
59
+
60
+ = link_to @release.undo, class: 'card__button' do
61
+ %span.button.button--small= t('workarea.admin.releases.undo.view_the_undo_release')
62
+
63
+
64
+
@@ -14,7 +14,7 @@
14
14
  .grid__cell= render 'workarea/admin/shared/date_selector', starts_at: @report.starts_at, ends_at: @report.ends_at
15
15
  .grid__cell
16
16
  .property.property--inline
17
- = label_tag 'group_by', t('workarea.admin.reports.first_time_vs_returning_sales.by')
17
+ = label_tag 'group_by', t('workarea.admin.reports.by')
18
18
  = select_tag 'group_by', options_for_select(@report.group_by_options, @report.group_by), data: { form_submitting_control: '' }
19
19
 
20
20
  .browsing-controls__count
@@ -27,7 +27,9 @@
27
27
  %th.align-center= link_to_reports_sorting t('workarea.admin.fields.first_order_at'), report: @report, sort_by: 'first_order_at'
28
28
  %th.align-center= link_to_reports_sorting t('workarea.admin.fields.last_order_at'), report: @report, sort_by: 'last_order_at'
29
29
  %th.align-center= link_to_reports_sorting t('workarea.admin.fields.orders'), report: @report, sort_by: 'orders'
30
+ %th.align-right= link_to_reports_sorting t('workarea.admin.fields.cancellations'), report: @report, sort_by: 'cancellations'
30
31
  %th.align-right= link_to_reports_sorting t('workarea.admin.fields.average_order_value'), report: @report, sort_by: 'average_order_value'
32
+ %th.align-right= link_to_reports_sorting t('workarea.admin.fields.refund'), report: @report, sort_by: 'refund'
31
33
  %th.align-right= link_to_reports_sorting t('workarea.admin.fields.revenue'), report: @report, sort_by: 'revenue'
32
34
  %tbody
33
35
  - @report.results.each do |result|
@@ -45,5 +47,7 @@
45
47
  %td.align-center= local_time_ago(result.first_order_at)
46
48
  %td.align-center= local_time_ago(result.last_order_at)
47
49
  %td.align-center= number_with_delimiter result.orders
50
+ %td.align-center= number_with_delimiter result.cancellations
48
51
  %td.align-right= number_to_currency(result.average_order_value)
52
+ %td.align-right= number_to_currency(result.refund)
49
53
  %td.align-right= number_to_currency(result.revenue)
@@ -14,7 +14,7 @@
14
14
  .grid__cell= render 'workarea/admin/shared/date_selector', starts_at: @report.starts_at, ends_at: @report.ends_at
15
15
  .grid__cell
16
16
  .property.property--inline
17
- = label_tag 'group_by', t('workarea.admin.reports.first_time_vs_returning_sales.by')
17
+ = label_tag 'group_by', t('workarea.admin.reports.by')
18
18
  = select_tag 'group_by', options_for_select(@report.group_by_options, @report.group_by), data: { form_submitting_control: '' }
19
19
 
20
20
  .browsing-controls__count
@@ -9,80 +9,39 @@
9
9
 
10
10
  .view__container.view__container--narrow
11
11
  .section
12
- %h2.align-center= t('workarea.admin.reports.reference.terms')
12
+ %h2.align-center= t('workarea.admin.reports.reference.terms_title')
13
13
 
14
14
  %table
15
- %tr
16
- %td
17
- %strong= t('workarea.admin.reports.reference.average_order_value')
18
- %td= t('workarea.admin.reports.reference.average_order_value_description')
19
- %tr
20
- %td
21
- %strong= t('workarea.admin.reports.reference.discounts')
22
- %td= t('workarea.admin.reports.reference.discounts_description')
23
- %tr
24
- %td
25
- %strong= t('workarea.admin.reports.reference.first_time_orders')
26
- %td= t('workarea.admin.reports.reference.first_time_orders_description')
27
- %tr
28
- %td
29
- %strong= t('workarea.admin.reports.reference.merchandise')
30
- %td= t('workarea.admin.reports.reference.merchandise_description')
31
- %tr
32
- %td
33
- %strong= t('workarea.admin.reports.reference.orders')
34
- %td= t('workarea.admin.reports.reference.orders_description')
35
- %tr
36
- %td
37
- %strong= t('workarea.admin.reports.reference.returning_orders')
38
- %td= t('workarea.admin.reports.reference.returning_orders_description')
39
- %tr
40
- %td
41
- %strong= t('workarea.admin.reports.reference.revenue')
42
- %td= t('workarea.admin.reports.reference.revenue_description')
43
- %tr
44
- %td
45
- %strong= t('workarea.admin.reports.reference.search_id')
46
- %td= t('workarea.admin.reports.reference.search_id_description')
47
- %tr
48
- %td
49
- %strong= t('workarea.admin.reports.reference.searches')
50
- %td= t('workarea.admin.reports.reference.searches_description')
51
- %tr
52
- %td
53
- %strong= t('workarea.admin.reports.reference.shipping')
54
- %td= t('workarea.admin.reports.reference.shipping_description')
55
- %tr
56
- %td
57
- %strong= t('workarea.admin.reports.reference.tax')
58
- %td= t('workarea.admin.reports.reference.tax_description')
59
- %tr
60
- %td
61
- %strong= t('workarea.admin.reports.reference.units_sold')
62
- %td= t('workarea.admin.reports.reference.units_sold_description')
15
+ - @terms.each do |term|
16
+ %tr
17
+ %td
18
+ %strong= term.name
19
+ %td= term.description.presence || term.description_html
63
20
 
64
21
  .section
65
- %h2.align-center= t('workarea.admin.reports.reference.discrepancies')
22
+ %h2.align-center= t('workarea.admin.reports.reference.discrepancies_title')
66
23
  %p.align-center= t('workarea.admin.reports.reference.discrepancies_description')
67
24
 
68
25
  %table
69
26
  %tr
70
27
  %td
71
- %strong= t('workarea.admin.reports.reference.definitions')
72
- %td= t('workarea.admin.reports.reference.definitions_description')
28
+ %strong= t('workarea.admin.reports.reference.discrepancies.definitions.name')
29
+ %td= t('workarea.admin.reports.reference.discrepancies.definitions.description')
73
30
  %tr
74
31
  %td
75
- %strong= t('workarea.admin.reports.reference.browser_configuration')
76
- %td= t('workarea.admin.reports.reference.browser_configuration_description')
32
+ %strong= t('workarea.admin.reports.reference.discrepancies.browser_configuration.name')
33
+ %td= t('workarea.admin.reports.reference.discrepancies.browser_configuration.description')
77
34
  %tr
78
35
  %td
79
- %strong= t('workarea.admin.reports.reference.time_zones')
80
- %td= t('workarea.admin.reports.reference.time_zones_description_html', time_zone: Time.zone.name)
36
+ %strong= t('workarea.admin.reports.reference.discrepancies.time_zones.name')
37
+ %td= t('workarea.admin.reports.reference.discrepancies.time_zones.description_html', time_zone: Time.zone.name)
81
38
  %tr
82
39
  %td
83
- %strong= t('workarea.admin.reports.reference.time_delay')
84
- %td= t('workarea.admin.reports.reference.time_delay_description_html')
40
+ %strong= t('workarea.admin.reports.reference.discrepancies.time_delay.name')
41
+ %td= t('workarea.admin.reports.reference.discrepancies.time_delay.description_html')
42
+
43
+ = append_partials('admin.report_reference_discrepancies')
85
44
 
86
45
  .section
87
- %h2.align-center= t('workarea.admin.reports.reference.insights')
88
- %p.align-center= t('workarea.admin.reports.reference.insights_description')
46
+ %h2.align-center= t('workarea.admin.reports.reference.discrepancies.insights.name')
47
+ %p.align-center= t('workarea.admin.reports.reference.discrepancies.insights.description')
@@ -22,11 +22,14 @@
22
22
  %th= t('workarea.admin.fields.country')
23
23
  %th= t('workarea.admin.fields.name')
24
24
  %th.align-center= link_to_reports_sorting t('workarea.admin.fields.units_sold'), report: @report, sort_by: 'units_sold'
25
+ %th.align-center= link_to_reports_sorting t('workarea.admin.fields.units_canceled'), report: @report, sort_by: 'units_canceled'
25
26
  %th.align-center= link_to_reports_sorting t('workarea.admin.fields.orders'), report: @report, sort_by: 'orders'
27
+ %th.align-center= link_to_reports_sorting t('workarea.admin.fields.cancellations'), report: @report, sort_by: 'cancellations'
26
28
  %th.align-right= link_to_reports_sorting t('workarea.admin.fields.merchandise'), report: @report, sort_by: 'merchandise'
27
29
  %th.align-right= link_to_reports_sorting t('workarea.admin.fields.shipping'), report: @report, sort_by: 'shipping'
28
30
  %th.align-right= link_to_reports_sorting t('workarea.admin.fields.discounts'), report: @report, sort_by: 'discounts'
29
31
  %th.align-right= link_to_reports_sorting t('workarea.admin.fields.tax'), report: @report, sort_by: 'tax'
32
+ %th.align-right= link_to_reports_sorting t('workarea.admin.fields.refund'), report: @report, sort_by: 'refund'
30
33
  %th.align-right= link_to_reports_sorting t('workarea.admin.fields.revenue'), report: @report, sort_by: 'revenue'
31
34
  %tbody
32
35
  - @report.results.each do |result|
@@ -34,9 +37,12 @@
34
37
  %td= result._id
35
38
  %td= result.name.presence || t('workarea.admin.reports.unknown')
36
39
  %td.align-center= number_with_delimiter result.units_sold
40
+ %td.align-center= number_with_delimiter result.units_canceled
37
41
  %td.align-center= number_with_delimiter result.orders
42
+ %td.align-center= number_with_delimiter result.cancellations
38
43
  %td.align-right= number_to_currency(result.merchandise)
39
44
  %td.align-right= number_to_currency(result.shipping)
40
45
  %td.align-right= number_to_currency(result.discounts)
41
46
  %td.align-right= number_to_currency(result.tax)
47
+ %td.align-right= number_to_currency(result.refund)
42
48
  %td.align-right= number_to_currency(result.revenue)