X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/6cd8db7bff35f8b401eb904e4c24936d8fc09a0a..1fcd5f559324d9f00cf1f71618c8f723506b2026:/app/views/site/edit.rhtml diff --git a/app/views/site/edit.rhtml b/app/views/site/edit.rhtml index ecb977656..b1c555586 100644 --- a/app/views/site/edit.rhtml +++ b/app/views/site/edit.rhtml @@ -4,7 +4,7 @@

<% else %> <% content_for :greeting do %> -<% if !@user.home_lon.nil? and !@user.home_lat.nil? %> +<% if @user and !@user.home_lon.nil? and !@user.home_lat.nil? %> <%= link_to_function 'home', "setPosition(#{@user.home_lat}, #{@user.home_lon}, 10)" %> | <% end %> <% end %> @@ -39,10 +39,12 @@ var fo = new SWFObject("/potlatch/potlatch.swf?d="+Math.round(Math.random()*1000), "potlatch", "700", "600", "6", "#FFFFFF"); function doSWF(lat,lon,sc) { + if (sc < 11) sc = 11; fo.addVariable('lat',lat); 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"); }