X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/5cd05017a39fe1e161e7db5387d465324f25dde5..0c90905495a5d9fd40282456b4d4098da6adda48:/app/views/site/edit.rhtml diff --git a/app/views/site/edit.rhtml b/app/views/site/edit.rhtml index 6b5952f38..8ff98a3b1 100644 --- a/app/views/site/edit.rhtml +++ b/app/views/site/edit.rhtml @@ -13,7 +13,8 @@ <% end %> <% end %> -<%= render :partial => 'search', :locals => { :onopen => "resizeMap();", :onclose => "resizeMap();" } %> +<%= render :partial => 'sidebar', :locals => { :onopen => "resizeMap();", :onclose => "resizeMap();" } %> +<%= render :partial => 'search' %> <% session[:token] = @user.tokens.create.token unless session[:token] %> @@ -68,14 +69,14 @@ } function resizeMap() { - var search_results_width = $("search_results").offsetWidth; + var sidebar_width = $("sidebar").offsetWidth; - if (search_results_width > 0) { - search_results_width = search_results_width + 5 + if (sidebar_width > 0) { + sidebar_width = sidebar_width + 5 } - $("map").style.left = (search_results_width) + "px"; - $("map").style.width = ($("content").offsetWidth - search_results_width) + "px"; + $("map").style.left = (sidebar_width) + "px"; + $("map").style.width = ($("content").offsetWidth - sidebar_width) + "px"; $("map").style.height = ($("content").offsetHeight - 2) + "px"; } @@ -89,5 +90,16 @@ window.onresize = handleResize; window.onload = handleResize; + + +<% unless @user.data_public? %> + var warningtext ="

You haven't set your edits to be public.

From mid-November, you will no longer be able to use the online editor unless you do so. You can set your edits as public from your "; + var warningtext=warningtext+'<%= link_to 'user page', {:controller => 'user', :action => 'account', :display_name => @user.display_name}%>.

'; + var warningtext=warningtext+'

(Find out why this is changing.)

'; + updateSidebar("Warning",warningtext); + openSidebar(); +<% end %> + + <% end %>