]> git.openstreetmap.org Git - rails.git/commitdiff
Move link to ToU to attribution footer
authorSimon Poole <simon@poole.ch>
Wed, 14 Nov 2018 12:53:04 +0000 (13:53 +0100)
committerSimon Poole <simon@poole.ch>
Mon, 13 May 2019 14:54:29 +0000 (16:54 +0200)
app/assets/javascripts/leaflet.map.js
app/views/layouts/map.html.erb
config/locales/en.yml

index 1f161ceeaf3f7d5d5c19610be80a7651c8837d9e..ffb9218ba8395c3941aaf7bed06ba4266d2452ec 100644 (file)
@@ -13,13 +13,14 @@ L.OSM.Map = L.Map.extend({
   initialize: function (id, options) {
     L.Map.prototype.initialize.call(this, id, options);
 
   initialize: function (id, options) {
     L.Map.prototype.initialize.call(this, id, options);
 
-    var copyright = I18n.t("javascripts.map.copyright", { copyright_url: "/copyright" });
-    var donate = I18n.t("javascripts.map.donate_link_text", { donate_url: "https://donate.openstreetmap.org" });
+    var copyright = I18n.t('javascripts.map.copyright', {copyright_url: '/copyright'});
+    var donate = I18n.t('javascripts.map.donate_link_text', {donate_url: 'https://donate.openstreetmap.org'});
+    var terms = I18n.t('javascripts.map.terms', {terms_url: 'https://wiki.osmfoundation.org/wiki/Terms_of_Use'});
 
     this.baseLayers = [];
 
     this.baseLayers.push(new L.OSM.Mapnik({
 
     this.baseLayers = [];
 
     this.baseLayers.push(new L.OSM.Mapnik({
-      attribution: copyright + " &hearts; " + donate,
+      attribution: copyright + " &hearts; " + donate + ". " + terms,
       code: "M",
       keyid: "mapnik",
       name: I18n.t("javascripts.map.base.standard")
       code: "M",
       keyid: "mapnik",
       name: I18n.t("javascripts.map.base.standard")
@@ -27,7 +28,7 @@ L.OSM.Map = L.Map.extend({
 
     if (OSM.THUNDERFOREST_KEY) {
       this.baseLayers.push(new L.OSM.CycleMap({
 
     if (OSM.THUNDERFOREST_KEY) {
       this.baseLayers.push(new L.OSM.CycleMap({
-        attribution: copyright + ". Tiles courtesy of <a href='https://www.thunderforest.com/' target='_blank'>Andy Allan</a>",
+        attribution: copyright + ". Tiles courtesy of <a href='https://www.thunderforest.com/' target='_blank'>Andy Allan</a>" + ". " + terms,
         apikey: OSM.THUNDERFOREST_KEY,
         code: "C",
         keyid: "cyclemap",
         apikey: OSM.THUNDERFOREST_KEY,
         code: "C",
         keyid: "cyclemap",
@@ -35,7 +36,7 @@ L.OSM.Map = L.Map.extend({
       }));
 
       this.baseLayers.push(new L.OSM.TransportMap({
       }));
 
       this.baseLayers.push(new L.OSM.TransportMap({
-        attribution: copyright + ". Tiles courtesy of <a href='https://www.thunderforest.com/' target='_blank'>Andy Allan</a>",
+        attribution: copyright + ". Tiles courtesy of <a href='https://www.thunderforest.com/' target='_blank'>Andy Allan</a>" + ". " + terms,
         apikey: OSM.THUNDERFOREST_KEY,
         code: "T",
         keyid: "transportmap",
         apikey: OSM.THUNDERFOREST_KEY,
         code: "T",
         keyid: "transportmap",
@@ -44,7 +45,7 @@ L.OSM.Map = L.Map.extend({
     }
 
     this.baseLayers.push(new L.OSM.HOT({
     }
 
     this.baseLayers.push(new L.OSM.HOT({
-      attribution: copyright + ". Tiles style by <a href='https://www.hotosm.org/' target='_blank'>Humanitarian OpenStreetMap Team</a> hosted by <a href='https://openstreetmap.fr/' target='_blank'>OpenStreetMap France</a>",
+      attribution: copyright + ". Tiles style by <a href='https://www.hotosm.org/' target='_blank'>Humanitarian OpenStreetMap Team</a>" + " hosted by <a href='https://openstreetmap.fr/' target='_blank'>OpenStreetMap France</a>" + ". " + terms,
       code: "H",
       keyid: "hot",
       name: I18n.t("javascripts.map.base.hot")
       code: "H",
       keyid: "hot",
       name: I18n.t("javascripts.map.base.hot")
index b0d99893aa6bed0710c078e7f2f89862df6041b4..2939df3cf75640d8d7e38978cb3bd427d6b606b2 100644 (file)
@@ -48,8 +48,6 @@
                  :bytemark => link_to(t("layouts.partners_bytemark"), "https://www.bytemark.co.uk"),
                  :partners => link_to(t("layouts.partners_partners"), "https://hardware.openstreetmap.org/thanks/") %>
         </p>
                  :bytemark => link_to(t("layouts.partners_bytemark"), "https://www.bytemark.co.uk"),
                  :partners => link_to(t("layouts.partners_partners"), "https://hardware.openstreetmap.org/thanks/") %>
         </p>
-        <p><%= t 'layouts.intro_tou_html', :tou_link => link_to(t('layouts.tou'), "https://wiki.osmfoundation.org/wiki/Terms_of_Use") %>
-        </p>      
         <a class="button learn-more" href="<%= about_path %>"><%= t('layouts.learn_more') %></a>
         <a class="button sign-up" href="<%= user_new_path %>"><%= t('layouts.start_mapping') %></a>
       </div>
         <a class="button learn-more" href="<%= about_path %>"><%= t('layouts.learn_more') %></a>
         <a class="button sign-up" href="<%= user_new_path %>"><%= t('layouts.start_mapping') %></a>
       </div>
index 37053cb44a567561aa0d267bc109b13368e5fd76..20b771b87e81d4deada944886a6d63f24b5aa2c2 100644 (file)
@@ -2423,6 +2423,7 @@ en:
         title: "Layers"
       copyright: "© <a href='%{copyright_url}'>OpenStreetMap contributors</a>"
       donate_link_text: "<a class='donate-attr' href='%{donate_url}'>Make a Donation</a>"
         title: "Layers"
       copyright: "© <a href='%{copyright_url}'>OpenStreetMap contributors</a>"
       donate_link_text: "<a class='donate-attr' href='%{donate_url}'>Make a Donation</a>"
+      terms: "<a href='%{terms_url}' target='_blank'>Website and API terms</a>"
     site:
       edit_tooltip: Edit the map
       edit_disabled_tooltip: Zoom in to edit the map
     site:
       edit_tooltip: Edit the map
       edit_disabled_tooltip: Zoom in to edit the map