From 11974689ef497ef1f1402ecd7ce7d50251af5a3d Mon Sep 17 00:00:00 2001 From: luisramos0 Date: Tue, 23 Jul 2019 11:09:52 +0100 Subject: [PATCH] Remove dead code under views/spree/shared --- app/views/spree/shared/_address.html.haml | 4 ---- app/views/spree/shared/_filters.html.haml | 15 -------------- app/views/spree/shared/_products.html.haml | 23 ---------------------- 3 files changed, 42 deletions(-) delete mode 100644 app/views/spree/shared/_address.html.haml delete mode 100644 app/views/spree/shared/_filters.html.haml delete mode 100644 app/views/spree/shared/_products.html.haml diff --git a/app/views/spree/shared/_address.html.haml b/app/views/spree/shared/_address.html.haml deleted file mode 100644 index 976a85adc8..0000000000 --- a/app/views/spree/shared/_address.html.haml +++ /dev/null @@ -1,4 +0,0 @@ -= address.address1 -= ", #{address.address2}" unless address.address2.blank? -%br/ -= [address.city, address.state_text, address.zipcode, address.country.name].compact.join ', ' diff --git a/app/views/spree/shared/_filters.html.haml b/app/views/spree/shared/_filters.html.haml deleted file mode 100644 index 728dbbc0ef..0000000000 --- a/app/views/spree/shared/_filters.html.haml +++ /dev/null @@ -1,15 +0,0 @@ -- filters = @taxon ? @taxon.applicable_filters : [] -- unless filters.empty? - %nav#filters - - params[:search] ||= {} - - filters.each do |filter| - - labels = filter[:labels] || filter[:conds].map {|m,c| [m,m]} - - next if labels.empty? - - %h6.filter_name= "Shop by #{filter[:name]}" - - %ul.filter_choices - - labels.each do |nm,val| - %li.nowrap - - active = params[:search][filter[:scope]] && params[:search][filter[:scope]].include?(val.to_s) - = link_to nm, "?search[#{filter[:scope].to_s}][]=#{CGI.escape(val)}" diff --git a/app/views/spree/shared/_products.html.haml b/app/views/spree/shared/_products.html.haml deleted file mode 100644 index 8ea2743642..0000000000 --- a/app/views/spree/shared/_products.html.haml +++ /dev/null @@ -1,23 +0,0 @@ -- paginated_products = @searcher.retrieve_products if params.key?(:keywords) -- paginated_products ||= products - -- if products.empty? - = t(:no_products_found) -- elsif params.key?(:keywords) - %h6.search-results-title= t(:search_results, :keywords => h(params[:keywords])) - -- if products.any? - %ul#products.inline.product-listing{"data-hook" => ""} - - reset_cycle('default') - - products.each do |product| - - if Spree::Config[:show_zero_stock_products] || product.has_stock? - %li{:class => "columns three #{cycle("alpha", "secondary", "", "omega secondary")}", "data-hook" => "products_list_item", :id => "product_#{product.id}", :itemscope => "", :itemtype => "http://schema.org/Product"} - .product-image - = link_to small_image(product, :itemprop => "image"), product, :itemprop => 'url' - = link_to truncate(product.name, :length => 50), product, :class => 'info', :itemprop => "name", :title => product.name - %span.price.selling{:itemprop => "price"}= spree_number_to_currency(product.price) - -- if paginated_products.respond_to?(:num_pages) - - params.delete(:search) - - params.delete(:taxon) - = paginate paginated_products