diff --git a/app/assets/stylesheets/store/openfoodweb.css.scss b/app/assets/stylesheets/store/openfoodweb.css.scss new file mode 100644 index 0000000000..512ddd1790 --- /dev/null +++ b/app/assets/stylesheets/store/openfoodweb.css.scss @@ -0,0 +1,24 @@ +@import "screen"; + +/* Based on Spree's nav#taxonomies style. Copied instead of + * extended with SASS because SASS does not allow extending + * nested selectors. + */ +nav#filters { + .filter_name { + text-transform: uppercase; + border-bottom: 1px solid lighten($body_text_color, 60); + margin-bottom: 5px; + font-size: $main_navigation_header_font_size; + } + + .filter_choices { + padding-left: 20px; + margin-bottom: 20px; + list-style: disc outside; + + li a { + font-size: $main_navigation_font_size; + } + } +} diff --git a/app/views/spree/shared/_filters.html.erb b/app/views/spree/shared/_filters.html.erb index da86fcaaf9..cbb70ba94a 100644 --- a/app/views/spree/shared/_filters.html.erb +++ b/app/views/spree/shared/_filters.html.erb @@ -1,28 +1,19 @@ <% filters = @taxon ? @taxon.applicable_filters : [Spree::ProductFilters.distributor_filter] %> <% unless filters.empty? %> - <%= form_tag '', :method => :get, :id => 'sidebar_products_search' do %> + <% end %> diff --git a/lib/spree/product_filters.rb b/lib/spree/product_filters.rb index 8cc8e60387..be1e501b8b 100644 --- a/lib/spree/product_filters.rb +++ b/lib/spree/product_filters.rb @@ -10,7 +10,7 @@ module Spree def ProductFilters.distributor_filter distributors = Spree::Distributor.all.map(&:name).compact.uniq conds = Hash[*distributors.map { |d| [d, "#{Spree::Distributor.table_name}.name = '#{d}'"] }.flatten] - { :name => "Distributor", + { :name => "Group", :scope => :distributor_any, :conds => conds, :labels => (distributors.sort).map { |k| [k, k] }