mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-30 06:31:16 +00:00
Add filters count
This commit is contained in:
@@ -94,3 +94,6 @@ Darkswarm.controller "ProductsCtrl", ($scope, $filter, $rootScope, Products, Ord
|
||||
$scope.Products.products = []
|
||||
$scope.update_filters()
|
||||
$scope.loadProducts()
|
||||
|
||||
$scope.filtersCount = () ->
|
||||
$scope.taxonSelectors.totalActive() + $scope.propertySelectors.totalActive()
|
||||
|
||||
@@ -49,5 +49,8 @@
|
||||
%input.small.button.primary.right.add_to_cart{type: :submit, value: "{{ Cart.dirty ? '#{t(:products_updating_cart)}' : (Cart.empty() ? '#{t(:products_cart_empty)}' : '#{t(:products_edit_cart)}' ) }}", "ng-disabled" => "Cart.dirty || Cart.empty()", "ng-class" => "{ dirty: Cart.dirty }" }
|
||||
|
||||
.hide-for-medium-down.large-2.columns
|
||||
%h5= t(:products_filter_by)
|
||||
%h5
|
||||
= t(:products_filter_by)
|
||||
%span{ng: {show: 'filtersCount()' }}
|
||||
= "({{ filtersCount() }} #{t(:products_filter_selected)})"
|
||||
= render partial: "shop/products/filters"
|
||||
|
||||
@@ -1654,6 +1654,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using
|
||||
products_with: with
|
||||
products_search: "Search by product or producer"
|
||||
products_filter_by: "Filter by"
|
||||
products_filter_selected: "selected"
|
||||
products_loading: "Loading products..."
|
||||
products_updating_cart: "Updating cart..."
|
||||
products_cart_empty: "Cart empty"
|
||||
|
||||
Reference in New Issue
Block a user