diff --git a/app/overrides/order_cycle_selection.rb b/app/overrides/order_cycle_selection.rb new file mode 100644 index 0000000000..1d3433da80 --- /dev/null +++ b/app/overrides/order_cycle_selection.rb @@ -0,0 +1,14 @@ +Deface::Override.new(:virtual_path => "spree/home/index", + :insert_before => "[data-hook='homepage_products']", + :partial => "order_cycles/selection", + :name => "order_cycle_selection_home") + +Deface::Override.new(:virtual_path => "spree/products/index", + :insert_top => "[data-hook='homepage_products']", + :partial => "order_cycles/selection", + :name => "order_cycle_selection_products") + +Deface::Override.new(:virtual_path => "spree/taxons/show", + :insert_top => "[data-hook='homepage_products']", + :partial => "order_cycles/selection", + :name => "order_cycle_selection_taxon") diff --git a/app/views/order_cycles/_selection.html.haml b/app/views/order_cycles/_selection.html.haml new file mode 100644 index 0000000000..ff044575a4 --- /dev/null +++ b/app/views/order_cycles/_selection.html.haml @@ -0,0 +1 @@ +%p Hello, world! diff --git a/app/views/spree/shared/_products_by_distributor.html.haml b/app/views/spree/shared/_products_by_distributor.html.haml index 34da323228..d7ba771c8f 100644 --- a/app/views/spree/shared/_products_by_distributor.html.haml +++ b/app/views/spree/shared/_products_by_distributor.html.haml @@ -1,11 +1,12 @@ -= home_page_cms_content +%div(data-hook='homepage_products') + = home_page_cms_content -- if @products - #products= render 'spree/shared/products', :products => @products, :taxon => @taxon -- else - #products-local - %h2= "Products at #{current_distributor.name}" - = render 'spree/shared/products', :products => @products_local, :taxon => @taxon - #products-remote - %h2 Products found elsewhere - = render 'spree/shared/products', :products => @products_remote, :taxon => @taxon + - if @products + #products= render 'spree/shared/products', :products => @products, :taxon => @taxon + - else + #products-local + %h2= "Products at #{current_distributor.name}" + = render 'spree/shared/products', :products => @products_local, :taxon => @taxon + #products-remote + %h2 Products found elsewhere + = render 'spree/shared/products', :products => @products_remote, :taxon => @taxon