Remove old geocoder views and add new one.
This commit is contained in:
parent
6c02cd4b5f
commit
3bae3e6881
3 changed files with 10 additions and 33 deletions
|
@ -1,33 +0,0 @@
|
|||
<h2>Your Search Results for <%= @place_name.capitalize %></h2>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Country</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
<% @res_ary.each do |hsh| %>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<%= hsh['name'] %>
|
||||
</td>
|
||||
<td>
|
||||
<%= hsh['countryname'] %>
|
||||
</td>
|
||||
<td>
|
||||
<%= link_to('Map', url="/index.html?mlat=#{hsh['lat']}&mlon=#{hsh['lon']}&zoom=12") %>
|
||||
</td>
|
||||
<td>
|
||||
<%= link_to('Edit', url="/edit.html?mlat=#{hsh['lat']}&mlon=#{hsh['lon']}&zoom=12") %>
|
||||
</td>
|
||||
<td>
|
||||
<%= link_to('API', url="/#FIXME") %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
</table>
|
10
app/views/geocoder/search.rhtml
Normal file
10
app/views/geocoder/search.rhtml
Normal file
|
@ -0,0 +1,10 @@
|
|||
<% @results.each do |source| %>
|
||||
<p class="search_results_heading">Results from <%= link_to source[:source], source[:url] %></p>
|
||||
<% if source[:results] %>
|
||||
<% source[:results].each do |result| %>
|
||||
<p class="search_results_entry"><%= link_to_function result[:description], "setPosition(#{result[:lat]}, #{result[:lon]}, #{result[:zoom]})" %></p>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<p class="search_results_error"><%= source[:error] %></p>
|
||||
<% end %>
|
||||
<% end %>
|
Loading…
Add table
Add a link
Reference in a new issue