mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-06 22:36:07 +00:00
Add deface for order cycle selection
This commit is contained in:
14
app/overrides/order_cycle_selection.rb
Normal file
14
app/overrides/order_cycle_selection.rb
Normal 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")
|
||||
1
app/views/order_cycles/_selection.html.haml
Normal file
1
app/views/order_cycles/_selection.html.haml
Normal file
@@ -0,0 +1 @@
|
||||
%p Hello, world!
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user