From eb6114617c219baeeca957d9022f438e981c308e Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 7 Aug 2007 23:25:35 +0000 Subject: [PATCH] Add an explicit message when no results are found for a given source. --- app/views/geocoder/search.rhtml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/views/geocoder/search.rhtml b/app/views/geocoder/search.rhtml index bbe1fad2a..a3674f745 100644 --- a/app/views/geocoder/search.rhtml +++ b/app/views/geocoder/search.rhtml @@ -1,9 +1,13 @@ <% @results.each do |source| %>

Results from <%= link_to source[:source], source[:url] %>

<% if source[:results] %> +<% if source[:results].empty? %> +

No results found

+<% else %> <% source[:results].each do |result| %>

<%= link_to_function result[:description], "setPosition(#{result[:lat]}, #{result[:lon]}, #{result[:zoom]})" %>

<% end %> +<% end %> <% else %>

<%= source[:error] %>

<% end %> -- 2.43.2