diff options
Diffstat (limited to 'templates')
35 files changed, 894 insertions, 488 deletions
diff --git a/templates/email/default/test.txt b/templates/email/default/test.txt index bfa2c1dd3..1acd4b6ca 100644 --- a/templates/email/default/test.txt +++ b/templates/email/default/test.txt @@ -1,5 +1,4 @@ Subject: test email ☺ -From: bad-sender@duff.com Hello, diff --git a/templates/email/fixamingata/test.txt b/templates/email/fixamingata/test.txt deleted file mode 100644 index bfa2c1dd3..000000000 --- a/templates/email/fixamingata/test.txt +++ /dev/null @@ -1,15 +0,0 @@ -Subject: test email ☺ -From: bad-sender@duff.com - -Hello, - -This is a test email where foo: [% foo %]. - -utf8: 我们应该能够无缝处理UTF8编码 - - indented_text - -long line: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. - -Yours, -FixMyStreet. diff --git a/templates/email/zurich/problem-closed.txt b/templates/email/zurich/problem-closed.txt index 392004504..b469e74c6 100644 --- a/templates/email/zurich/problem-closed.txt +++ b/templates/email/zurich/problem-closed.txt @@ -16,10 +16,6 @@ Ihre Meldung lautet: -Freundliche Grüsse - -Ihre Stadt Zürich - Dieses E-Mail wurde automatisch generiert. Bitte antworten Sie nicht darauf. diff --git a/templates/email/zurich/problem-confirm.txt b/templates/email/zurich/problem-confirm.txt index b945c6d59..d64d54e8c 100644 --- a/templates/email/zurich/problem-confirm.txt +++ b/templates/email/zurich/problem-confirm.txt @@ -2,7 +2,7 @@ Subject: Züri wie neu: Meldung #[% report.id %] Grüezi [% report.name %] -Besten Dank für Ihre Meldung auf <<Züri wie neu>>. Klicken Sie bitte auf diesen Link, um Ihre E-Mail-Adresse zu bestätigen und über den Status der Meldung informiert zu bleiben. Falls der Link nicht funktioniert, kopieren Sie ihn in Ihren Browser: +Besten Dank für Ihre Meldung auf <<Züri wie neu>>. Klicken Sie bitte auf diesen Link, um[% UNLESS email_confirmed %] Ihre E-Mail-Adresse zu bestätigen und[% END %] über den Status der Meldung informiert zu bleiben. Falls der Link nicht funktioniert, kopieren Sie ihn in Ihren Browser: [% token_url %] @@ -20,4 +20,6 @@ Freundliche Grüsse Ihre Stadt Zürich + + Dieses E-Mail wurde automatisch generiert. Bitte antworten Sie nicht darauf. diff --git a/templates/email/zurich/problem-external.txt b/templates/email/zurich/problem-external.txt index 09cc9c7ca..5645b0e1e 100644 --- a/templates/email/zurich/problem-external.txt +++ b/templates/email/zurich/problem-external.txt @@ -2,8 +2,7 @@ Subject: Züri wie neu: Meldung #[% problem.id %] Grüezi [% problem.name %] -Besten Dank für Ihre Meldung auf <<Züri wie neu>>. Wir haben Ihr Anliegen an [% problem.body(c).name %] -weitergeleitet, da es nicht in den Zuständigkeitsbereich der beteiligten Fachbereiche fällt. +[% problem.extra.public_response %] Unter: [% url %] @@ -16,11 +15,6 @@ Ihre Meldung lautet: -Freundliche Grüsse - -Ihre Stadt Zürich - - Dieses E-Mail wurde automatisch generiert. Bitte antworten Sie nicht darauf. diff --git a/templates/email/zurich/problem-rejected.txt b/templates/email/zurich/problem-rejected.txt index c3d375747..ac02ea19a 100644 --- a/templates/email/zurich/problem-rejected.txt +++ b/templates/email/zurich/problem-rejected.txt @@ -2,16 +2,7 @@ Subject: Züri wie neu: Meldung #[% problem.id %] Grüezi [% problem.name %] -Ihre Meldung wurde aufgrund des Inhalts zurückgewiesen. -Dies kann verschiedene Gründe haben wie zum Beispiel unzureichenden, nicht nachvollziehbaren oder diskriminierenden Inhalt. - -Bitte geben Sie die Meldung nochmals, mit möglichst detaillierten, sachlichen Informationen ein. - -Besten Dank für Ihr Verständnis. - -Freundliche Grüsse - -Ihre Stadt Zürich +[% problem.extra.public_response %] Ihre Meldung lautet: @@ -19,11 +10,6 @@ Ihre Meldung lautet: -Freundliche Grüsse - -Ihre Stadt Zürich - - Dieses E-Mail wurde automatisch generiert. Bitte antworten Sie nicht darauf. diff --git a/templates/email/zurich/problem-wish.txt b/templates/email/zurich/problem-wish.txt new file mode 100644 index 000000000..b7508c316 --- /dev/null +++ b/templates/email/zurich/problem-wish.txt @@ -0,0 +1,16 @@ +Subject: Züri wie neu: Meldung #[% problem.id %] + +Grüezi [% problem.name %] + +[% problem.extra.public_response %] + + +Ihre Meldung lautet: + +[% problem.detail %] + + + + +Dieses E-Mail wurde automatisch generiert. Bitte antworten Sie nicht darauf. + diff --git a/templates/email/zurich/reply-autoresponse.txt b/templates/email/zurich/reply-autoresponse.txt index 1e79549b3..884ea6dea 100644 --- a/templates/email/zurich/reply-autoresponse.txt +++ b/templates/email/zurich/reply-autoresponse.txt @@ -7,4 +7,5 @@ Dies ist eine automatische Antwort auf Ihr E-Mail. Ihr E-Mail wurde nicht überm Falls Sie eine Meldung erfassen möchten, tun Sie das bitte über die Hauptseite: [%# link to FMZ %] + Falls Sie Fragen zu <<Züri wie neu>> haben, senden Sie ein E-Mail an gis-zentrum@zuerich.ch diff --git a/templates/email/zurich/submit-external-personal.txt b/templates/email/zurich/submit-external-personal.txt index 5e0823871..593d047c9 100644 --- a/templates/email/zurich/submit-external-personal.txt +++ b/templates/email/zurich/submit-external-personal.txt @@ -2,7 +2,8 @@ Subject: Züri wie neu: Weitergeleitete Meldung #<?=$values['id']?> Grüezi <?=$values['bodies_name']?>, -Die folgende Meldung wurde auf http://www.stadt-zuerich.ch/zueriwieneu erfasst: +<?=$values['external_message']?> + Öffentliche URL: <?=$values['url']?> @@ -12,15 +13,5 @@ Email des Meldenden: <?=$values['email']?> Telefonnummer des Meldenden: <?=$values['phone']?> -"Züri wie neu" ist ein Pilotprojekt der Stadt Zürich zum Thema -Bürgerbeteiligung. Auf dieser Plattform kann die Bevölkerung auf Schäden und -Mängel an der städtischen Infrastruktur hinweisen. Diese Meldung wurde Ihnen -von der Stadt Zürich gesendet, da es Ihr Zuständigkeitsgebiet betreffen könnte. - -Bei Fragen zum Pilotprojekt "Züri wie neu" wenden Sie sich bitte an -gis-zentrum@zuerich.ch. - - -Freundliche Grüsse -Ihre Stadt Zürich +Bei Fragen zu "Züri wie neu" wenden Sie sich bitte an gis-zentrum@zuerich.ch.
\ No newline at end of file diff --git a/templates/email/zurich/submit-external-wish.txt b/templates/email/zurich/submit-external-wish.txt new file mode 100644 index 000000000..ec472f95f --- /dev/null +++ b/templates/email/zurich/submit-external-wish.txt @@ -0,0 +1,20 @@ +Subject: Züri wie neu: Weitergeleitete Meldung #<?=$values['id']?> + +Grüezi <?=$values['bodies_name']?>, + +<?=$values['external_message']?> + + +Name des Meldenden: <?=$values['name']?> + +Email des Meldenden: <?=$values['email']?> + +Telefonnummer des Meldenden: <?=$values['phone']?> + +Meldung: <?=$values['detail']?> + +Standort in AV-Online anzeigen: +http://webgis.intra.stzh.ch/AV_Online/Direct.asp?Map=AV&Search=Koord&West=<?=$values['west']?>&Nord=<?=$values['nord']?>&B=300 + + +Bei Fragen zu "Züri wie neu" wenden Sie sich bitte an gis-zentrum@zuerich.ch. diff --git a/templates/email/zurich/submit-external.txt b/templates/email/zurich/submit-external.txt index bf409dccc..d85c2f84f 100644 --- a/templates/email/zurich/submit-external.txt +++ b/templates/email/zurich/submit-external.txt @@ -2,19 +2,10 @@ Subject: Züri wie neu: Weitergeleitete Meldung #<?=$values['id']?> Grüezi <?=$values['bodies_name']?>, -Die folgende Meldung wurde auf http://www.stadt-zuerich.ch/zueriwieneu erfasst: +<?=$values['external_message']?> -Öffentliche URL: <?=$values['url']?> - -"Züri wie neu" ist eine Dienstleistung der Stadt Zürich zum Thema -Bürgerbeteiligung. Auf dieser Plattform kann die Bevölkerung auf Schäden und -Mängel an der städtischen Infrastruktur hinweisen. -Diese Meldung wurde Ihnen von der Stadt Zürich gesendet, da es Ihr -Zuständigkeitsgebiet betreffen könnte. - -Bei Fragen zu "Züri wie neu" wenden Sie sich bitte an gis-zentrum@zuerich.ch. +Öffentliche URL: <?=$values['url']?> -Freundliche Grüsse -Ihre Stadt Zürich +Bei Fragen zu "Züri wie neu" wenden Sie sich bitte an gis-zentrum@zuerich.ch.
\ No newline at end of file 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 ‘sign in by email’ 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 %] diff --git a/templates/web/zurich/admin/body-form.html b/templates/web/zurich/admin/body-form.html index a31dffe7c..ac2887159 100644 --- a/templates/web/zurich/admin/body-form.html +++ b/templates/web/zurich/admin/body-form.html @@ -48,6 +48,7 @@ <p> <input type="hidden" name="posted" value="body"> <input type="hidden" name="token" value="[% token %]"> + <p> <input type="submit" value="[% body ? loc('Update body') : loc('Add body') %]"> </p> </form> diff --git a/templates/web/zurich/admin/header.html b/templates/web/zurich/admin/header.html index 281b1de23..929df8352 100644 --- a/templates/web/zurich/admin/header.html +++ b/templates/web/zurich/admin/header.html @@ -9,16 +9,20 @@ 'planned' = loc('Planned'), 'fixed - council' = loc('Closed'), 'hidden' = loc('Hidden'), - 'closed' = loc('Closed'), + 'closed' = loc('Extern'), + 'partial' = loc('Not contactable'), + 'investigating' = loc('Wish'), + 'unable to fix' = loc('Jurisdiction unknown'), + 'fixed - council' = loc('Closed'), } %] <style type="text/css"> .adminhidden { color: #666666; } - .admininternal { background-color: #eeeeff; } .active { background-color: #ffffee; cursor: pointer; } .error { color: red; } .overdue { background-color: #ffcccc; } select { width: auto; } + .admin-report-edit select { max-width: 100%; } #fms_pan_zoom { top: 13em !important; } </style> <script> diff --git a/templates/web/zurich/admin/list_updates.html b/templates/web/zurich/admin/list_updates.html index 2b575f27e..bde28567b 100644 --- a/templates/web/zurich/admin/list_updates.html +++ b/templates/web/zurich/admin/list_updates.html @@ -1,45 +1,49 @@ [% IF updates.size %] -<h2>[% loc('Internal notes') %]</h3> - -<table cellspacing="0" cellpadding="2" border="1"> - <tr> - <th>[% loc('ID') %]</th> - <th>[% loc('Created') %]</th> - <th>[% loc('User') %]</th> - <th>[% loc('Text') %]</th> - </tr> -[% FOREACH update IN updates -%] - [% IF update.extra.is_internal_note %] - <tr class="[% 'admininternal' IF update.extra.is_internal_note %]"> - <td>[% update.id %]</td> - <td>[% PROCESS format_date this_date=update.created %] [% update.created.hms %]</td> - <td><a href="mailto:[% update.user.email %]">[% update.user.name || update.user.email %]</a></td> - <td>[% update.text | html %]</td> - </tr> - [% END %] -[% END -%] -</table> - -<h2>[% loc('Updates') %]</h2> - -<table cellspacing="0" cellpadding="2" border="1"> - <tr> - <th>[% loc('ID') %]</th> - <th>[% loc('Created') %]</th> - <th>[% loc('User') %]</th> - <th>[% loc('Text') %]</th> - </tr> -[% FOREACH update IN updates -%] - [% IF ! update.extra.is_internal_note %] - <tr class="[% 'adminhidden' IF update.state == 'hidden' || update.problem.state == 'hidden' %]"> - <td>[% update.id %]</td> - <td>[% PROCESS format_date this_date=update.created %] [% update.created.hms %]</td> - <td><a href="mailto:[% update.user.email %]">[% update.user.name || update.user.email %]</a></td> - <td>[% update.text | html %]</td> - </tr> - [% END %] -[% END -%] -</table> +[%# We assume internal notes are lowest priority, and thus displayed last. + All other updates (eg: "I've done this work, here's what you should tell + the citizen") are displayed first. %] + +[% internal_updates=[]; + sdm_notes=[]; + FOREACH update IN updates; + IF NOT update.extra.is_external_message; + IF update.extra.is_internal_note; + internal_updates.unshift(update); + ELSE; + sdm_notes.unshift(update); + END; + END; + END +%] + +[% IF sdm_notes.size %] + <h2>[% loc('Notes from SDM to DM') %]</h2> + + [% FOREACH update IN sdm_notes -%] + <div class="admin-note [% 'adminhidden' IF update.state == 'hidden' || update.problem.state == 'hidden' %]" title="[% loc('ID') %]: [% update.id %]"> + <p class="admin-note__text">[% update.text | html %]</p> + <p class="admin-note__creator"> + <a href="mailto:[% update.user.email %]">[% update.user.name || update.user.email %]</a> + · [% PROCESS format_date this_date=update.created %] [% update.created.hms %] + </p> + </div> + [% END -%] +[% END %] + +[% IF internal_updates.size %] + <h2>[% loc('Internal notes') %]</h2> + + [% FOREACH update IN internal_updates -%] + <div class="admin-note admininternal" title="[% loc('ID') %]: [% update.id %]"> + <p class="admin-note__text">[% update.text | html %]</p> + <p class="admin-note__creator"> + <a href="mailto:[% update.user.email %]">[% update.user.name || update.user.email %]</a> + · [% PROCESS format_date this_date=update.created %] [% update.created.hms %] + </p> + </div> + [% END -%] + +[% END %] [% END %] diff --git a/templates/web/zurich/admin/problem_row.html b/templates/web/zurich/admin/problem_row.html index 9b395a1ac..baa8d3ac7 100644 --- a/templates/web/zurich/admin/problem_row.html +++ b/templates/web/zurich/admin/problem_row.html @@ -18,7 +18,9 @@ <td>[% PROCESS value_or_nbsp value=problem.category %]</td> <td>[% PROCESS format_date this_date=problem.created %]</td> <td>[% PROCESS format_date this_date=problem.lastupdate %]</td> - <td>[% states.${problem.state} %]</td> + <td> [% states.${problem.state} %][% IF problem.state == 'planned'; + SET cs=problem.get_extra_metadata('closure_status'); + IF cs %] ([% states.$cs %]) [% END; END %]</td> [% IF include_subdiv %] <td> @@ -34,7 +36,11 @@ <td> [% IF problem.photo %] - <img class="img" height="60" width="90" src="[% c.cobrand.base_url %]/photo/[% problem.photo %].temp.jpeg" alt=""> + [% FOR photo IN problem.get_photoset(c).images %] + <div class="update-img"> + <img height="60" width="90" alt="" src="[% c.cobrand.base_url %]/photo/[% photo.0 %].temp.jpeg"> + </div> + [% END %] [% END %] </td> diff --git a/templates/web/zurich/admin/report_edit-sdm.html b/templates/web/zurich/admin/report_edit-sdm.html index 82bbeba23..8e576a718 100644 --- a/templates/web/zurich/admin/report_edit-sdm.html +++ b/templates/web/zurich/admin/report_edit-sdm.html @@ -1,4 +1,5 @@ [% + PROCESS "report/photo-js.html"; PROCESS "maps/zurich.html"; PROCESS 'admin/header.html' title = tprintf(loc('Editing problem %d'), problem.id ), @@ -9,63 +10,141 @@ [% map_html %] </div> -[% status_message %] - <form method="post" action="[% c.uri_for( 'report_edit', problem.id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> <input type="hidden" name="token" value="[% token %]" > <input type="hidden" name="submit" value="1" > -<p align="right"><input type="submit" name="send_back" value="[% loc('Not for my subdivision') %]"></p> - -<ul class="no-bullets"> -<li><a href="[% c.uri_for_email( '/report', problem.id ) %]">[% loc('View report on site' )%]</a></li> - -<li><a href="http://webgis.intra.stzh.ch/AV_Online/Direct.asp?Map=AV&Search=Koord&West=[% problem.local_coords.0 %]&Nord=[% problem.local_coords.1 %]&B=300" target="_blank">Standort in AV-Online anzeigen</a></li> - -<li><span class="mock-label">[% loc('Details:') %]</span> [% problem.detail | html %] -[% IF problem.extra.original_detail %] -<br>[% - SET safe = problem.extra.original_detail | html; - tprintf( loc('originally entered: “%s”'), safe ) -%] -[% END %] -</li> -<li><span class="mock-label">[% loc('Co-ordinates:') %]</span> [% problem.local_coords.join(',') %] - <input type="hidden" name="latitude" id="fixmystreet.latitude" value="[% problem.latitude %]"> - <input type="hidden" name="longitude" id="fixmystreet.longitude" value="[% problem.longitude %]"> -([% - SET safe = problem.postcode | html; - tprintf( loc('originally entered: “%s”'), safe ) -%], -[% IF problem.used_map %][% loc('used map') %][% ELSE %][% loc("didn't use map") %][% END %])</li> - -<li><span class="mock-label">[% loc('Category:') %]</span> [% problem.category | html %] </li> -<li><span class="mock-label">[% loc('Name:') %]</span> [% problem.name | html %] -<li><span class="mock-label">[% loc('Email:') %]</span> [% problem.user.email | html %] -[% IF NOT problem.extra.email_confirmed %]<span class="error">[% loc('Unconfirmed') %]</span>[% END %] -<li><span class="mock-label">[% loc('Phone:') %]</span> [% IF problem.user.phone %][% problem.user.phone | html %][% ELSE %]<em>[% loc('None') %]</em>[% END %]</li> -<li><span class="mock-label">[% loc('Created:') %]</span> [% PROCESS format_date this_date=problem.created %] [% problem.created.hms %]</li> - -[% IF problem.photo %] -<li><img alt="" src="[% c.cobrand.base_url %]/photo/[% problem.photo %].temp.jpeg"></li> -[% END %] - -<li><span class="mock-label">[% loc('State:') %]</span> [% states.${problem.state} %]</li> - -<li><label for="new_internal_note">[% loc('New internal note:') %]</label> -<textarea name='new_internal_note' id='new_internal_note' cols=60 rows=5></textarea></li> - -<li><label for="status_update">[% loc('New update:') %]</label> -<textarea name='status_update' id='status_update' cols=60 rows=5></textarea></li> +<div class="admin-report-edit admin-report-edit--details"> + +<dl> + + <dd class="screen-only">» <a href="[% c.uri_for_email( '/report', problem.id ) %]">[% loc('View report on site' )%]</a></dd> + + <dd class="screen-only">» <a href="http://webgis.intra.stzh.ch/AV_Online/Direct.asp?Map=AV&Search=Koord&West=[% problem.local_coords.0 %]&Nord=[% problem.local_coords.1 %]&B=300" target="_blank">Standort in AV-Online anzeigen</a></dd> + + <dd class="screen-only">» <a href="http://webgis.intra.stzh.ch/stapo/GoogleStreetView.asp?lat=[% problem.latitude %]&lon=[% problem.longitude %]" target="_blank">[% loc('Street View') %]</a></dd> + + <dt><span class="mock-label">[% loc('Details:') %]</span></dt> + <dd>[% problem.detail | html %]</dd> + [% IF problem.extra.original_detail %] + <dd>[% + SET safe = problem.extra.original_detail | html; + tprintf( loc('originally entered: “%s”'), safe ) + %]</dd> + [% END %] + + <dt class="print-only">[% loc('Reported:') %] <!-- Meldedatum --></dt> + <dd class="screen-no-space-after"> + <strong>[% PROCESS format_date this_date=problem.created %] [% problem.created.hms %]</strong> + </dd> + <dt class="print-only">[% loc('Coordinates:') %] <!-- Koordinaten --></dt> + <dd class="screen-no-space-after print-no-space-after"> + [% problem.local_coords.join(',') %] + <input type="hidden" name="latitude" id="fixmystreet.latitude" value="[% problem.latitude %]"> + <input type="hidden" name="longitude" id="fixmystreet.longitude" value="[% problem.longitude %]"> + </dd> + <dd class="screen-no-space-after print-no-space-after"> + [% IF problem.used_map %] + [% loc('Used map') %] + [% ELSE %] + [% loc("Didn't use map") %] + [% END %] + </dd> + <dd>[% + SET safe = problem.postcode | html; + tprintf( loc('originally entered: “%s”'), safe ) + %]</dd> + + <dt class="print-only">[% loc('Reported by:') %] <!-- Meldende Person --></dt> + <dd> + <strong>[% IF problem.name %][% problem.name | html %][% ELSE %][% loc('(No name)') %][% END %]</strong> + <input type='hidden' name='name' id='name' value='[% problem.name | html %]'> + <br> + [% problem.user.email | html %] + [% IF NOT problem.extra.email_confirmed %]<span class="error">[% loc('Unconfirmed') %]</span>[% END %] + <input type='hidden' id='email' name='email' value='[% problem.user.email | html %]'> + <br> + [% IF problem.user.phone %][% problem.user.phone | html %][% ELSE %]<em>[% loc('(No phone number)') %]</em>[% END %] + </dd> + + <dt>[% loc('Category:') %] <!-- Kategorie --></dt> + <dd>[% problem.category | html %]</dd> + + <dt class="print-only">[% loc('State:') %] <!-- Status --></dt> + <dd class="print-only">[% states.${problem.state} %]</dd> + + <dt>[% loc('Time spent (in minutes):') %]</dt> + <dd>[% problem.get_time_spent %]</dd> + + <dd> + [% status_message %] + </dd> + + [% IF problem.photo %] + <dd> + [% FOR photo IN problem.get_photoset(c).images %] + <div class="update-img"> + <a href="[% c.cobrand.base_url %]/photo/[% photo.0 %].fulltemp.jpeg" rel="fancy"> + <img alt="Photo of this report" src="[% c.cobrand.base_url %]/photo/[% photo.0 %].temp.jpeg"> + <span>zoom</span> + </a> + </div> + [% END %] + </dd> + [% END %] + +</dl> + +</div> +<div class="admin-report-edit admin-report-edit--interact"> + +<script type="text/javascript"> + $(function(){ + $('#map_box .noscript').clone().removeClass('noscript').addClass('map_clone print-only').prependTo('.admin-report-edit--interact'); + }); +</script> + +<p align="right" class="screen-only"><input type="submit" name="send_back" value="[% loc('Not for my subdivision') %]"></p> +<p align="right" class="screen-only"><input type="submit" name="not_contactable" value="[% loc('Customer not contactable') %]"></p> + +<ul class="no-bullets screen-only"> + <li> + <label for="new_internal_note">[% loc('New internal note:') %]</label> + <textarea name='new_internal_note' id='new_internal_note' cols=60 rows=4></textarea> + </li> + <li> + <label for="status_update">[% loc('New note to DM:') %]</label> + <textarea name='status_update' id='status_update' cols=60 rows=4></textarea> + </li> </ul> -<p class="cf"> +<p class="screen-only"> + <label for="time_spent">[% loc('Time spent (in minutes):') %]</label> + <input type="text" name="time_spent" id="form_time_spent" style="width: 4em" value="0"> + <script> + $(function () { + $('#form_time_spent').spinner({ + spin: function (e, ui) { + if (ui.value < 0) { return false } + } + }); + }); + </script> +</p> + +<p class="cf screen-only"> <input style="float:left" type="submit" name="Submit changes" value="[% loc('Submit changes') %]" > <input style="float:right" type="submit" name="no_more_updates" value="[% loc('No further updates') %]"> </p> -</form> [% INCLUDE 'admin/list_updates.html' %] +</div> +</form> + +<div id="print_report_map" class="print-only"> +[% INCLUDE 'maps/noscript_map.html' map=print_report_map nsm_prefix="large_" %] +</div> + [% INCLUDE 'admin/footer.html' %] diff --git a/templates/web/zurich/admin/report_edit.html b/templates/web/zurich/admin/report_edit.html index 5376d77f4..64d0950ee 100644 --- a/templates/web/zurich/admin/report_edit.html +++ b/templates/web/zurich/admin/report_edit.html @@ -10,160 +10,312 @@ [% map_html %] </div> -[% status_message %] +[% pstate = problem.get_extra_metadata('closure_status') || problem.state %] -<form method="post" action="[% c.uri_for( 'report_edit', problem.id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> +<form id="report_edit" method="post" action="[% c.uri_for( 'report_edit', problem.id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> <input type="hidden" name="token" value="[% token %]" > <input type="hidden" name="submit" value="1" > -<ul class="no-bullets"> -<li><a href="[% c.uri_for_email( '/report', problem.id ) %]">[% loc('View report on site' )%]</a></li> +<div class="admin-report-edit admin-report-edit--details"> + +<dl> + <dd class="screen-only">» <a href="[% c.uri_for_email( '/report', problem.id ) %]">[% loc('View report on site' )%]</a></dd> -<li><a href="http://webgis.intra.stzh.ch/AV_Online/Direct.asp?Map=AV&Search=Koord&West=[% problem.local_coords.0 %]&Nord=[% problem.local_coords.1 %]&B=300" target="_blank">Standort in AV-Online anzeigen</a></li> + <dd class="screen-only">» <a href="http://webgis.intra.stzh.ch/AV_Online/Direct.asp?Map=AV&Search=Koord&West=[% problem.local_coords.0 %]&Nord=[% problem.local_coords.1 %]&B=300" target="_blank">Standort in AV-Online anzeigen</a></dd> -[% IF problem.state == 'fixed - council' OR problem.state == 'closed' %] - <li><span class="mock-label">[% loc('Details:') %]</span> [% problem.detail | html %] + <dd class="screen-only">» <a href="http://webgis.intra.stzh.ch/stapo/GoogleStreetView.asp?lat=[% problem.latitude %]&lon=[% problem.longitude %]" target="_blank">[% loc('Street View') %]</a></dd> + + [% IF c.cobrand.problem_is_closed(problem) %] + <dt><span class="mock-label">[% loc('Details:') %]</span></dt> + <dd>[% problem.detail | html %]</dd> [% IF problem.extra.original_detail %] - <br>[% - SET detail_safe = problem.extra.original_detail | html; - tprintf( loc('originally entered: “%s”'), detail_safe ) - %] + <dd>[% + SET detail_safe = problem.extra.original_detail | html; + tprintf( loc('originally entered: “%s”'), detail_safe ) + %]</dd> [% END %] - </li> -[% ELSE %] - <li><label for='title'>[% loc('Subject:') %]</label> <input size=60 type='text' id='title' name='title' value='[% problem.title | html %]'></li> - <li><label for='detail'>[% loc('Details:') %]</label> - <textarea name='detail' id='detail' cols=60 rows=5>[% problem.detail | html %]</textarea> + [% ELSE %] + + <dt><label for='title'>[% loc('Subject:') %]</label></dt> + <dd class="screen-only"><input size=60 type='text' id='title' name='title' value='[% problem.title | html %]'></dd> + <dd class="print-only">[% problem.title | html %]</dd> + + <dt><label for='detail'>[% loc('Details:') %]</label></dt> + <dd class="screen-only"><textarea name='detail' id='detail' cols=60 rows=4>[% problem.detail | html %]</textarea></dd> + <dd class="print-only">[% problem.detail | html %]</dd> + [% IF problem.extra.original_detail %] - [% - SET detail_safe = problem.extra.original_detail | html; - tprintf( loc('originally entered: “%s”'), detail_safe ) - %] + <dd>[% + SET detail_safe = problem.extra.original_detail | html; + tprintf( loc('originally entered: “%s”'), detail_safe ) + %]</dd> [% END %] - </li> -[% END %] + [% END %] -<li><span class="mock-label">[% loc('Co-ordinates:') %]</span> [% problem.local_coords.join(',') %] - <input type="hidden" name="latitude" id="fixmystreet.latitude" value="[% problem.latitude %]"> - <input type="hidden" name="longitude" id="fixmystreet.longitude" value="[% problem.longitude %]"> - -([% - SET safe = problem.postcode | html; - tprintf( loc('originally entered: “%s”'), safe ) -%], -[% IF problem.used_map %][% loc('used map') %][% ELSE %][% loc("didn't use map") %][% END %])</li> - -<li><span class="mock-label">[% loc('Name:') %]</span> [% problem.name | html %] <input type='hidden' name='name' id='name' value='[% problem.name | html %]'></li> -<li><span class="mock-label">[% loc('Email:') %]</span> [% problem.user.email | html %] <input type='hidden' id='email' name='email' value='[% problem.user.email | html %]'> -[% IF NOT problem.extra.email_confirmed %]<span class="error">[% loc('Unconfirmed') %]</span>[% END %] -</li> -<li><span class="mock-label">[% loc('Phone:') %]</span> [% IF problem.user.phone %][% problem.user.phone | html %][% ELSE %]<em>[% loc('None') %]</em>[% END %]</li> -<li><span class="mock-label">[% loc('Created:') %]</span> [% PROCESS format_date this_date=problem.created %] [% problem.created.hms %]</li> - - -[% IF problem.photo %] -<li> -[% photo = problem.get_photo_params %] -<div class="update-img"> - <a href="[% c.cobrand.base_url %]/photo/[% problem.photo %].fulltemp.jpeg" rel="fancy"> - <img alt="Photo of this report" src="[% c.cobrand.base_url %]/photo/[% problem.photo %].temp.jpeg"> - <span>zoom</span></a> -</div> -<br> -<input type="submit" name="rotate_photo" value="[% loc('Rotate Left') %]"> -<input type="submit" name="rotate_photo" value="[% loc('Rotate Right') %]"> -<br> -<input type="checkbox" id="publish_photo" name="publish_photo" value="1"[% ' checked' IF problem.extra.publish_photo %]> -<label class="inline" for="publish_photo">[% loc("Publish photo") %]</label></li> -[% END %] -</ul> + <dt class="print-only">[% loc('Reported:') %] <!-- Meldedatum --></dt> + <dd class="screen-no-space-after"> + <strong>[% PROCESS format_date this_date=problem.created %] [% problem.created.hms %]</strong> + </dd> + <dt class="print-only">[% loc('Coordinates:') %] <!-- Koordinaten --></dt> + <dd class="screen-no-space-after print-no-space-after"> + [% problem.local_coords.join(',') %] + <input type="hidden" name="latitude" id="fixmystreet.latitude" value="[% problem.latitude %]"> + <input type="hidden" name="longitude" id="fixmystreet.longitude" value="[% problem.longitude %]"> + </dd> + <dd class="screen-no-space-after print-no-space-after"> + [% IF problem.used_map %] + [% loc('Used map') %] + [% ELSE %] + [% loc("Didn't use map") %] + [% END %] + </dd> + <dd>[% + SET safe = problem.postcode | html; + tprintf( loc('originally entered: “%s”'), safe ) + %]</dd> + + [% SET fields = problem.get_extra_fields; IF fields.size %] + <dd> + [% FOR f IN fields %] + <strong>[% f.description %]</strong> [% f.value %] + <br> + [% END %] + </dd> + [% END %] -<p><label for="new_internal_note">[% loc('New internal note:') %]</label> -<textarea name='new_internal_note' id='new_internal_note' cols=60 rows=5>[% new_internal_note | html %]</textarea></p> - -<p><span class="mock-label">[% loc('State:') %]</span> <select name="state" id="state"> - <option value="">--</option> - [% FOREACH s IN [ - ['unconfirmed', loc('Submitted')] - ['confirmed', loc('Open')], - ['planned', loc('Planned')], - ['hidden', loc('Hidden')], - ] %] - <option [% 'selected ' IF s.0 == problem.state %] value="[% s.0 %]">[% s.1 %]</option> - [% END %] - [% IF problem.state == 'closed' %] - <option selected value="closed">[% loc('Closed') %]</option> - [% ELSIF problem.state == 'fixed - council' %] - <option selected value="fixed - council">[% loc('Closed') %]</option> - [% ELSIF problem.state == 'in progress' %] - <option selected value="in progress">[% loc('In progress') %]</option> + <dt class="print-only">[% loc('Reported by:') %] <!-- Meldende Person --></dt> + <dd> + <strong>[% IF problem.name %][% problem.name | html %][% ELSE %][% loc('(No name)') %][% END %]</strong> + <input type='hidden' name='name' id='name' value='[% problem.name | html %]'> + <br> + [% problem.user.email | html %] + [% IF NOT problem.extra.email_confirmed %]<span class="error">[% loc('Unconfirmed') %]</span>[% END %] + <input type='hidden' id='email' name='email' value='[% problem.user.email | html %]'> + <br> + [% IF problem.user.phone %][% problem.user.phone | html %][% ELSE %]<em>[% loc('(No phone number)') %]</em>[% END %] + </dd> + + <dt>[% loc('Category:') %] <!-- Kategorie --></dt> + <dd>[% problem.category | html %]</dd> + + <dt class="print-only">[% loc('State:') %] <!-- Status --></dt> + <dd class="print-only">[% states_trans.${problem.state} %]</dd> + + <dt>[% loc('Time spent (in minutes):') %]</dt> + <dd>[% problem.get_time_spent %]</dd> + + [% IF problem.photo %] + <dd> + [% FOR photo IN problem.get_photoset(c).images %] + <div class="update-img"> + <a href="[% c.cobrand.base_url %]/photo/[% photo.0 %].fulltemp.jpeg" rel="fancy"> + <img alt="Photo of this report" src="[% c.cobrand.base_url %]/photo/[% photo.0 %].temp.jpeg"> + <span>zoom</span> + </a> + </div> + <input type="submit" name="rotate_photo_[% loop.index %]" value="[% loc('Rotate Left') %]" class="screen-only"> + <input type="submit" name="rotate_photo_[% loop.index %]" value="[% loc('Rotate Right') %]" class="screen-only"> + [% END %] + <br> + <input type="checkbox" id="publish_photo" name="publish_photo" value="1"[% ' checked' IF problem.extra.publish_photo %] class="screen-only"> + <label class="inline screen-only" for="publish_photo">[% loc("Publish photo") %]</label></li> [% END %] -</select></p> -<p id="automatic-reply"> - <span class="mock-label">Automatische Antwort</span> - <input type="checkbox" name="send_rejected_email" id="send_rejected_email" value="1" /> -</p> +</dl> + +</div> + +<div class="admin-report-edit admin-report-edit--interact"> + +[% status_message %] <script type="text/javascript"> -$(function(){ - // Show or hide the automatic reply field - $('#state').change(function(){ - if ($(this).val() === 'hidden') { - $('#automatic-reply').show(); - } else { - $('#automatic-reply').hide(); - } - }).change(); -}); + $(function(){ + $('#map_box .noscript').clone().removeClass('noscript').addClass('map_clone print-only').prependTo('.admin-report-edit--interact'); + }); </script> -[% IF problem.state == 'unconfirmed' OR problem.state == 'confirmed' %] +<dl [% IF status_message %]class="with-message"[% END %]> + + <dt class="screen-only"> + <label for="new_internal_note">[% loc('New internal note:') %]</label> + </dt> + <dd class="screen-only"> + <textarea name='new_internal_note' id='new_internal_note' cols=60 rows=4>[% new_internal_note | html %]</textarea> + </dd> + + <dt class="screen-only"> + <label for="time_spent">[% loc('Time spent (in minutes):') %]</label> + </dt> + <dd class="screen-only"> + <input type="text" name="time_spent" id="form_time_spent" style="width: 4em" value="0"> + </dd> + + <dt class="screen-only"> + <span class="mock-label">[% loc('State:') %]</span> + </dt> + <dd class="screen-only"> + <select name="state" id="state"> + <option value="">--</option> + [% FOREACH s IN states %] + <option [% 'selected ' IF s.state == pstate %] value="[% s.state %]">[% s.trans %]</option> + [% END %] + </select> + </dd> + +</dl> -<ul class="no-bullets"> -[% list = FOR body IN bodies %] +<ul class="no-bullets screen-only"> + +[% IF problem.state == 'confirmed' %] + <li class="assignation"> + <div id="assignation__category"> + <label for="category">[% loc('Assign to different category:') %]</label> + <select name="category" id="category"> + <option value="">--</option> + [% FOREACH cat IN categories %] + <option value="[% cat %]">[% cat %]</option> + [% END %] + </select> + </div> + </li> + + [% list = FOR body IN bodies %] [%- NEXT UNLESS body.parent.id == c.user.from_body.id %] <option value="[% body.id %]"[% IF body.id == problem.bodies_str %] selected[% END %]>[% body.name %]</option> -[% END %] + [% END %] + [% IF admin_type != 'super' AND list %] - <li class="assignation"> + <li class="assignation" id="assignation__subdivision"> <label for="body_subdivision">[% loc('Assign to subdivision:') %]</label> - <select name="body_subdivision" id="body_subdivision"> + <select name="body_subdivision" id="body_subdivision" class="assignation__select"> <option value="">--</option> [% list %] </select> </li> [% END %] -<li class="assignation"> -<label for="category"> -[% loc('Category:') %] [% problem.category %]<br> -[% loc('Assign to different category:') %]</label> - <select name="category" id="category"> - <option value="">--</option> - [% FOREACH cat IN categories %] - <option value="[% cat %]">[% cat %]</option> - [% END %] - </select></li> - -<li class="assignation"> -<label for="body_external">[% loc('Assign to external body:') %]</label> - <select name="body_external" id="body_external"> - <option value="">--</option> - [% FOR body IN bodies %] - [% NEXT IF body.parent OR body.bodies OR body.deleted %] - <option value="[% body.id %]"[% IF body.id == problem.bodies_str %] selected[% END %]>[% body.name %]</option> +[% END %] +</ul> + + +[% IF problem.state == 'planned' %] + [%# 3rd party messages sent for Extern/Wunsch states %] + [% SWITCH pstate %] + [% CASE ['closed','investigating'] %] + <ul class="no-bullets screen-only"> + <li class="assignation" id="assignation__external"> + <span class="error hidden">[% loc('Please select a body.') %]</span> + <label for="body_external"> + [% IF pstate == 'closed' %] + [% loc('Assign to external body:') %] + [% ELSE %] + [% loc('Assign to competent body:') %] + [% END %] + </label> + <select name="body_external" id="body_external"> + <option value="">--</option> + [% FOR body IN bodies %] + [% NEXT IF body.parent OR body.bodies OR body.deleted %] + <option value="[% body.id %]"[% IF body.id == problem.external_body %] selected[% END %]>[% body.name %]</option> + [% END %] + </select> + </li> + <li> + [% IF pstate == 'closed' %] + <input type="checkbox" name="third_personal" id="third_personal" value="1"[% ' checked' IF problem.extra.third_personal %]> + <label for="third_personal" class="inline">[% loc('Include reporter personal details') %]</label> + [% END %] + </li> + <li> + [% INCLUDE 'admin/response_templates_select.html' for='external_body' %] + <textarea name='external_message' id='external_body' cols=60 rows=5>[% problem.get_extra_metadata('external_message') | html %]</textarea> + </li> + </ul> [% END %] - </select> - <br> - <input type="checkbox" name="third_personal" id="third_personal" value="1"[% ' checked' IF problem.extra.third_personal %]> - <label for="third_personal" class="inline">[% loc('Include reporter personal details') %]</label> -</ul> + [%# Public response field shown for Ruckmeldung ausstehend states + # (e.g. various pstates) %] + <ul class="no-bullets screen-only"> + <li id="status_update_container"><label for="status_update"> + [% SWITCH pstate %] + [% CASE ['hidden', 'investigating', 'partial'] %][%# Hidden/Wish/Not contactable %] + [% loc('Reply to user:') %] + [% CASE DEFAULT %] + [% loc('Public response:') %] + [% END %] + </label> + [% INCLUDE 'admin/response_templates_select.html' for='status_update' %] + <textarea name='status_update' id='status_update' cols=60 rows=5> + [%- problem.extra.public_response || default_public_response | html -%] + </textarea> + </li> + </ul> +[% END %] + +<p align="right" class="screen-only"> + [% IF show_publish_response %] + [%# While we call this 'publish_response', the response will not actually + # be "published" for these cases: Wish / Hidden / Not contactable (for these, + # only a private email will be sent to the user. However, in all cases, + # this is the end of processing, so we mark this with the same text used + # for 'No further updates %] + <input type="submit" name="publish_response" value="[% loc('No further updates') %]"> + [% END %] + + [%# This button simply saves changes, but does NOT close the report (though + # it may trigger other workflow %] + <input type="submit" name="Submit changes" value="[% loc('Submit changes') %]" > +</p> + +[% IF c.cobrand.problem_has_public_response(problem) || c.cobrand.problem_has_user_response(problem) %] + <h2>[% loc('Public response:') %]</h2> + <div class="admin-official-answer"> + [% problem.extra.public_response | html_para %] + </div> +[% END %] + +[% SWITCH problem.state %] + [% CASE ['closed','investigating'] %] + <h2> + [% IF problem.state == 'closed' %] + [% loc('Message to external body:') %] + [% ELSE %] + [% loc('Message to competent body:') %] + [% END %] + </h2> + <div class="admin-external-message"> + [% problem.extra.external_message | html_para %] + </div> +[% END %] + + +[% INCLUDE 'admin/list_updates.html' %] + +</div> + +</form> <script type="text/javascript"> $(function(){ - $('.assignation select').change(function(){ + var form_fields_changed = false; + + $('#form_time_spent').spinner({ + spin: function (e, ui) { + if (ui.value < 0) { return false } + form_fields_changed = true; + } + }); + + setTimeout(function(){ + $('.message-updated').fadeOut(250, function(){ + $(this).remove(); + }); + }, 5000); + + // When the user changes a select box, this bit of code + // makes the labels for the other two select boxes grey. + $('.assignation__select, .assignation select').change(function(){ if (this.value == "") { $('.assignation').css('color', '#000'); } else { @@ -172,57 +324,82 @@ $(function(){ $('.assignation').not(a).css('color', '#999'); } }); -}); -</script> - -[% ELSIF problem.state == 'planned' %] - -<ul class="no-bullets"> -[% list = FOR body IN bodies %] - [%- NEXT UNLESS body.parent.id == c.user.from_body.id %] - <option value="[% body.id %]">[% body.name %]</option> -[% END %] - [% IF admin_type != 'super' AND list %] - <li class="assignation"> - <label for="body_subdivision">[% loc('Assign to subdivision:') %]</label> - <select name="body_subdivision" id="body_subdivision"> - <option value="" selected>--</option> - [% list %] - </select> - </li> - [% END %] - - <li><label for="status_update">[% loc('Public response:') %]</label> - - <textarea name='status_update' id='status_update' cols=60 rows=5> - [%- IF problem.extra.public_response -%] - [%- problem.extra.public_response | html -%] - [%- ELSE -%] - -Freundliche Grüsse - -Ihre Stadt Zürich - [%- END %]</textarea> - </li> -</ul> -[% ELSIF problem.state == 'fixed - council' %] + $('#state').change(function(){ + // Show or hide the automatic reply field + var state = $(this).val(); + + // show or disable assignation, templates, public_response, publish if + // same or different state to the one we started on + if ((state === '[% pstate %]')) { + $('input[name=publish_response]').show(); + $('.response_templates_select').show(); + $('#status_update_container').show(); + + if (state === 'confirmed') { + $('#assignation__category').show(); + $('#assignation__subdivision').show(); + } + if ((state === 'closed') || (state === 'investigating')) { + $('#assignation__external').show(); + } else { + $('#assignation__external').hide(); + } + } + else { + $('input[name=publish_response]').hide(); + $('.response_templates_select').hide(); + $('#status_update_container').hide(); + + $('#assignation__category').hide(); + $('#assignation__subdivision').hide(); + $('#assignation__category select').val(''); + $('#assignation__subdivision select').val(''); + + $('#assignation__external select').val(''); + $('#assignation__external').hide(); + $('#external_body').hide(); + $('#third_personal, label[for=third_personal]').hide(); + } -<p><span class="mock-label">[% loc('Public response:') %]</span> -[% problem.extra.public_response | html %] -</p> + }).change(); -[% END %] + $("form#report_edit input[type=submit]").click(function() { + $("form#report_edit").data("clicked_button", $(this).attr("name")); + }); -<p align="right"> -[% IF problem.state == 'planned' %] -<input type="submit" name="publish_response" value="[% loc('Publish the response') %]"> -[% END %] -<input type="submit" name="Submit changes" value="[% loc('Submit changes') %]" > -</p> + $("form#report_edit").submit(function() { + // Make sure the external body field has a value if it's visible + // and the form is submitted as a 'save' action (i.e. not a rotate + // photo). + var clicked = $(this).data("clicked_button"); + if (clicked == "publish_response" || clicked == "Submit changes") { + var visible = $("select#body_external:visible").length > 0; + var val = parseInt($("select#body_external").val()); + if (visible && isNaN(val)) { + $("#assignation__external .error").removeClass("hidden"); + $("select#body_external").focus().get(0).scrollIntoView(); + return false; + } + } + // If the user has clicked to rotate a photo and has edited other + // fields, ask for confirmation before submitting the form + if (/rotate_photo/.test(clicked) && form_fields_changed) { + var message = "[% loc('Rotating this photo will discard unsaved changes to the report.') %]"; + if (!confirm(message)) { + return false; + } + } + }); -</form> + $("form#report_edit").find("input, select, textarea").change(function() { + form_fields_changed = true; + }); +}); +</script> -[% INCLUDE 'admin/list_updates.html' %] +<div id="print_report_map" class="print-only"> +[% INCLUDE 'maps/noscript_map.html' map=print_report_map nsm_prefix="large_" %] +</div> [% INCLUDE 'admin/footer.html' %] diff --git a/templates/web/zurich/admin/response_templates_select.html b/templates/web/zurich/admin/response_templates_select.html new file mode 100644 index 000000000..c0f4104c8 --- /dev/null +++ b/templates/web/zurich/admin/response_templates_select.html @@ -0,0 +1,25 @@ +[% template_name="templates_for_${for}" %] + +[% response_templates = problem.response_templates %] +<div class="response_templates_select"> +<select id="[% template_name %]"> + <option value="">[% loc('Choose a template') %]</option> +[% FOR t IN response_templates %] + <option value="[% t.id %]"> [% t.title | html %] </option> +[% END %] +</select> +</div> +<script> + $(function () { + var response_template_texts = { + [% FOR t IN response_templates %] + [% t.id %]: '[% t.text | escape_js %]' [% loop.last ? '' : ',' %] + [% END %] + }; + $('#[% template_name %]').change(function () { + var val = $(this).val(); + var text = response_template_texts[val]; + $('#[% for %]').val( text ); + }); + }); +</script> diff --git a/templates/web/zurich/admin/stats.html b/templates/web/zurich/admin/stats.html index 52b33ebc4..fa8104496 100644 --- a/templates/web/zurich/admin/stats.html +++ b/templates/web/zurich/admin/stats.html @@ -2,7 +2,7 @@ [% PROCESS 'admin/report_blocks.html' %] [% USE date %] -<p style="float:right"><a href="[% c.uri_with( { export=1 } ) %]">[% loc('All Reports') %]</a></p> +<p style="float:right"><a href="[% c.uri_with( { export=1 } ) %]">[% loc('All Reports as CSV') %]</a></p> [% IF start_date AND end_date %] <p><strong>[% tprintf( loc( 'All reports between %s and %s' ), start_date.ymd, end_date.ymd ) | html %]</strong></p> @@ -48,7 +48,7 @@ <table> <tr><th>[% loc('Category') %]</th><th>[% loc('Count') %]</th></tr> -[% WHILE ( c = per_category.next ) %]<tr><td>[% c.category %]</td><td>[% c.get_column('c') %]</td></tr>[% END %] +[% WHILE ( cc = per_category.next ) %]<tr><td>[% cc.category %]</td><td>[% cc.get_column('c') %]</td></tr>[% END %] </table> [% INCLUDE 'admin/footer.html' %] diff --git a/templates/web/zurich/admin/template_edit.html b/templates/web/zurich/admin/template_edit.html new file mode 100644 index 000000000..1deda6a77 --- /dev/null +++ b/templates/web/zurich/admin/template_edit.html @@ -0,0 +1,38 @@ +[% INCLUDE 'admin/header.html' title=tprintf(loc('Response Templates for %s'), body.name) -%] +[% rt = response_template %] + +<h2> [% tprintf(loc('Response Templates for %s'), body.name) %] </h2> + +<h3> [% IF rt.id %] + [% tprintf(loc('Template «%s»'), rt.title) %] + [% ELSE %] + [% loc('New template') %] + [% END %] +</h3> + +<form method="post" + action="[% c.uri_for('templates', body.id, rt.id || 'new' ) %]" + enctype="application/x-www-form-urlencoded" + accept-charset="utf-8" + class="validate"> + + <p> + <strong>[% loc('Title:') %] </strong> + <input type="text" name="title" class="required" size="30" value="[% rt.title| html %]"> + </p> + <p> + <strong>[% loc('Text:') %] </strong> + <textarea name="text" class="required">[% rt.text |html %]</textarea> + </p> + <p> + <input type="hidden" name="token" value="[% token %]" > + <input type="submit" name="Edit templates" value="[% rt.id ? loc('Save changes') : loc('Create template') %]" > + </p> + [% IF rt.id %] + <p> + <input class="delete" type="submit" name="delete_template" value="[% loc('Delete template') %]"> + </p> + [% END %] +</form> + +[% INCLUDE 'admin/footer.html' %] diff --git a/templates/web/zurich/admin/templates.html b/templates/web/zurich/admin/templates.html new file mode 100644 index 000000000..d3b334022 --- /dev/null +++ b/templates/web/zurich/admin/templates.html @@ -0,0 +1,28 @@ +[% INCLUDE 'admin/header.html' title=tprintf(loc('Response Templates for %s'), body.name) -%] + +<h2> [% tprintf(loc('Response Templates for %s'), body.name) %] </h2> + +<table> + <thead> + <tr> + <th> [% loc('Title') %] </th> + <th> [% loc('Text') %] </th> + <th> [% loc('Created') %] </th> + <th> </th> + </tr> + </thead> + <tbody> +[% FOR t IN response_templates %] + <tr> + <td> [% t.title %] </td> + <td> [% t.text %] </td> + <td> [% t.created %] </td> + <td> <a href="/admin/templates/[% body.id %]/[% t.id %]" class="btn">[% loc('Edit') %]</a> </td> + </tr> +[% END %] + </tbody> +</table> + +<a href="[% c.uri_for('templates', body.id, 'new') %]" class="btn">[% loc('New template') %]</a> + +[% INCLUDE 'admin/footer.html' %] diff --git a/templates/web/zurich/auth/general.html b/templates/web/zurich/auth/general.html index 11c729fde..fd34b79f8 100644 --- a/templates/web/zurich/auth/general.html +++ b/templates/web/zurich/auth/general.html @@ -27,7 +27,7 @@ END %] [% 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 ‘sign in by email’ 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> <label for="password_sign_in">[% loc('Password (optional)') %]</label> <div class="form-txt-submit-box"> diff --git a/templates/web/zurich/faq/faq-de-ch.html b/templates/web/zurich/faq/faq-de-ch.html index c7e284194..deda32a1c 100644 --- a/templates/web/zurich/faq/faq-de-ch.html +++ b/templates/web/zurich/faq/faq-de-ch.html @@ -2,87 +2,55 @@ <h1><a name="faq"></a>Hilfe</h1> - <dl> - -<dt>Was ist «Züri wie neu»</dt> -<dd> -«Züri wie neu» ist eine Online-Plattform, über die die Einwohnerinnen und -Einwohner der Stadt Zürich auf Mängel und Schäden der städtischen Infrastruktur -hinweisen können. «Züri wie neu» wird von der Stadtverwaltung moderiert und -transparent geführt. Die Meldungen werden innerhalb von einem Arbeitstag den zuständigen Fachstellen -zugewiesen und innert fünf Arbeitstagen abschliessend beantwortet. Fällt eine -Meldung nicht in den Zuständigkeitsbereich der Stadtverwaltung, wird die -Meldung anonymisiert der zuständigen dritten Stelle per E-Mail zugestellt. -</dd> - -<dt>Welche Probleme kann ich über «Züri wie neu» melden?</dt> -<dd> -<p>Gemeldet werden können sämtliche Schäden an der Infrastruktur der Stadt Zürich. -Dabei kann es sich um ein Loch im Strassenbelag, ein Graffiti am Stadthaus oder -eine durch Vandalen beschädigte Parkbank handeln. - -<p>Es können Probleme zu folgenden Kategorien gemeldet werden: +<h3 id="was_ist_zri_wie_neu">Was ist «Züri wie neu»</h3> + +<p>«Züri wie neu» ist eine Online-Plattform, über die die Einwohnerinnen und Einwohner die Stadt Zürich auf Schäden an der städtischen Infrastruktur hinweisen können. «Züri wie neu» wird von der Stadtverwaltung moderiert und transparent geführt. Die Meldungen werden innerhalb von einem Arbeitstag den zuständigen Fachstellen zugewiesen und innert fünf Arbeitstagen abschliessend beantwortet. Fällt eine Meldung nicht in den Zuständigkeitsbereich der Stadtverwaltung, wird die Meldung anonymisiert der zuständigen dritten Stelle per E-Mail zugestellt.</p> + +<h3 id="welche_probleme_kann_ich_ber_zri_wie_neu_melden">Welche Probleme kann ich über «Züri wie neu» melden?</h3> + +<p>Gemeldet werden können sämtliche Schäden an der Infrastruktur der Stadt Zürich in folgenden Kategorien:</p> <ul> <li>Abfall / Sammelstellen</li> -<li>Beleuchtung</li> +<li>Beleuchtung / Uhren</li> +<li>Brunnen / Hydranten</li> <li>Graffiti</li> -<li>Spielplatz / Sitzbank</li> +<li>Grünflächen / Spielplätze</li> <li>Strasse / Trottoir / Platz</li> -<li>Tiere / Grünflächen</li> +<li>VBZ / ÖV</li> </ul> -</dd> +<h3 id="was_kann_ich_nicht_ber_zri_wie_neu_melden">Was kann ich nicht über «Züri wie neu» melden?</h3> -<dt>Was kann ich nicht über «Züri wie neu» melden?</dt> -<dd> <ul> -<li>Mängel die nicht auf Stadtgebiet liegen.</li> -<li>Melden Sie «Züri wie neu» KEINE Notfälle. Die Notrufnummern lauten: - <br>Medizinisch - 144 Polizei - 117 Feuer - 118 Allgemein - 112</li> +<li>Schäden die nicht auf Stadtgebiet liegen</li> +<li>Melden Sie «Züri wie neu» KEINE Notfälle. Die Notrufnummern lauten: <br /> +Sanität – 144, Polizei – 117, Feuerwehr – 118, Allgemein - 112</li> <li>Allgemeine Verschönerungs- und Verbesserungsvorschläge</li> </ul> -</dd> - -<dt>Wie verwende ich die Webseite?</dt> -<dd> -<p> -Geben Sie zuerst eine Adresse an oder lassen Sie Ihren Standort automatisch -über den entsprechenden Link lokalisieren. Mittels Mausklick in die danach -angezeigte Karte können Sie den exakten Ort des Mangels angeben. Als letzten -Schritt füllen Sie die Felder des Formulars aus und schicken die Meldung ab. -</p> -<p> -Weiter können Sie bestehende Meldungen sowie auch die Rückmeldungen der -Verwaltung betrachten. -</p> -</dd> - -<dt>Wie werden die Probleme gelöst?</dt> -<dd> -Die Meldungen werden innerhalb von einem Arbeitstag den zuständigen Fachstellen -zugewiesen und innert fünf Arbeitstagen von den dafür zuständigen -Fachstellen bearbeitet sowie mit einer entsprechenden Rückmeldung versehen. -</dd> - -<dt>Kann ich «Züri wie neu» auf meinem Smartphone nutzen?</dt> -<dd> -Ja, sowohl über die für mobile Geräte optimierte Webseite, als auch über die -<a href="https://itunes.apple.com/ch/app/zuri-wie-neu/id631302236">iOS</a>- und <a href="https://play.google.com/store/apps/details?id=ch.zueriwieneu.zueriwieneu">Android-App</a>. -</dd> - -<dt>Kann ich auch Probleme ausserhalb von Zürich melden?</dt> -<dd>Nein.</dd> - -<dt>Werden meine E-Mail-Adresse, mein Name und meine Telefonnummer vertraulich behandelt?</dt> -<dd> -Die Kontaktinformationen werden nur stadtintern für Rückfragen verwendet. Sie -werden weder im Internet publiziert noch an Dritte weitergegeben. -</dd> - -<dt>Wer hat «Züri wie neu» programmiert?</dt> -<dd>«Züri wie neu» wurde von <a href="http://www.mysociety.org/">mySociety</a> entwickelt.</dd> - -</dl> + +<h3 id="wie_melde_ich_einen_schaden">Wie melde ich einen Schaden?</h3> + +<p>Geben Sie zuerst eine Adresse an oder lassen Sie Ihren Standort automatisch über den entsprechenden Link lokalisieren. Mittels Mausklick in die danach angezeigte Karte können Sie den exakten Ort des Mangels angeben. Als letzten Schritt füllen Sie die Felder des Formulars aus, machen mindestens ein Foto des Schadens und schicken die Meldung ab.</p> + +<h3 id="wie_werden_die_schden_behoben">Wie werden die Schäden behoben?</h3> + +<p>Die Meldungen werden innerhalb von einem Arbeitstag den zuständigen Fachstellen zugewiesen und innert fünf Arbeitstagen von den dafür zuständigen Fachstellen bearbeitet sowie mit einer entsprechenden Rückmeldung versehen.</p> + +<h3 id="kann_ich_zri_wie_neu_auf_meinem_smartphone_nutzen">Kann ich «Züri wie neu» auf meinem Smartphone nutzen?</h3> + +<p>Ja, sowohl über die für mobile Geräte optimierte Webseite, als auch über die <a href="https://itunes.apple.com/ch/app/zuri-wie-neu/id631302236">iOS-</a> und <a href="https://play.google.com/store/apps/details?id=ch.zueriwieneu.zueriwieneu">Android-App</a>.</p> + +<h3 id="kann_ich_auch_schden_ausserhalb_von_zrich_melden">Kann ich auch Schäden ausserhalb von Zürich melden?</h3> + +<p>Nein, auf «Züri wie neu» können nur Schäden auf Stadtgebiet gemeldet werden.</p> + +<h3 id="werden_meine_e_mail_adresse_mein_name_und_meine_telefonnummer_vertraulich_behandelt">Werden meine E-Mail-Adresse, mein Name und meine Telefonnummer vertraulich behandelt?</h3> + +<p>Die Kontaktinformationen werden nur stadtintern für Rückfragen verwendet. Sie werden weder im Internet publiziert noch an Dritte weitergegeben.</p> + +<h3 id="wer_hat_zri_wie_neu_programmiert">Wer hat «Züri wie neu» programmiert?</h3> + +<p>«Züri wie neu» wurde von <a href="https://www.mysociety.org/">mySociety</a> programmiert.</p> [% INCLUDE 'footer.html' pagefooter = 'yes' %] diff --git a/templates/web/zurich/footer.html b/templates/web/zurich/footer.html index f70470226..11bfa9fcb 100644 --- a/templates/web/zurich/footer.html +++ b/templates/web/zurich/footer.html @@ -1,3 +1,4 @@ +[% USE date %] </div><!-- .content role=main --> </div><!-- .container --> </div><!-- .table-cell --> @@ -30,7 +31,7 @@ <div id="zurich-footer-wrapper" class="desk-only"> <div id="zurich-footer"> - © 2013 Stadt Zürich + © [% date.format(date.now, '%Y') %] Stadt Zürich <span class="hidden">|</span> <a href="http://www.stadt-zuerich.ch/content/portal/de/index/footer/rechtliche_hinweise.html">Rechtliche Hinweise</a> <span class="hidden">|</span> <a href="http://www.stadt-zuerich.ch/content/portal/de/index/footer/impressum.html">Impressum</a> </div> diff --git a/templates/web/zurich/header.html b/templates/web/zurich/header.html index 0d06d2c53..7e88f3f0f 100644 --- a/templates/web/zurich/header.html +++ b/templates/web/zurich/header.html @@ -14,7 +14,7 @@ [% SET start = c.config.ADMIN_BASE_URL IF admin %] <link rel="stylesheet" href="[% start %][% version('/cobrands/' _ c.cobrand.moniker _ '/base.css') %]"> - <link rel="stylesheet" href="[% start %][% version('/cobrands/' _ c.cobrand.moniker _ '/layout.css') %]" media="(min-width:48em)"> + <link rel="stylesheet" href="[% start %][% version('/cobrands/' _ c.cobrand.moniker _ '/layout.css') %]" media="screen and (min-width:48em)"> [% extra_css %] <!--[if (lt IE 9) & (!IEMobile)]> <link rel="stylesheet" href="[% start %][% version('/cobrands/' _ c.cobrand.moniker _ '/layout.css') %]"> @@ -68,9 +68,14 @@ <li [% IF pagename == 'users' OR pagename == 'user_edit' %]class="current"[% END %]> <a href="/admin/users">[% loc('Users') %]</a> </li> + [% END %] <li [% IF pagename == 'stats' %]class="current"[% END %]> <a href="/admin/stats">[% loc('Stats') %]</a> </li> + [% IF admin_type == 'dm' %] + <li [% IF pagename == 'templates' OR pagename == 'template' %]class="current"[% END %]> + <a href="/admin/templates">[% loc('Templates') %]</a> + </li> [% END %] <li class="search-box"> <form method="get" action="[% c.uri_for('reports') %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> diff --git a/templates/web/zurich/maps/noscript_map.html b/templates/web/zurich/maps/noscript_map.html new file mode 100644 index 000000000..5c2a2c064 --- /dev/null +++ b/templates/web/zurich/maps/noscript_map.html @@ -0,0 +1,70 @@ +<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 %] + 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 compass %] + </div> +</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 + data-foo="[% pin.px %],[% pin.py %]/ [% map.tile_size %]*[% map.cols %],[% map.rows %]" + 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 / ( map.tile_size * map.rows ) * 100 %]%; + left: [% pin.px / ( map.tile_size * map.cols ) * 100 %]%; + position: absolute; + margin-left: -24px; /* Half of 48px wide image */ + margin-top: -64px; /* All of 64px tall image */ + " +> +[%- IF pin.id -%] +</a> +[% END %] + +[% END %] diff --git a/templates/web/zurich/report/banner.html b/templates/web/zurich/report/banner.html index eda70a0de..c10a99ef6 100644 --- a/templates/web/zurich/report/banner.html +++ b/templates/web/zurich/report/banner.html @@ -1,17 +1,6 @@ [% USE date %] -[% BLOCK banner %] - <div class="banner"> - <p id="[% id %]">[% text %]</p> - </div> -[% END %] - -[% IF problem.state == 'unconfirmed' %] - [% INCLUDE banner, id = 'closed', text = loc('Submitted') %] -[% ELSIF problem.state == 'confirmed' %] - [% INCLUDE banner, id = 'closed', text = loc('Open') %] -[% ELSIF problem.is_fixed OR problem.is_closed %] - [% INCLUDE banner, id = 'fixed', text = loc('Closed') %] -[% ELSIF problem.state == 'in progress' OR problem.state == 'planned' %] - [% INCLUDE banner, id = 'progress', text = loc('In progress') %] -[% END %] +[% problem_hashref = c.cobrand.problem_as_hashref(problem, c) %] +<div class="banner"> + <p id="[% problem_hashref.banner_id %]">[% problem_hashref.state_t %]</p> +</div> diff --git a/templates/web/zurich/report/new/fill_in_details_form.html b/templates/web/zurich/report/new/fill_in_details_form.html index 28d9ebe68..c8c567786 100644 --- a/templates/web/zurich/report/new/fill_in_details_form.html +++ b/templates/web/zurich/report/new/fill_in_details_form.html @@ -48,14 +48,17 @@ [% PROCESS "report/new/category_wrapper.html" %] [% IF c.cobrand.allow_photo_upload %] - <label for="form_photo">[% loc('Photo') %]</label> + <label for="form_photo"> + [% loc('Photo') %] + [% loc('(Defect & location of defect)') %] + </label> [% IF upload_fileid || report.photo %] [% IF upload_fileid %] <img align="right" src="/photo/[% upload_fileid %].temp.jpeg" alt=""> <input type="hidden" name="upload_fileid" value="[% upload_fileid %]"> [% END %] - <p>[% loc('You have already attached a photo to this report, attaching another one will replace it.') %]</p> + <p>[% loc('You have already attached photos to this report. Note that you can attach a maximum of 3 to this report (if you try to upload more, the oldest will be removed).') %]</p> [% IF report.photo %] <img align="right" src="/photo/[% report.id %].jpeg"> @@ -65,7 +68,9 @@ [% IF field_errors.photo %] <p class='form-error'>[% field_errors.photo %]</p> [% END %] - <input type="file" name="photo" id="form_photo"> + <input type="file" name="photo1" id="form_photo"> + <input type="file" name="photo2" id="form_photo2"> + <input type="file" name="photo3" id="form_photo3"> [% END %] <label for="form_email">[% loc('Your email') %]</label> @@ -84,7 +89,7 @@ [% IF field_errors.phone %] <p class='form-error'>[% field_errors.phone %]</p> [% END %] - <input type="text" value="[% report.user.phone | html %]" name="phone" id="form_phone" placeholder="[% loc('Your phone number') %]"> + <input type="text" value="[% report.user.phone | html %]" name="phone" id="form_phone" placeholder="[% loc('Your phone number') %]" required> <div class="form-txt-submit-box"> [%# ID of submit_sign_in so name can be option, name of submit_register so it doesn't try and sign us in %] diff --git a/templates/web/zurich/report/updates.html b/templates/web/zurich/report/updates.html index 786ecd582..cb7644694 100644 --- a/templates/web/zurich/report/updates.html +++ b/templates/web/zurich/report/updates.html @@ -5,10 +5,10 @@ <div class="update-wrap"> <div class="update-text"> <p class="meta-2">[% prettify_dt( problem.lastupdate, 'zurich' ) %]</p> - [% IF problem.state == 'fixed - council' %] + [%# XXX following should honour zurich_closed_states instead? %] + [% IF problem.state == 'fixed - council' + || ( problem.external_body AND problem.state == 'closed' ) %] [% add_links( problem.extra.public_response ) | html_para %] - [% ELSIF problem.state == 'closed' AND problem.external_body %] - <p>[% tprintf( loc('Assigned to %s'), problem.body(c).name ) %]</p> [% END %] </div> </div> |