Show name matches only when at least one is present. Show accurate closest-to target.

This commit is contained in:
Rohan Mitchell
2015-07-02 16:14:52 +10:00
parent eba0a12d29
commit 794c9558bb

View File

@@ -10,8 +10,14 @@
.row{bindonce: true}
.small-12.columns
%h2 Did you mean?
= render "home/hubs_table", enterprises: "nameMatches"
.name-matches{"ng-show" => "nameMatches.length > 0"}
%h2 Did you mean?
= render "home/hubs_table", enterprises: "nameMatches"
%h2
Closest to
%span{"ng-show" => "nameMatches.length > 0"} {{ nameMatches[0].name }}
%span{"ng-hide" => "nameMatches.length > 0"} {{ query }}
\...
%h2 Closest to {{ query }}...
= render "home/hubs_table", enterprises: "distanceMatches"