]> git.openstreetmap.org Git - rails.git/commitdiff
Add a landing page for "fix the map / report a problem" links
authorSimon Poole <simon@poole.ch>
Sun, 19 Jan 2014 13:48:27 +0000 (13:48 +0000)
committerTom Hughes <tom@compton.nu>
Sun, 19 Jan 2014 13:48:27 +0000 (13:48 +0000)
app/assets/javascripts/fixthemap.js [new file with mode: 0644]
app/assets/stylesheets/common.css.scss
app/views/site/fixthemap.html.erb [new file with mode: 0644]
config/locales/en.yml
config/routes.rb

diff --git a/app/assets/javascripts/fixthemap.js b/app/assets/javascripts/fixthemap.js
new file mode 100644 (file)
index 0000000..e2a503a
--- /dev/null
@@ -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);
+});
index d0aa003d776023588c772ea35deb7f291dc7227f..bbe96ddda76f51050e5ff9aee92534a6ebb48054 100644 (file)
@@ -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 (file)
index 0000000..fc5fecc
--- /dev/null
@@ -0,0 +1,37 @@
+<% content_for :head do %>
+ <%= javascript_include_tag "fixthemap" %>
+<% end %>
+
+<% content_for :heading do %>
+  <h1><%= t "fixthemap.title" %></h1>
+<% end %>
+
+<h3><%= t "layouts.intro_header" %></h3>
+
+<p><%= t "layouts.intro_text" %></p>
+
+<h3><%= t "fixthemap.how_to_help.title" %></h3>
+
+<div class='clearfix'>
+  <div class='col6 inner11'>
+    <h3><%= t "fixthemap.how_to_help.join_the_community.title" %></h3>
+    <%= t "fixthemap.how_to_help.join_the_community.explanation_html" %>
+    <div class='clearfix center'>
+      <a class="button sign-up" href="<%= user_new_path %>"><%= t('layouts.start_mapping') %></a>
+    </div>
+  </div>
+  <div class='col6 inner11'>
+    <h3><%= t "welcome_page.add_a_note.title" %></h3>
+    <p><%= t "welcome_page.add_a_note.paragraph_1_html" %></p>
+    <p><%= t "fixthemap.how_to_help.add_a_note.instructions_html", :map_url => root_path %></p>
+  </div>
+</div>
+
+<h3><%= t "fixthemap.other_concerns.title" %></h3>
+<p><%= t "fixthemap.other_concerns.explanation_html" %></p>
+
+<div class='col12 clearfix icon-list'>
+  <h3><%= t "welcome_page.questions.title" %></h3>
+  <span class='sprite small term question'></span>
+  <p><%= t "welcome_page.questions.paragraph_1_html", :help_url => help_path %></p>
+</div>
index 9679bbf0e818fdcf4a37285447563ee277c16f64..9efda4556401dd42d01d94816fa4c29637b59f12 100644 (file)
@@ -1085,6 +1085,26 @@ en:
         Just go to <a href='%{map_url}'>the map</a> and click the note icon:
         <span class='icon note'></span>. 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 <a class='icon note'></a> 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
+        <a href='/copyright'>copyright page</a> for more legal information, or contact the appropriate 
+        <a href='http://wiki.osmfoundation.org/wiki/Working_Groups'>OSMF working group</a>.  
   help_page:
     title: Getting Help
     introduction: |
index 500a9b13c279c04a74a7b4ecb0023bef3ba11fda..e9f593d92bdc4b4d53da185f2bfc0ceff03bf4bf 100644 (file)
@@ -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