X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/a8c7d1c4ce7b0b11eda847947a50dadcbee75cae..2e2f2124728ca755b2db8f83f022eaea24b647f0:/app/views/geocoder/_results.html.erb diff --git a/app/views/geocoder/_results.html.erb b/app/views/geocoder/_results.html.erb new file mode 100644 index 000000000..bf42244f9 --- /dev/null +++ b/app/views/geocoder/_results.html.erb @@ -0,0 +1,15 @@ +<% results.each do |source| %> +<% type = source[:type] || t('geocoder.results.results') %> +

<%= t'geocoder.results.type_from_source', :type => type, :source_link => link_to(source[:source], source[:url]) %>

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

<%= t'geocoder.results.no_results' %>

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

<%= result_to_html(result) %>

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

<%= source[:error] %>

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