X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/eb0f9ff63d5ad5d91ea941420e094dd2980df094..79276fb43abc429cd5515f81005281e303a16dd8:/app/views/site/edit.html.erb diff --git a/app/views/site/edit.html.erb b/app/views/site/edit.html.erb index 51389afc1..e5bffd1e4 100644 --- a/app/views/site/edit.html.erb +++ b/app/views/site/edit.html.erb @@ -1,7 +1,7 @@ -<% if OSM_STATUS == :database_offline or OSM_STATUS == :api_offline %> +<% if STATUS == :database_offline or STATUS == :api_offline %>

<%= t 'layouts.osm_offline' %>

-<% elsif OSM_STATUS == :database_readonly or OSM_STATUS == :api_readonly %> +<% elsif STATUS == :database_readonly or STATUS == :api_readonly %>

<%= t 'layouts.osm_read_only' %>

<% elsif !@user.data_public? %> @@ -12,7 +12,7 @@ <% else %> <% content_for :greeting do %> <% if @user and !@user.home_lon.nil? and !@user.home_lat.nil? %> -<%= link_to_function 'home', "setPosition(#{@user.home_lat}, #{@user.home_lon}, 10)" %> | +<%= link_to_function t('layouts.home'), "setPosition(#{@user.home_lat}, #{@user.home_lon}, 10)", { :title => t('layouts.home_tooltip') } %> | <% end %> <% end %> @@ -20,7 +20,7 @@ <%= render :partial => 'search' %> <% -session[:token] = @user.tokens.create.token unless session[:token] +session[:token] = @user.tokens.create.token unless session[:token] and UserToken.find_by_token(session[:token]) # Decide on a lat lon to initialise potlatch with. Various ways of doing this if params['lon'] and params['lat'] @@ -88,7 +88,7 @@ zoom='14' if zoom.nil? doSWF(<%= lat || 'null' %>,<%= lon || 'null' %>,<%= zoom %>); function setPosition(lat, lon, zoom) { - doSWF(lat, lon, zoom); + doSWF(lat, lon, zoom || 15); } function resizeContent() {