From 72d78db168e6ee52d53c5ccbb5adae1402186465 Mon Sep 17 00:00:00 2001 From: Simon Poole Date: Wed, 14 Nov 2018 13:53:04 +0100 Subject: [PATCH] Move link to ToU to attribution footer --- app/assets/javascripts/leaflet.map.js | 13 +++++++------ app/views/layouts/map.html.erb | 2 -- config/locales/en.yml | 1 + 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/assets/javascripts/leaflet.map.js b/app/assets/javascripts/leaflet.map.js index 1f161ceea..ffb9218ba 100644 --- a/app/assets/javascripts/leaflet.map.js +++ b/app/assets/javascripts/leaflet.map.js @@ -13,13 +13,14 @@ L.OSM.Map = L.Map.extend({ 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({ - attribution: copyright + " ♥ " + donate, + attribution: copyright + " ♥ " + donate + ". " + terms, 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({ - attribution: copyright + ". Tiles courtesy of Andy Allan", + attribution: copyright + ". Tiles courtesy of Andy Allan" + ". " + terms, 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({ - attribution: copyright + ". Tiles courtesy of Andy Allan", + attribution: copyright + ". Tiles courtesy of Andy Allan" + ". " + terms, 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({ - attribution: copyright + ". Tiles style by Humanitarian OpenStreetMap Team hosted by OpenStreetMap France", + attribution: copyright + ". Tiles style by Humanitarian OpenStreetMap Team" + " hosted by OpenStreetMap France" + ". " + terms, code: "H", keyid: "hot", name: I18n.t("javascripts.map.base.hot") diff --git a/app/views/layouts/map.html.erb b/app/views/layouts/map.html.erb index b0d99893a..2939df3cf 100644 --- a/app/views/layouts/map.html.erb +++ b/app/views/layouts/map.html.erb @@ -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/") %>

-

<%= t 'layouts.intro_tou_html', :tou_link => link_to(t('layouts.tou'), "https://wiki.osmfoundation.org/wiki/Terms_of_Use") %> -

<%= t('layouts.learn_more') %> <%= t('layouts.start_mapping') %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 37053cb44..20b771b87 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2423,6 +2423,7 @@ en: title: "Layers" copyright: "© OpenStreetMap contributors" donate_link_text: "" + terms: "Website and API terms" site: edit_tooltip: Edit the map edit_disabled_tooltip: Zoom in to edit the map -- 2.39.5