aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/web/angus/maps/fms.html22
-rw-r--r--templates/web/base/common_footer_tags.html31
-rw-r--r--templates/web/base/common_scripts.html44
-rwxr-xr-xtemplates/web/base/errors/generic.html4
-rw-r--r--templates/web/base/front/javascript.html19
-rw-r--r--templates/web/base/header.html19
-rw-r--r--templates/web/base/index.html2
-rw-r--r--templates/web/base/maps/bing.html16
-rw-r--r--templates/web/base/maps/fms.html18
-rw-r--r--templates/web/base/maps/google-ol.html14
-rw-r--r--templates/web/base/maps/google.html10
-rw-r--r--templates/web/base/maps/mapquest-attribution.html17
-rw-r--r--templates/web/base/maps/osm-streetview.html17
-rw-r--r--templates/web/base/maps/osm-toner-lite.html19
-rw-r--r--templates/web/base/maps/osm.html17
-rw-r--r--templates/web/base/offline/appcache.html12
-rw-r--r--templates/web/base/offline/manifest.html17
-rw-r--r--templates/web/base/report/_inspect.html3
-rw-r--r--templates/web/base/report/_item.html3
-rw-r--r--templates/web/base/report/_main.html2
-rw-r--r--templates/web/base/report/photo-js.html6
-rwxr-xr-xtemplates/web/base/reports/index.html6
-rw-r--r--templates/web/bristol/footer_extra_js.html10
-rw-r--r--templates/web/bristol/maps/bristol.html14
-rw-r--r--templates/web/bromley/footer_extra_js.html4
-rw-r--r--templates/web/bromley/maps/bromley.html19
-rw-r--r--templates/web/fixmystreet-uk-councils/footer_extra_js.html6
-rw-r--r--templates/web/fixmystreet.com/about/posters.html6
-rw-r--r--templates/web/fixmystreet.com/footer_extra_js.html8
-rw-r--r--templates/web/fixmystreet.com/front/javascript.html19
-rw-r--r--templates/web/fixmystreet.com/header.html45
-rw-r--r--templates/web/oxfordshire/header.html5
-rw-r--r--templates/web/zurich/maps/zurich.html16
33 files changed, 299 insertions, 171 deletions
diff --git a/templates/web/angus/maps/fms.html b/templates/web/angus/maps/fms.html
index aed4d1764..1516ae05e 100644
--- a/templates/web/angus/maps/fms.html
+++ b/templates/web/angus/maps/fms.html
@@ -1,11 +1,11 @@
-[% map_js = BLOCK %]
-<!-- <script type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0&mkt=en-GB"></script> -->
-<script type="text/javascript" src="[% version('/js/OpenLayers/OpenLayers.angus.js') %]"></script>
-<script type="text/javascript" src="[% version('/js/map-OpenLayers.js') %]"></script>
-<script type="text/javascript" src="[% version('/js/map-bing-ol.js') %]"></script>
-<script type="text/javascript" src="[% version('/js/map-fms.js') %]"></script>
-<script src="[% version('/cobrands/fixmystreet/assets.js') %]"></script>
-<script src="[% version('/cobrands/angus/js.js') %]"></script>
-[% END %]
-
-[% map_html = INCLUDE maps/openlayers.html include_key = 1 %]
+[%
+map_js = [
+ version('/js/OpenLayers/OpenLayers.angus.js'),
+ version('/js/map-OpenLayers.js'),
+ version('/js/map-bing-ol.js'),
+ version('/js/map-fms.js'),
+ version('/cobrands/fixmystreet/assets.js'),
+ version('/cobrands/angus/js.js'),
+];
+map_html = INCLUDE maps/openlayers.html include_key = 1
+%]
diff --git a/templates/web/base/common_footer_tags.html b/templates/web/base/common_footer_tags.html
index 45872895b..01420c37d 100644
--- a/templates/web/base/common_footer_tags.html
+++ b/templates/web/base/common_footer_tags.html
@@ -1,28 +1,13 @@
-[% USE date %][% USE Math %]
-
[% TRY %][% PROCESS 'footer_extra.html' %][% CATCH file %][% END %]
-<script type="text/javascript" src="[% start %]/js/translation_strings.[% lang_code %].js?[% Math.int( date.now / 3600 ) %]"></script>
-<script type="text/javascript" src="[% version('/jslib/jquery-1.7.2.min.js') %]"></script>
+[% PROCESS 'common_scripts.html' %]
+
<!--[if lte IE 9]>
- <script type="text/javascript" src="[% version('/js/history.polyfill.min.js') %]"></script>
+ <script src="[% version('/js/history.polyfill.min.js') %]"></script>
<![endif]-->
-<script type="text/javascript" src="[% version('/js/validation_rules.js') %]"></script>
-<script src="[% version('/js/jquery.validate.min.js') %]" type="text/javascript" charset="utf-8"></script>
-<script type="text/javascript" src="[% version('/js/dropzone.min.js') %]"></script>
-<script type="text/javascript" src="[% version('/js/jquery.multi-select.js') %]"></script>
-
-<script type="text/javascript" src="[% version('/js/geo.min.js') %]"></script>
-<script type="text/javascript" src="[% version('/cobrands/fixmystreet/fixmystreet.js') %]"></script>
-
-[% map_js %]
-<script src="[% version('/cobrands/fixmystreet/map.js') %]"></script>
-
-[% IF admin %]
- <script src="[% version('/js/jquery-ui/js/jquery-ui-1.10.3.custom.min.js') %]"></script>
- <script type="text/javascript" src="[% version('/js/fixmystreet-admin.js') %]"></script>
+[% FOR script IN scripts ~%]
+ [% script = script.0 ? script : [ script ] ~%]
+ <script src="[% script.0 %]"
+ [%~ FOR attr IN script.1 %] [% attr.key %]="[% attr.value %]"[% END ~%]
+ ></script>
[% END %]
-
-[% extra_js %]
-
-[% TRY %][% PROCESS 'footer_extra_js.html' %][% CATCH file %][% END %]
diff --git a/templates/web/base/common_scripts.html b/templates/web/base/common_scripts.html
new file mode 100644
index 000000000..1d53f1d51
--- /dev/null
+++ b/templates/web/base/common_scripts.html
@@ -0,0 +1,44 @@
+[%
+
+USE date;
+USE Math;
+
+scripts = [];
+
+scripts.push(
+ start _ "/js/translation_strings." _ lang_code _ ".js?" _ Math.int( date.now / 3600 ),
+ version('/jslib/jquery-1.7.2.min.js'),
+ version('/js/validation_rules.js'),
+ version('/js/jquery.validate.min.js'),
+ version('/js/dropzone.min.js'),
+ version('/js/jquery.multi-select.js'),
+ version('/js/geo.min.js'),
+ version('/cobrands/fixmystreet/fixmystreet.js'),
+);
+
+FOR script IN map_js;
+ scripts.push(script);
+END;
+
+scripts.push(
+ version('/cobrands/fixmystreet/map.js'),
+ version('/cobrands/fixmystreet/offline.js'),
+);
+
+IF admin;
+ scripts.push(
+ version('/js/jquery-ui/js/jquery-ui-1.10.3.custom.min.js'),
+ version('/js/fixmystreet-admin.js'),
+ );
+END;
+
+FOR script IN extra_js;
+ scripts.push(script);
+END;
+
+TRY;
+ PROCESS 'footer_extra_js.html';
+CATCH file;
+END;
+
+~%]
diff --git a/templates/web/base/errors/generic.html b/templates/web/base/errors/generic.html
index d0d1e2e00..241b310de 100755
--- a/templates/web/base/errors/generic.html
+++ b/templates/web/base/errors/generic.html
@@ -1,5 +1,9 @@
[% INCLUDE 'header.html', bodyclass = 'fullwidthpage', title = loc('Error') %]
+[% IF csrf_token ~%]
+<input type="hidden" name="token" value="[% csrf_token %]">
+[% END ~%]
+
<div class="confirmation-header confirmation-header--failure">
<h1>[% loc('Error') %]</h1>
<p>[% message %]</p>
diff --git a/templates/web/base/front/javascript.html b/templates/web/base/front/javascript.html
index 2795829a5..6b8e2a292 100644
--- a/templates/web/base/front/javascript.html
+++ b/templates/web/base/front/javascript.html
@@ -1,7 +1,12 @@
-[%# Assume using OpenStreetMap maps %]
-<script src="[% version('/js/yepnope.js') %]"></script>
-<script id="script_front" src="[% version('/cobrands/fixmystreet/front.js') %]"
- data-scripts="
- [%~ version('/js/OpenLayers/OpenLayers.fixmystreet.js') %],
- [%~ version('/js/map-OpenLayers.js') %],
- [%~ version('/js/map-OpenStreetMap.js') %]"></script>
+[%
+# Assume using OpenStreetMap maps
+map_js = [
+ version('/js/yepnope.js'),
+ [ version('/cobrands/fixmystreet/front.js'), {
+ id = 'script_front',
+ 'data-scripts' = version('/js/OpenLayers/OpenLayers.fixmystreet.js') _ ',' _
+ version('/js/map-OpenLayers.js') _ ',' _
+ version('/js/map-OpenStreetMap.js')
+ } ],
+]
+%]
diff --git a/templates/web/base/header.html b/templates/web/base/header.html
index c11e78b47..4e537a7ec 100644
--- a/templates/web/base/header.html
+++ b/templates/web/base/header.html
@@ -7,7 +7,10 @@
<!--[if IE 7]> <html class="no-js ie7 iel8"[% html_att %]><![endif]-->
<!--[if IE 8]> <html class="no-js ie8 iel8"[% html_att %]><![endif]-->
<!--[if IE 9]> <html class="no-js ie9"[% html_att %]><![endif]-->
-<!--[if gt IE 9]><!--><html class="no-js"[% html_att %]><!--<![endif]-->
+<!--[if gt IE 9]><!--><html class="no-js"[% html_att %]
+[% IF appcache ~%]
+ manifest="/offline/appcache.manifest"
+[%~ END %]><!--<![endif]-->
<head>
<meta name="viewport" content="initial-scale=1.0">
@@ -16,19 +19,11 @@
<meta name="mobileoptimized" content="0">
[% INCLUDE 'header_opengraph.html' %]
- [%
- # For clarity, the 'fixmystreet' moniker (for fixmystreet.com) puts
- # it stylesheets under fixmystreet.com
- IF c.cobrand.moniker == 'fixmystreet';
- SET css_dir = 'fixmystreet.com';
- ELSE;
- SET css_dir = c.cobrand.moniker;
- END %]
- <link rel="stylesheet" href="[% version('/cobrands/' _ css_dir _ '/base.css') %]">
- <link rel="stylesheet" href="[% version('/cobrands/' _ css_dir _ '/layout.css') %]" media="(min-width:48em)">
+ <link rel="stylesheet" href="[% version('/cobrands/' _ c.cobrand.asset_moniker _ '/base.css') %]">
+ <link rel="stylesheet" href="[% version('/cobrands/' _ c.cobrand.asset_moniker _ '/layout.css') %]" media="(min-width:48em)">
[% extra_css %]
<!--[if (lt IE 9) & (!IEMobile)]>
- <link rel="stylesheet" href="[% version('/cobrands/' _ css_dir _ '/layout.css') %]">
+ <link rel="stylesheet" href="[% version('/cobrands/' _ c.cobrand.asset_moniker _ '/layout.css') %]">
<![endif]-->
[% INCLUDE 'common_header_tags.html' %]
diff --git a/templates/web/base/index.html b/templates/web/base/index.html
index 0441b3efb..8cb127e6a 100644
--- a/templates/web/base/index.html
+++ b/templates/web/base/index.html
@@ -1,4 +1,4 @@
-[% map_js = PROCESS 'front/javascript.html' %]
+[% PROCESS 'front/javascript.html' %]
[% pre_container_extra = PROCESS 'around/postcode_form.html' %]
[% INCLUDE 'header.html', title = '', bodyclass = 'frontpage fullwidthpage' %]
diff --git a/templates/web/base/maps/bing.html b/templates/web/base/maps/bing.html
index 6af4c3562..59d012c4f 100644
--- a/templates/web/base/maps/bing.html
+++ b/templates/web/base/maps/bing.html
@@ -1,8 +1,8 @@
-[% map_js = BLOCK %]
-<!-- <script type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0&mkt=en-GB"></script> -->
-<script type="text/javascript" src="[% version('/js/OpenLayers/OpenLayers.fixmystreet.js') %]"></script>
-<script type="text/javascript" src="[% version('/js/map-OpenLayers.js') %]"></script>
-<script type="text/javascript" src="[% version('/js/map-bing-ol.js') %]"></script>
-[% END %]
-
-[% map_html = INCLUDE maps/openlayers.html %]
+[%
+map_js = [
+ version('/js/OpenLayers/OpenLayers.fixmystreet.js'),
+ version('/js/map-OpenLayers.js'),
+ version('/js/map-bing-ol.js'),
+];
+map_html = INCLUDE maps/openlayers.html
+%]
diff --git a/templates/web/base/maps/fms.html b/templates/web/base/maps/fms.html
index 03eb843da..e155ff778 100644
--- a/templates/web/base/maps/fms.html
+++ b/templates/web/base/maps/fms.html
@@ -1,9 +1,9 @@
-[% map_js = BLOCK %]
-<!-- <script type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0&mkt=en-GB"></script> -->
-<script type="text/javascript" src="[% version('/js/OpenLayers/OpenLayers.fixmystreet.js') %]"></script>
-<script type="text/javascript" src="[% version('/js/map-OpenLayers.js') %]"></script>
-<script type="text/javascript" src="[% version('/js/map-bing-ol.js') %]"></script>
-<script type="text/javascript" src="[% version('/js/map-fms.js') %]"></script>
-[% END %]
-
-[% map_html = INCLUDE maps/openlayers.html include_key = 1 %]
+[%
+map_js = [
+ version('/js/OpenLayers/OpenLayers.fixmystreet.js'),
+ version('/js/map-OpenLayers.js'),
+ version('/js/map-bing-ol.js'),
+ version('/js/map-fms.js'),
+];
+map_html = INCLUDE maps/openlayers.html include_key = 1
+%]
diff --git a/templates/web/base/maps/google-ol.html b/templates/web/base/maps/google-ol.html
index cccea5b24..e326bd713 100644
--- a/templates/web/base/maps/google-ol.html
+++ b/templates/web/base/maps/google-ol.html
@@ -1,9 +1,11 @@
-[% map_js = BLOCK %]
-<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3"></script>
-<script type="text/javascript" src="[% version('/js/OpenLayers/OpenLayers.google.js') %]"></script>
-<script type="text/javascript" src="[% version('/js/map-OpenLayers.js') %]"></script>
-<script type="text/javascript" src="[% version('/js/map-google-ol.js') %]"></script>
-[% END %]
+[%
+map_js = [
+ "https://maps.googleapis.com/maps/api/js?v=3",
+ version('/js/OpenLayers/OpenLayers.google.js'),
+ version('/js/map-OpenLayers.js'),
+ version('/js/map-google-ol.js'),
+]
+%]
[% map_sub_links = BLOCK %]
<a class="hidden-nojs" id="map_layer_toggle" href="">[% loc('Satellite') %]</a>
diff --git a/templates/web/base/maps/google.html b/templates/web/base/maps/google.html
index eeb4c9837..c86c757fb 100644
--- a/templates/web/base/maps/google.html
+++ b/templates/web/base/maps/google.html
@@ -1,4 +1,3 @@
-[% map_js = BLOCK %]
<style>
#map_box img {
max-width: none;
@@ -7,9 +6,12 @@
color: #000;
}
</style>
-<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
-<script type="text/javascript" src="[% version('/js/map-google.js') %]"></script>
-[% END %]
+[%
+map_js = [
+ "http://maps.googleapis.com/maps/api/js?sensor=false",
+ version('/js/map-google.js'),
+]
+%]
[% map_html = BLOCK %]
<script nonce="[% csp_nonce %]">
diff --git a/templates/web/base/maps/mapquest-attribution.html b/templates/web/base/maps/mapquest-attribution.html
index ab4424cdd..e469901a8 100644
--- a/templates/web/base/maps/mapquest-attribution.html
+++ b/templates/web/base/maps/mapquest-attribution.html
@@ -1,9 +1,8 @@
-[% map_js = BLOCK %]
-<script type="text/javascript" src="[% version('/js/OpenLayers/OpenLayers.fixmystreet.js') %]"></script>
-<script type="text/javascript" src="[% version('/js/map-OpenLayers.js') %]"></script>
-<script type="text/javascript" src="[% version('/js/map-OpenStreetMap.js') %]"></script>
-[% END %]
-
-[% map_html = BLOCK %]
-[% INCLUDE maps/openlayers.html %]
-[% END %]
+[%
+map_js = [
+ version('/js/OpenLayers/OpenLayers.fixmystreet.js'),
+ version('/js/map-OpenLayers.js'),
+ version('/js/map-OpenStreetMap.js'),
+];
+map_html = INCLUDE maps/openlayers.html
+%]
diff --git a/templates/web/base/maps/osm-streetview.html b/templates/web/base/maps/osm-streetview.html
index 2ff3b4723..dcf45d3b6 100644
--- a/templates/web/base/maps/osm-streetview.html
+++ b/templates/web/base/maps/osm-streetview.html
@@ -1,9 +1,8 @@
-[% map_js = BLOCK %]
-<script type="text/javascript" src="[% version('/js/OpenLayers/OpenLayers.fixmystreet.js') %]"></script>
-<script type="text/javascript" src="[% version('/js/map-OpenLayers.js') %]"></script>
-<script type="text/javascript" src="[% version('/js/map-streetview.js') %]"></script>
-[% END %]
-
-[% map_html = BLOCK %]
-[% INCLUDE maps/openlayers.html %]
-[% END %]
+[%
+map_js = [
+ version('/js/OpenLayers/OpenLayers.fixmystreet.js'),
+ version('/js/map-OpenLayers.js'),
+ version('/js/map-streetview.js'),
+];
+map_html = INCLUDE maps/openlayers.html
+%]
diff --git a/templates/web/base/maps/osm-toner-lite.html b/templates/web/base/maps/osm-toner-lite.html
index 5e48f7569..6512eaf2c 100644
--- a/templates/web/base/maps/osm-toner-lite.html
+++ b/templates/web/base/maps/osm-toner-lite.html
@@ -1,10 +1,9 @@
-[% map_js = BLOCK %]
-<script type="text/javascript" src="[% version('/js/OpenLayers/OpenLayers.fixmystreet.js') %]"></script>
-<script type="text/javascript" src="https://stamen-maps.a.ssl.fastly.net/js/tile.stamen.js?v1.3.0"></script>
-<script type="text/javascript" src="[% version('/js/map-OpenLayers.js') %]"></script>
-<script type="text/javascript" src="[% version('/js/map-toner-lite.js') %]"></script>
-[% END %]
-
-[% map_html = BLOCK %]
-[% INCLUDE maps/openlayers.html %]
-[% END %]
+[%
+map_js = [
+ version('/js/OpenLayers/OpenLayers.fixmystreet.js'),
+ "https://stamen-maps.a.ssl.fastly.net/js/tile.stamen.js?v1.3.0",
+ version('/js/map-OpenLayers.js'),
+ version('/js/map-toner-lite.js'),
+];
+map_html = INCLUDE maps/openlayers.html
+%]
diff --git a/templates/web/base/maps/osm.html b/templates/web/base/maps/osm.html
index ab4424cdd..e469901a8 100644
--- a/templates/web/base/maps/osm.html
+++ b/templates/web/base/maps/osm.html
@@ -1,9 +1,8 @@
-[% map_js = BLOCK %]
-<script type="text/javascript" src="[% version('/js/OpenLayers/OpenLayers.fixmystreet.js') %]"></script>
-<script type="text/javascript" src="[% version('/js/map-OpenLayers.js') %]"></script>
-<script type="text/javascript" src="[% version('/js/map-OpenStreetMap.js') %]"></script>
-[% END %]
-
-[% map_html = BLOCK %]
-[% INCLUDE maps/openlayers.html %]
-[% END %]
+[%
+map_js = [
+ version('/js/OpenLayers/OpenLayers.fixmystreet.js'),
+ version('/js/map-OpenLayers.js'),
+ version('/js/map-OpenStreetMap.js'),
+];
+map_html = INCLUDE maps/openlayers.html
+%]
diff --git a/templates/web/base/offline/appcache.html b/templates/web/base/offline/appcache.html
new file mode 100644
index 000000000..5a8ba1463
--- /dev/null
+++ b/templates/web/base/offline/appcache.html
@@ -0,0 +1,12 @@
+[% INCLUDE 'header.html' appcache = 1 bodyclass = "fullwidthpage" %]
+
+<h1>Internet glitch</h1>
+
+<p>Sorry, we don’t have a good enough connection to fetch that page, or the
+page wasn’t found or there was a server error. Please try again later.</p>
+
+<ul class="item-list item-list--reports" id="offline_list"></ul>
+
+<div id="offline_clear"></div>
+
+[% INCLUDE 'footer.html' %]
diff --git a/templates/web/base/offline/manifest.html b/templates/web/base/offline/manifest.html
new file mode 100644
index 000000000..f5a9fddcc
--- /dev/null
+++ b/templates/web/base/offline/manifest.html
@@ -0,0 +1,17 @@
+CACHE MANIFEST
+
+[% PROCESS 'common_scripts.html' ~%]
+
+CACHE:
+[% version('/cobrands/' _ c.cobrand.asset_moniker _ '/base.css') %]
+[% version('/cobrands/' _ c.cobrand.asset_moniker _ '/layout.css') %]
+
+[% FOR script IN scripts ~%]
+ [%- script %]
+[% END %]
+
+NETWORK:
+*
+
+FALLBACK:
+/ [% version('../templates/web/base/offline/appcache.html', '/offline/appcache') %]
diff --git a/templates/web/base/report/_inspect.html b/templates/web/base/report/_inspect.html
index 06c3aab6c..84170a38c 100644
--- a/templates/web/base/report/_inspect.html
+++ b/templates/web/base/report/_inspect.html
@@ -136,7 +136,7 @@
[% IF permissions.report_inspect %]
<p>
<label class="label-containing-checkbox">
- <input type="checkbox" name="save_inspected" value="1" class="js-toggle-public-update" [% 'checked' IF save_inspected %]>
+ <input type="checkbox" name="save_inspected" value="1" class="js-toggle-public-update" checked>
[% loc('Save with a public update') %]
</label>
</p>
@@ -157,7 +157,6 @@
<p>
<input type="hidden" name="token" value="[% csrf_token %]">
- <a class="btn" href="[% c.uri_for( '/report', problem.id ) %]">[% loc('Cancel') %]</a>
<input class="btn btn-primary" type="submit" value="[% loc('Save changes') %]" data-value-original="[% loc('Save changes') %]" data-value-duplicate="[% loc('Save + close as duplicate') %]" name="save" />
</p>
</div>
diff --git a/templates/web/base/report/_item.html b/templates/web/base/report/_item.html
index 939dc5da6..02457e5a0 100644
--- a/templates/web/base/report/_item.html
+++ b/templates/web/base/report/_item.html
@@ -2,7 +2,8 @@
[% PROCESS 'admin/report_blocks.html' ~%]
[% END ~%]
-<li class="item-list__item item-list--reports__item [% item_extra_class %]" data-report-id="[% problem.id | html %]">
+<li class="item-list__item item-list--reports__item [% item_extra_class %]"
+ data-report-id="[% problem.id | html %]" data-lastupdate="[% problem.lastupdate %]">
<a href="[% c.cobrand.base_url_for_report( problem ) %][% problem.url %]">
[% IF problem.photo %]
<img class="img" height="60" width="90" src="[% problem.photos.first.url_fp %]" alt="">
diff --git a/templates/web/base/report/_main.html b/templates/web/base/report/_main.html
index 4de26535c..d5224f23e 100644
--- a/templates/web/base/report/_main.html
+++ b/templates/web/base/report/_main.html
@@ -5,7 +5,7 @@
<a href="[% c.uri_for( '/around', { lat => latitude, lon => longitude } ) %]"
class="problem-back js-back-to-report-list">[% loc('Back to all reports') %]</a>
-<div class="problem-header clearfix" problem-id="[% problem.id %]">
+<div class="problem-header clearfix" data-lastupdate="[% problem.lastupdate %]">
[% IF c.user.has_permission_to('planned_reports', problem.bodies_str_ids) %]
<form method="post" action="/my/planned/change" id="planned_form" class="hidden-label-target">
diff --git a/templates/web/base/report/photo-js.html b/templates/web/base/report/photo-js.html
index 05588d085..91b9930e7 100644
--- a/templates/web/base/report/photo-js.html
+++ b/templates/web/base/report/photo-js.html
@@ -1,6 +1,6 @@
[% extra_css = BLOCK %]
<link rel="stylesheet" href="[% version('/js/fancybox/jquery.fancybox-1.3.4.css') %]">
[% END %]
-[% extra_js = BLOCK %]
- <script src="[% version('/js/fancybox/jquery.fancybox-1.3.4.pack.js') %]" charset="utf-8"></script>
-[% END %]
+[% extra_js = [
+ version('/js/fancybox/jquery.fancybox-1.3.4.pack.js')
+] %]
diff --git a/templates/web/base/reports/index.html b/templates/web/base/reports/index.html
index 4a7d5a9c9..b07227144 100755
--- a/templates/web/base/reports/index.html
+++ b/templates/web/base/reports/index.html
@@ -1,6 +1,6 @@
-[% extra_js = BLOCK %]
- <script src="[% version('/js/jquery.fixedthead.js') %]"></script>
-[% END -%]
+[% extra_js = [
+ version('/js/jquery.fixedthead.js')
+] -%]
[% INCLUDE 'header.html', title = loc('Summary reports'), bodyclass => 'fullwidthpage' %]
<h1>[% loc('All Reports') %]</h1>
diff --git a/templates/web/bristol/footer_extra_js.html b/templates/web/bristol/footer_extra_js.html
index 6ba5e3100..1cfcf00f6 100644
--- a/templates/web/bristol/footer_extra_js.html
+++ b/templates/web/bristol/footer_extra_js.html
@@ -1,4 +1,6 @@
-<script src="[% version('/js/OpenLayers.Projection.OrdnanceSurvey.js') %]"></script>
-<script src="[% version('/cobrands/fixmystreet-uk-councils/js.js') %]"></script>
-<script src="[% version('/cobrands/fixmystreet/assets.js') %]"></script>
-<script src="[% version('/cobrands/bristol/js.js') %]"></script>
+[% scripts.push(
+ version('/js/OpenLayers.Projection.OrdnanceSurvey.js')
+ version('/cobrands/fixmystreet-uk-councils/js.js'),
+ version('/cobrands/fixmystreet/assets.js'),
+ version('/cobrands/bristol/js.js'),
+) %]
diff --git a/templates/web/bristol/maps/bristol.html b/templates/web/bristol/maps/bristol.html
index f49571a1d..08f6fba1c 100644
--- a/templates/web/bristol/maps/bristol.html
+++ b/templates/web/bristol/maps/bristol.html
@@ -1,9 +1,11 @@
-[% map_js = BLOCK %]
-<script type="text/javascript" src="[% version('/js/OpenLayers/OpenLayers.bristol.js') %]"></script>
-<script type="text/javascript" src="[% version('/js/map-OpenLayers.js') %]"></script>
-<script type="text/javascript" src="[% version('/js/map-wmts-base.js') %]"></script>
-<script type="text/javascript" src="[% version('/js/map-wmts-bristol.js') %]"></script>
-[% END %]
+[%
+map_js = [
+ version('/js/OpenLayers/OpenLayers.bristol.js'),
+ version('/js/map-OpenLayers.js'),
+ version('/js/map-wmts-base.js'),
+ version('/js/map-wmts-bristol.js'),
+]
+%]
[% map_html = BLOCK %]
[% INCLUDE maps/openlayers.html %]
diff --git a/templates/web/bromley/footer_extra_js.html b/templates/web/bromley/footer_extra_js.html
index 57066dbe8..ac03496a8 100644
--- a/templates/web/bromley/footer_extra_js.html
+++ b/templates/web/bromley/footer_extra_js.html
@@ -1 +1,3 @@
-<script src="[% version('/cobrands/bromley/a-z-nav.js') %]" charset="utf-8"></script>
+[% scripts.push(
+ version('/cobrands/bromley/a-z-nav.js'),
+) %]
diff --git a/templates/web/bromley/maps/bromley.html b/templates/web/bromley/maps/bromley.html
index aa5789c1c..c2ee0273f 100644
--- a/templates/web/bromley/maps/bromley.html
+++ b/templates/web/bromley/maps/bromley.html
@@ -1,9 +1,10 @@
-[% map_js = BLOCK %]
-<script type="text/javascript" src="[% version('/js/OpenLayers/OpenLayers.fixmystreet.js') %]"></script>
-<script type="text/javascript" src="[% version('/js/map-OpenLayers.js') %]"></script>
-<script type="text/javascript" src="[% version('/js/map-bing-ol.js') %]"></script>
-<script type="text/javascript" src="[% version('/js/map-fms.js') %]"></script>
-<script type="text/javascript" src="[% version('/cobrands/bromley/map.js') %]"></script>
-[% END %]
-
-[% map_html = INCLUDE maps/openlayers.html include_key = 1 %]
+[%
+map_js = [
+ version('/js/OpenLayers/OpenLayers.fixmystreet.js'),
+ version('/js/map-OpenLayers.js'),
+ version('/js/map-bing-ol.js'),
+ version('/js/map-fms.js'),
+ version('/cobrands/bromley/map.js'),
+];
+map_html = INCLUDE maps/openlayers.html include_key = 1
+%]
diff --git a/templates/web/fixmystreet-uk-councils/footer_extra_js.html b/templates/web/fixmystreet-uk-councils/footer_extra_js.html
index 493902ef0..1e7a38f8a 100644
--- a/templates/web/fixmystreet-uk-councils/footer_extra_js.html
+++ b/templates/web/fixmystreet-uk-councils/footer_extra_js.html
@@ -1,2 +1,4 @@
-<script src="[% version('/js/OpenLayers.Projection.OrdnanceSurvey.js') %]"></script>
-<script src="[% version('/cobrands/fixmystreet-uk-councils/js.js') %]"></script>
+[% scripts.push(
+ version('/js/OpenLayers.Projection.OrdnanceSurvey.js')
+ version('/cobrands/fixmystreet-uk-councils/js.js'),
+) %]
diff --git a/templates/web/fixmystreet.com/about/posters.html b/templates/web/fixmystreet.com/about/posters.html
index 1a9a4400c..c4cf16cd4 100644
--- a/templates/web/fixmystreet.com/about/posters.html
+++ b/templates/web/fixmystreet.com/about/posters.html
@@ -1,6 +1,6 @@
-[% extra_js = BLOCK %]
- <script src="[% version('/cobrands/fixmystreet.com/posters.js') %]"></script>
-[% END %]
+[% extra_js = [
+ version('/cobrands/fixmystreet.com/posters.js')
+] %]
[% extra_css = BLOCK %]
<link rel="stylesheet" href="[% version('/cobrands/fixmystreet.com/posters.css') %]">
[% END %]
diff --git a/templates/web/fixmystreet.com/footer_extra_js.html b/templates/web/fixmystreet.com/footer_extra_js.html
index 0d1cca04d..d03aa8657 100644
--- a/templates/web/fixmystreet.com/footer_extra_js.html
+++ b/templates/web/fixmystreet.com/footer_extra_js.html
@@ -1,3 +1,5 @@
-<script src="[% version('/js/OpenLayers.Projection.OrdnanceSurvey.js') %]"></script>
-<script src="[% version('/js/jquery.cookie.min.js') %]"></script>
-<script src="[% version('/cobrands/fixmystreet.com/js.js') %]"></script>
+[% scripts.push(
+ version('/js/OpenLayers.Projection.OrdnanceSurvey.js'),
+ version('/js/jquery.cookie.min.js'),
+ version('/cobrands/fixmystreet.com/js.js'),
+) %]
diff --git a/templates/web/fixmystreet.com/front/javascript.html b/templates/web/fixmystreet.com/front/javascript.html
index ac9faa309..baf7ebb64 100644
--- a/templates/web/fixmystreet.com/front/javascript.html
+++ b/templates/web/fixmystreet.com/front/javascript.html
@@ -1,7 +1,12 @@
-<script src="[% version('/js/yepnope.js') %]"></script>
-<script id="script_front" src="[% version('/cobrands/fixmystreet/front.js') %]"
- data-scripts="
- [%~ version('/js/OpenLayers/OpenLayers.fixmystreet.js') %],
- [%~ version('/js/map-OpenLayers.js') %],
- [%~ version('/js/map-bing-ol.js') %],
- [%~ version('/js/map-fms.js') %]"></script>
+[%
+map_js = [
+ version('/js/yepnope.js'),
+ [ version('/cobrands/fixmystreet/front.js'), {
+ id = "script_front",
+ 'data-scripts' = version('/js/OpenLayers/OpenLayers.fixmystreet.js') _ ',' _
+ version('/js/map-OpenLayers.js') _ ',' _
+ version('/js/map-bing-ol.js') _ ',' _
+ version('/js/map-fms.js')
+ } ],
+]
+%]
diff --git a/templates/web/fixmystreet.com/header.html b/templates/web/fixmystreet.com/header.html
new file mode 100644
index 000000000..48759d614
--- /dev/null
+++ b/templates/web/fixmystreet.com/header.html
@@ -0,0 +1,45 @@
+[% SET html_att = ' lang="' _ lang_code _ '"' -%]
+<!doctype html>
+<!--[if IE 7]> <html class="no-js ie7 iel8"[% html_att %]><![endif]-->
+<!--[if IE 8]> <html class="no-js ie8 iel8"[% html_att %]><![endif]-->
+<!--[if IE 9]> <html class="no-js ie9"[% html_att %]><![endif]-->
+<!--[if gt IE 9]><!--><html class="no-js"[% html_att %]
+[% IF appcache ~%]
+ manifest="/offline/appcache.manifest"
+[%~ END %]><!--<![endif]-->
+ <head>
+ <meta name="viewport" content="initial-scale=1.0">
+
+ <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
+ <meta name="HandHeldFriendly" content="true">
+ <meta name="mobileoptimized" content="0">
+
+ [% INCLUDE 'header_opengraph.html' %]
+ <link rel="stylesheet" href="[% version('/cobrands/fixmystreet.com/base.css') %]">
+ <link rel="stylesheet" href="[% version('/cobrands/fixmystreet.com/layout.css') %]" media="(min-width:48em)">
+ [% extra_css %]
+ <!--[if (lt IE 9) & (!IEMobile)]>
+ <link rel="stylesheet" href="[% version('/cobrands/fixmystreet.com/layout.css') %]">
+ <![endif]-->
+
+ [% INCLUDE 'common_header_tags.html' %]
+
+ [% IF c.req.uri.host == 'osm.fixmystreet.com' %]
+ <link rel="canonical" href="https://www.fixmystreet.com[% c.req.uri.path_query %]">
+ [% END %]
+
+ [% TRY %][% PROCESS 'header_extra.html' %][% CATCH file %][% END %]
+
+ </head>
+ [% TRY %][% PROCESS 'set_body_class.html' %][% CATCH file %][% END %]
+ <body class="[% bodyclass | html IF bodyclass %]">
+ <div class="top_banner top_banner--donate"><p>FixMyStreet is run by the charity mySociety. <a href="https://www.mysociety.org/donate/?utm_source=fixmystreet.com&utm_medium=banner&utm_campaign=december_2016&utm_content=banner+donate+now">Can you help support us with a small donation?</a></p></div>
+
+ <div class="wrapper">
+ <div class="table-cell">
+ [% INCLUDE 'header_site.html' %]
+
+ [% pre_container_extra %]
+
+ <div class="container">
+ <div class="content[% " $mainclass" | html IF mainclass %]" role="main">
diff --git a/templates/web/oxfordshire/header.html b/templates/web/oxfordshire/header.html
index 042222e1d..d8cb8d4bb 100644
--- a/templates/web/oxfordshire/header.html
+++ b/templates/web/oxfordshire/header.html
@@ -2,7 +2,10 @@
<!--[if IE 7]> <html class="no-js ie7 iel8" lang="[% lang_code %]"><![endif]-->
<!--[if IE 8]> <html class="no-js ie8 iel8" lang="[% lang_code %]"><![endif]-->
<!--[if IE 9]> <html class="no-js ie9" lang="[% lang_code %]"><![endif]-->
-<!--[if gt IE 9]><!--><html class="no-js" lang="[% lang_code %]"><!--<![endif]-->
+<!--[if gt IE 9]><!--><html class="no-js" lang="[% lang_code %]"
+[% IF appcache ~%]
+ manifest="/offline/appcache.manifest"
+[%~ END %]><!--<![endif]-->
<head>
<meta name="viewport" content="initial-scale=1.0">
diff --git a/templates/web/zurich/maps/zurich.html b/templates/web/zurich/maps/zurich.html
index 2f21c91a6..f85be4aef 100644
--- a/templates/web/zurich/maps/zurich.html
+++ b/templates/web/zurich/maps/zurich.html
@@ -1,10 +1,12 @@
-[% map_js = BLOCK %]
-<script type="text/javascript" src="[% version('/js/OpenLayers.2.11.zurich.js') %]"></script>
-<script type="text/javascript" src="[% version('/js/OpenLayers.Projection.CH1903Plus.js') %]"></script>
-<script type="text/javascript" src="[% version('/js/map-OpenLayers.js') %]"></script>
-<script type="text/javascript" src="[% version('/js/map-wmts-base.js') %]"></script>
-<script type="text/javascript" src="[% version('/js/map-wmts-zurich.js') %]"></script>
-[% END %]
+[%
+map_js = [
+ version('/js/OpenLayers.2.11.zurich.js'),
+ version('/js/OpenLayers.Projection.CH1903Plus.js'),
+ version('/js/map-OpenLayers.js'),
+ version('/js/map-wmts-base.js'),
+ version('/js/map-wmts-zurich.js'),
+]
+%]
[% map_sub_links = BLOCK %]
<a class="hidden-nojs" id="map_layer_toggle" href="">Stadtplan</a>