rescue ActiveRecord::RecordNotFound
# don't try and derive a location from a missing/deleted object
end
+
+ if api_status != "online"
+ flash.now[:warning] = { :partial => "layouts/offline_flash" }
+ elsif current_user && !current_user.data_public?
+ flash.now[:warning] = { :partial => "not_public_flash" }
+ else
+ @enable_editor = true
+ end
end
def copyright
--- /dev/null
+<p><%= t ".not_public" %></p>
+<p><%= t ".not_public_description_html", :user_page => (link_to t(".user_page_link"), edit_account_path(:anchor => "public")) %></p>
+<p><%= t ".anon_edits_html", :link => link_to(t(".anon_edits_link_text"), t(".anon_edits_link")) %></p>
<% content_for :content do %>
- <% if Settings.status == "database_offline" or Settings.status == "api_offline" %>
- <div class="alert alert-warning text-center">
- <p class="my-2"><%= t "layouts.osm_offline" %></p>
- </div>
- <% elsif Settings.status == "database_readonly" or Settings.status == "api_readonly" %>
- <div class="alert alert-warning text-center">
- <p class="my-2"><%= t "layouts.osm_read_only" %></p>
- </div>
- <% elsif !current_user.data_public? %>
- <p><%= t ".not_public" %></p>
- <p><%= t ".not_public_description_html", :user_page => (link_to t(".user_page_link"), edit_account_path(:anchor => "public")) %></p>
- <p><%= t ".anon_edits_html", :link => link_to(t(".anon_edits_link_text"), t(".anon_edits_link")) %></p>
- <% else %>
+ <% if @enable_editor %>
<%= render :partial => preferred_editor %>
<% end %>
<% end %>
license_url: "https://openstreetmap.org/copyright"
project_url: "https://openstreetmap.org"
remote_failed: "Editing failed - make sure JOSM or Merkaartor is loaded and the remote control option is enabled"
- edit:
+ not_public_flash:
not_public: "You have not set your edits to be public."
not_public_description_html: "You can no longer edit the map unless you do so. You can set your edits as public from your %{user_page}."
user_page_link: user page
anon_edits_html: "(%{link})"
anon_edits_link: "https://wiki.openstreetmap.org/wiki/Disabling_anonymous_edits"
anon_edits_link_text: "Find out why this is the case."
+ edit:
id_not_configured: "iD has not been configured"
export:
title: "Export"