<% @results.each do |source| %>
<p class="search_results_heading">Results from <%= link_to source[:source], source[:url] %></p>
<% if source[:results] %>
+<% if source[:results].empty? %>
+<p class="search_results_entry">No results found</p>
+<% else %>
<% source[:results].each do |result| %>
-<p class="search_results_entry"><%= link_to_function result[:description], "setPosition(#{result[:lat]}, #{result[:lon]}, #{result[:zoom]})" %></p>
+<p class="search_results_entry"><%= result_to_html(result) %></p>
+<% end %>
<% end %>
<% else %>
<p class="search_results_error"><%= source[:error] %></p>