]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/site/_search.html.erb
Fix the "Where am I?" link
[rails.git] / app / views / site / _search.html.erb
index 52adf66e1817e31df290976d10bb5f4883da5d21..c208b3219837fb184713b6c7d659769acaff6d07 100644 (file)
@@ -1,18 +1,3 @@
-<script type="text/javascript">
-<!--
-  function describeLocation() {
-    var args = querystring.parse($("#viewanchor").attr("href").split('?')[1]);
-
-    $("#sidebar_title").html("<%= t 'site.sidebar.search_results' %>");
-    $("#sidebar_content").load("<%= url_for :controller => :geocoder, :action => :description %>", {
-      lat: args["lat"],
-      lon: args["lon"],
-      zoom: args["zoom"]
-    }, openSidebar);
-  }
-// -->
-</script>
-
 <% content_for :optionals do %>
   <div class="optionalbox">
     <div class="search_container">
@@ -25,7 +10,7 @@
     </div>
     <p class='search_help deemphasize'>
       <%= raw(t 'site.search.search_help') %>
-      <span class="whereami"><a href="javascript:describeLocation()" title="<%= t 'site.search.where_am_i_title' %>"><%= t 'site.search.where_am_i' %></a></span>
+      <%= link_to t('site.search.where_am_i'), { :controller => :geocoder, :action => :description }, { :id => "describe_location", :title => t('site.search.where_am_i_title') } %>
     </p>
   </div>
 <% end %>