From c763a5e8e78849d736f9c0cec92ee2687ac9e75d Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Mon, 23 Feb 2015 12:47:18 +0000 Subject: Tidy up front page and map copyright templates. --- perllib/FixMyStreet/Map/OSM.pm | 2 +- perllib/FixMyStreet/Map/OSM/MapQuest.pm | 4 ++++ perllib/FixMyStreet/Map/OSM/StreetView.pm | 1 + templates/web/base/maps/mapquest-attribution.html | 1 - templates/web/base/maps/openlayers.html | 2 +- templates/web/base/maps/osm.html | 1 - templates/web/bromley/front/pre-steps.html | 5 +++++ .../web/fixmystreet.com/front/javascript.html | 15 +++++++++++++ templates/web/fixmystreet/front/javascript.html | 15 +++++++++++++ templates/web/fixmystreet/index.html | 26 ++-------------------- templates/web/zerotb/index.html | 2 +- web/js/map-OpenStreetMap.js | 1 - web/js/map-streetview.js | 4 +--- web/js/map-wmts-zurich.js | 1 - 14 files changed, 46 insertions(+), 34 deletions(-) create mode 100644 templates/web/bromley/front/pre-steps.html create mode 100644 templates/web/fixmystreet.com/front/javascript.html create mode 100644 templates/web/fixmystreet/front/javascript.html diff --git a/perllib/FixMyStreet/Map/OSM.pm b/perllib/FixMyStreet/Map/OSM.pm index df2d16b82..df4b292a8 100644 --- a/perllib/FixMyStreet/Map/OSM.pm +++ b/perllib/FixMyStreet/Map/OSM.pm @@ -39,7 +39,7 @@ sub base_tile_url { } sub copyright { - return _('Map © OpenStreetMap and contributors, CC-BY-SA'); + _('© OpenStreetMap contributors'); } # display_map C PARAMS diff --git a/perllib/FixMyStreet/Map/OSM/MapQuest.pm b/perllib/FixMyStreet/Map/OSM/MapQuest.pm index 2c3cbaf00..4fc8ba57d 100644 --- a/perllib/FixMyStreet/Map/OSM/MapQuest.pm +++ b/perllib/FixMyStreet/Map/OSM/MapQuest.pm @@ -33,4 +33,8 @@ sub base_tile_url { return 'mqcdn.com/tiles/1.0.0/map/'; } +sub copyright { + 'Data, imagery and map information provided by MapQuest , OpenStreetMap and contributors, ODbL' +} + 1; diff --git a/perllib/FixMyStreet/Map/OSM/StreetView.pm b/perllib/FixMyStreet/Map/OSM/StreetView.pm index c70dd93aa..87c335dd6 100644 --- a/perllib/FixMyStreet/Map/OSM/StreetView.pm +++ b/perllib/FixMyStreet/Map/OSM/StreetView.pm @@ -22,6 +22,7 @@ sub base_tile_url { } sub copyright { + 'Contains OS data © Crown copyright and database right 2013'; } 1; diff --git a/templates/web/base/maps/mapquest-attribution.html b/templates/web/base/maps/mapquest-attribution.html index d76e20817..804710ad1 100644 --- a/templates/web/base/maps/mapquest-attribution.html +++ b/templates/web/base/maps/mapquest-attribution.html @@ -10,5 +10,4 @@ [% map_html = BLOCK %] [% INCLUDE maps/openlayers.html %] -
Data, imagery and map information provided by MapQuest , OpenStreetMap and contributors, ODbL
[% END %] diff --git a/templates/web/base/maps/openlayers.html b/templates/web/base/maps/openlayers.html index d01e98138..48eb896e8 100644 --- a/templates/web/base/maps/openlayers.html +++ b/templates/web/base/maps/openlayers.html @@ -49,7 +49,7 @@ var fixmystreet = { [% INCLUDE compass %] [% IF map.copyright %] - +
[% map.copyright %]
[% END %] diff --git a/templates/web/base/maps/osm.html b/templates/web/base/maps/osm.html index 3e1e1aec8..0b2db1a53 100644 --- a/templates/web/base/maps/osm.html +++ b/templates/web/base/maps/osm.html @@ -10,5 +10,4 @@ [% map_html = BLOCK %] [% INCLUDE maps/openlayers.html %] -
© OpenStreetMap contributors
[% END %] diff --git a/templates/web/bromley/front/pre-steps.html b/templates/web/bromley/front/pre-steps.html new file mode 100644 index 000000000..a5523c862 --- /dev/null +++ b/templates/web/bromley/front/pre-steps.html @@ -0,0 +1,5 @@ +

This is primarily for reporting physical problems that can be fixed +like graffiti, cleansing issues or road defects. To report other +kinds of problems like missed bins use our +online report it forms. +

diff --git a/templates/web/fixmystreet.com/front/javascript.html b/templates/web/fixmystreet.com/front/javascript.html new file mode 100644 index 000000000..0ccaa0870 --- /dev/null +++ b/templates/web/fixmystreet.com/front/javascript.html @@ -0,0 +1,15 @@ + diff --git a/templates/web/fixmystreet/front/javascript.html b/templates/web/fixmystreet/front/javascript.html new file mode 100644 index 000000000..13aa5216c --- /dev/null +++ b/templates/web/fixmystreet/front/javascript.html @@ -0,0 +1,15 @@ +[%# Assume using OpenStreetMap maps %] + diff --git a/templates/web/fixmystreet/index.html b/templates/web/fixmystreet/index.html index f92518022..0441b3efb 100644 --- a/templates/web/fixmystreet/index.html +++ b/templates/web/fixmystreet/index.html @@ -1,20 +1,4 @@ -[%# Assumes fixmystreet cobrand is using FMS map template - for bonus points preload all the right map elements. %] -[% map_js = BLOCK %] - -[% END %] +[% map_js = PROCESS 'front/javascript.html' %] [% pre_container_extra = PROCESS 'around/postcode_form.html' %] [% INCLUDE 'header.html', title = '', bodyclass = 'frontpage fullwidthpage' %] @@ -23,13 +7,7 @@ Modernizr.load({

[% error %]

[% END %] -[% IF c.cobrand.moniker == 'bromley' %] -

This is primarily for reporting physical problems that can be fixed -like graffiti, cleansing issues or road defects. To report other -kinds of problems like missed bins use our -online report it forms. -

-[% END %] +[% TRY %][% PROCESS 'front/pre-steps.html' %][% CATCH file %][% END %]
diff --git a/templates/web/zerotb/index.html b/templates/web/zerotb/index.html index 754dcbabc..4d0d6555c 100644 --- a/templates/web/zerotb/index.html +++ b/templates/web/zerotb/index.html @@ -9,7 +9,7 @@ Modernizr.load({ load: [ "preload![% version('/js/OpenLayers.fixmystreet.js') %]", "preload![% version('/js/map-OpenLayers.js') %]", - "preload![% version('/js/map-bing-ol.js') %]", + "preload![% version('/js/map-OpenStreetMap.js') %]", "preload![% version('/js/jquery.ba-hashchange.min.js') %]" ] }); diff --git a/web/js/map-OpenStreetMap.js b/web/js/map-OpenStreetMap.js index 7ef222da7..5dcf3cab3 100644 --- a/web/js/map-OpenStreetMap.js +++ b/web/js/map-OpenStreetMap.js @@ -8,7 +8,6 @@ function set_map_config(perm) { //new OpenLayers.Control.LayerSwitcher(), new OpenLayers.Control.Navigation(), new OpenLayers.Control.PermalinkFMS(permalink_id), - new OpenLayers.Control.PermalinkFMSz('osm_link', 'https://www.openstreetmap.org/'), new OpenLayers.Control.PanZoomFMS({id: 'fms_pan_zoom' }) ]; } diff --git a/web/js/map-streetview.js b/web/js/map-streetview.js index b81438a88..58d856781 100644 --- a/web/js/map-streetview.js +++ b/web/js/map-streetview.js @@ -1,7 +1,6 @@ function set_map_config(perm) { fixmystreet.controls = [ new OpenLayers.Control.ArgParser(), - //new OpenLayers.Control.LayerSwitcher(), new OpenLayers.Control.Navigation(), new OpenLayers.Control.Permalink(), new OpenLayers.Control.PanZoomFMS() @@ -38,8 +37,7 @@ OpenLayers.Layer.StreetView = OpenLayers.Class(OpenLayers.Layer.XYZ, { /* Below line added to OSM's file in order to allow minimum zoom level */ maxResolution: 156543.03390625/Math.pow(2, options.zoomOffset || 0), numZoomLevels: 19, - sphericalMercator: true, - attribution: "Contains Ordnance Survey data © Crown copyright and database right 2012" + sphericalMercator: true }, options); var newArguments = [name, url, options]; OpenLayers.Layer.XYZ.prototype.initialize.apply(this, newArguments); diff --git a/web/js/map-wmts-zurich.js b/web/js/map-wmts-zurich.js index cfff686e6..54b932168 100644 --- a/web/js/map-wmts-zurich.js +++ b/web/js/map-wmts-zurich.js @@ -63,7 +63,6 @@ $(function(){ fixmystreet.nav_control = new OpenLayers.Control.Navigation(nav_opts); fixmystreet.controls = [ - new OpenLayers.Control.Attribution(), new OpenLayers.Control.ArgParser(), fixmystreet.nav_control ]; -- cgit v1.2.3