]> git.openstreetmap.org Git - rails.git/commitdiff
Add copyright in attribution control
authorJohn Firebaugh <john.firebaugh@gmail.com>
Tue, 16 Jul 2013 21:30:27 +0000 (14:30 -0700)
committerTom Hughes <tom@compton.nu>
Thu, 8 Aug 2013 09:59:13 +0000 (10:59 +0100)
app/assets/javascripts/index.js
app/views/layouts/site.html.erb
config/locales/en.yml

index bd366b60906a892181a218921d26baaa08f15522..5190277c98c6927a040be94f64d6b6c17e5ef335 100644 (file)
@@ -22,27 +22,29 @@ $(document).ready(function () {
 
   map.hash = L.hash(map);
 
+  var copyright = I18n.t('javascripts.map.copyright', {copyright_url: '/copyright'});
+
   var layers = [
     new L.OSM.Mapnik({
-      attribution: '',
+      attribution: copyright,
       code: "M",
       keyid: "mapnik",
       name: I18n.t("javascripts.map.base.standard")
     }),
     new L.OSM.CycleMap({
-      attribution: "Tiles courtesy of <a href='http://www.opencyclemap.org/' target='_blank'>Andy Allan</a>",
+      attribution: copyright + ". Tiles courtesy of <a href='http://www.opencyclemap.org/' target='_blank'>Andy Allan</a>",
       code: "C",
       keyid: "cyclemap",
       name: I18n.t("javascripts.map.base.cycle_map")
     }),
     new L.OSM.TransportMap({
-      attribution: "Tiles courtesy of <a href='http://www.opencyclemap.org/' target='_blank'>Andy Allan</a>",
+      attribution: copyright + ". Tiles courtesy of <a href='http://www.opencyclemap.org/' target='_blank'>Andy Allan</a>",
       code: "T",
       keyid: "transportmap",
       name: I18n.t("javascripts.map.base.transport_map")
     }),
     new L.OSM.MapQuestOpen({
-      attribution: "Tiles courtesy of <a href='http://www.mapquest.com/' target='_blank'>MapQuest</a> <img src='http://developer.mapquest.com/content/osm/mq_logo.png'>",
+      attribution: copyright + ". Tiles courtesy of <a href='http://www.mapquest.com/' target='_blank'>MapQuest</a> <img src='http://developer.mapquest.com/content/osm/mq_logo.png'>",
       code: "Q",
       keyid: "mapquest",
       name: I18n.t("javascripts.map.base.mapquest")
index 44edfc6d129aa7f6273192b49dddcbec969975b1..548dc35fbf9c43a1c7ee30f42b4d4b8b02045c2e 100644 (file)
@@ -44,7 +44,6 @@
           <ul>
             <li><%= link_to(t('layouts.help_centre'), t('layouts.help_url'), :title => t('layouts.help_title')) %></li>
             <li><%= link_to(t('layouts.documentation'), t('layouts.wiki_url'), :title => t('layouts.documentation_title')) %></li>
-            <li><%= link_to t('layouts.copyright'), copyright_path %></li>
           </ul>
         </li>
         <li>
@@ -59,6 +58,9 @@
         </li>
         <li>
           <h4><%= t'layouts.data' %></h4>
+          <ul>
+            <li><%= link_to t('layouts.copyright'), copyright_path %></li>
+          </ul>
           <ul>
             <li><%= link_to t('layouts.export_data'), export_path %></li>
           </ul>
index 62fcb8433d5fb1194c220733f5bcbb164701fed8..697c9a747a7a9b0ca000d65276c7870768a8ff03 100644 (file)
@@ -2085,6 +2085,7 @@ en:
         notes: Map Notes
         data: Map Data
         overlays: Enable overlays for troubleshooting the map
+      copyright: "© <a href='%{copyright_url}'>OpenStreetMap contributors</a>"
     site:
       edit_tooltip: Edit the map
       edit_disabled_tooltip: Zoom in to edit the map