From 673635fdcb3bb212e5f3551edf6123b58cafe033 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Fri, 3 Jul 2015 12:07:57 +1000 Subject: [PATCH] Show no results message at correct times --- app/views/home/_hubs_table.html.haml | 6 +++--- .../shared/components/_enterprise_no_results.html.haml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/home/_hubs_table.html.haml b/app/views/home/_hubs_table.html.haml index e020480458..fa2de8bc3b 100644 --- a/app/views/home/_hubs_table.html.haml +++ b/app/views/home/_hubs_table.html.haml @@ -4,7 +4,7 @@ "ng-controller" => "HubNodeCtrl", id: "{{hub.hash}}"} .small-12.columns - = render partial: 'home/skinny' - = render partial: 'home/fat' + = render 'home/skinny' + = render 'home/fat' - = render partial: 'shared/components/enterprise_no_results' + = render 'shared/components/enterprise_no_results', enterprises: enterprises diff --git a/app/views/shared/components/_enterprise_no_results.html.haml b/app/views/shared/components/_enterprise_no_results.html.haml index 2e6edd0875..fe3ce2ecdc 100644 --- a/app/views/shared/components/_enterprise_no_results.html.haml +++ b/app/views/shared/components/_enterprise_no_results.html.haml @@ -1,4 +1,4 @@ -%producer.row{"ng-show" => "filteredEnterprises.length == 0"} +%producer.row{"ng-show" => "#{enterprises || 'filteredEnterprises'}.length == 0"} %p.no-results Sorry, no results found for %strong {{query}}.