use shared partial for no results

This commit is contained in:
Rafael Schouten
2014-10-06 23:51:19 +11:00
parent 7805d46743
commit ec6805f573
2 changed files with 6 additions and 34 deletions

View File

@@ -4,20 +4,13 @@
.small-12.columns
%h1 Shop in your local area
#active-table-search.row.pad-top
.small-12.columns
%input{type: :text,
"ng-model" => "query",
placeholder: "Search by name or suburb...",
"ng-debounce" => "150",
"ofn-disable-enter" => true}
= render partial: "shared/components/enterprise_search"
= render partial: "home/filters"
.row{bindonce: true}
.small-12.columns
.active_table
%hub.active_table_node.row.animate-repeat{"ng-repeat" => "hub in hubs = (Enterprises.hubs | searchEnterprises:query | taxons:activeTaxons | shipping:shippingTypes | showProfiles:show_profiles | orderBy:['-active', '+orders_close_at'])",
%hub.active_table_node.row.animate-repeat{"ng-repeat" => "hub in filteredEnterprises = (Enterprises.hubs | searchEnterprises:query | taxons:activeTaxons | shipping:shippingTypes | showHubProfiles:show_profiles | orderBy:['-active', '+orders_close_at'])",
"ng-class" => "{'is_profile' : !hub.is_distributor, 'closed' : !open(), 'open' : open(), 'inactive' : !hub.active, 'current' : current()}",
"scroll-after-load" => true,
"ng-controller" => "HubNodeCtrl",
@@ -26,9 +19,4 @@
= render partial: 'home/skinny'
= render partial: 'home/fat'
.row{"ng-show" => "hubs.length == 0"}
.columns.small-12
%p.no-results
Sorry, no results found for
%strong {{query}}.
Try another search?
= render partial: 'shared/components/enterprise_no_results'

View File

@@ -3,20 +3,8 @@
.row
.small-12.columns.pad-top
%h1 Find local producers
/ %div
/ Find a
/ %ofn-modal{title: "producer"}
/ = render partial: "modals/producers"
/ from the list below:
#active-table-search.row
.small-12.columns
%input.animate-show{type: :text,
"ng-model" => "query",
placeholder: "Search by producer or suburb...",
"ng-debounce" => "150",
"ofn-disable-enter" => true}
= render partial: "shared/components/enterprise_search"
= render partial: "producers/filters"
.row{bindonce: true}
@@ -24,7 +12,7 @@
.active_table
%producer.active_table_node.row.animate-repeat{id: "{{producer.path}}",
"scroll-after-load" => true,
"ng-repeat" => "producer in producers = (Enterprises.producers | searchEnterprises:query | taxons:activeTaxons)",
"ng-repeat" => "producer in filteredEnterprises = (Enterprises.producers | searchEnterprises:query | taxons:activeTaxons)",
"ng-controller" => "ProducerNodeCtrl",
"ng-class" => "{'closed' : !open(), 'open' : open(), 'inactive' : !producer.active}",
id: "{{producer.hash}}"}
@@ -33,10 +21,6 @@
= render partial: 'producers/skinny'
= render partial: 'producers/fat'
%producer.row{"ng-show" => "producers.length == 0"}
%p.no-results
Sorry, no results found for
%strong {{query}}.
Try another search?
= render partial: 'shared/components/enterprise_no_results'
= render partial: "shared/footer"