aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/web/base/common_scripts.html2
-rw-r--r--templates/web/base/maps/noscript_map_base_wmx.html18
-rw-r--r--templates/web/base/maps/noscript_map_wmts.html32
-rw-r--r--templates/web/base/maps/openlayers.html4
-rw-r--r--templates/web/base/maps/wms.html4
-rw-r--r--templates/web/base/maps/wms_config.html13
-rw-r--r--templates/web/base/maps/wmts.html2
-rw-r--r--templates/web/base/offline/service_worker.html2
-rw-r--r--templates/web/borsetshire/front/footer-marketing.html2
-rw-r--r--templates/web/fixmystreet.com/about/posters.html4
-rw-r--r--templates/web/fixmystreet.com/front/footer-marketing.html2
-rw-r--r--templates/web/tfl/footer_extra_js.html7
-rw-r--r--templates/web/tfl/report/_item_heading.html3
13 files changed, 54 insertions, 41 deletions
diff --git a/templates/web/base/common_scripts.html b/templates/web/base/common_scripts.html
index f94b3d464..b8c4db343 100644
--- a/templates/web/base/common_scripts.html
+++ b/templates/web/base/common_scripts.html
@@ -46,7 +46,7 @@ IF c.user_exists AND (c.user.from_body OR c.user.is_superuser);
END;
IF c.user.has_body_permission_to('planned_reports');
scripts.push(
- 'https://cdn.jsdelivr.net/npm/idb-keyval@3/dist/idb-keyval-iife.min.js',
+ version('/vendor/idb-keyval-iife.min.js'),
version('/cobrands/fixmystreet/offline.js'),
);
END;
diff --git a/templates/web/base/maps/noscript_map_base_wmx.html b/templates/web/base/maps/noscript_map_base_wmx.html
new file mode 100644
index 000000000..45de9926e
--- /dev/null
+++ b/templates/web/base/maps/noscript_map_base_wmx.html
@@ -0,0 +1,18 @@
+<div class="noscript">
+ <div id="[% nsm_prefix %]drag">
+ [%- FOR row IN map.tiles -%]
+ [%- FOR tile IN row -%]
+ [%- top_px = tile.row_offset * map.tile_size -%]
+ [%- left_px = tile.col_offset * map.tile_size %]
+ <[% map.img_type | safe %]
+ alt="[% tile.alt %]"
+ id="[% nsm_prefix %]t[% tile.dotted_id %]"
+ name="tile_[% tile.dotted_id %]"
+ src="[% tile.src %]"
+ style="width: [% map.tile_size %]px; top: [% top_px %]px; left: [% left_px %]px">
+ [%- END -%]
+ [% END %]
+ </div>
+ <div id="[% nsm_prefix %]pins">[% FOR pin IN map.pins %][% INCLUDE 'maps/pin.html' %][% END %]</div>
+ [% INCLUDE 'maps/_compass.html' %]
+</div>
diff --git a/templates/web/base/maps/noscript_map_wmts.html b/templates/web/base/maps/noscript_map_wmts.html
deleted file mode 100644
index 2b1c5e73c..000000000
--- a/templates/web/base/maps/noscript_map_wmts.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<div class="noscript square-map__outer">
- <div class="square-map__inner">
- <div id="[% nsm_prefix %]drag">
- [%- FOR row IN map.tiles -%]
- [%- FOR tile IN row -%]
- [%- top_px = tile.row_offset * map.tile_size -%]
- [%- left_px = tile.col_offset * map.tile_size %]
- <[% map.img_type | safe %]
- class="square-map__tile"
- alt="[% tile.alt %]"
- id="[% nsm_prefix %]t[% tile.dotted_id %]"
- name="tile_[% tile.dotted_id %]"
- src="[% tile.src %]"
- style="width: [% 100 / map.cols %]%; height: auto; float: left;">
- [%- END -%]
- [% END %]
- </div>
- <div id="[% nsm_prefix %]pins">[% FOR pin IN map.pins %][% INCLUDE pin %][% END %]</div>
- [% INCLUDE 'maps/_compass.html' %]
- </div>
-</div>
-
-[% BLOCK pin %]
-[%
- SET pin_top = pin.py / ( map.tile_size * map.rows ) * 100;
- SET pin_left = pin.px / ( map.tile_size * map.cols ) * 100;
- # -24px half of 48px wide image, -64px all of 64px tall image
- INCLUDE 'maps/pin.html'
- pin_style = 'top:' _ pin_top _ '%; left:' _ pin_left _ '%; position:absolute; margin-left:-24px; margin-top:-64px;'
-%]
-[% END %]
-
diff --git a/templates/web/base/maps/openlayers.html b/templates/web/base/maps/openlayers.html
index 5002d4243..48a2f0890 100644
--- a/templates/web/base/maps/openlayers.html
+++ b/templates/web/base/maps/openlayers.html
@@ -33,8 +33,8 @@
<div id="map_box" aria-hidden="true">
[% pre_map %]
<div id="map">
- [% IF noscript_map_template == 'maps/noscript_map_wmts.html' %]
- [% INCLUDE 'maps/noscript_map_wmts.html' js = 1 %]
+ [% IF noscript_map_template == 'maps/noscript_map_base_wmx.html' %]
+ [% INCLUDE 'maps/noscript_map_base_wmx.html' js = 1 %]
[% ELSE %]
[% INCLUDE 'maps/noscript_map.html' js = 1 %]
[% END %]
diff --git a/templates/web/base/maps/wms.html b/templates/web/base/maps/wms.html
new file mode 100644
index 000000000..93fcb95dd
--- /dev/null
+++ b/templates/web/base/maps/wms.html
@@ -0,0 +1,4 @@
+[% map_html = BLOCK %]
+[% INCLUDE maps/openlayers.html noscript_map_template = 'maps/noscript_map_base_wmx.html' %]
+[% INCLUDE maps/wms_config.html %]
+[% END %]
diff --git a/templates/web/base/maps/wms_config.html b/templates/web/base/maps/wms_config.html
new file mode 100644
index 000000000..f7fe3510c
--- /dev/null
+++ b/templates/web/base/maps/wms_config.html
@@ -0,0 +1,13 @@
+<script nonce="[% csp_nonce %]">
+ var fixmystreet = window.fixmystreet || {};
+ fixmystreet.wms_config = {
+ 'map_projection': '[% map.map_projection %]',
+ 'tile_urls': [% map.tile_urls | safe %],
+ 'tile_size': [% map.tile_size %],
+ 'layer_names': [% map.layer_names | safe %],
+ 'wms_version': '[% map.wms_version %]',
+ 'format': '[% map.format %]',
+ 'scales': [% map.scales | safe %],
+ 'requestEncoding': "REST"
+ };
+</script>
diff --git a/templates/web/base/maps/wmts.html b/templates/web/base/maps/wmts.html
index d955f6985..25c9065a3 100644
--- a/templates/web/base/maps/wmts.html
+++ b/templates/web/base/maps/wmts.html
@@ -1,4 +1,4 @@
[% map_html = BLOCK %]
-[% INCLUDE maps/openlayers.html noscript_map_template = 'maps/noscript_map_wmts.html' %]
+[% INCLUDE maps/openlayers.html noscript_map_template = 'maps/noscript_map_base_wmx.html' %]
[% INCLUDE maps/wmts_config.html %]
[% END %]
diff --git a/templates/web/base/offline/service_worker.html b/templates/web/base/offline/service_worker.html
index 0feb26ce6..3c480f9b1 100644
--- a/templates/web/base/offline/service_worker.html
+++ b/templates/web/base/offline/service_worker.html
@@ -6,7 +6,7 @@ SET scripts_seen = {};
~%]
-importScripts('https://cdn.jsdelivr.net/npm/idb-keyval@3/dist/idb-keyval-iife.min.js');
+importScripts('[% version('/vendor/idb-keyval-iife.min.js') %]');
const requiredOffline = [
"[% version('/cobrands/' _ c.cobrand.asset_moniker _ '/base.css') %]",
diff --git a/templates/web/borsetshire/front/footer-marketing.html b/templates/web/borsetshire/front/footer-marketing.html
index 41a815e65..2a4305c81 100644
--- a/templates/web/borsetshire/front/footer-marketing.html
+++ b/templates/web/borsetshire/front/footer-marketing.html
@@ -2,5 +2,5 @@
<h2>FixMyStreet Pro</h2>
<p class="lead">The one-stop street reporting service for councils.</p>
<p>Integrate FixMyStreet with your council system for smooth, end-to-end report fullfilment.</p>
- <p><a href="https://www.fixmystreet.com/pro/" class="btn">Learn more</a></p>
+ <p><a href="https://www.fixmystreet.com/pro/" class="btn">Learn more about Pro</a></p>
</div>
diff --git a/templates/web/fixmystreet.com/about/posters.html b/templates/web/fixmystreet.com/about/posters.html
index c4cf16cd4..073b36b3b 100644
--- a/templates/web/fixmystreet.com/about/posters.html
+++ b/templates/web/fixmystreet.com/about/posters.html
@@ -82,10 +82,10 @@
<h2 id="web">Website Badge</h2>
-<p class="badge-preview">[% badge %]</p>
+<p class="badge-preview">[% badge | safe %]</p>
<p>Copy and paste the text below to add this badge to your site:</p>
-<textarea class="badge-code js-click-select">[% badge | html %]</textarea>
+<textarea class="badge-code js-click-select">[% badge %]</textarea>
<p><small>(thanks to Lincolnshire Council for the image)</small></p>
<h2 id="print">Printed Materials</h2>
diff --git a/templates/web/fixmystreet.com/front/footer-marketing.html b/templates/web/fixmystreet.com/front/footer-marketing.html
index c5812cccf..e1cc180ed 100644
--- a/templates/web/fixmystreet.com/front/footer-marketing.html
+++ b/templates/web/fixmystreet.com/front/footer-marketing.html
@@ -3,7 +3,7 @@
<h2>Go Pro</h2>
<p class="lead">Integrate FixMyStreet Pro with your council system for smooth, end-to-end report fullfilment.</p>
<p>How much could <em>you</em> save?</p>
- <p><a href="/pro/" class="btn">Learn more</a></p>
+ <p><a href="/pro/" class="btn">Learn more about Pro</a></p>
</div>
<div class="fms-pro-promo__stats">
<h2>Free statistics for councils</h2>
diff --git a/templates/web/tfl/footer_extra_js.html b/templates/web/tfl/footer_extra_js.html
index a8ccc80d0..af38a5286 100644
--- a/templates/web/tfl/footer_extra_js.html
+++ b/templates/web/tfl/footer_extra_js.html
@@ -9,3 +9,10 @@ IF bodyclass.match('mappage');
);
END
%]
+[%~
+IF c.user_exists AND ((c.user.from_body AND c.user.from_body.name == 'TfL') OR c.user.is_superuser);
+ scripts.push(
+ version('/cobrands/tfl/staff.js'),
+ );
+END
+%]
diff --git a/templates/web/tfl/report/_item_heading.html b/templates/web/tfl/report/_item_heading.html
index c9575f0fd..17ded1110 100644
--- a/templates/web/tfl/report/_item_heading.html
+++ b/templates/web/tfl/report/_item_heading.html
@@ -1,4 +1,7 @@
<h3 class="item-list__heading">[% problem.title | html %]</h3>
+[% IF c.user.from_body || c.user.is_superuser %]
+ <small class="item-list__item__borough">[% c.cobrand.borough_for_report(problem) %]</small>
+[% END %]
[%~ IF c.user.has_permission_to('report_inspect', problem.bodies_str_ids) AND problem.get_extra_field_value('safety_critical') == 'yes' ~%]
<small class="item-list__safety-critical">Safety Critical</small>
[%~ END ~%]