Do not show 'Closest to...' heading when no query entered

This commit is contained in:
Rohan Mitchell
2015-07-08 11:55:11 +10:00
parent 5b93ac2ae1
commit 6816df5f72

View File

@@ -15,7 +15,7 @@
= render "home/hubs_table", enterprises: "nameMatches"
.distance-matches{"ng-if" => "nameMatches.length == 0 || distanceMatchesShown"}
%h2
%h2{"ng-show" => "nameMatches.length > 0 || query.length > 0"}
Closest to
%span{"ng-show" => "nameMatches.length > 0"} {{ nameMatches[0].name }}...
%span{"ng-hide" => "nameMatches.length > 0"} {{ query }}...