From: Tom Hughes Date: Tue, 7 Aug 2007 17:14:27 +0000 (+0000) Subject: Remove old geocoder views and add new one. X-Git-Tag: live~8286 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/3bae3e688181aeb6957b4baf959501dadc5c6fd5 Remove old geocoder views and add new one. --- diff --git a/app/views/geocoder/_geocoder.rhtml b/app/views/geocoder/_geocoder.rhtml deleted file mode 100644 index e69de29bb..000000000 diff --git a/app/views/geocoder/results.rhtml b/app/views/geocoder/results.rhtml deleted file mode 100644 index 7f4d710e1..000000000 --- a/app/views/geocoder/results.rhtml +++ /dev/null @@ -1,33 +0,0 @@ -

Your Search Results for <%= @place_name.capitalize %>

- - - - - - - - - - -<% @res_ary.each do |hsh| %> - - - - - - - - -<% end %> - -
NameCountry
-<%= hsh['name'] %> - -<%= hsh['countryname'] %> - -<%= link_to('Map', url="/index.html?mlat=#{hsh['lat']}&mlon=#{hsh['lon']}&zoom=12") %> - -<%= link_to('Edit', url="/edit.html?mlat=#{hsh['lat']}&mlon=#{hsh['lon']}&zoom=12") %> - -<%= link_to('API', url="/#FIXME") %> -
diff --git a/app/views/geocoder/search.rhtml b/app/views/geocoder/search.rhtml new file mode 100644 index 000000000..bbe1fad2a --- /dev/null +++ b/app/views/geocoder/search.rhtml @@ -0,0 +1,10 @@ +<% @results.each do |source| %> +

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

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

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

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

<%= source[:error] %>

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