aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/base
diff options
context:
space:
mode:
Diffstat (limited to 'templates/web/base')
-rw-r--r--templates/web/base/admin/category_edit.html3
-rw-r--r--templates/web/base/auth/general.html2
-rw-r--r--templates/web/base/maps/noscript_map.html64
-rw-r--r--templates/web/base/maps/openlayers.html61
-rw-r--r--templates/web/base/report/new/category_extras.html2
-rw-r--r--templates/web/base/report/photo.html25
6 files changed, 91 insertions, 66 deletions
diff --git a/templates/web/base/admin/category_edit.html b/templates/web/base/admin/category_edit.html
index b827a4b6d..c0bd43ef5 100644
--- a/templates/web/base/admin/category_edit.html
+++ b/templates/web/base/admin/category_edit.html
@@ -43,6 +43,9 @@
[% IF c.cobrand.moniker != 'zurich' %]
<input type="checkbox" name="non_public" value="1" id="non_public"[% ' checked' IF contact.non_public %]>
<label class="inline" for="non_public">[% loc('Private') %]</label>
+ [% ELSE %]
+ <input type="checkbox" name="photo_required" value="1" id="photo_required"[% ' checked' IF contact.get_extra_metadata('photo_required') %]>
+ <label class="inline" for="photo_required">[% loc('Photo required') %]</label>
[% END %]
</p>
diff --git a/templates/web/base/auth/general.html b/templates/web/base/auth/general.html
index 7efef4f6b..6e1db86fe 100644
--- a/templates/web/base/auth/general.html
+++ b/templates/web/base/auth/general.html
@@ -25,7 +25,7 @@
[% ELSIF sign_in_error %]
<div class="form-error">[% loc('There was a problem with your email/password combination. If you cannot remember your password, or do not have one, please fill in the &lsquo;sign in by email&rsquo; section of the form.') %]</div>
[% END %]
- <input type="email" class="required email" id="email" name="email" value="[% email | html %]" placeholder="[% loc('Your email address') %]">
+ <input type="email" class="required email" id="email" name="email" value="[% email | html %]" placeholder="[% loc('Your email address') %]" autofocus>
<div id="form_sign_in">
<h3>[% tprintf(loc("Do you have a %s password?", "%s is the site name"), site_name) %]</h3>
diff --git a/templates/web/base/maps/noscript_map.html b/templates/web/base/maps/noscript_map.html
new file mode 100644
index 000000000..aaaa217c9
--- /dev/null
+++ b/templates/web/base/maps/noscript_map.html
@@ -0,0 +1,64 @@
+<div class="noscript">
+ <div id="[% nsm_prefix %]drag">
+ <[% map.img_type %]
+ alt="NW map tile" id="[% nsm_prefix %]t2.2"
+ name="tile_[% map.x_tile - 1 %].[% map.y_tile - 1 %]"
+ src="[% map.tiles.0 %]"
+ style="top:0; left:0;">
+ <[% map.img_type %]
+ alt="NE map tile" id="[% nsm_prefix %]t2.3"
+ name="tile_[% map.x_tile %].[% map.y_tile - 1 %]"
+ src="[% map.tiles.1 %]"
+ style="top:0px; left:256px;">
+ <br>
+ <[% map.img_type %]
+ alt="SW map tile" id="[% nsm_prefix %]t3.2"
+ name="tile_[% map.x_tile - 1 %].[% map.y_tile %]"
+ src="[% map.tiles.2 %]"
+ style="top:256px; left:0;">
+ <[% map.img_type %]
+ alt="SE map tile" id="[% nsm_prefix %]t3.3"
+ name="tile_[% map.x_tile %].[% map.y_tile %]"
+ src="[% map.tiles.3 %]"
+ style="top:256px; left:256px;">
+ </div>
+ <div id="[% nsm_prefix %]pins">[% FOR pin IN map.pins %][% INCLUDE pin %][% END %]</div>
+ [% INCLUDE compass %]
+</div>
+
+[% BLOCK compass %]
+[%
+ north = c.uri_with( { lat = map.compass.north.0, lon = map.compass.north.1, zoom = map.zoom } )
+ south = c.uri_with( { lat = map.compass.south.0, lon = map.compass.south.1, zoom = map.zoom } )
+ east = c.uri_with( { lat = map.compass.east.0, lon = map.compass.east.1, zoom = map.zoom } )
+ west = c.uri_with( { lat = map.compass.west.0, lon = map.compass.west.1, zoom = map.zoom } )
+ world = c.uri_with( { zoom = 0 } );
+ SET zoom_in = c.uri_with( { lat = map.latitude, lon = map.longitude, zoom = map.zoom + 1 } ) IF map.zoom < map.numZoomLevels - 1;
+ SET zoom_out = c.uri_with( { lat = map.latitude, lon = map.longitude, zoom = map.zoom - 1 } ) IF map.zoom > 0;
+ SET zoom_in = '#' IF map.zoom >= map.numZoomLevels - 1;
+ SET zoom_out = '#' IF map.zoom <= 0;
+%]
+<div style="position: absolute; left: 4px; top: 4px;" class="olControlPanZoom olControlNoSelect" unselectable="on">
+ <div style="position: absolute; left: 13px; top: 4px; width: 18px; height: 18px;"><a rel="nofollow" href="[% north %]"><img style="position: relative; width: 18px; height: 18px;" src="/js/OpenLayers-2.13.1/img/north-mini.png" border="0"></a></div>
+ <div style="position: absolute; left: 4px; top: 22px; width: 18px; height: 18px;"><a rel="nofollow" href="[% west %]"><img style="position: relative; width: 18px; height: 18px;" src="/js/OpenLayers-2.13.1/img/west-mini.png" border="0"></a></div>
+ <div style="position: absolute; left: 22px; top: 22px; width: 18px; height: 18px;"><a rel="nofollow" href="[% east %]"><img style="position: relative; width: 18px; height: 18px;" src="/js/OpenLayers-2.13.1/img/east-mini.png" border="0"></a></div>
+ <div style="position: absolute; left: 13px; top: 40px; width: 18px; height: 18px;"><a rel="nofollow" href="[% south %]"><img style="position: relative; width: 18px; height: 18px;" src="/js/OpenLayers-2.13.1/img/south-mini.png" border="0"></a></div>
+ <div style="position: absolute; left: 13px; top: 63px; width: 18px; height: 18px;"><a rel="nofollow" href="[% zoom_in %]"><img style="position: relative; width: 18px; height: 18px;" src="/js/OpenLayers-2.13.1/img/zoom-plus-mini.png" border="0"></a></div>
+ <div style="position: absolute; left: 13px; top: 81px; width: 18px; height: 18px;"><a rel="nofollow" href="[% world %]"><img style="position: relative; width: 18px; height: 18px;" src="/js/OpenLayers-2.13.1/img/zoom-world-mini.png" border="0"></a></div>
+ <div style="position: absolute; left: 13px; top: 99px; width: 18px; height: 18px;"><a rel="nofollow" href="[% zoom_out %]"><img style="position: relative; width: 18px; height: 18px;" src="/js/OpenLayers-2.13.1/img/zoom-minus-mini.png" border="0"></a></div>
+</div>
+[% END %]
+
+
+[% BLOCK pin %]
+
+[% IF pin.id %]
+<a title="[% pin.title | html %]" href="[% c.uri_for('/report/' _ pin.id) %]">
+[%- END -%]
+<img border="0" class="pin" src="[% c.uri_for( c.cobrand.path_to_pin_icons _ 'pin-' _ pin.colour _ '.png') %]"
+ alt="[% loc('Problem') %]" style="top:[% pin.py - 64 %]px; left:[% pin.px - 24 %]px; position: absolute;">
+[%- IF pin.id -%]
+</a>
+[% END %]
+
+[% END %]
diff --git a/templates/web/base/maps/openlayers.html b/templates/web/base/maps/openlayers.html
index 1d0f88166..1e7ae5ce8 100644
--- a/templates/web/base/maps/openlayers.html
+++ b/templates/web/base/maps/openlayers.html
@@ -30,65 +30,10 @@ var fixmystreet = {
</script>
<div id="map_box" aria-hidden="true">
[% pre_map %]
- <div id="map"><noscript>
- <div id="drag"><[% map.img_type %]
- alt="NW map tile" id="t2.2"
- name="tile_[% map.x_tile - 1 %].[% map.y_tile - 1 %]"
- src="[% map.tiles.0 %]"
- style="top:0; left:0;"><[% map.img_type %]
- alt="NE map tile" id="t2.3"
- name="tile_[% map.x_tile %].[% map.y_tile - 1 %]"
- src="[% map.tiles.1 %]"
- style="top:0px; left:256px;"><br><[% map.img_type %]
- alt="SW map tile" id="t3.2"
- name="tile_[% map.x_tile - 1 %].[% map.y_tile %]"
- src="[% map.tiles.2 %]"
- style="top:256px; left:0;"><[% map.img_type %]
- alt="SE map tile" id="t3.3"
- name="tile_[% map.x_tile %].[% map.y_tile %]"
- src="[% map.tiles.3 %]"
- style="top:256px; left:256px;"></div>
- <div id="pins">[% FOR pin IN map.pins %][% INCLUDE pin %][% END %]</div>
- [% INCLUDE compass %]
- </noscript></div>
+ <div id="map">
+ [% INCLUDE 'maps/noscript_map.html' %]
+ </div>
[% IF map.copyright %]
<div class="olControlAttribution" style="position: absolute;">[% map.copyright %]</div>
[% END %]
-
-[% BLOCK compass %]
-[%
- north = c.uri_with( { lat = map.compass.north.0, lon = map.compass.north.1, zoom = map.zoom } )
- south = c.uri_with( { lat = map.compass.south.0, lon = map.compass.south.1, zoom = map.zoom } )
- east = c.uri_with( { lat = map.compass.east.0, lon = map.compass.east.1, zoom = map.zoom } )
- west = c.uri_with( { lat = map.compass.west.0, lon = map.compass.west.1, zoom = map.zoom } )
- world = c.uri_with( { zoom = 0 } );
- SET zoom_in = c.uri_with( { lat = map.latitude, lon = map.longitude, zoom = map.zoom + 1 } ) IF map.zoom < map.numZoomLevels - 1;
- SET zoom_out = c.uri_with( { lat = map.latitude, lon = map.longitude, zoom = map.zoom - 1 } ) IF map.zoom > 0;
- SET zoom_in = '#' IF map.zoom >= map.numZoomLevels - 1;
- SET zoom_out = '#' IF map.zoom <= 0;
-%]
-<div style="position: absolute; left: 4px; top: 4px;" class="olControlPanZoom olControlNoSelect" unselectable="on">
- <div style="position: absolute; left: 13px; top: 4px; width: 18px; height: 18px;"><a rel="nofollow" href="[% north %]"><img style="position: relative; width: 18px; height: 18px;" src="/js/OpenLayers-2.13.1/img/north-mini.png" border="0"></a></div>
- <div style="position: absolute; left: 4px; top: 22px; width: 18px; height: 18px;"><a rel="nofollow" href="[% west %]"><img style="position: relative; width: 18px; height: 18px;" src="/js/OpenLayers-2.13.1/img/west-mini.png" border="0"></a></div>
- <div style="position: absolute; left: 22px; top: 22px; width: 18px; height: 18px;"><a rel="nofollow" href="[% east %]"><img style="position: relative; width: 18px; height: 18px;" src="/js/OpenLayers-2.13.1/img/east-mini.png" border="0"></a></div>
- <div style="position: absolute; left: 13px; top: 40px; width: 18px; height: 18px;"><a rel="nofollow" href="[% south %]"><img style="position: relative; width: 18px; height: 18px;" src="/js/OpenLayers-2.13.1/img/south-mini.png" border="0"></a></div>
- <div style="position: absolute; left: 13px; top: 63px; width: 18px; height: 18px;"><a rel="nofollow" href="[% zoom_in %]"><img style="position: relative; width: 18px; height: 18px;" src="/js/OpenLayers-2.13.1/img/zoom-plus-mini.png" border="0"></a></div>
- <div style="position: absolute; left: 13px; top: 81px; width: 18px; height: 18px;"><a rel="nofollow" href="[% world %]"><img style="position: relative; width: 18px; height: 18px;" src="/js/OpenLayers-2.13.1/img/zoom-world-mini.png" border="0"></a></div>
- <div style="position: absolute; left: 13px; top: 99px; width: 18px; height: 18px;"><a rel="nofollow" href="[% zoom_out %]"><img style="position: relative; width: 18px; height: 18px;" src="/js/OpenLayers-2.13.1/img/zoom-minus-mini.png" border="0"></a></div>
-</div>
-[% END %]
-
-
-[% BLOCK pin %]
-
-[% IF pin.id %]
-<a title="[% pin.title | html %]" href="[% c.uri_for('/report/' _ pin.id) %]">
-[%- END -%]
-<img border="0" class="pin" src="[% c.uri_for( c.cobrand.path_to_pin_icons _ 'pin-' _ pin.colour _ '.png') %]"
- alt="[% loc('Problem') %]" style="top:[% pin.py - 64 %]px; left:[% pin.px - 24 %]px; position: absolute;">
-[%- IF pin.id -%]
-</a>
-[% END %]
-
-[% END %]
diff --git a/templates/web/base/report/new/category_extras.html b/templates/web/base/report/new/category_extras.html
index c0f6a7bae..12ef1486f 100644
--- a/templates/web/base/report/new/category_extras.html
+++ b/templates/web/base/report/new/category_extras.html
@@ -6,7 +6,7 @@
[%- END %]
[%- IF report_meta %]
- <h4>Additional Information</h4>
+ <h4>[% loc('Additional Information') %]</h4>
[%- FOR meta IN category_extras.$category %]
[%- meta_name = meta.code -%]
diff --git a/templates/web/base/report/photo.html b/templates/web/base/report/photo.html
index c463c34c4..094f677d8 100644
--- a/templates/web/base/report/photo.html
+++ b/templates/web/base/report/photo.html
@@ -1,8 +1,21 @@
[% IF c.cobrand.allow_photo_display(object) && object.photo %]
-[% photo = object.get_photo_params %]
-<div class="update-img">
- [% IF photo.url_full %]<a href="[% photo.url_full %]" rel="fancy">[% END
- %]<img alt="Photo of this report" [% IF photo.height %]height="[% photo.height %]" width="[% photo.width %]"[% END %] src="[% photo.url %]">
- [%- IF photo.url_full %]<span>zoom</span></a>[% END %]
-</div>
+ [% IF object.can('get_photoset') %]
+ [% FOR photo IN object.get_photoset(c).images %]
+ <div class="update-img">
+ <a href="[% c.cobrand.base_url %]/photo/[% object.id %].[% loop.index %].full.jpeg?[% photo.0 %]" rel="fancy">
+ <img alt="Photo of this report" src="[% c.cobrand.base_url %]/photo/[% object.id %].[% loop.index %].jpeg?[% photo.0 %]">
+ <span>zoom</span></a>
+ </div>
+ [% END %]
+ [% ELSE %]
+ [%# e.g. comments %]
+ [% photo = object.get_photo_params %]
+ <div class="update-img">
+ [% IF photo.url_full %]<a href="[% photo.url_full %]" rel="fancy">[% END %]
+ <img alt="Photo of this report"
+ [%- IF photo.height %]height="[% photo.height %]" width="[% photo.width %]"[% END -%]
+ src="[% photo.url %]">
+ [%- IF photo.url_full %]<span>zoom</span></a>[% END %]
+ </div>
+ [% END %]
[% END %]