From 9be5dc41b98062efe5047f78ddad8cddbb3c04db Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Sun, 24 Jun 2012 09:41:33 +1000 Subject: [PATCH] Split products by local/remote distributor: style --- app/assets/stylesheets/store/openfoodweb.css.scss | 9 +++++++++ .../spree/shared/_products_by_distributor.html.haml | 8 ++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/store/openfoodweb.css.scss b/app/assets/stylesheets/store/openfoodweb.css.scss index 89affd418f..3b0c18b6cb 100644 --- a/app/assets/stylesheets/store/openfoodweb.css.scss +++ b/app/assets/stylesheets/store/openfoodweb.css.scss @@ -98,3 +98,12 @@ ul.product-listing { } } } + + +/* Highlight local products in distributor-split product listings */ +#products-local ul { + margin-bottom: 1em; + padding: 10px; + border-radius: 10px; + background-color: #def; +} diff --git a/app/views/spree/shared/_products_by_distributor.html.haml b/app/views/spree/shared/_products_by_distributor.html.haml index 96b0f1973d..c7f2200ae2 100644 --- a/app/views/spree/shared/_products_by_distributor.html.haml +++ b/app/views/spree/shared/_products_by_distributor.html.haml @@ -1,5 +1,9 @@ - if @products #products= render 'spree/shared/products', :products => @products, :taxon => @taxon - else - #products-local= render 'spree/shared/products', :products => @products_local, :taxon => @taxon - #products-remote= render 'spree/shared/products', :products => @products_remote, :taxon => @taxon + #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