From a24f52dec75007d05c5a4e2986dd82c4602af4ad Mon Sep 17 00:00:00 2001 From: Simon Poole Date: Sun, 19 Jan 2014 13:48:27 +0000 Subject: [PATCH] Add a landing page for "fix the map / report a problem" links --- app/assets/javascripts/fixthemap.js | 12 +++++++++ app/assets/stylesheets/common.css.scss | 2 +- app/views/site/fixthemap.html.erb | 37 ++++++++++++++++++++++++++ config/locales/en.yml | 20 ++++++++++++++ config/routes.rb | 1 + 5 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 app/assets/javascripts/fixthemap.js create mode 100644 app/views/site/fixthemap.html.erb diff --git a/app/assets/javascripts/fixthemap.js b/app/assets/javascripts/fixthemap.js new file mode 100644 index 000000000..e2a503ad3 --- /dev/null +++ b/app/assets/javascripts/fixthemap.js @@ -0,0 +1,12 @@ +$(document).ready(function() { + var params = OSM.params(); + + var url = '/note/new'; + if (params.lat && params.lon) { + params.lat = parseFloat(params.lat); + params.lon = parseFloat(params.lon); + params.zoom = params.zoom || 17; + url += OSM.formatHash(params); + } + $('.icon.note').attr('href', url); +}); diff --git a/app/assets/stylesheets/common.css.scss b/app/assets/stylesheets/common.css.scss index d0aa003d7..bbe96ddda 100644 --- a/app/assets/stylesheets/common.css.scss +++ b/app/assets/stylesheets/common.css.scss @@ -2351,7 +2351,7 @@ input.richtext_title[type="text"] { } /* Rules for the "Welcome" page */ -.site-welcome { +.site-welcome, .site-fixthemap { .center { text-align: center; .sprite { diff --git a/app/views/site/fixthemap.html.erb b/app/views/site/fixthemap.html.erb new file mode 100644 index 000000000..fc5fecc9a --- /dev/null +++ b/app/views/site/fixthemap.html.erb @@ -0,0 +1,37 @@ +<% content_for :head do %> + <%= javascript_include_tag "fixthemap" %> +<% end %> + +<% content_for :heading do %> +

<%= t "fixthemap.title" %>

+<% end %> + +

<%= t "layouts.intro_header" %>

+ +

<%= t "layouts.intro_text" %>

+ +

<%= t "fixthemap.how_to_help.title" %>

+ +
+
+

<%= t "fixthemap.how_to_help.join_the_community.title" %>

+ <%= t "fixthemap.how_to_help.join_the_community.explanation_html" %> + +
+
+

<%= t "welcome_page.add_a_note.title" %>

+

<%= t "welcome_page.add_a_note.paragraph_1_html" %>

+

<%= t "fixthemap.how_to_help.add_a_note.instructions_html", :map_url => root_path %>

+
+
+ +

<%= t "fixthemap.other_concerns.title" %>

+

<%= t "fixthemap.other_concerns.explanation_html" %>

+ +
+

<%= t "welcome_page.questions.title" %>

+ +

<%= t "welcome_page.questions.paragraph_1_html", :help_url => help_path %>

+
diff --git a/config/locales/en.yml b/config/locales/en.yml index 9679bbf0e..9efda4556 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1085,6 +1085,26 @@ en: Just go to the map and click the note icon: . This will add a marker to the map, which you can move by dragging. Add your message, then click save, and other mappers will investigate. + fixthemap: + title: Report a problem / Fix the map + how_to_help: + title: How to Help + join_the_community: + title: Join the community + explanation_html: | + If you have noticed a problem with our map data, for example a road is missing or your address, the best way to + proceed is to join the OpenStreetMap community and add or repair the data yourself. + add_a_note: + instructions_html: | + Just click or the same icon on the map display. + This will add a marker to the map, which you can move + by dragging. Add your message, then click save, and other mappers will investigate. + other_concerns: + title: Other concerns + explanation_html: | + If you have concerns about how our data is being used or about the contents please consult our + copyright page for more legal information, or contact the appropriate + OSMF working group. help_page: title: Getting Help introduction: | diff --git a/config/routes.rb b/config/routes.rb index 500a9b13c..e9f593d92 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -139,6 +139,7 @@ OpenStreetMap::Application.routes.draw do match '/copyright/:copyright_locale' => 'site#copyright', :via => :get match '/copyright' => 'site#copyright', :via => :get match '/welcome' => 'site#welcome', :via => :get, :as => :welcome + match '/fixthemap' => 'site#fixthemap', :via => :get, :as => :fixthemap match '/help' => 'site#help', :via => :get, :as => :help match '/about' => 'site#about', :via => :get, :as => :about match '/history' => 'changeset#list', :via => :get -- 2.43.2