mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Adding ponies and filtering
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
Darkswarm.filter 'products', (Matcher)->
|
||||
(products, text)->
|
||||
products ||= []
|
||||
text ?= ""
|
||||
products.filter (product)=>
|
||||
propertiesToMatch = [product.name, product.supplier.name, product.primary_taxon.name]
|
||||
Matcher.match propertiesToMatch, text
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
%div{bindonce: true}
|
||||
%product{"ng-controller" => "ProductNodeCtrl",
|
||||
"ng-repeat" => "product in Product.products | filter:query | orderBy:ordering.order | limitTo: limit track by product.id"}
|
||||
"ng-repeat" => "product in Product.products | products:query | orderBy:ordering.order | limitTo: limit track by product.id"}
|
||||
%div
|
||||
= render partial: "shop/products/summary"
|
||||
%div{"bo-if" => "hasVariants"}
|
||||
|
||||
Reference in New Issue
Block a user