From: Tom Hughes Date: Tue, 7 Aug 2007 23:25:35 +0000 (+0000) Subject: Add an explicit message when no results are found for a given source. X-Git-Tag: live~8261 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/eb6114617c219baeeca957d9022f438e981c308e Add an explicit message when no results are found for a given source. --- 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 %>