]> git.openstreetmap.org Git - rails.git/commitdiff
Fix more links to use new style #map links
authorTom Hughes <tom@compton.nu>
Thu, 13 Mar 2014 16:02:50 +0000 (16:02 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 13 Mar 2014 16:02:50 +0000 (16:02 +0000)
app/views/diary_entry/_location.html.erb
app/views/trace/_trace.html.erb
app/views/trace/edit.html.erb
app/views/trace/view.html.erb

index a3ba473a8a67e54f11e08cfc79f314e9b3a4201a..a5db0cdca949be7df2846819f6b75f47fb71a311 100644 (file)
@@ -1,6 +1,6 @@
 <%= t 'diary_entry.location.location' %>
 
-<a href="<%= url_for :controller => 'site', :action => 'index', :lat => location.latitude, :lon => location.longitude, :zoom => 14 %>">
+<a href="<%= url_for :controller => 'site', :action => 'index', :anchor => "map=14/#{location.latitude}/#{location.longitude}" %>">
 <abbr class="geo" title="<%= number_with_precision(location.latitude, :precision => 4) %>; <%= number_with_precision(location.longitude, :precision => 4) %>">
 <%= describe_location location.latitude, location.longitude, 14, location.language_code %>
 </abbr>
index c05e00c4a494e8dd139ae5b157717112a73b483b..99d570cf0992f1201c23644ba26532579bf284e6 100644 (file)
@@ -16,7 +16,7 @@
       <% end %>
       ... <%= t'trace.trace.ago', :time_in_words_ago => time_ago_in_words(trace.timestamp) %></span>
       <%= link_to t('trace.trace.more'), {:controller => 'trace', :action => 'view', :display_name => trace.user.display_name, :id => trace.id}, {:title => t('trace.trace.trace_details')} %> /
-      <%= link_to_if trace.inserted?, t('trace.trace.map'), {:controller => 'site', :action => 'index', :lat => trace.latitude, :lon => trace.longitude, :zoom => 14}, {:title => t('trace.trace.view_map')} %> /
+      <%= link_to_if trace.inserted?, t('trace.trace.map'), {:controller => 'site', :action => 'index', :anchor => "map=14/#{trace.latitude}/#{trace.longitude}"}, {:title => t('trace.trace.view_map')} %> /
       <%= link_to t('trace.trace.edit'), {:controller => 'site', :action => 'edit', :gpx => trace.id }, {:title => t('trace.trace.edit_map')} %>
       <span class="trace_<%= trace.visibility %>"><%= t('trace.trace.' + trace.visibility) %></span>
       <br />
index d9ec9f14b7d94cc632ca824607c4ec2edfc07195..200f6aa26fd4f9c9a3f36e85386594606bde74fa 100644 (file)
@@ -32,7 +32,7 @@
       <span class="latitude"><%= @trace.latitude %></span>;
       <span class="longitude"><%= @trace.longitude %></span>
     </div>
-    (<%=link_to t('trace.edit.map'), :controller => 'site', :action => 'index', :lat => @trace.latitude, :lon => @trace.longitude, :zoom => 14 %> / <%=link_to t('trace.edit.edit'), :controller => 'site', :action => 'edit', :lat => @trace.latitude, :lon => @trace.longitude, :gpx=> @trace.id, :zoom => 14 %>)
+    (<%=link_to t('trace.edit.map'), :controller => 'site', :action => 'index', :anchor => "map=14/#{@trace.latitude}/#{@trace.longitude}" %> / <%=link_to t('trace.edit.edit'), :controller => 'site', :action => 'edit', :gpx=> @trace.id, :anchor => "map=14/#{@trace.latitude}/#{@trace.longitude}" %>)
   </fieldset>
 
   <% end %>
index cbe6c1628e928ea701d6a5a82a65d50cb736f3ad..fac0139d94c7ac73f1c9a285800036a44027a4f2 100644 (file)
@@ -25,7 +25,7 @@
     <td><%= @trace.size.to_s.gsub(/(\d)(?=(\d{3})+$)/,'\1,') %></td></tr>
   <tr>
     <td><%= t'trace.view.start_coordinates' %></td>
-    <td><div class="geo" style="display: inline"><span class="latitude"><%= @trace.latitude %></span>; <span class="longitude"><%= @trace.longitude %></span></div> (<%=link_to t('trace.view.map'), :controller => 'site', :action => 'index', :lat => @trace.latitude, :lon => @trace.longitude, :zoom => 14 %> / <%=link_to t('trace.view.edit'), :controller => 'site', :action => 'edit', :lat => @trace.latitude, :lon => @trace.longitude, :gpx=> @trace.id, :zoom => 14 %>)</td>
+    <td><div class="geo" style="display: inline"><span class="latitude"><%= @trace.latitude %></span>; <span class="longitude"><%= @trace.longitude %></span></div> (<%=link_to t('trace.view.map'), :controller => 'site', :action => 'index', :anchor => "map=14/#{@trace.latitude}/#{@trace.longitude}" %> / <%=link_to t('trace.view.edit'), :controller => 'site', :action => 'edit', :gpx=> @trace.id, :anchor => "map=14/#{@trace.latitude}/#{@trace.longitude}" %>)</td>
   </tr>
   <% end %>
   <tr>