X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/3bae3e688181aeb6957b4baf959501dadc5c6fd5..2e2189ecb9e60b6aefda6919a177932372339607:/app/views/geocoder/search.rhtml?ds=sidebyside diff --git a/app/views/geocoder/search.rhtml b/app/views/geocoder/search.rhtml index bbe1fad2a..7ffde3194 100644 --- a/app/views/geocoder/search.rhtml +++ b/app/views/geocoder/search.rhtml @@ -1,8 +1,12 @@ <% @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]})" %>
+<%= result_to_html(result) %>
+<% end %> <% end %> <% else %><%= source[:error] %>