From: Richard Fairhurst Date: Wed, 12 Sep 2007 10:07:26 +0000 (+0000) Subject: Potlatch v0.2a: display GPS traces, some bugfixes X-Git-Tag: live~8177 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/1fcd5f559324d9f00cf1f71618c8f723506b2026 Potlatch v0.2a: display GPS traces, some bugfixes --- diff --git a/app/views/site/edit.rhtml b/app/views/site/edit.rhtml index fc1f78ce4..b1c555586 100644 --- a/app/views/site/edit.rhtml +++ b/app/views/site/edit.rhtml @@ -44,6 +44,7 @@ fo.addVariable('long',lon); fo.addVariable('scale',sc); fo.addVariable('token','<%= session[:token] %>'); +<% if params['gpx'] %> fo.addVariable('gpx','<%= params['gpx']+"/data" %>'); <% end %> fo.write("map"); } diff --git a/app/views/trace/_trace.rhtml b/app/views/trace/_trace.rhtml index eb8558510..91862444a 100644 --- a/app/views/trace/_trace.rhtml +++ b/app/views/trace/_trace.rhtml @@ -15,7 +15,7 @@ ... <%= time_ago_in_words( trace.timestamp ) %> ago <%= link_to 'more', {:controller => 'trace', :action => 'view', :display_name => trace.user.display_name, :id => trace.id}, {:title => 'View Trace Details'} %> / <%= link_to_if trace.inserted?, 'map', {:controller => 'site', :action => 'index', :lat => trace.latitude, :lon => trace.longitude, :zoom => 14}, {:title => 'View Map'} %> / - <%= link_to_if trace.inserted?, 'edit', {:controller => 'site', :action => 'edit', :lat => trace.latitude, :lon => trace.longitude, :zoom => 14}, {:title => 'Edit Map'} %> + <%= link_to_if trace.inserted?, 'edit', {:controller => 'site', :action => 'edit', :lat => trace.latitude, :lon => trace.longitude, :zoom => 14, :gpx => trace.id }, {:title => 'Edit Map'} %>
<%= escape_once(trace.description) %>
diff --git a/app/views/trace/view.rhtml b/app/views/trace/view.rhtml index f351a1dea..60f71b7c7 100644 --- a/app/views/trace/view.rhtml +++ b/app/views/trace/view.rhtml @@ -17,7 +17,7 @@ <%= @trace.size.to_s.gsub(/(\d)(?=(\d{3})+$)/,'\1,') %> Start coordinate: -
<%= @trace.latitude %>; <%= @trace.longitude %>
(<%=link_to 'map', :controller => 'site', :action => 'index', :lat => @trace.latitude, :lon => @trace.longitude, :zoom => 14 %> / <%=link_to 'edit', :controller => 'site', :action => 'edit', :lat => @trace.latitude, :lon => @trace.longitude, :zoom => 14 %>) +
<%= @trace.latitude %>; <%= @trace.longitude %>
(<%=link_to 'map', :controller => 'site', :action => 'index', :lat => @trace.latitude, :lon => @trace.longitude, :zoom => 14 %> / <%=link_to 'edit', :controller => 'site', :action => 'edit', :lat => @trace.latitude, :lon => @trace.longitude, :gpx=> @trace.id, :zoom => 14 %>) <% end %> diff --git a/public/potlatch/potlatch.swf b/public/potlatch/potlatch.swf index 77730e4e8..7e5ebe96a 100755 Binary files a/public/potlatch/potlatch.swf and b/public/potlatch/potlatch.swf differ