aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/default
diff options
context:
space:
mode:
Diffstat (limited to 'templates/web/default')
-rwxr-xr-xtemplates/web/default/around/display_location.html2
-rw-r--r--templates/web/default/maps/tilma/original.html76
-rw-r--r--templates/web/default/questionnaire/index.html5
-rw-r--r--templates/web/default/report/display.html11
-rw-r--r--templates/web/default/report/new/fill_in_details.html9
5 files changed, 92 insertions, 11 deletions
diff --git a/templates/web/default/around/display_location.html b/templates/web/default/around/display_location.html
index b46b242d6..f9a9bdc51 100755
--- a/templates/web/default/around/display_location.html
+++ b/templates/web/default/around/display_location.html
@@ -43,7 +43,7 @@
<input type="hidden" name="latitude" id="fixmystreet.latitude" value="[% short_latitude | html %]">
<input type="hidden" name="longitude" id="fixmystreet.longitude" value="[% short_longitude | html %]">
-[% map_html %]
+[% INCLUDE "maps/${map.type}.html" %]
<p id='sub_map_links'>
[% IF c.req.params.no_pins %]
diff --git a/templates/web/default/maps/tilma/original.html b/templates/web/default/maps/tilma/original.html
new file mode 100644
index 000000000..53231672a
--- /dev/null
+++ b/templates/web/default/maps/tilma/original.html
@@ -0,0 +1,76 @@
+[% IF !map.tiles %]
+ <div id="map_box">
+ <div id="map"><div id="drag">
+ [% loc("Unable to fetch the map tiles from the tile server.") %]
+ </div></div>
+ [% RETURN %]
+[% END %]
+
+[% IF map.clickable %]
+<input type="hidden" name="x" id="formX" value="[% map.x %]">
+<input type="hidden" name="y" id="formY" value="[% map.y %]">
+ [% map.img_type = 'input type="image"' %]
+[% ELSE %]
+ [% map.img_type = 'img' %]
+[% END %]
+<script type="text/javascript">
+[% c.cobrand.root_path_js %]
+var fixmystreet = {
+ 'x': [% map.x - 3 %],
+ 'y': [% map.y - 3 %],
+ 'start_x': [% map.px %],
+ 'start_y': [% map.py %],
+ 'tile_type': '[% map.tile_type %]',
+ 'tilewidth': [% map.tilewidth %],
+ 'tileheight': [% map.tilewidth %]
+};
+</script>
+<div id="map_box">
+ [% pre_map %]
+ <div id="map"><div id="drag">
+ <[% map.img_type %]
+ alt="NW map tile" id="t2.2" name="tile_[% map.x - 1 %].[% map.y %]" src="[% map.url %][% map.tileids.0.0 %]" style="top:0px; left:0;"><[% map.img_type %]
+ alt="NE map tile" id="t2.3" name="tile_[% map.x %].[% map.y %]" src="[% map.url %][% map.tileids.0.1 %]" style="top:0px; left:[% map.tilewidth %]px;"><br><[% map.img_type %]
+ alt="SW map tile" id="t3.2" name="tile_[% map.x - 1 %].[% map.y - 1 %]" src="[% map.url %][% map.tileids.1.0 %]" style="top:[% map.tilewidth %]px; left:0;"><[% map.img_type %]
+ alt="SE map tile" id="t3.3" name="tile_[% map.x %].[% map.y - 1 %]" src="[% map.url %][% map.tileids.1.1 %]" style="top:[% map.tilewidth %]px; left:[% map.tilewidth %]px;">
+ <div id="pins">[% FOR pin IN map.pins %][% INCLUDE pin %][% END %]</div>
+ </div>
+ [% '<div id="watermark"></div>' IF map.watermark %]
+ <table cellpadding="0" cellspacing="0" border="0" id="compass">
+ <tr valign="bottom">
+ <td align="right"><a href="[% c.req.uri_with( { x => map.x - 1, y => map.y + 1 } ) %]"><img src="[% c.uri_for('/i/arrow-northwest.gif') %]" alt="NW" width=11 height=11></a></td>
+ <td align="center"><a href="[% c.req.uri_with( { x => map.x, y => map.y + 1 } ) %]"><img src="[% c.uri_for('/i/arrow-north.gif') %]" vspace="3" alt="N" width=13 height=11></a></td>
+ <td><a href="[% c.req.uri_with( { x => map.x + 1, y => map.y + 1 } ) %]"><img src="[% c.uri_for('/i/arrow-northeast.gif') %]" alt="NE" width=11 height=11></a></td>
+ </tr>
+ <tr>
+ <td><a href="[% c.req.uri_with( { x => map.x - 1, y => map.y } ) %]"><img src="[% c.uri_for('/i/arrow-west.gif') %]" hspace="3" alt="W" width=11 height=13></a></td>
+ <td align="center"><a href="$recentre"><img src="[% c.uri_for('/i/rose.gif') %]" alt="Recentre" width=35 height=34></a></td>
+ <td><a href="[% c.req.uri_with( { x => map.x + 1, y => map.y } ) %]"><img src="[% c.uri_for('/i/arrow-east.gif') %]" hspace="3" alt="E" width=11 height=13></a></td>
+ </tr>
+ <tr valign="top">
+ <td align="right"><a href="[% c.req.uri_with( { x => map.x - 1, y => map.y - 1 } ) %]"><img src="[% c.uri_for('/i/arrow-southwest.gif') %]" alt="SW" width=11 height=11></a></td>
+ <td align="center"><a href="[% c.req.uri_with( { x => map.x, y => map.y - 1 } ) %]"><img src="[% c.uri_for('/i/arrow-south.gif') %]" vspace="3" alt="S" width=13 height=11></a></td>
+ <td><a href="[% c.req.uri_with( { x => map.x + 1, y => map.y - 1 } ) %]"><img src="[% c.uri_for('/i/arrow-southeast.gif') %]" alt="SE" width=11 height=11></a></td>
+ </tr>
+ </table>
+ </div>
+ <p id="copyright">[% map.copyright %]</p>
+
+
+[% BLOCK pin %]
+
+[% num = '' IF !num or num > 9;
+ cols = {
+ red = 'R', green = 'G', blue = 'B', purple = 'P',
+ }
+%]
+[% IF pin.id %]
+<a title="[% pin.title | html %]" href="[% c.uri_for('/report/' _ pin.id) %]">
+[%- END -%]
+<img class="pin" src="[% c.uri_for('/i/pin' _ cols.${pin.col} _ num _ '.gif') %]"
+ alt="[% loc('Problem') %]" style="top:[% pin.py - 59 %]px; left:[% pin.px %]px; position: absolute;">
+[%- IF pin.id -%]
+</a>
+[% END %]
+
+[% END %]
diff --git a/templates/web/default/questionnaire/index.html b/templates/web/default/questionnaire/index.html
index 2bc28451f..dd811394c 100644
--- a/templates/web/default/questionnaire/index.html
+++ b/templates/web/default/questionnaire/index.html
@@ -1,9 +1,8 @@
[% INCLUDE 'header.html', title = loc('Questionnaire') %]
-[% INCLUDE 'report/_main.html' %]
+[% pre_map = INCLUDE 'report/_main.html' %]
-# FIXME The below should be in the template, by including a map template.
-[% map_start_html %]
+[% INCLUDE "maps/${map.type}.html" %]
[% INCLUDE 'report/updates.html' %]
diff --git a/templates/web/default/report/display.html b/templates/web/default/report/display.html
index 58bc494e9..1461ffc39 100644
--- a/templates/web/default/report/display.html
+++ b/templates/web/default/report/display.html
@@ -6,8 +6,15 @@
robots = 'index, nofollow'
%]
-[% map_start_html %]
-[% map_links %]
+[% INCLUDE "maps/${map.type}.html" %]
+
+[% IF c.config.COUNTRY == 'GB' %]
+<p id='sub_map_links'>
+ <a href="http://maps.google.co.uk/maps?output=embed&amp;z=16&amp;q=
+ [%- problem.title _ ' - ' _ c.cobrand.base_url_for_emails _ '/report/' _ problem.id | uri -%]
+@[% short_latitude %],[% short_longitude %]">View on Google Maps</a></p>
+[% END %]
+
</div>
<div id="side">
diff --git a/templates/web/default/report/new/fill_in_details.html b/templates/web/default/report/new/fill_in_details.html
index 1016a1ede..fcf08b884 100644
--- a/templates/web/default/report/new/fill_in_details.html
+++ b/templates/web/default/report/new/fill_in_details.html
@@ -16,13 +16,12 @@
<input type="hidden" name="latitude" id="fixmystreet.latitude" value="[% short_latitude | html %]">
<input type="hidden" name="longitude" id="fixmystreet.longitude" value="[% short_longitude | html %]">
-[% map_html %]
-
[% IF report.used_map %]
-</div>
-<div id="side">
+ [% INCLUDE "maps/${map.type}.html" %]
+ </div>
+ <div id="side">
[% ELSE %]
-<div id="skipped-map">
+ <div id="skipped-map">
[% END %]
<h1>[% loc('Reporting a problem') %]</h1>