workarea-package_products 3.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.editorconfig +20 -0
- data/.github/ISSUE_TEMPLATE/bug_report.md +37 -0
- data/.github/ISSUE_TEMPLATE/documentation-request.md +17 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- data/.gitignore +15 -0
- data/CHANGELOG.md +343 -0
- data/CODE_OF_CONDUCT.md +3 -0
- data/CONTRIBUTING.md +3 -0
- data/Gemfile +16 -0
- data/LICENSE +52 -0
- data/README.md +40 -0
- data/Rakefile +52 -0
- data/app/assets/javascripts/workarea/storefront/package_products/modules/family_product_add_to_cart.js +83 -0
- data/app/assets/javascripts/workarea/storefront/package_products/templates/family_add_to_cart_checkbox.jst.ejs +1 -0
- data/app/assets/stylesheets/workarea/admin/package_products/components/_product_cards.scss +7 -0
- data/app/assets/stylesheets/workarea/storefront/package_products/components/_product_detail_packaged_products.scss +11 -0
- data/app/controllers/workarea/admin/create_catalog_package_products_controller.rb +150 -0
- data/app/controllers/workarea/admin/create_catalog_products_controller.decorator +25 -0
- data/app/controllers/workarea/storefront/cart_items_controller.decorator +29 -0
- data/app/controllers/workarea/storefront/products_controller.decorator +8 -0
- data/app/models/workarea/catalog/product.decorator +44 -0
- data/app/models/workarea/search/admin/catalog_product.decorator +20 -0
- data/app/models/workarea/search/storefront/package_product.rb +40 -0
- data/app/queries/workarea/search/product_entries.decorator +8 -0
- data/app/seeds/workarea/package_product_seeds.rb +41 -0
- data/app/services/workarea/add_package_to_cart.rb +79 -0
- data/app/view_models/workarea/admin/product_view_model.decorator +35 -0
- data/app/view_models/workarea/storefront/product_templates/family_view_model.rb +6 -0
- data/app/view_models/workarea/storefront/product_templates/package_view_model.rb +33 -0
- data/app/view_models/workarea/storefront/product_view_model.decorator +13 -0
- data/app/views/workarea/admin/catalog_products/_create_package_button.html.haml +1 -0
- data/app/views/workarea/admin/catalog_products/_packaged_products_card.html.haml +26 -0
- data/app/views/workarea/admin/create_catalog_package_products/categorization.html.haml +64 -0
- data/app/views/workarea/admin/create_catalog_package_products/content.html.haml +54 -0
- data/app/views/workarea/admin/create_catalog_package_products/details.html.haml +87 -0
- data/app/views/workarea/admin/create_catalog_package_products/images.html.haml +57 -0
- data/app/views/workarea/admin/create_catalog_package_products/packaged_products.html.haml +79 -0
- data/app/views/workarea/admin/create_catalog_package_products/publish.html.haml +61 -0
- data/app/views/workarea/admin/create_catalog_package_products/setup.html.haml +68 -0
- data/app/views/workarea/admin/create_catalog_products/select.html.haml +34 -0
- data/app/views/workarea/storefront/cart_items/package.html.haml +59 -0
- data/app/views/workarea/storefront/products/package_show.html.haml +49 -0
- data/app/views/workarea/storefront/products/templates/_family.html.haml +42 -0
- data/app/views/workarea/storefront/products/templates/_package.html.haml +36 -0
- data/app/workers/workarea/update_package_products.rb +21 -0
- data/bin/rails +16 -0
- data/config/initializers/appends.rb +31 -0
- data/config/initializers/configuration.rb +6 -0
- data/config/initializers/seeds.rb +1 -0
- data/config/locales/en.yml +45 -0
- data/config/routes.rb +30 -0
- data/lib/tasks/sample_data.rake +16 -0
- data/lib/workarea/package_products.rb +10 -0
- data/lib/workarea/package_products/engine.rb +8 -0
- data/lib/workarea/package_products/version.rb +5 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/config/manifest.js +4 -0
- data/test/dummy/app/assets/images/.keep +0 -0
- data/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/dummy/app/assets/stylesheets/application.css +15 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/controllers/concerns/.keep +0 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/jobs/application_job.rb +2 -0
- data/test/dummy/app/mailers/application_mailer.rb +4 -0
- data/test/dummy/app/models/concerns/.keep +0 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/app/views/layouts/mailer.html.erb +13 -0
- data/test/dummy/app/views/layouts/mailer.text.erb +1 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/bin/setup +34 -0
- data/test/dummy/bin/update +29 -0
- data/test/dummy/config.ru +5 -0
- data/test/dummy/config/application.rb +18 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/cable.yml +9 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +54 -0
- data/test/dummy/config/environments/production.rb +83 -0
- data/test/dummy/config/environments/test.rb +43 -0
- data/test/dummy/config/initializers/application_controller_renderer.rb +6 -0
- data/test/dummy/config/initializers/assets.rb +11 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +5 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +4 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/workarea.rb +5 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/puma.rb +47 -0
- data/test/dummy/config/routes.rb +5 -0
- data/test/dummy/config/secrets.yml +22 -0
- data/test/dummy/db/seeds.rb +2 -0
- data/test/dummy/lib/assets/.keep +0 -0
- data/test/dummy/log/.keep +0 -0
- data/test/dummy/public/404.html +67 -0
- data/test/dummy/public/422.html +67 -0
- data/test/dummy/public/500.html +66 -0
- data/test/dummy/public/apple-touch-icon-precomposed.png +0 -0
- data/test/dummy/public/apple-touch-icon.png +0 -0
- data/test/dummy/public/favicon.ico +1 -0
- data/test/integration/workarea/admin/create_catalog_package_products_integration_test.rb +139 -0
- data/test/integration/workarea/storefront/package_cart_items_integration_test.rb +47 -0
- data/test/integration/workarea/storefront/products_integration_test.decorator +19 -0
- data/test/models/workarea/catalog/package_product_test.rb +68 -0
- data/test/models/workarea/search/storefront/package_product_test.rb +44 -0
- data/test/queries/workarea/search/product_entries_test.decorator +15 -0
- data/test/services/workarea/add_package_to_cart_test.rb +46 -0
- data/test/system/workarea/admin/activity_system_test.decorator +53 -0
- data/test/system/workarea/admin/package_product_copy_system_test.rb +27 -0
- data/test/system/workarea/admin/package_products_system_test.rb +101 -0
- data/test/system/workarea/admin/product_copy_system_test.decorator +28 -0
- data/test/system/workarea/admin/products_system_test.decorator +69 -0
- data/test/system/workarea/storefront/categories_with_packages_system_test.rb +172 -0
- data/test/system/workarea/storefront/family_product_system_test.rb +58 -0
- data/test/system/workarea/storefront/package_product_system_test.rb +42 -0
- data/test/test_helper.rb +10 -0
- data/test/view_models/workarea/admin/package_product_view_model_test.rb +41 -0
- data/test/view_models/workarea/storefront/package_product_view_model_test.rb +27 -0
- data/test/view_models/workarea/storefront/package_templates/package_view_model_test.rb +34 -0
- data/test/workers/workarea/update_package_products_test.rb +27 -0
- data/workarea-package_products.gemspec +24 -0
- metadata +189 -0
@@ -0,0 +1,54 @@
|
|
1
|
+
- @page_title = t('workarea.admin.create_catalog_products.content.page_title', product_name: @product.name)
|
2
|
+
|
3
|
+
.view
|
4
|
+
.view__header
|
5
|
+
.view__heading
|
6
|
+
%h1.heading.heading--no-margin= t('workarea.admin.create_catalog_products.content.add_content', product_name: @product.name)
|
7
|
+
%p= link_to t('workarea.admin.create_catalog_products.content.or_skip_this'), categorization_create_catalog_package_product_path(@product)
|
8
|
+
|
9
|
+
.view__container.view__container--narrow
|
10
|
+
= form_tag save_content_create_catalog_package_product_path(@product), method: 'post' do
|
11
|
+
.section
|
12
|
+
%h2= t('workarea.admin.create_catalog_products.content.description')
|
13
|
+
|
14
|
+
.property
|
15
|
+
.wysiwyg{ data: { wysiwyg: '' } }= text_area_tag 'product[description]', @product.description, class: 'text-box text-box--multi-line text-box--i18n', id: "product_description"
|
16
|
+
|
17
|
+
.section
|
18
|
+
%h2= t('workarea.admin.create_catalog_products.content.seo')
|
19
|
+
|
20
|
+
.property
|
21
|
+
= label_tag 'product[browser_title]', t('workarea.admin.create_catalog_products.content.browser_title'), class: 'property__name'
|
22
|
+
= text_field_tag 'product[browser_title]', @product.browser_title, class: 'text-box text-box--i18n', placeholder: '(defaults to the product name)'
|
23
|
+
%span.property__note= t('workarea.admin.create_catalog_products.content.appears_in_the_browser_and_is_shown_in_search_engine_results')
|
24
|
+
|
25
|
+
.property
|
26
|
+
= label_tag 'product[meta_description]', t('workarea.admin.create_catalog_products.content.meta_description'), class: 'property__name'
|
27
|
+
= text_field_tag 'product[meta_description]', @product.meta_description, class: 'text-box text-box--i18n', placeholder: t('workarea.admin.create_catalog_products.content.defaults_to_a_truncated_description')
|
28
|
+
%span.property__note= t('workarea.admin.create_catalog_products.content.provides_a_summary_that_is_displayed_on_search_engine_result_pages')
|
29
|
+
|
30
|
+
.workflow-bar
|
31
|
+
.grid.grid--middle
|
32
|
+
.grid__cell.grid__cell--20
|
33
|
+
= link_to t('workarea.admin.create_catalog_products.content.cancel'), catalog_product_path(@product), class: 'workflow-bar__button workflow-bar__button--delete', data: { method: 'delete', confirm: t('workarea.admin.create_catalog_products.are_you_sure_all_work_on_this_product_will_be_lost') }
|
34
|
+
|
35
|
+
.grid__cell.grid__cell--60
|
36
|
+
%ol.workflow-bar__steps
|
37
|
+
%li.workflow-bar__step
|
38
|
+
1) #{link_to t('workarea.admin.create_catalog_products.steps.setup'), edit_create_catalog_package_product_path(@product)}
|
39
|
+
%li.workflow-bar__step
|
40
|
+
2) #{link_to t('workarea.admin.create_catalog_package_products.steps.packaged_products'), packaged_products_create_catalog_package_product_path(@product)}
|
41
|
+
%li.workflow-bar__step
|
42
|
+
3) #{link_to t('workarea.admin.create_catalog_products.steps.images'), images_create_catalog_package_product_path(@product)}
|
43
|
+
%li.workflow-bar__step
|
44
|
+
4) #{link_to t('workarea.admin.create_catalog_products.steps.details'), details_create_catalog_package_product_path(@product)}
|
45
|
+
%li.workflow-bar__step
|
46
|
+
%strong 5) #{t('workarea.admin.create_catalog_products.steps.content')}
|
47
|
+
%li.workflow-bar__step
|
48
|
+
6) #{t('workarea.admin.create_catalog_products.steps.categorization')}
|
49
|
+
%li.workflow-bar__step
|
50
|
+
7) #{t('workarea.admin.create_catalog_products.steps.publish')}
|
51
|
+
|
52
|
+
.grid__cell.grid__cell--20
|
53
|
+
.grid.grid--auto.grid--right.grid--middle
|
54
|
+
.grid__cell= button_tag t('workarea.admin.create_catalog_products.content.save_and_categorize'), value: 'save_content', class: 'workflow-bar__button workflow-bar__button--create'
|
@@ -0,0 +1,87 @@
|
|
1
|
+
- @page_title = t('workarea.admin.create_catalog_products.details.page_title', product_name: @product.name)
|
2
|
+
|
3
|
+
.view
|
4
|
+
.view__header
|
5
|
+
.view__heading
|
6
|
+
%h1.heading.heading--no-margin= t('workarea.admin.create_catalog_products.details.add_details', product_name: @product.name)
|
7
|
+
%p= link_to t('workarea.admin.create_catalog_products.details.or_skip_this'), content_create_catalog_package_product_path(@product)
|
8
|
+
|
9
|
+
.view__container.view__container--narrow
|
10
|
+
= form_tag save_details_create_catalog_package_product_path(@product), method: 'post' do
|
11
|
+
.grid.grid--huge
|
12
|
+
.grid__cell.grid__cell--50-at-medium
|
13
|
+
.section
|
14
|
+
%h2= t('workarea.admin.create_catalog_products.details.filters')
|
15
|
+
|
16
|
+
%table
|
17
|
+
%tbody
|
18
|
+
- @filters.each do |name, value|
|
19
|
+
%tr
|
20
|
+
%td
|
21
|
+
.property
|
22
|
+
= text_field_tag 'filters[]', name, class: 'text-box text-box--i18n', title: 'New Filter Name', placeholder: 'Name', data: { rule_notypefilter: 'true' }, id: "filter_#{name}"
|
23
|
+
%td
|
24
|
+
.property
|
25
|
+
= text_field_tag 'filters[]', hash_editing_value(value), class: 'text-box text-box--i18n', title: 'New Filter Value', placeholder: 'Value', id: "filter_#{name}_value"
|
26
|
+
|
27
|
+
%tr{ data: { cloneable_row: '' } }
|
28
|
+
%td
|
29
|
+
.property
|
30
|
+
= text_field_tag 'filters[]', nil, class: 'text-box text-box--i18n', title: 'New Filter Name', placeholder: 'Name', data: { rule_notypefilter: 'true' }, id: 'new_filter_name'
|
31
|
+
%span.property__note= t('workarea.admin.create_catalog_products.details.example_color')
|
32
|
+
%td
|
33
|
+
.property
|
34
|
+
= text_field_tag 'filters[]', nil, class: 'text-box text-box--i18n', title: 'New Filter Value', placeholder: 'Value', id: 'new_filter_value'
|
35
|
+
%span.property__note= t('workarea.admin.create_catalog_products.details.comma_separated_red_green')
|
36
|
+
|
37
|
+
.grid__cell.grid__cell--50-at-medium
|
38
|
+
.section
|
39
|
+
%h2= t('workarea.admin.create_catalog_products.details.details')
|
40
|
+
|
41
|
+
%table
|
42
|
+
%tbody
|
43
|
+
- @details.each do |name, value|
|
44
|
+
%tr
|
45
|
+
%td
|
46
|
+
.property
|
47
|
+
= text_field_tag 'details[]', name, class: 'text-box text-box--i18n', title: 'Name', placeholder: 'Name', data: { rule_notypefilter: 'true' }, id: "detail_#{name}"
|
48
|
+
%td
|
49
|
+
.property
|
50
|
+
= text_field_tag 'details[]', hash_editing_value(value), class: 'text-box text-box--i18n', title: 'Value', placeholder: 'Value', id: "detail_#{name}_value"
|
51
|
+
|
52
|
+
%tr{ data: { cloneable_row: '' } }
|
53
|
+
%td
|
54
|
+
.property
|
55
|
+
= text_field_tag 'details[]', nil, class: 'text-box text-box--i18n', title: 'Name', placeholder: 'Name', data: { rule_notypefilter: 'true' }, id: 'new_detail_name'
|
56
|
+
%span.property__note= t('workarea.admin.create_catalog_products.details.example_manufactured')
|
57
|
+
%td
|
58
|
+
.property
|
59
|
+
= text_field_tag 'details[]', nil, class: 'text-box text-box--i18n', title: 'Value', placeholder: 'Value', id: 'new_detail_value'
|
60
|
+
%span.property__note= t('workarea.admin.create_catalog_products.details.example_usa')
|
61
|
+
|
62
|
+
.workflow-bar
|
63
|
+
.grid.grid--middle
|
64
|
+
.grid__cell.grid__cell--20
|
65
|
+
= link_to t('workarea.admin.create_catalog_products.details.cancel'), catalog_product_path(@product), class: 'workflow-bar__button workflow-bar__button--delete', data: { method: 'delete', confirm: t('workarea.admin.create_catalog_products.are_you_sure_all_work_on_this_product_will_be_lost') }
|
66
|
+
|
67
|
+
.grid__cell.grid__cell--60
|
68
|
+
|
69
|
+
%ol.workflow-bar__steps
|
70
|
+
%li.workflow-bar__step
|
71
|
+
1) #{link_to t('workarea.admin.create_catalog_products.steps.setup'), edit_create_catalog_package_product_path(@product)}
|
72
|
+
%li.workflow-bar__step
|
73
|
+
2) #{link_to t('workarea.admin.create_catalog_package_products.steps.packaged_products'), packaged_products_create_catalog_package_product_path(@product)}
|
74
|
+
%li.workflow-bar__step
|
75
|
+
2) #{link_to t('workarea.admin.create_catalog_products.steps.images'), images_create_catalog_package_product_path(@product)}
|
76
|
+
%li.workflow-bar__step
|
77
|
+
%strong 4) #{t('workarea.admin.create_catalog_products.steps.details')}
|
78
|
+
%li.workflow-bar__step
|
79
|
+
5) #{t('workarea.admin.create_catalog_products.steps.content')}
|
80
|
+
%li.workflow-bar__step
|
81
|
+
6) #{t('workarea.admin.create_catalog_products.steps.categorization')}
|
82
|
+
%li.workflow-bar__step
|
83
|
+
7) #{t('workarea.admin.create_catalog_products.steps.publish')}
|
84
|
+
|
85
|
+
.grid__cell.grid__cell--20
|
86
|
+
.grid.grid--auto.grid--right.grid--middle
|
87
|
+
= button_tag t('workarea.admin.create_catalog_products.details.save_details_and_continue'), value: 'save_details', class: 'workflow-bar__button workflow-bar__button--create'
|
@@ -0,0 +1,57 @@
|
|
1
|
+
- @page_title = t('workarea.admin.create_catalog_products.images.page_title', product_name: @product.name)
|
2
|
+
|
3
|
+
.view
|
4
|
+
.view__header
|
5
|
+
.view__heading
|
6
|
+
%h1.heading.heading--no-margin= t('workarea.admin.create_catalog_products.images.add_images', product_name: @product.name)
|
7
|
+
%p= link_to t('workarea.admin.create_catalog_products.images.or_skip_this'), details_create_catalog_package_product_path(@product)
|
8
|
+
|
9
|
+
|
10
|
+
.view__container
|
11
|
+
= form_tag save_images_create_catalog_package_product_path(@product), method: 'post', multipart: true do
|
12
|
+
.grid.grid--center
|
13
|
+
.grid__cell.grid__cell--50-at-medium
|
14
|
+
%table
|
15
|
+
%thead
|
16
|
+
%tr
|
17
|
+
%th
|
18
|
+
%th= t('workarea.admin.create_catalog_products.images.image')
|
19
|
+
%th= t('workarea.admin.create_catalog_products.images.option')
|
20
|
+
%tbody
|
21
|
+
- @product.images.each do |image|
|
22
|
+
%tr
|
23
|
+
%td= image_tag product_image_url(image, :small)
|
24
|
+
%td= file_field_tag "updates[#{image.id}][image]", class: 'text-box'
|
25
|
+
%td= text_field_tag "updates[#{image.id}][option]", image.option, placeholder: 'Blue', class: 'text-box text-box--small text-box--i18n'
|
26
|
+
|
27
|
+
%tr{ data: { cloneable_row: '' } }
|
28
|
+
%td
|
29
|
+
%td= file_field_tag 'images[][image]', class: 'text-box'
|
30
|
+
%td= text_field_tag 'images[][option]', nil, placeholder: 'Blue', class: 'text-box text-box--small text-box--i18n'
|
31
|
+
|
32
|
+
.workflow-bar
|
33
|
+
.grid.grid--middle
|
34
|
+
.grid__cell.grid__cell--20
|
35
|
+
= link_to t('workarea.admin.create_catalog_products.images.cancel'), catalog_product_path(@product), class: 'workflow-bar__button workflow-bar__button--delete', data: { method: 'delete', confirm: t('workarea.admin.create_catalog_products.are_you_sure_all_work_on_this_product_will_be_lost') }
|
36
|
+
|
37
|
+
.grid__cell.grid__cell--60
|
38
|
+
|
39
|
+
%ol.workflow-bar__steps
|
40
|
+
%li.workflow-bar__step
|
41
|
+
1) #{link_to t('workarea.admin.create_catalog_products.steps.setup'), edit_create_catalog_package_product_path(@product)}
|
42
|
+
%li.workflow-bar__step
|
43
|
+
2) #{link_to t('workarea.admin.create_catalog_package_products.steps.packaged_products'), packaged_products_create_catalog_package_product_path(@product)}
|
44
|
+
%li.workflow-bar__step
|
45
|
+
%strong 3) #{t('workarea.admin.create_catalog_products.steps.images')}
|
46
|
+
%li.workflow-bar__step
|
47
|
+
4) #{t('workarea.admin.create_catalog_products.steps.details')}
|
48
|
+
%li.workflow-bar__step
|
49
|
+
5) #{t('workarea.admin.create_catalog_products.steps.content')}
|
50
|
+
%li.workflow-bar__step
|
51
|
+
6) #{t('workarea.admin.create_catalog_products.steps.categorization')}
|
52
|
+
%li.workflow-bar__step
|
53
|
+
7) #{t('workarea.admin.create_catalog_products.steps.publish')}
|
54
|
+
|
55
|
+
.grid__cell.grid__cell--20
|
56
|
+
.grid.grid--auto.grid--right.grid--middle
|
57
|
+
.grid__cell= button_tag t('workarea.admin.create_catalog_products.images.save_images_and_continue'), value: 'save_images', class: 'workflow-bar__button workflow-bar__button--create'
|
@@ -0,0 +1,79 @@
|
|
1
|
+
- @page_title = t('workarea.admin.create_catalog_package_products.packaged_products.page_title', product_name: @product.name)
|
2
|
+
|
3
|
+
.view
|
4
|
+
.view__header
|
5
|
+
.view__heading
|
6
|
+
%h1.heading.heading--no-margin= t('workarea.admin.create_catalog_package_products.packaged_products.title', product_name: @product.name)
|
7
|
+
%p= link_to t('workarea.admin.create_catalog_package_products.workflow.skip_this'), content_create_catalog_package_product_path(@product)
|
8
|
+
|
9
|
+
.view__container
|
10
|
+
.section
|
11
|
+
%p.align-center= t('workarea.admin.create_catalog_package_products.packaged_products.instruction')
|
12
|
+
|
13
|
+
.browsing-controls.browsing-controls--with-divider.browsing-controls--center{ class: ('browsing-controls--filters-displayed' unless @search.toggle_facets?) }
|
14
|
+
= form_tag packaged_products_create_catalog_package_product_path(@product), method: 'get', id: 'product_search_form' do
|
15
|
+
= facet_hidden_inputs(@search.facets)
|
16
|
+
.browsing-controls__sort
|
17
|
+
.property.property--inline
|
18
|
+
= label_tag 'sort', t('workarea.admin.search.sort_by'), class: 'property__name'
|
19
|
+
= select_tag :sort, options_for_select(@search.sorts, selected: @search.sort), data: { form_submitting_control: '' }
|
20
|
+
|
21
|
+
.browsing-controls__search
|
22
|
+
.search-form
|
23
|
+
= text_field_tag :q, params[:q], class: 'search-form__input', title: t('workarea.admin.search.keywords'), placeholder: t('workarea.admin.search.keywords')
|
24
|
+
= submit_tag 'search_products', class: 'search-form__button'
|
25
|
+
|
26
|
+
= render 'workarea/admin/shared/creation_date', search: @search, form_path: packaged_products_create_catalog_package_product_path(@product)
|
27
|
+
|
28
|
+
- if @search.facets.present?
|
29
|
+
- @search.facets.each do |facet|
|
30
|
+
= render "workarea/admin/facets/#{facet.type}", facet: facet
|
31
|
+
|
32
|
+
-if @search.toggle_facets?
|
33
|
+
.browsing-controls__toggle-filters
|
34
|
+
%button.text-button{ type: 'button', data: { toggle_filters: '' } }= t('workarea.admin.search.show_filters')
|
35
|
+
|
36
|
+
= render 'workarea/admin/facets/applied', search: @search, reset_path: packaged_products_create_catalog_package_product_path(@product)
|
37
|
+
|
38
|
+
- if @search.results.blank?
|
39
|
+
%h2
|
40
|
+
= t('workarea.admin.create_catalog_package_products.packaged_products.no_matching_products')
|
41
|
+
= link_to t('workarea.admin.create_catalog_package_products.packaged_products.start_over'), packaged_products_create_catalog_package_product_path(@product)
|
42
|
+
|
43
|
+
- else
|
44
|
+
.grid.grid--auto.grid--flush.grid--center
|
45
|
+
- @search.results.each do |result|
|
46
|
+
.grid__cell
|
47
|
+
- if @product.product_ids.include?(result.id)
|
48
|
+
= render 'workarea/admin/featured_products/selected', featurable: @product, product: result
|
49
|
+
- else
|
50
|
+
= render 'workarea/admin/featured_products/unselected', featurable: @product, product: result
|
51
|
+
|
52
|
+
- if @search.results.total_pages > 1
|
53
|
+
= render 'workarea/admin/shared/pagination', collection: @search.results
|
54
|
+
|
55
|
+
.workflow-bar
|
56
|
+
.grid.grid--middle
|
57
|
+
.grid__cell.grid__cell--20
|
58
|
+
= link_to t('workarea.admin.form.cancel'), catalog_product_path(@product), class: 'workflow-bar__button workflow-bar__button--delete', data: { method: 'delete', confirm: t('workarea.admin.create_catalog_package_products.workflow.cancel_message') }
|
59
|
+
|
60
|
+
.grid__cell.grid__cell--60
|
61
|
+
%ol.workflow-bar__steps
|
62
|
+
%li.workflow-bar__step
|
63
|
+
1) #{link_to t('workarea.admin.create_catalog_package_products.steps.setup'), edit_create_catalog_package_product_path(@product)}
|
64
|
+
%li.workflow-bar__step
|
65
|
+
%strong 2) #{t('workarea.admin.create_catalog_package_products.steps.packaged_products')}
|
66
|
+
%li.workflow-bar__step
|
67
|
+
3) #{t('workarea.admin.create_catalog_package_products.steps.images')}
|
68
|
+
%li.workflow-bar__step
|
69
|
+
4) #{t('workarea.admin.create_catalog_package_products.steps.details')}
|
70
|
+
%li.workflow-bar__step
|
71
|
+
5) #{t('workarea.admin.create_catalog_package_products.steps.content')}
|
72
|
+
%li.workflow-bar__step
|
73
|
+
6) #{t('workarea.admin.create_catalog_package_products.steps.categorization')}
|
74
|
+
%li.workflow-bar__step
|
75
|
+
7) #{t('workarea.admin.create_catalog_package_products.steps.publish')}
|
76
|
+
|
77
|
+
.grid__cell.grid__cell--20
|
78
|
+
.grid.grid--auto.grid--right.grid--middle
|
79
|
+
.grid__cell= link_to "#{t('workarea.admin.create_catalog_package_products.packaged_products.continue_to_images')} →", images_create_catalog_package_product_path(@product), class: 'workflow-bar__button'
|
@@ -0,0 +1,61 @@
|
|
1
|
+
- @page_title = t('workarea.admin.create_catalog_products.publish.page_title', product_name: @product.name)
|
2
|
+
|
3
|
+
.view
|
4
|
+
.view__header
|
5
|
+
.view__heading
|
6
|
+
%h1.heading.heading--no-margin= t('workarea.admin.create_catalog_products.publish.when_does_it_go_live', product_name: @product.name)
|
7
|
+
%p= link_to t('workarea.admin.create_catalog_products.publish.or_skip_this'), url_for(@product)
|
8
|
+
|
9
|
+
.view__container.view__container--narrow
|
10
|
+
= form_tag save_publish_create_catalog_package_product_path(@product), method: 'post' do
|
11
|
+
.section
|
12
|
+
.grid.grid--center
|
13
|
+
.grid__cell.grid__cell--40-at-medium
|
14
|
+
.publish-create-release{ data: { publish_create_release: '' } }
|
15
|
+
.property
|
16
|
+
= radio_button_tag t('workarea.admin.create_catalog_products.publish.activate'), 'now', current_release.blank?, title: 'Active'
|
17
|
+
= label_tag 'activate_now', t('workarea.admin.create_catalog_products.publish.now'), class: 'heading--4'
|
18
|
+
|
19
|
+
- release_options.each do |release|
|
20
|
+
.property
|
21
|
+
= radio_button_tag t('workarea.admin.create_catalog_products.publish.activate'), release.id, release == current_release, title: 'Active'
|
22
|
+
= label_tag "activate_#{release.id}", t('workarea.admin.create_catalog_products.publish.with_release', release_name: release.name), class: 'heading--4'
|
23
|
+
|
24
|
+
.property
|
25
|
+
= radio_button_tag t('workarea.admin.create_catalog_products.publish.activate'), 'new_release', params[:activate] == 'new_release', title: 'Active'
|
26
|
+
= label_tag 'activate_new_release', t('workarea.admin.create_catalog_products.publish.with_a_new_release'), class: 'heading--4'
|
27
|
+
|
28
|
+
.publish-create-release__fields{ class: ("hidden" unless params[:activate] == 'new_release') }
|
29
|
+
.property
|
30
|
+
= label_tag 'release[name]', t('workarea.admin.create_catalog_products.publish.release_name'), class: 'property__name'
|
31
|
+
= text_field_tag 'release[name]', nil, class: 'text-box text-box--wide', placeholder: "Mother's Day #{Time.now.year}"
|
32
|
+
.property
|
33
|
+
= label_tag 'release[publish_at]', t('workarea.admin.create_catalog_products.publish.when_does_it_publish'), class: 'property__name'
|
34
|
+
= hidden_field_tag 'release[publish_at]', nil, placeholder: 'When does it publish?', data: { datetimepicker_field: { inline: true } }
|
35
|
+
|
36
|
+
.workflow-bar
|
37
|
+
.grid.grid--middle
|
38
|
+
.grid__cell.grid__cell--20
|
39
|
+
= link_to t('workarea.admin.create_catalog_products.publish.cancel'), catalog_product_path(@product), class: 'workflow-bar__button workflow-bar__button--delete', data: { method: 'delete', confirm: t('workarea.admin.create_catalog_products.are_you_sure_all_work_on_this_product_will_be_lost') }
|
40
|
+
|
41
|
+
.grid__cell.grid__cell--60
|
42
|
+
%ol.workflow-bar__steps
|
43
|
+
%li.workflow-bar__step
|
44
|
+
1) #{link_to t('workarea.admin.create_catalog_products.steps.setup'), edit_create_catalog_package_product_path(@product)}
|
45
|
+
%li.workflow-bar__step
|
46
|
+
2) #{link_to t('workarea.admin.create_catalog_package_products.steps.packaged_products'), packaged_products_create_catalog_package_product_path(@product)}
|
47
|
+
%li.workflow-bar__step
|
48
|
+
3) #{link_to t('workarea.admin.create_catalog_products.steps.images'), images_create_catalog_package_product_path(@product)}
|
49
|
+
%li.workflow-bar__step
|
50
|
+
4) #{link_to t('workarea.admin.create_catalog_products.steps.details'), details_create_catalog_package_product_path(@product)}
|
51
|
+
%li.workflow-bar__step
|
52
|
+
5) #{link_to t('workarea.admin.create_catalog_products.steps.content'), content_create_catalog_package_product_path(@product)}
|
53
|
+
%li.workflow-bar__step
|
54
|
+
6) #{link_to t('workarea.admin.create_catalog_products.steps.categorization'), categorization_create_catalog_package_product_path(@product)}
|
55
|
+
%li.workflow-bar__step
|
56
|
+
%strong
|
57
|
+
7) #{t('workarea.admin.create_catalog_products.steps.publish')}
|
58
|
+
|
59
|
+
.grid__cell.grid__cell--20
|
60
|
+
.grid.grid--auto.grid--right.grid--middle
|
61
|
+
.grid__cell= button_tag t('workarea.admin.create_catalog_products.publish.save_and_finish'), value: 'publish', class: 'workflow-bar__button workflow-bar__button--create'
|
@@ -0,0 +1,68 @@
|
|
1
|
+
- @page_title = t('workarea.admin.create_catalog_products.setup.page_title')
|
2
|
+
|
3
|
+
.view
|
4
|
+
.view__header
|
5
|
+
.view__heading
|
6
|
+
%h1= t('workarea.admin.create_catalog_products.setup.setup')
|
7
|
+
- unless params[:continue]
|
8
|
+
%p
|
9
|
+
= t('workarea.admin.create_catalog_products.setup.going_to_create_several_products_at_once')
|
10
|
+
= link_to t('workarea.admin.create_catalog_products.setup.try_the_csv_import'), new_data_file_import_path(model_type: 'Workarea::Catalog::Product')
|
11
|
+
%br
|
12
|
+
= t('workarea.admin.create_catalog_products.setup.copy_a_product')
|
13
|
+
= link_to t('workarea.admin.create_catalog_products.setup.copy_button'), new_catalog_product_copy_path
|
14
|
+
|
15
|
+
.view__container.view__container--narrow
|
16
|
+
- @product.errors.full_messages.each do |message|
|
17
|
+
= render_message 'error', message
|
18
|
+
|
19
|
+
= form_tag create_catalog_package_products_path, method: 'post' do
|
20
|
+
= hidden_field_tag :id, @product.slug unless @product.new_record?
|
21
|
+
= hidden_field_tag 'product[active]', false
|
22
|
+
|
23
|
+
.section
|
24
|
+
.property.property--required
|
25
|
+
= label_tag 'product[name]', t('workarea.admin.create_catalog_products.setup.product_name'), class: 'property__name'
|
26
|
+
= text_field_tag 'product[name]', @product.name, class: 'text-box text-box--i18n', required: true
|
27
|
+
|
28
|
+
.property
|
29
|
+
= label_tag 'product[slug]', t('workarea.admin.fields.slug'), class: 'property__name'
|
30
|
+
%span= storefront.product_url('')
|
31
|
+
= text_field_tag 'product[slug]', @product.slug, class: 'text-box text-box--medium', placeholder: @product.slug || 'your-slug-here'
|
32
|
+
|
33
|
+
.property
|
34
|
+
= label_tag 'product[tag_list]', t('workarea.admin.fields.tags'), class: 'property__name'
|
35
|
+
= text_field_tag 'product[tag_list]', @product.tag_list, class: 'text-box'
|
36
|
+
%span.property__note= t('workarea.admin.create_catalog_products.setup.tags_note')
|
37
|
+
|
38
|
+
.property
|
39
|
+
= label_tag 'product_template', t('workarea.admin.fields.template'), class: 'property__name'
|
40
|
+
= select_tag 'product[template]', options_for_select(@product.templates, @product.template)
|
41
|
+
|
42
|
+
- if @product.customization_options.many?
|
43
|
+
.property
|
44
|
+
= label_tag "product_customizations", t('workarea.admin.fields.customizations'), class: 'property__name'
|
45
|
+
= select_tag 'product[customizations]', options_for_select(@product.customization_options, @product.customizations), id: "product_customizations"
|
46
|
+
|
47
|
+
.workflow-bar
|
48
|
+
.grid.grid--middle
|
49
|
+
.grid__cell.grid__cell--20
|
50
|
+
- if @product.new_record?
|
51
|
+
= link_to t('workarea.admin.create_catalog_products.setup.cancel'), catalog_products_path, class: 'workflow-bar__button workflow-bar__button--delete'
|
52
|
+
- else
|
53
|
+
= link_to t('workarea.admin.create_catalog_products.setup.cancel'), catalog_product_path(@product), class: 'workflow-bar__button workflow-bar__button--delete', data: { method: 'delete', confirm: t('workarea.admin.create_catalog_products.are_you_sure_all_work_on_this_product_will_be_lost') }
|
54
|
+
|
55
|
+
.grid__cell.grid__cell--60
|
56
|
+
%ol.workflow-bar__steps
|
57
|
+
%li.workflow-bar__step
|
58
|
+
%strong 1) #{t('workarea.admin.create_catalog_products.steps.setup')}
|
59
|
+
%li.workflow-bar__step 2) #{t('workarea.admin.create_catalog_package_products.steps.packaged_products')}
|
60
|
+
%li.workflow-bar__step 3) #{t('workarea.admin.create_catalog_products.steps.images')}
|
61
|
+
%li.workflow-bar__step 4) #{t('workarea.admin.create_catalog_products.steps.details')}
|
62
|
+
%li.workflow-bar__step 5) #{t('workarea.admin.create_catalog_products.steps.content')}
|
63
|
+
%li.workflow-bar__step 6) #{t('workarea.admin.create_catalog_products.steps.categorization')}
|
64
|
+
%li.workflow-bar__step 7) #{t('workarea.admin.create_catalog_products.steps.publish')}
|
65
|
+
|
66
|
+
.grid__cell.grid__cell--20
|
67
|
+
.grid.grid--auto.grid--right.grid--middle
|
68
|
+
.grid__cell= button_tag t('workarea.admin.create_catalog_package_products.setup.save_and_add_products'), value: 'save_setup', class: 'workflow-bar__button workflow-bar__button--create'
|
@@ -0,0 +1,34 @@
|
|
1
|
+
- @page_title = t('workarea.admin.create_catalog_products.select.title')
|
2
|
+
|
3
|
+
.view
|
4
|
+
.view__header
|
5
|
+
.view__heading
|
6
|
+
%h1.heading--no-margin= t('workarea.admin.create_catalog_products.select.title')
|
7
|
+
%p.align-center= t('workarea.admin.create_catalog_products.select.instruction')
|
8
|
+
|
9
|
+
= form_tag create_catalog_products_path, method: 'get' do
|
10
|
+
.section
|
11
|
+
.grid
|
12
|
+
.grid__cell.grid__cell--33
|
13
|
+
.grid__cell.grid__cell--33
|
14
|
+
.section.align-center
|
15
|
+
.property
|
16
|
+
= radio_button_tag 'product_type', 'standard', true, title: t('workarea.admin.create_catalog_products.select.standard')
|
17
|
+
= label_tag 'product_type_standard', t('workarea.admin.create_catalog_products.select.standard'), class: 'heading--3'
|
18
|
+
%p= t('workarea.admin.create_catalog_products.select.standard_description')
|
19
|
+
.property
|
20
|
+
= radio_button_tag 'product_type', 'package', false, title: t('workarea.admin.create_catalog_products.select.package')
|
21
|
+
= label_tag 'product_type_package', t('workarea.admin.create_catalog_products.select.package'), class: 'heading--3'
|
22
|
+
%p= t('workarea.admin.create_catalog_products.select.package_description')
|
23
|
+
.grid__cell.grid__cell--33
|
24
|
+
|
25
|
+
.workflow-bar
|
26
|
+
.grid.grid--middle
|
27
|
+
.grid__cell.grid__cell--20
|
28
|
+
= link_to t('workarea.admin.form.cancel'), catalog_products_path, class: 'workflow-bar__button workflow-bar__button--delete'
|
29
|
+
|
30
|
+
.grid__cell.grid__cell--60
|
31
|
+
|
32
|
+
.grid__cell.grid__cell--20
|
33
|
+
.grid.grid--auto.grid--right.grid--middle
|
34
|
+
.grid__cell= button_tag t('workarea.admin.create_catalog_products.select.button'), value: 'select_product_type', class: 'workflow-bar__button workflow-bar__button--create'
|