Add deface for order cycle selection

This commit is contained in:
Rohan Mitchell
2013-01-31 09:53:06 +11:00
parent 63f3504b81
commit 8b5aea42b8
3 changed files with 26 additions and 10 deletions

View File

@@ -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")

View File

@@ -0,0 +1 @@
%p Hello, world!

View File

@@ -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