Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrap deface overrides in a module #171

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions app/overrides/decorate_admin_configurations_index.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# frozen_string_literal: true

Deface::Override.new(
virtual_path: "spree/admin/shared/_configuration_menu",
name: "multi_domain_admin_configurations_menu",
insert_bottom: "[data-hook='admin_configurations_sidebar_menu']",
disabled: false,
partial: "spree/shared/multi_domain_sidebar_entry"
)
module DecorateAdminConfigurationsIndex
Deface::Override.new(
virtual_path: "spree/admin/shared/_configuration_menu",
name: "multi_domain_admin_configurations_menu",
insert_bottom: "[data-hook='admin_configurations_sidebar_menu']",
disabled: false,
partial: "spree/shared/multi_domain_sidebar_entry"
)
end
16 changes: 9 additions & 7 deletions app/overrides/decorate_admin_products_form.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# frozen_string_literal: true

Deface::Override.new(
virtual_path: "spree/admin/products/_form",
name: "multi_domain_admin_product_form_meta",
insert_bottom: "[data-hook='admin_product_form_meta']",
partial: "spree/admin/products/stores",
disabled: false
)
module DecorateAdminProductsForm
Deface::Override.new(
virtual_path: "spree/admin/products/_form",
name: "multi_domain_admin_product_form_meta",
insert_bottom: "[data-hook='admin_product_form_meta']",
partial: "spree/admin/products/stores",
disabled: false
)
end
44 changes: 23 additions & 21 deletions app/overrides/decorate_admin_products_index.rb
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
# frozen_string_literal: true

Deface::Override.new(
virtual_path: "spree/admin/products/index",
name: "multi_domain_admin_products_index_headers",
insert_before: "[data-hook='admin_products_index_header_actions']",
partial: "spree/admin/products/index_headers",
disabled: false
)
module DecorateAdminProductsIndex
Deface::Override.new(
virtual_path: "spree/admin/products/index",
name: "multi_domain_admin_products_index_headers",
insert_before: "[data-hook='admin_products_index_header_actions']",
partial: "spree/admin/products/index_headers",
disabled: false
)

Deface::Override.new(
virtual_path: "spree/admin/products/index",
name: "multi_domain_admin_products_index_rows",
insert_before: "[data-hook='admin_products_index_row_actions']",
partial: "spree/admin/products/index_rows",
disabled: false
)
Deface::Override.new(
virtual_path: "spree/admin/products/index",
name: "multi_domain_admin_products_index_rows",
insert_before: "[data-hook='admin_products_index_row_actions']",
partial: "spree/admin/products/index_rows",
disabled: false
)

Deface::Override.new(
virtual_path: "spree/admin/products/index",
name: "multi_domain_admin_products_index_search",
insert_top: "[data-hook='admin_products_index_search']",
partial: "spree/admin/products/index_search_fields",
disabled: false
)
Deface::Override.new(
virtual_path: "spree/admin/products/index",
name: "multi_domain_admin_products_index_search",
insert_top: "[data-hook='admin_products_index_search']",
partial: "spree/admin/products/index_search_fields",
disabled: false
)
end