diff options
Diffstat (limited to 'templates')
114 files changed, 1411 insertions, 462 deletions
diff --git a/templates/email/default/submit-brent.txt b/templates/email/default/submit-brent.txt index c94e6e1e4..75a954765 100644 --- a/templates/email/default/submit-brent.txt +++ b/templates/email/default/submit-brent.txt @@ -1,6 +1,6 @@ Subject: FMS Problem Report: <?=$values['title']?> -Dear <?=$values['councils_name']?>, +Dear <?=$values['bodies_name']?>, <?=$values['missing']?><?=$values['multiple']?>A user of FixMyStreet has submitted the following report diff --git a/templates/email/default/submit.txt b/templates/email/default/submit.txt index a956b4add..6066a7b68 100644 --- a/templates/email/default/submit.txt +++ b/templates/email/default/submit.txt @@ -1,6 +1,6 @@ Subject: Problem Report: <?=$values['title']?> -Dear <?=$values['councils_name']?>, +Dear <?=$values['bodies_name']?>, <?=$values['missing']?><?=$values['multiple']?>A user of FixMyStreet has submitted the following report diff --git a/templates/email/fiksgatami/nn/submit.txt b/templates/email/fiksgatami/nn/submit.txt index 82849b0d5..52f519221 100644 --- a/templates/email/fiksgatami/nn/submit.txt +++ b/templates/email/fiksgatami/nn/submit.txt @@ -1,6 +1,6 @@ Subject: Problemrapport: <?=$values['title']?> -Til <?=$values['councils_name']?>, +Til <?=$values['bodies_name']?>, <?=$values['missing']?><?=$values['multiple']?>Ein brukar av FiksGataMi har sendt inn følgjande rapport om eit lokalt problem som diff --git a/templates/email/fiksgatami/submit.txt b/templates/email/fiksgatami/submit.txt index 8005f5c82..947729422 100644 --- a/templates/email/fiksgatami/submit.txt +++ b/templates/email/fiksgatami/submit.txt @@ -1,6 +1,6 @@ Subject: Problemrapport: <?=$values['title']?> -Til <?=$values['councils_name']?>, +Til <?=$values['bodies_name']?>, <?=$values['missing']?><?=$values['multiple']?>En bruker av FiksGataMi har sendt inn følgende rapport om et lokalt diff --git a/templates/email/zurich/alert-moderation-overdue.txt b/templates/email/zurich/alert-moderation-overdue.txt index 85906b9cb..c3aab66d2 100644 --- a/templates/email/zurich/alert-moderation-overdue.txt +++ b/templates/email/zurich/alert-moderation-overdue.txt @@ -1,10 +1,9 @@ -Subject: eskalierte Meldungen auf FixMyZürich
-
-
+Subject: eskalierte Meldungen auf Fix my Zurich -Die folgenden Meldungen auf FixMyZürich sind älter als einen Tag und müssen dringend bearbeitet werden:
-<?=$values['data']?>
-
-Um diese Meldungen zu moderieren, klicken Sie auf folgende URL:
+Die folgenden Meldungen auf Fix my Zurich sind älter als einen Tag und müssen dringend bearbeitet werden: -<?=$values['admin_url']?>
\ No newline at end of file +<?=$values['data']?> + +Um diese Meldungen zu moderieren, klicken Sie auf folgende URL: + +<?=$values['admin_url']?> diff --git a/templates/email/zurich/alert-overdue.txt b/templates/email/zurich/alert-overdue.txt index 90c8ee02f..3301feee5 100644 --- a/templates/email/zurich/alert-overdue.txt +++ b/templates/email/zurich/alert-overdue.txt @@ -1,13 +1,9 @@ -Subject: Rückmeldung erforderlich auf FixMyZürich
-
+Subject: Rückmeldung erforderlich auf Fix my Zurich -Die folgenden Meldungen wurden eskaliert, da sie nicht innerhalb von fünf Tagen beantwortet worden sind: +Die folgenden Meldungen wurden eskaliert, da sie nicht innerhalb von fünf Tagen beantwortet worden sind: -
<?=$values['data']?> -
-
Um diese Meldungen zu bearbeiten, klicken Sie auf folgende URL: -
-<?=$values['admin_url']?>
\ No newline at end of file + +<?=$values['admin_url']?> diff --git a/templates/email/zurich/alert-update.txt b/templates/email/zurich/alert-update.txt new file mode 100644 index 000000000..3f8da5f66 --- /dev/null +++ b/templates/email/zurich/alert-update.txt @@ -0,0 +1,11 @@ +Subject: New update on report - '<?=$values['title']?>' + +The following update has been left on this report: + +<?=$values['data']?> + +To view this report on the site, please visit the following URL: + <?=$values['problem_url']?> + +<?=$values['signature']?> + diff --git a/templates/email/zurich/problem-closed.txt b/templates/email/zurich/problem-closed.txt new file mode 100644 index 000000000..d7482d8eb --- /dev/null +++ b/templates/email/zurich/problem-closed.txt @@ -0,0 +1,17 @@ +Subject: FixMyZurich: Meldung #[% problem.id %] + +Guten Tag [% problem.name %] + +Antwort auf Ihre Meldung: + +[% problem.extra.public_response %] + +Um die Meldung auf der Webseite zu betrachen, klicken Sie auf folgenden Link: + [% url %] + +Ihre Meldung: + +[% problem.detail %] + +Dieses E-Mail wurde automatisch generiert. Bitte antworten Sie nicht auf dieses E-Mail. + diff --git a/templates/email/zurich/problem-confirm.txt b/templates/email/zurich/problem-confirm.txt index e770aa69e..401591681 100755 --- a/templates/email/zurich/problem-confirm.txt +++ b/templates/email/zurich/problem-confirm.txt @@ -1,16 +1,13 @@ -Subject: Fix My Zürich: Meldung #[% ---report.ID--- | trim %] +Subject: Fix my Zurich: Meldung #[% report.id %] -
-
-Guten Tag [% report.name %]
-
-Bitte klicken Sie auf den untenstehenden Link, um Ihre Meldung zu bestätigen. Falls der Link nicht funktioniert, kopieren Sie ihn in Ihren Browser:
-
-[% token_url %]
-
-Ihre Meldung:
-
-[% ---report.details---- %]
-
-
-Dieses E-Mail wurde automatisch generiert. Bitte antworten Sie nicht auf dieses E-Mail.
\ No newline at end of file +Guten Tag [% report.name %] + +Bitte klicken Sie auf den untenstehenden Link, um Ihre Meldung zu bestätigen. Falls der Link nicht funktioniert, kopieren Sie ihn in Ihren Browser: + +[% token_url %] + +Ihre Meldung: + +[% report.detail %] + +Dieses E-Mail wurde automatisch generiert. Bitte antworten Sie nicht auf dieses E-Mail. diff --git a/templates/email/zurich/problem-external.txt b/templates/email/zurich/problem-external.txt new file mode 100644 index 000000000..bcc1468d4 --- /dev/null +++ b/templates/email/zurich/problem-external.txt @@ -0,0 +1,15 @@ +Subject: FixMyZurich: Meldung #[% problem.id %] + +Guten Tag [% problem.name %] + +Ihre Meldung wurde an [% problem.body(c).name %] weitergeleitet. + +Um die Meldung auf der Webseite zu betrachen, klicken Sie auf folgenden Link: + [% url %] + +Ihre Meldung: + +[% problem.detail %] + +Dieses E-Mail wurde automatisch generiert. Bitte antworten Sie nicht auf dieses E-Mail. + diff --git a/templates/email/zurich/problem-rejected.txt b/templates/email/zurich/problem-rejected.txt new file mode 100644 index 000000000..447aeaefb --- /dev/null +++ b/templates/email/zurich/problem-rejected.txt @@ -0,0 +1,12 @@ +Subject: Fix my Zurich: Meldung #[% problem.id %] + +Guten Tag [% problem.name %] + +Ihre Meldung wurde aufgrund des Inhalts zurückgewiesen. + +Ihre Meldung: + +[% problem.detail %] + +Dieses E-Mail wurde automatisch generiert. Bitte antworten Sie nicht auf dieses E-Mail. + diff --git a/templates/email/zurich/reply-autoresponse.txt b/templates/email/zurich/reply-autoresponse.txt index ef5d69d41..be927f72b 100755 --- a/templates/email/zurich/reply-autoresponse.txt +++ b/templates/email/zurich/reply-autoresponse.txt @@ -2,9 +2,9 @@ Subject: Automatische Antwort auf Ihr E-Mail Guten Tag
-Dies ist eine automatische Antwort auf Ihr E-Mail. Ihr E-Mail wurde nicht übermittelt.
+Dies ist eine automatische Antwort auf Ihr E-Mail. Ihr E-Mail wurde nicht übermittelt.
-Falls Sie eine Meldung erfassen möchten, tun Sie das bitte über die Hauptseite:
-[% ---link to FMZ--- %]
+Falls Sie eine Meldung erfassen möchten, tun Sie das bitte über die Hauptseite:
+[%# link to FMZ %]
-Falls Sie Fragen zu Fix My Zürich haben, senden Sie ein E-Mail an gis-zentrum@zuerich.ch
+Falls Sie Fragen zu Fix my Zurich 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 new file mode 100644 index 000000000..36768d3bb --- /dev/null +++ b/templates/email/zurich/submit-external-personal.txt @@ -0,0 +1,13 @@ +Subject: FixMyZurich: Neue Meldung #<?=$values['id']?> + +Guten Tag <?=$values['bodies_name']?>, + +Diese Meldung wurde Ihnen von der Stadt Zürich gesendet, da es Ihr Zuständigkeitsgebiet betreffen könnte. + +Öffentliche URL: <?=$values['url']?> + +Reporter name: <?=$values['name']?> + +Reporter email: <?=$values['email']?> + +Reporter phone: <?=$values['phone']?> diff --git a/templates/email/zurich/submit-external.txt b/templates/email/zurich/submit-external.txt new file mode 100644 index 000000000..3e07b0664 --- /dev/null +++ b/templates/email/zurich/submit-external.txt @@ -0,0 +1,8 @@ +Subject: FixMyZurich: Neue Meldung #<?=$values['id']?> + +Guten Tag <?=$values['bodies_name']?>, + +Diese Meldung wurde Ihnen von der Stadt Zürich gesendet, da es Ihr Zuständigkeitsgebiet betreffen könnte. + +Öffentliche URL: <?=$values['url']?> + diff --git a/templates/email/zurich/submit-feedback-pending.txt b/templates/email/zurich/submit-feedback-pending.txt new file mode 100755 index 000000000..fbf9cafb9 --- /dev/null +++ b/templates/email/zurich/submit-feedback-pending.txt @@ -0,0 +1,10 @@ +Subject: FixMyZurich: Meldung #<?=$values['id']?> bereit für Feedback + +Guten Tag <?=$values['bodies_name']?>, + +Diese Meldung wurde vom Fachbereich abschliessend beantwortet und kann nun auf Fix My Zurich beantwortet und abgeschlossen werden. + +Öffentliche URL: <?=$values['url']?> + +Admin URL: <?=$values['admin_url']?> + diff --git a/templates/email/zurich/submit-in-progress.txt b/templates/email/zurich/submit-in-progress.txt new file mode 100644 index 000000000..809ba4653 --- /dev/null +++ b/templates/email/zurich/submit-in-progress.txt @@ -0,0 +1,10 @@ +Subject: FixMyZurich: Neue Meldung #<?=$values['id']?> + +Guten Tag <?=$values['bodies_name']?>, + +Diese Meldung wurde Ihnen von Ihrer FMZ-Verantworltichen Stelle zugeteilt. + +Öffentliche URL: <?=$values['url']?> + +Admin URL: <?=$values['admin_url']?> + diff --git a/templates/email/zurich/submit.txt b/templates/email/zurich/submit.txt index a95b02cde..f55b66e18 100755..100644 --- a/templates/email/zurich/submit.txt +++ b/templates/email/zurich/submit.txt @@ -1,10 +1,10 @@ -Subject: Fix My Zürich: #<?=----$values['ID']----?> +Subject: FixMyZurich: Neue Meldung #<?=$values['id']?> -
-
-<?=$values['url']?>
-
-
-<?=$values['detail']?> +Guten Tag <?=$values['bodies_name']?>, + +Eine neue Meldung wurde erfasst: + +Öffentliche URL: <?=$values['url']?> + +Admin URL: <?=$values['admin_url']?> -
diff --git a/templates/web/bromley/report/display.html b/templates/web/bromley/report/display.html index 5288041f9..329d7ace9 100644 --- a/templates/web/bromley/report/display.html +++ b/templates/web/bromley/report/display.html @@ -20,7 +20,7 @@ <div class="shadow-wrap"> <ul id="key-tools"> - [% IF c.user_exists AND c.user.council == 'Bromley Council' %] + [% IF c.user_exists AND c.user.body == 'Bromley Council' %] <li><form method="post" action="/report/delete/[% problem.id %]"> <input type="submit" class="abuse" value="Remove from site"> </form></li> @@ -74,7 +74,7 @@ <br><a href="http://www.bromley.gov.uk/report">Report a different issue</a> </div> - [% IF c.user && c.user.belongs_to_council( problem.council ) %] + [% IF c.user && c.user.belongs_to_body( problem.bodies_str ) %] <label for="form_state">[% loc( 'State' ) %]</label> <select name="state" id="form_state"> [% FOREACH state IN [ ['confirmed', loc('Open')], ['investigating', diff --git a/templates/web/bromley/report/new/fill_in_details_form.html b/templates/web/bromley/report/new/fill_in_details_form.html index 2c5abb874..b60935f47 100644 --- a/templates/web/bromley/report/new/fill_in_details_form.html +++ b/templates/web/bromley/report/new/fill_in_details_form.html @@ -39,8 +39,8 @@ [% INCLUDE 'report/new/form_heading.html' %] - [% IF field_errors.council %] - <p class='form-error'>[% field_errors.council %]</p> + [% IF field_errors.bodies %] + <p class='form-error'>[% field_errors.bodies %]</p> [% END %] diff --git a/templates/web/default/admin/bodies.html b/templates/web/default/admin/bodies.html new file mode 100644 index 000000000..a1555cac9 --- /dev/null +++ b/templates/web/default/admin/bodies.html @@ -0,0 +1,50 @@ +[% INCLUDE 'admin/header.html' title=loc('Bodies') -%] + +[% INCLUDE 'admin/edit-league.html' %] + +<table cellspacing="0" cellpadding="2" border="1"> + <tr> + <th>[% loc('Name') %]</th> + [% IF c.cobrand.moniker == 'zurich' %] + <th>[% loc('Email') %]</th> + [% ELSE %] + <th>[% loc('Category') %]</th> + [% END %] + </tr> +[%- FOREACH body IN bodies %] + [%- SET id = body.id %] + [% NEXT IF c.cobrand.moniker == 'zurich' AND admin_type == 'dm' AND (body.parent OR body.bodies) %] + <tr> + <td> + [% IF c.cobrand.moniker == 'zurich' %] + [% FILTER repeat(4*body.api_key) %] [% END %] + [% END %] + <a href="[% c.uri_for( 'body', id ) %]">[% body.name %]</a> + [% IF c.cobrand.moniker != 'zurich' %] + [%- ', ' _ body.parent.name IF body.parent -%] + [% END %] + </td> + [% IF c.cobrand.moniker == 'zurich' %] + <td>[% body.endpoint %]</td> + [% ELSE %] + <td> + [% IF counts.$id %] + [% tprintf( loc('%d addresses'), counts.$id.c) IF c.cobrand.moniker != 'emptyhomes' %] + [% IF counts.$id.deleted %] + (1+ deleted) + [% ELSIF counts.$id.confirmed != counts.$id.c %] + (some unconfirmed) + [% END %] + [% ELSE %] + no categories + [% END %] + </td> + [% END %] + </tr> +[%- END %] +</table> + +<h2>[% loc('Add body') %]</h2> +[% INCLUDE 'admin/body-form.html', body='' %] + +[% INCLUDE 'admin/footer.html' %] diff --git a/templates/web/default/admin/body-form.html b/templates/web/default/admin/body-form.html new file mode 100644 index 000000000..039d83ae2 --- /dev/null +++ b/templates/web/default/admin/body-form.html @@ -0,0 +1,85 @@ + <form method="post" action="[% body ? c.uri_for('body', body.id) : c.uri_for('bodies') %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> + + <p> + <label for="name">[% loc('Name') %]</label> + <input type="text" name="name" id="name" value="[% body.name %]" size="50"> + </p> + + <p> + <label for="parent">[% loc('Parent') %]</label> + <select name="parent" id="parent"> + <option value=""> -- [% loc('Select a body') %] -- </option> + [% FOR b IN bodies %] + <option value="[% b.id %]"[% ' selected' IF body.parent.id == b.id %]>[% b.name %]</option> + [% END %] + </select> + </p> + + <p> + <label for="area_ids">[% loc('Area covered') %]</label> + <select name="area_ids" id="area_ids" multiple> + <option value=""> -- [% loc('Select an area') %] -- </option> + [% FOR area IN areas %] + [% SET aid = area.id %] + <option value="[% area.id %]"[% ' selected' IF body.areas.$aid %]>[% area.name %]</option> + [% END %] + </select> + </p> + + <p> + <label for="send_method">Send Method</label> + <select name="send_method" id="send_method"> + <option value=""> -- Select a method -- </option> + [% FOR method IN send_methods %] + <option value="[% method %]"[% ' selected' IF body.send_method == method %]>[% method %]</option> + [% END %] + </select> + </p> + + <p> + <label for="endpoint">[% loc('Endpoint') %]</label> + <input type="text" name="endpoint" id="endpoint" value="[% body.endpoint %]" size="50"> + </p> + + <p> + <label for="jurisdiction">Open311 Jurisdiction</label> + <input type="text" name="jurisdiction" id="jurisdiction" value="[% body.jurisdiction %]" size="50"> + </p> + + <p> + <label for="api_key">Open311 API Key</label> + <input type="text" name="api_key" id="api_key" value="[% body.api_key %]" size="25"> + </p> + + <p> + <input type="checkbox" id="send_comments" name="send_comments"[% ' checked' IF body.send_comments %]> + <label for="send_comments" class="inline">Use Open311 comment sending extension</label> + </p> + + <p> + <label for"comment_user_id">User ID to attribute fetched comments to</label> + <input type="text" name="comment_user_id" value="[% body.comment_user_id %]"> + </p> + + <p> + <input type="checkbox" id="suppress_alerts" name="suppress_alerts"[% ' checked' IF body.suppress_alerts %]> + <label for="suppress_alerts" class="inline">Do not send email alerts on fetched comments to problem creator</label> + </p> + + <p> + <input type="checkbox" id="can_be_devolved" name="can_be_devolved"[% ' checked' IF body.can_be_devolved %]> + <label for="can_be_devolved" class="inline">Endpoint lookup can be devolved to contacts</label> + </p> + + <p> + <label for="send_extended_statuses">Send extended open311 statuses with service request updates</label>: + <input type="checkbox" id="send_extended_statuses" name="send_extended_statuses"[% ' checked' IF conf.send_extended_statuses %]> + </p> + + <p> + <input type="hidden" name="posted" value="body"> + <input type="hidden" name="token" value="[% token %]"> + <input type="submit" value="[% body ? loc('Update body') : loc('Add body') %]"> + </p> + </form> + diff --git a/templates/web/default/admin/council_contacts.html b/templates/web/default/admin/body.html index 56850a82b..120a07da9 100644 --- a/templates/web/default/admin/council_contacts.html +++ b/templates/web/default/admin/body.html @@ -1,6 +1,4 @@ -[% INCLUDE 'admin/header.html' title=tprintf(loc('Council contacts for %s'), council_name) -%] - -[% conf = open311.next %] +[% INCLUDE 'admin/header.html' title=tprintf(loc('Council contacts for %s'), body.name) -%] [% IF updated %] <p> @@ -13,14 +11,14 @@ <a href="[% c.uri_for_email( '/around', { pc => example_pc } ) %]">[% tprintf( loc('Example postcode %s'), example_pc ) | html %]</a> | [% END %] [% IF c.cobrand.moniker == 'emptyhomes' %] -<a href="[% c.uri_for( 'search_reports', search => 'area:' _ area_id ) %]">[% loc('List all reported problems' ) %]</a> +<a href="[% c.uri_for( 'reports', search => 'body:' _ body_id ) %]">[% loc('List all reported problems' ) %]</a> [% ELSE %] -<a href="[% c.uri_for_email( '/reports/' _ area_id ) %]">[% loc('List all reported problems' ) %]</a> +<a href="[% c.uri_for_email( '/reports/' _ body_id ) %]">[% loc('List all reported problems' ) %]</a> [% END %] -<a href="[% c.uri_for( 'council_contacts', area_id, { text => 1 } ) %]">[% loc('Text only version') %]</a> +<a href="[% c.uri_for( 'body', body_id, { text => 1 } ) %]">[% loc('Text only version') %]</a> </p> -[% IF open311.count > 0 %] +[% IF body.send_method == 'Open311' %] <h2> Council contacts configured via Open311 </h2> @@ -30,7 +28,7 @@ <p class="error">Do not give these out except to people at the council.</p> [% END %] -<form method="post" action="[% c.uri_for('council_contacts', area_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> +<form method="post" action="[% c.uri_for('body', body_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> <table cellspacing="0" cellpadding="2" border="1"> <tr> @@ -47,11 +45,11 @@ </tr> [% WHILE ( contact = contacts.next ) %] <tr> - <td><a href="[% c.uri_for( 'council_edit', area_id, contact.category ) %]">[% contact.category %]</a></td> + <td><a href="[% c.uri_for( 'body_edit', body_id, contact.category ) %]">[% contact.category %]</a></td> <td>[% contact.email | html %]</td> <td>[% IF contact.confirmed %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]</td> <td>[% IF contact.deleted %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]</td> - <td>[% IF conf.can_be_devolved && contact.send_method %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]</td> + <td>[% IF body.can_be_devolved && contact.send_method %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]</td> <td>[% contact.editor %]</td> <td>[% contact.note | html %]</td> <td>[% contact.non_public ? loc('Non Public') : loc('Public') %]</td> @@ -62,7 +60,6 @@ </table> <p> - <input type="hidden" name="area_id" value="[% area_id %]"> <input type="hidden" name="posted" value="update"> <input type="hidden" name="token" value="[% token %]"> <input type="submit" name="Update statuses" value="[% loc('Update statuses') %]"> @@ -71,7 +68,7 @@ <h2>[% loc('Add new category') %]</h2> - <form method="post" action="[% c.uri_for('council_contacts', area_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> + <form method="post" action="[% c.uri_for('body', body_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> [% IF c.cobrand.moniker != 'emptyhomes' %] <p> @@ -101,7 +98,6 @@ </p> <p> - <input type="hidden" name="area_id" value="[% area_id %]" > <input type="hidden" name="posted" value="new" > <input type="hidden" name="token" value="[% token %]" > <input type="submit" name="Create category" value="[% loc('Create category') %]" > @@ -113,65 +109,7 @@ </div> </form> - <h2>[% loc('Configure Open311 integration') %]</h2> - <form method="post" action="[% c.uri_for('council_contacts', area_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> - <p> - <label for="endpoint">Endpoint</label> - <input type="text" name="endpoint" id="endpoint" value="[% conf.endpoint %]" size="50"> - </p> - - <p> - <label for="jurisdiction">Jurisdiction</label> - <input type="text" name="jurisdiction" id="jurisdiction" value="[% conf.jurisdiction %]" size="50"> - </p> - - <p> - <label for="api_key">Api Key</label> - <input type="text" name="api_key" id="api_key" value="[% conf.api_key %]" size="25"> - </p> - - <p> - <label for="send_method">Send Method</label> - <select name="send_method"> - <option value=""> -- Select a method -- </option> - [% FOR method IN send_methods %] - <option value="[% method %]"[% ' selected' IF conf.send_method == method %]>[% method %]</option> - [% END %] - </select> - </p> - - <p> - <input type="checkbox" name="send_comments"[% ' checked' IF conf.send_comments %]> - <label for="send_comments" class="inline">Use Open311 comment sending extension</label> - </p> - - <p> - <label for"comment_user_id">User to attribute fetched comments to</label> - <input type="text" name="comment_user_id" value="[% conf.comment_user_id %]"> - </p> - - <p> - <input type="checkbox" name="suppress_alerts"[% ' checked' IF conf.suppress_alerts %]> - <label for="suppress_alerts" class="inline">Do not send email alerts on fetched comments to problem creator</label> - </p> - - <p> - <input type="checkbox" name="devolved"[% ' checked' IF conf.can_be_devolved %]> - <label for="devolved" class="inline">Endpoint lookup can be devolved to contacts</label> - </p> - - <p> - <label for="extended_statuses">Send extended open311 statuses with service request updates</label>: - <input type="checkbox" name="extended_statuses"[% ' checked' IF conf.send_extended_statuses %]> - </p> - - <p> - <input type="hidden" name="open311_id" value="[% conf.id %]"> - <input type="hidden" name="area_id" value="[% area_id %]"> - <input type="hidden" name="posted" value="open311"> - <input type="hidden" name="token" value="[% token %]"> - <input type="submit" name="Configure Open311" value="[% loc('Configure Open311') %]"> - </p> - </form> + <h2>[% loc('Edit body details') %]</h2> + [% INCLUDE 'admin/body-form.html' %] [% INCLUDE 'admin/footer.html' %] diff --git a/templates/web/default/admin/council_edit.html b/templates/web/default/admin/body_edit.html index 408466b51..1eeff9ab5 100644 --- a/templates/web/default/admin/council_edit.html +++ b/templates/web/default/admin/body_edit.html @@ -1,4 +1,4 @@ -[% INCLUDE 'admin/header.html' title=tprintf(loc('Council contacts for %s'), council_name) -%] +[% INCLUDE 'admin/header.html' title=tprintf(loc('Council contacts for %s'), body.name) -%] [% BLOCK highlightchanged_yesno %] [%- output = loc('No') %] @@ -19,37 +19,50 @@ [% END %] </p> -<form method="post" action="[% c.uri_for('council_contacts', area_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> - <strong>[% loc('Category:') %] </strong>[% contact.category | html %] +<form method="post" action="[% c.uri_for('body', body_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> + <p><strong>[% loc('Category:') %] </strong>[% contact.category | html %] <input type="hidden" name="category" value="[% contact.category | html %]" > <input type="hidden" name="token" value="[% token %]" > - <strong>[% loc('Email:') %] </strong> + <p><strong>[% loc('Email:') %] </strong> <input type="text" name="email" value="[% contact.email | html %]" size="30"> - <input type="checkbox" name="confirmed" value="1" id="confirmed"[% ' checked' IF contact.confirmed %]> <label for="confirmed">[% loc('Confirmed' ) %]</label> - <input type="checkbox" name="deleted" value="1" id="deleted"[% ' checked' IF contact.deleted %]> <label for="deleted">[% loc('Deleted') %]</label> - <input type="checkbox" name="non_public" value="1" id="non_public"[% ' checked' IF contact.non_public %]> <label for="non_public">[% loc('Private') %]</label><br> - <strong>[% loc('Note:') %] </strong><textarea name="note" rows="3" cols="40">[% contact.note | html %]</textarea> <br> + <p> + [% IF c.cobrand.moniker != 'zurich' %] + <input type="checkbox" name="confirmed" value="1" id="confirmed"[% ' checked' IF contact.confirmed %]> + <label class="inline" for="confirmed">[% loc('Confirmed' ) %]</label> + [% ELSE %] + <input type="hidden" name="confirmed" value="1"> + [% END %] + <input type="checkbox" name="deleted" value="1" id="deleted"[% ' checked' IF contact.deleted %]> + <label class="inline" for="deleted">[% loc('Deleted') %]</label> + [% 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> + [% END %] + </p> + + <p><strong>[% loc('Note:') %] </strong><textarea name="note" rows="3" cols="40">[% contact.note | html %]</textarea> + [% IF body.can_be_devolved %] <h2>[% loc('Configure Endpoint') %]</h2> - <form method="post" action="[% c.uri_for('council_contacts', area_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> + <form method="post" action="[% c.uri_for('body', body_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> <p> - <label for="endpoint">Endpoint</label>: + <label for="endpoint">Endpoint</label> <input type="text" name="endpoint" id="endpoint" value="[% contact.endpoint %]" size="50"> </p> <p> - <label for="jurisdiction">Jurisdiction</label>: + <label for="jurisdiction">Jurisdiction</label> <input type="text" name="jurisdiction" id="jurisdiction" value="[% contact.jurisdiction %]" size="50"> </p> <p> - <label for="api_key">Api Key</label>: + <label for="api_key">Api Key</label> <input type="text" name="api_key" id="api_key" value="[% contact.api_key %]" size="25"> </p> <p> - <label for="send_method">Send Method</label>: + <label for="send_method">Send Method</label> <select name="send_method"> <option value=""> -- Select a method -- </option> [% FOR method IN send_methods %] @@ -57,10 +70,10 @@ [% END %] </select> </p> + [% END %] - <input type="hidden" name="area_id" value="[% area_id %]"> <input type="hidden" name="posted" value="new"> - <input type="submit" name="Save changes" value="[% loc('Save changes') %]"> + <p><input type="submit" name="Save changes" value="[% loc('Save changes') %]"> </form> <h2>[% loc('History') %]</h2> diff --git a/templates/web/default/admin/council_list.html b/templates/web/default/admin/council_list.html deleted file mode 100644 index ac99368fe..000000000 --- a/templates/web/default/admin/council_list.html +++ /dev/null @@ -1,47 +0,0 @@ -[% INCLUDE 'admin/header.html' title=loc('Council contacts') -%] - -[%- BLOCK details %] -[%- IF councils.size == 0 %] - [%- loc('None') %] -[%- ELSE %] -[%- FOREACH council IN councils %] - [%- IF council.parent_area %] - [%- - p_area = areas.$council.parent_area - parent = ', ' _ areas.$parent.name - %] - [%- ELSE %] - [%- parent = '' %] - [%- END %] - [%- '<ul>' IF loop.first %] - <li><a href="[% c.uri_for( 'council_contacts', council ) %]">[% areas.$council.name %] [% parent %][% tprintf( loc('%d addresses'), counts.$council.c) IF counts.$council && c.cobrand.moniker != 'emptyhomes' %]</a> - [%- '</ul>' IF loop.last %] -[%- END %] -[%- END %] -[%- END %] - -<h2>[% loc('Diligency prize league table') %]</h2> -[% IF edit_activity.count %] -<ul> - [% WHILE ( editor = edit_activity.next ) %] - <li>[% tprintf( loc('%d edits by %s'), editor.get_column('c'), editor.editor ) %]</li> - [% END %] -</ul> -[% ELSE %] -<p> -[% loc('No edits have yet been made.') %] -</p> -[% END %] - -<h2>[% loc('Councils') %]</h2> - -<h3>[% loc('No info at all') %]</h3> -[% PROCESS details councils=no_info %] -<h3>[% loc('Currently has 1+ deleted') %]</h3> -[% PROCESS details councils=one_plus_deleted %] -<h3>[% loc('Some unconfirmeds') %]</h3> -[% PROCESS details councils=unconfirmeds %] -<h3>[% loc('All confirmed') %]</h3> -[% PROCESS details councils=all_confirmed %] - -[% INCLUDE 'admin/footer.html' %] diff --git a/templates/web/default/admin/edit-league.html b/templates/web/default/admin/edit-league.html new file mode 100644 index 000000000..6bf71537e --- /dev/null +++ b/templates/web/default/admin/edit-league.html @@ -0,0 +1,14 @@ +<h2>[% loc('Diligency prize league table') %]</h2> +[% IF edit_activity.count %] +<ul> + [% WHILE ( editor = edit_activity.next ) %] + <li>[% tprintf( loc('%d edits by %s'), editor.get_column('c'), editor.editor ) %]</li> + [% END %] +</ul> +[% ELSE %] +<p> +[% loc('No edits have yet been made.') %] +</p> +[% END %] + + diff --git a/templates/web/default/admin/list_flagged.html b/templates/web/default/admin/flagged.html index 0b22bccb2..5af92a23c 100644 --- a/templates/web/default/admin/list_flagged.html +++ b/templates/web/default/admin/flagged.html @@ -38,7 +38,7 @@ <tr> <td>[% user.name | html %]</td> <td>[% user.email | html %]</td> - <td><a href="[% c.uri_for( 'search_reports', search => user.email ) %]">list content</a></td> + <td><a href="[% c.uri_for( 'reports', search => user.email ) %]">list content</a></td> </tr> [%- END %] </table> diff --git a/templates/web/default/admin/list_updates.html b/templates/web/default/admin/list_updates.html index d21919b16..ff0ec2f31 100644 --- a/templates/web/default/admin/list_updates.html +++ b/templates/web/default/admin/list_updates.html @@ -29,10 +29,10 @@ <td>[% PROCESS format_time time=update.created %]</td> <td>[% IF update.anonymous %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]</td> <td>[% IF update.user.id == update.problem.user_id %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]</td> - <td>[% IF update.user.belongs_to_council( update.problem.council ) %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]</td> + <td>[% IF update.user.belongs_to_body( update.problem.bodies_str ) %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]</td> <td>[% update.cobrand %]<br>[% update.cobrand_data | html %]</td> <td>[% update.text | html %]</td> <td><a href="[% c.uri_for( 'update_edit', update.id ) %]">[% loc('Edit') %]</a></td> - <tr> + </tr> [% END -%] </table> diff --git a/templates/web/default/admin/problem_row.html b/templates/web/default/admin/problem_row.html index 5aa8bbfee..1533f8dd2 100644 --- a/templates/web/default/admin/problem_row.html +++ b/templates/web/default/admin/problem_row.html @@ -10,10 +10,12 @@ <td>[% PROCESS value_or_nbsp value=problem.title %]</td> <td>[% PROCESS value_or_nbsp value=problem.name %]</td> <td>[% PROCESS value_or_nbsp value=problem.user.email %]</td> - <td>[%- IF edit_council_contacts -%] - <a href="[% c.uri_for('council_contacts', problem.council ) %]">[% PROCESS value_or_nbsp value=problem.council %]</a> + <td>[%- IF edit_body_contacts -%] + [% FOR body IN problem.bodies.values %] + <a href="[% c.uri_for('body', body.id ) %]">[% PROCESS value_or_nbsp value=body.name %]</a> + [% END %] [%- ELSE -%] - [%- PROCESS value_or_nbsp value=problem.council -%] + [%- PROCESS value_or_nbsp value=problem.bodies_str -%] [%- END -%]</td> <td>[% PROCESS value_or_nbsp value=problem.category %]</td> <td>[% IF problem.anonymous %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]</td> diff --git a/templates/web/default/admin/report_blocks.html b/templates/web/default/admin/report_blocks.html index f08529ce7..bb9f34cb9 100644 --- a/templates/web/default/admin/report_blocks.html +++ b/templates/web/default/admin/report_blocks.html @@ -15,3 +15,10 @@ [% BLOCK flag_button -%] [% IF user.flagged || user_flagged %]<input type="submit" name="removeuserflag" value="[% loc('Remove flag') %]">[% ELSE %]<input type="submit" name="flaguser" value="[% loc('Flag user') %]" />[% END %] [%- END %] + +[%# note: date format here (i.e., dd.mm.YYYY) currently used by Zurich %] +[% BLOCK format_date -%] + [%- IF this_date %] + [% this_date.strftime('%d.%m.%Y') %] + [% ELSE %][% no_time || ' ' %][% END %][% no_time = '' %] +[%- END %] diff --git a/templates/web/default/admin/report_edit.html b/templates/web/default/admin/report_edit.html index ea98a9be9..cd5072d00 100644 --- a/templates/web/default/admin/report_edit.html +++ b/templates/web/default/admin/report_edit.html @@ -11,19 +11,27 @@ [%- cobrand_data = c.data_for_generic_problem IF !problem.cobrand %] <li><a href="[% c.uri_for_email( '/report', problem.id, cobrand_data ) %]">[% loc('View report on site' )%]</a></li> <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><br><textarea name='detail' id='detail' cols=60 rows=10>[% problem.detail | html %]</textarea></li> -<li>[% loc('Co-ordinates:') %] [% problem.latitude %], [% problem.longitude %] ( [% loc('originally entered') %] [% problem.postcode | html %] , [% IF problem.used_map %][% loc('used map') %][% ELSE %][% loc("didn't use map") %][% END %])</li> -<li>[% loc('For council(s):') %] [% IF problem.council %][% problem.council %][% ELSE %]<em>[% loc('None' ) %]</em>[% END %] ([% loc('other areas:') %] [% problem.areas | remove('^,') | remove( ',$' ) %])</li> -<li><label for="state">[% loc('State:') %]</label> <select name="state" id="state"> +<li><label for='detail'>[% loc('Details:') %]</label> +<textarea name='detail' id='detail' cols=60 rows=10>[% problem.detail | html %]</textarea></li> + +<li>[% loc('Co-ordinates:') %] [% problem.latitude %], [% problem.longitude %] +( [% + SET postcode_safe = problem.postcode | html; + tprintf( loc('originally entered: “%s”'), postcode_safe ) +%], +[% IF problem.used_map %][% loc('used map') %][% ELSE %][% loc("didn't use map") %][% END %])</li> + +<li>[% loc('For council(s):') %] [% IF problem.bodies_str %][% problem.bodies_str %][% ELSE %]<em>[% loc('None' ) %]</em>[% END %] ([% loc('other areas:') %] [% problem.areas | remove('^,') | remove( ',$' ) %])</li> +<li><label class="inline" for="state">[% loc('State:') %]</label> <select name="state" id="state"> [% FOREACH state IN [ ['confirmed', loc('Open')], ['investigating', loc('Investigating')], ['planned', loc('Planned')], ['in progress', - loc('In Progress')], ['closed', loc('Closed')], ['fixed', loc('Fixed')], ['fixed - user', + loc('In progress')], ['closed', loc('Closed')], ['fixed', loc('Fixed')], ['fixed - user', loc('Fixed - User')], ['fixed - council', loc('Fixed - Council')], ['hidden', loc('Hidden')], ['partial', loc('Partial')],['unconfirmed',loc('Unconfirmed')] ] %] <option [% 'selected ' IF state.0 == problem.state %] value="[% state.0 %]">[% state.1 %]</option> [% END %] </select></li> <li>[% loc('Category:') %] [% problem.category | html %] </li> -<li><label for="anonymous">[% loc('Anonymous:') %]</label> <select name="anonymous" id="anonymous"> +<li><label class="inline" for="anonymous">[% loc('Anonymous:') %]</label> <select name="anonymous" id="anonymous"> <option [% 'selected ' IF problem.anonymous %]value="1">[% loc('Yes') %]</option> <option [% 'selected ' IF !problem.anonymous %]value="0">[% loc('No') %]</option> </select></li> @@ -39,19 +47,19 @@ <li>[% loc('Cobrand data:') %] [% problem.cobrand_data %]</li> <li>[% loc('Extra data:') %] [% problem.extra ? 'Yes' : 'No' %]</li> <li>[% loc('Going to send questionnaire?') %] [% IF problem.send_questionnaire %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]</li> -<li><label for="flagged">[% loc('Flagged:') %]</label> <input type="checkbox" name="flagged"[% ' checked' IF problem.flagged %]></li> -<li><label for="non_public">[% loc('Private') %]:</label> <input type="checkbox" name="non_public"[% ' checked' IF problem.non_public %]></li> +<li><label class="inline" for="flagged">[% loc('Flagged:') %]</label> <input type="checkbox" name="flagged"[% ' checked' IF problem.flagged %]></li> +<li><label class="inline" for="non_public">[% loc('Private') %]:</label> <input type="checkbox" name="non_public"[% ' checked' IF problem.non_public %]></li> [% IF problem.photo %] [% photo = problem.get_photo_params %] <li><img alt="" height="[% photo.height %]" width="[% photo.width %]" src="[% c.cobrand.base_url %][% photo.url %]"> <br> -[% IF rotated %]Photo may be cached. View image directly to check<br>[% END %] -<input type="submit" name="rotate_photo" value="Rotate Left" /> -<input type="submit" name="rotate_photo" value="Rotate Right" /> +[% IF rotated %]Photo may be cached for a while.<br>[% END %] +<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="remove_photo" name="remove_photo" value="1"> -<label for="remove_photo">[% loc("Remove photo (can't be undone!)") %]</label></li> +<label class="inline" for="remove_photo">[% loc("Remove photo (can't be undone!)") %]</label></li> [% END %] </ul> <input type="submit" name="Submit changes" value="[% loc('Submit changes') %]" ></form> diff --git a/templates/web/default/admin/search_reports.html b/templates/web/default/admin/reports.html index 9702c16a7..600f2b436 100644 --- a/templates/web/default/admin/search_reports.html +++ b/templates/web/default/admin/reports.html @@ -1,8 +1,8 @@ [% INCLUDE 'admin/header.html' title=loc('Search Reports') %] [% PROCESS 'admin/report_blocks.html' %] -<form method="get" action="[% c.uri_for('search_reports') %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> - <label for="search">[% loc('Search:') %]</label> <input type="text" name="search" size="30" id="search"> +<form method="get" action="[% c.uri_for('reports') %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> + <p><label for="search">[% loc('Search:') %]</label> <input type="text" name="search" size="30" id="search"> </form> @@ -13,7 +13,7 @@ <th>[% loc('Title') %]</th> <th>[% loc('Name') %]</th> <th>[% loc('Email') %]</th> - <th>[% loc('Council') %]</th> + <th>[% loc('Body') %]</th> <th>[% loc('Category') %]</th> <th>[% loc('Anonymous') %]</th> <th>[% loc('Cobrand') %]</th> diff --git a/templates/web/default/admin/stats.html b/templates/web/default/admin/stats.html index 234600837..bb42d5b7d 100644 --- a/templates/web/default/admin/stats.html +++ b/templates/web/default/admin/stats.html @@ -81,10 +81,10 @@ </p> <p> - [% loc('Council:') %] <select id='council' name='council'> + [% loc('Council:') %] <select id='body' name='body'> <option value=''>[% loc('No council') %]</option> - [% FOR council IN council_ids %] - <option value="[% council %]"[% ' selected' IF council == selected_council %]>[% council_details.$council.name %]</option> + [% FOR body IN bodies %] + <option value="[% body.id %]"[% ' selected' IF body.id == selected_body %]>[% body.name %]</option> [% END %] </select> </p> diff --git a/templates/web/default/admin/timeline.html b/templates/web/default/admin/timeline.html index 95120e48c..4058f7f06 100644 --- a/templates/web/default/admin/timeline.html +++ b/templates/web/default/admin/timeline.html @@ -1,6 +1,4 @@ [% INCLUDE 'admin/header.html' title=loc('Timeline') %] -[%- USE f = DateTime::Format('DateTime::Format::Strptime', { pattern => "%A, %e %B %Y" }) %] -[%- USE alert_format = DateTime::Format('DateTime::Format::Strptime', { pattern => "%H:%M:%S %e %B %Y" }) %] [%- BLOCK problem_name %] [%- tprintf(loc('by %s'), problem.name) | html %] <[% problem.user.email | html %]>, '[% problem.title | html %]' @@ -8,7 +6,7 @@ [%- date = '' %] [% FOREACH moment IN time.keys.sort.reverse %] - [%- curdate = f.format(time.$moment.0.date) -%] + [%- curdate = time.$moment.0.date.strftime('%A, %e %B %Y') -%] [%- IF date != curdate %] [% '</dl>' IF date %] <h2>[% curdate %]</h2> @@ -25,7 +23,7 @@ [% CASE 'problemConfirmed' %] [%- tprintf( loc('Problem %s confirmed'), '<a href="' _ c.uri_for_email( '/report', item.obj.id, c.cobrand_data ) _ '">' _ item.obj.id _ '</a>') %]; [% PROCESS problem_name problem=item.obj -%] [% CASE 'problemSent' %] - [% tprintf(loc("Problem %s sent to council %s"), '<a href="' _ c.uri_for_email( '/report', item.obj.id, c.cobrand_data ) _ '">' _ item.obj.id _ '</a>', item.obj.council ) %] + [% tprintf(loc("Problem %s sent to council %s"), '<a href="' _ c.uri_for_email( '/report', item.obj.id, c.cobrand_data ) _ '">' _ item.obj.id _ '</a>', item.obj.bodies_str ) %] [% CASE 'quesSent' %] [% tprintf(loc("Questionnaire %d sent for problem %d"), item.obj.id, item.obj.problem_id ) %] [% CASE 'quesAnswered' %] @@ -36,7 +34,7 @@ [% CASE 'alertSub' %] [% tprintf(loc("Alert %d created for %s, type %s, parameters %s / %s"), item.obj.id, item.obj.user.email, item.obj.alert_type.ref, item.obj.parameter, item.obj.parameter2) | html %] [% CASE 'alertDel' %] - [% tprintf(loc("Alert %d disabled (created %s)"), item.obj.id, alert_format.format( item.obj.whensubscribed_local ) ) %] + [% tprintf(loc("Alert %d disabled (created %s)"), item.obj.id, item.obj.whensubscribed_local.strftime('%H:%M:%S %e %B %Y') ) %] [%- END %] <br /> [%- END %] diff --git a/templates/web/default/admin/update_edit.html b/templates/web/default/admin/update_edit.html index 1d5ee80b4..26d262f73 100644 --- a/templates/web/default/admin/update_edit.html +++ b/templates/web/default/admin/update_edit.html @@ -10,7 +10,10 @@ [%- cobrand_data = update.cobrand_data %] [%- cobrand_data = c.data_for_generic_update IF !update.cobrand %] <li><a href="[% c.uri_for_email( '/report', update.problem_id, cobrand_data ) %]#update_[% update.id %]">[% loc('View report on site' )%]</a></li> -<li><label for='detail'>[% loc('Text:') %]</label><br><textarea name='text' id='text' cols=60 rows=10>[% update.text | html %]</textarea></li> + +<li><label for='detail'>[% loc('Text:') %]</label> +<textarea name='text' id='text' cols=60 rows=10>[% update.text | html %]</textarea></li> + <li><label for="anonymous">[% loc('Anonymous:') %]</label> <select name="anonymous" id="anonymous"> <option [% 'selected ' IF update.anonymous %]value="1">[% loc('Yes') %]</option> <option [% 'selected ' IF !update.anonymous %]value="0">[% loc('No') %]</option> @@ -22,8 +25,8 @@ </select></li> <li>[% loc('Name:') %] <input type='text' name='name' id='name' value='[% update.name | html %]'></li> <li>[% loc('Email:') %] <input type='text' id='email' name='email' value='[% update.user.email | html %]'> -[%- IF update.user.from_council && update.user.from_council == update.problem.council %] -[% ' (' _ tprintf(loc('user is from same council as problem - %d'), update.user.from_council ) _')' %] +[%- IF update.user.from_body && update.user.from_body.id == update.problem.bodies_str %] +[% ' (' _ tprintf(loc('user is from same council as problem - %d'), update.user.from_body.id ) _')' %] [% END -%] [%- IF update.user.id == update.problem.user.id %] [% ' (' _ loc('user is problem owner') _')' %] diff --git a/templates/web/default/admin/user-form.html b/templates/web/default/admin/user-form.html new file mode 100644 index 000000000..eec54d447 --- /dev/null +++ b/templates/web/default/admin/user-form.html @@ -0,0 +1,18 @@ +<form method="post" action="[% c.uri_for( 'user_edit', user.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> + <li>[% loc('Name:') %] <input type='text' name='name' id='name' value='[% user.name | html %]'></li> + <li>[% loc('Email:') %] <input type='text' id='email' name='email' value='[% user.email | html %]'></li> + <li>[% loc('Body:') %] <select id='body' name='body'> + <option value=''>[% loc('No body') %]</option> + [% FOR body IN bodies %] + <option value="[% body.id %]"[% ' selected' IF body.id == user.from_body.id %]>[% body.name %]</option> + [% END %] + </select> + [% IF c.cobrand.moniker != 'zurich' %] + <li>[% loc('Flagged:') %] <input type="checkbox" id="flagged" name="flagged"[% user.flagged ? ' checked' : '' %]></li> + [% END %] + </ul> + <input type="submit" name="Submit changes" value="[% loc('Submit changes') %]" > +</form> diff --git a/templates/web/default/admin/user_edit.html b/templates/web/default/admin/user_edit.html index a03a4b734..d69c873a3 100644 --- a/templates/web/default/admin/user_edit.html +++ b/templates/web/default/admin/user_edit.html @@ -3,20 +3,6 @@ [% status_message %] -<form method="post" action="[% c.uri_for( 'user_edit', user.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> -<li>[% loc('Name:') %] <input type='text' name='name' id='name' value='[% user.name | html %]'></li> -<li>[% loc('Email:') %] <input type='text' id='email' name='email' value='[% user.email | html %]'></li> -<li>[% loc('Council:') %] <select id='council' name='council'> - <option value=''>[% loc('No council') %]</option> -[% FOR council IN council_ids %] - <option value="[% council %]"[% ' selected' IF council == user.from_council %]>[% council_details.$council.name %]</option> -[% END %] -</select> -<li>[% loc('Flagged:') %] <input type="checkbox" id="flagged" name="flagged"[% user.flagged ? ' checked' : '' %]></li> -</ul> -<input type="submit" name="Submit changes" value="[% loc('Submit changes') %]" ></form> +[% INCLUDE 'admin/user-form.html' %] [% INCLUDE 'admin/footer.html' %] diff --git a/templates/web/default/admin/search_users.html b/templates/web/default/admin/users.html index 0b4ba88e7..de0b74746 100644 --- a/templates/web/default/admin/search_users.html +++ b/templates/web/default/admin/users.html @@ -1,31 +1,40 @@ [% INCLUDE 'admin/header.html' title=loc('Search Users') %] [% PROCESS 'admin/report_blocks.html' %] -<form method="get" action="[% c.uri_for('search_users') %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> - <label for="search">[% loc('Search:') %]</label> <input type="text" name="search" size="30" id="search"> +<form method="get" action="[% c.uri_for('users') %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> + <p><label for="search">[% loc('Search:') %]</label> <input type="text" name="search" size="30" id="search" value="[% searched | html %]"> </form> - [% IF searched %] + <table cellspacing="0" cellpadding="2" border="1"> <tr> <th>[% loc('Name') %]</th> <th>[% loc('Email') %]</th> - <th>[% loc('Council') %]</th> + <th>[% loc('Body') %]</th> + [% IF c.cobrand.moniker != 'zurich' %] <th>[% loc('Flagged') %]</th> + [% END %] <th>*</th> </tr> [%- FOREACH user IN users %] <tr> <td>[% PROCESS value_or_nbsp value=user.name %]</td> - <td><a href="[% c.uri_for( 'search_reports', search => user.email ) %]">[% PROCESS value_or_nbsp value=user.email %]</a></td> - <td>[% PROCESS value_or_nbsp value=user.from_council %]</td> + <td><a href="[% c.uri_for( 'reports', search => user.email ) %]">[% PROCESS value_or_nbsp value=user.email %]</a></td> + <td>[% PROCESS value_or_nbsp value=user.from_body.name %]</td> + [% IF c.cobrand.moniker != 'zurich' %] <td>[% user.flagged == 2 ? loc('(Email in abuse table)') : user.flagged ? loc('Yes') : ' ' %]</td> + [% END %] <td>[% IF user.id %]<a href="[% c.uri_for( 'user_edit', user.id ) %]">[% loc('Edit') %]</a>[% END %]</td> </tr> [%- END -%] </table> +[% ELSE %] + +<h2>[% loc('Add user') %]</h2> +[% INCLUDE 'admin/user-form.html' %] + [% END %] [% INCLUDE 'admin/footer.html' %] diff --git a/templates/web/default/around/around_map_list_items.html b/templates/web/default/around/around_map_list_items.html index f598a9ba9..655d8bd25 100644 --- a/templates/web/default/around/around_map_list_items.html +++ b/templates/web/default/around/around_map_list_items.html @@ -5,7 +5,7 @@ <li> <a href="[% c.uri_for('/report', p.problem.id ) %]">[% p.problem.title | html %]</a> - <small>[% prettify_epoch( p.problem.confirmed_local.epoch, 1 ) %], [% dist %]km</small> + <small>[% prettify_dt( p.problem.confirmed_local, 1 ) %], [% dist %]km</small> [% IF p.problem.is_fixed %] <small>[% loc('(fixed)') %]</small> [% ELSIF p.problem.is_closed %] diff --git a/templates/web/default/around/display_location.html b/templates/web/default/around/display_location.html index a9f18b9bd..c8c6935de 100755 --- a/templates/web/default/around/display_location.html +++ b/templates/web/default/around/display_location.html @@ -35,7 +35,7 @@ bodyclass => 'mappage', robots => 'noindex,nofollow'; - allow_creation = !c.cobrand.only_authed_can_create || (c.user && c.user.from_council); + allow_creation = !c.cobrand.only_authed_can_create || (c.user && c.user.from_body); %] [% IF allow_creation %] @@ -53,6 +53,9 @@ [% IF c.cobrand.moniker != 'emptyhomes' %] <p id='sub_map_links'> + [% IF c.cobrand.moniker == 'zurich' %] + <a class="hidden-nojs" id="map_layer_toggle" href="">Stadtplan</a> + [% END %] [% IF c.req.params.no_pins %] <a id='hide_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => 0 } ) %]'>[% loc('Show pins') %]</a> [% ELSE %] diff --git a/templates/web/default/around/on_map_list_items.html b/templates/web/default/around/on_map_list_items.html index e0f8eea08..1022c88a0 100644 --- a/templates/web/default/around/on_map_list_items.html +++ b/templates/web/default/around/on_map_list_items.html @@ -2,7 +2,7 @@ [% FOREACH p IN on_map %] <li> <a href="[% c.uri_for('/report', p.id ) %]">[% p.title | html %]</a> - <small>[% prettify_epoch( p.confirmed_local.epoch, 1 ) %]</small> + <small>[% prettify_dt( p.confirmed_local, 1 ) %]</small> [% IF p.is_fixed %] <small>[% loc('(fixed)') %]</small> [% ELSIF p.is_closed %] diff --git a/templates/web/default/around/postcode_form.html b/templates/web/default/around/postcode_form.html index 935995cfe..f58d7285d 100644 --- a/templates/web/default/around/postcode_form.html +++ b/templates/web/default/around/postcode_form.html @@ -5,7 +5,7 @@ <form action="[% c.uri_for('/around') %]" method="get" name="postcodeForm" id="postcodeForm"> <label for="pc">[% question %]:</label> <span><input type="text" name="pc" value="[% pc | html %]" id="pc" size="10" maxlength="200"> - <input type="submit" value="[% loc('Go') %]" id="submit"> + <input type="submit" value="[% loc('Go') %]" id="sub"> </span> [% IF partial_token %] <input type="hidden" name="partial" value="[% partial_token.token %]"> diff --git a/templates/web/default/auth/sign_out.html b/templates/web/default/auth/sign_out.html index 23d39aa2d..571e13f9f 100644 --- a/templates/web/default/auth/sign_out.html +++ b/templates/web/default/auth/sign_out.html @@ -2,7 +2,6 @@ <h1>[% loc('You have been signed out') %]</h1> -<p>Please feel free to <a href="[% c.uri_for('/auth') %]">sign in again</a>, or -go back to the <a href="/">FixMyStreet front page</a>.</p> +<p>[% tprintf( loc('Please feel free to <a href="%s">sign in again</a>, or go back to the <a href="/">front page</a>.'), c.uri_for('/auth') ) %]</p> [% INCLUDE 'footer.html' %] diff --git a/templates/web/default/auth/token.html b/templates/web/default/auth/token.html index 0f44d1074..5fa69ab21 100644 --- a/templates/web/default/auth/token.html +++ b/templates/web/default/auth/token.html @@ -18,7 +18,9 @@ <p>[% loc("We have sent you an email containing a link to confirm your account.") %]</p> +[% IF c.cobrand.moniker != 'zurich' %] <p>[% loc("The confirmation email <strong>may</strong> take a few minutes to arrive — <em>please</em> be patient.") %]</p> +[% END %] <p>[% loc("If you use web-based email or have 'junk mail' filters, you may wish to check your bulk/spam mail folders: sometimes, our messages are marked that way.") %]</p> diff --git a/templates/web/default/common_header_tags.html b/templates/web/default/common_header_tags.html index 4839249ac..346d53693 100644 --- a/templates/web/default/common_header_tags.html +++ b/templates/web/default/common_header_tags.html @@ -2,7 +2,7 @@ <meta http-equiv="content-type" content="text/html; charset=utf-8"> <script type="text/javascript" src="/js/validation_rules.js?[% Math.int( date.now / 3600 ) %]"></script> -<script type="text/javascript" src="/js/validation_strings.[% lang_code %].js?[% Math.int( date.now / 3600 ) %]"></script> +<script type="text/javascript" src="/js/translation_strings.[% lang_code %].js?[% Math.int( date.now / 3600 ) %]"></script> <script type="text/javascript" src="/jslib/jquery-1.7.2.min.js"></script> <script src="[% version('/js/jquery.validate.min.js') %]" type="text/javascript" charset="utf-8"></script> diff --git a/templates/web/default/contact/index.html b/templates/web/default/contact/index.html index a644ed952..cb87362ba 100644 --- a/templates/web/default/contact/index.html +++ b/templates/web/default/contact/index.html @@ -18,9 +18,9 @@ <blockquote> <p> [% IF update.anonymous %] - [% tprintf( loc('Update below added anonymously at %s'), prettify_epoch( update.confirmed_local.epoch ) ) %] + [% tprintf( loc('Update below added anonymously at %s'), prettify_dt( update.confirmed_local ) ) %] [% ELSE %] - [% tprintf( loc('Update below added by %s at %s'), update.name, prettify_epoch( update.confirmed_local.epoch ) ) | html %] + [% tprintf( loc('Update below added by %s at %s'), update.name, prettify_dt( update.confirmed_local ) ) | html %] [% END %] </p> @@ -42,9 +42,9 @@ <p> [% IF problem.anonymous %] - [% tprintf( loc('Reported anonymously at %s'), prettify_epoch( problem.confirmed_local.epoch ) ) %] + [% tprintf( loc('Reported anonymously at %s'), prettify_dt( problem.confirmed_local ) ) %] [% ELSE %] - [% tprintf( loc('Reported by %s at %s'), problem.user.name, prettify_epoch( problem.confirmed_local.epoch ) ) | html %] + [% tprintf( loc('Reported by %s at %s'), problem.user.name, prettify_dt( problem.confirmed_local ) ) | html %] [% END %] </p> diff --git a/templates/web/default/email_sent.html b/templates/web/default/email_sent.html index fd947022a..9afddf2bd 100644 --- a/templates/web/default/email_sent.html +++ b/templates/web/default/email_sent.html @@ -1,30 +1,34 @@ -[% INCLUDE 'header.html', title => loc('Create a report') %] - -[% - messages = { - problem => { - action => loc('your problem will not be posted'), - worry => loc("we'll hang on to your problem report while you're checking your email."), - }, - update => { - action => loc('your update will not be posted'), - worry => loc("we'll hang on to your update while you're checking your email."), - }, - alert => { - action => loc('your alert will not be activated'), - worry => loc("we'll hang on to your alert while you're checking your email."), - }, - } -%] +[% INCLUDE 'header.html', title = loc('Create a report') %] <h1>[% loc("Nearly Done! Now check your email...") %]</h1> -<p>[% loc("The confirmation email <strong>may</strong> take a few minutes to arrive — <em>please</em> be patient.") %]</p> +[% IF c.cobrand.moniker != 'zurich' %] + <p>[% loc("The confirmation email <strong>may</strong> take a few minutes to arrive — <em>please</em> be patient.") %]</p> +[% END %] <p>[% loc("If you use web-based email or have 'junk mail' filters, you may wish to check your bulk/spam mail folders: sometimes, our messages are marked that way.") %]</p> -<p>[% tprintf( loc("You must now click the link in the email we've just sent you — if you do not, %s."), messages.$email_type.action ) %].</p> +[% IF c.cobrand.moniker != 'zurich' %] + <p> + [% loc("You must now click the link in the email we've just sent you.") %] + [% IF email_type == 'problem' %] + [% loc("If you do not, your problem will not be posted.") %] + [% ELSIF email_type == 'update' %] + [% loc("If you do not, your update will not be posted.") %] + [% ELSIF email_type == 'alert' %] + [% loc("If you do not, your alert will not be activated.") %] + [% END %] + </p> -<p>[% tprintf( loc("(Don't worry — %s)"), messages.$email_type.worry ) %]</p> + <p> + [% IF email_type == 'problem' %] + [% loc("(Don't worry — we'll hang on to your problem report while you're checking your email.)") %] + [% ELSIF email_type == 'update' %] + [% loc("(Don't worry — we'll hang on to your update while you're checking your email.)") %] + [% ELSIF email_type == 'alert' %] + [% loc("(Don't worry — we'll hang on to your alert while you're checking your email.)") %] + [% END %] + </p> +[% END %] [% INCLUDE 'footer.html' %] diff --git a/templates/web/default/front/stats.html b/templates/web/default/front/stats.html index fd1f253bc..eae66018b 100644 --- a/templates/web/default/front/stats.html +++ b/templates/web/default/front/stats.html @@ -38,6 +38,8 @@ <div>[% tprintf( new_text, stats.new ) | comma %]</div> [% IF c.cobrand.moniker != 'emptyhomes' %] <div>[% tprintf( fixed_text, stats.fixed ) | comma %]</div> + [% IF c.cobrand.moniker != 'zurich' %] <div>[% tprintf( updates_text, stats.updates ) | comma %]</div> [% END %] + [% END %] </div> diff --git a/templates/web/default/index.html b/templates/web/default/index.html index 78e4fbba6..beaeefb20 100644 --- a/templates/web/default/index.html +++ b/templates/web/default/index.html @@ -53,7 +53,7 @@ [% FOREACH p IN probs %] <li> <a href="/report/[% p.id %]">[% p.title | html %]</a> - <small>[% prettify_epoch( p.confirmed_local.epoch, 1 ) %]</small> + <small>[% prettify_dt( p.confirmed_local, 1 ) %]</small> </li> [% END %] </ul> diff --git a/templates/web/default/js/validation_strings.html b/templates/web/default/js/translation_strings.html index c33bd2b81..a0cfc02c9 100644 --- a/templates/web/default/js/validation_strings.html +++ b/templates/web/default/js/translation_strings.html @@ -1,4 +1,4 @@ - validation_strings = { + translation_strings = { update: '[% loc('Please enter a message') | replace("'", "\\'") %]', title: '[% loc('Please enter a subject') | replace("'", "\\'") %]', detail: '[% loc('Please enter some details') | replace("'", "\\'") %]', @@ -19,5 +19,22 @@ first_name: '[% loc('Please enter your first name') | replace("'", "\\'") %]', last_name: '[% loc('Please enter your second name') | replace("'", "\\'") %]', geolocate: '[% loc('or locate me automatically') | replace("'", "\\'") %]', + right_place: '[% loc('Right place?') | replace("'", "\\'") %]', + try_again: '[% loc('Try again') | replace("'", "\\'") %]', + place_pin_on_map: '[% loc('Place pin on map') | replace("'", "\\'") %]', + home: '[% loc('Home') | replace("'", "\\'") %]', + back: '[% loc('Back') | replace("'", "\\'") %]', + how_to_send: '[% loc('How to send successful reports') | replace("'", "\\'") %]', + more_details: '[% loc('Details') | replace("'", "\\'") %]', + + geolocation_declined: '[% loc('You declined; please fill in the box above') | replace("'", "\\'") %]', + geolocation_no_position: '[% loc('Could not look up location') | replace("'", "\\'") %]', + geolocation_no_result: '[% loc('No result returned') | replace("'", "\\'") %]', + geolocation_unknown: '[% loc('Unknown error') | replace("'", "\\'") %]', + + reporting_a_problem: '[% loc('Reporting a problem') | replace("'", "\\'") %]', + ok: '[% loc('OK') | replace("'", "\\'") %]', + map: '[% loc('MAP') | replace("'", "\\'") %]', + report_problem_heading: '[% loc('Click map to report a problem') | replace("'", "\\'") %]' }; diff --git a/templates/web/default/my/my.html b/templates/web/default/my/my.html index 3d418cda7..cb9b0dd99 100644 --- a/templates/web/default/my/my.html +++ b/templates/web/default/my/my.html @@ -53,7 +53,7 @@ END %] <li>“[% u.text | html %]” – <a href="[% c.uri_for( '/report', u.problem_id ) %]#update_[% u.id %]">[% u.problem.title | html %]</a>. <em class="council_sent_info"> - [% tprintf( loc("Added %s"), prettify_epoch( u.confirmed_local.epoch, 'date' ) ) %] + [% tprintf( loc("Added %s"), prettify_dt( u.confirmed_local, 'date' ) ) %] </em> </li> [% "</ul>" IF loop.last %] @@ -69,9 +69,9 @@ END %] <li><a href="[% c.uri_for( '/report', p.id ) %]">[% p.title | html %]</a> <em class="council_sent_info"> – [% IF p.whensent %] - [% tprintf( loc("Reported %s, to %s"), prettify_epoch( p.confirmed_local.epoch, 'date' ), p.body(c) ) %] + [% tprintf( loc("Reported %s, to %s"), prettify_dt( p.confirmed_local, 'date' ), p.body(c) ) %] [% ELSE %] - [% tprintf( loc("Reported %s"), prettify_epoch( p.confirmed_local.epoch, 'date' ) ) %] + [% tprintf( loc("Reported %s"), prettify_dt( p.confirmed_local, 'date' ) ) %] [% END %] </em> </li> diff --git a/templates/web/default/questionnaire/completed.html b/templates/web/default/questionnaire/completed.html index 52c20652c..4d848a63c 100644 --- a/templates/web/default/questionnaire/completed.html +++ b/templates/web/default/questionnaire/completed.html @@ -22,7 +22,7 @@ site and leave an update.</p>') %] [% END %] [% IF advert_outcome %] - [% display_crosssell_advert( problem.user.email, problem.name, 'council', problem.council ) %] + [% display_crosssell_advert( problem.user.email, problem.name, 'council', problem.bodies_str ) %] [% END %] [% INCLUDE 'footer.html' %] diff --git a/templates/web/default/report/_main.html b/templates/web/default/report/_main.html index 6b7c1d271..789f8e43e 100644 --- a/templates/web/default/report/_main.html +++ b/templates/web/default/report/_main.html @@ -4,7 +4,7 @@ <p><em> [% problem.meta_line(c) | html %] [%- IF !problem.used_map AND c.cobrand.moniker != 'emptyhomes' %]; <strong>[% loc('there is no pin shown as the user did not use the map') %]</strong>[% END %] - [% IF problem.council %] + [% IF problem.bodies_str %] [% IF problem.whensent || problem.can_display_external_id %] <small class="council_sent_info"><br> [% problem.processed_summary_string(c) %] diff --git a/templates/web/default/report/_support.html b/templates/web/default/report/_support.html index e8b958940..f4bdb8c20 100644 --- a/templates/web/default/report/_support.html +++ b/templates/web/default/report/_support.html @@ -1,7 +1,7 @@ [% IF c.cobrand.can_support_problems %] <p id="supporter"><small> [% IF !problem.interest_count %][% text=loc('No supporters') %][% ELSIF problem.interest_count == 1 %][% text = loc('1 supporter') %][% ELSE %][% text = tprintf( loc('%d supporters' ), problem.interest_count ) %][% END %] - [% IF c.user && c.user.from_council %]<form action="[% c.uri_for( '/report/support' ) %]"> + [% IF c.user && c.user.from_body %]<form action="[% c.uri_for( '/report/support' ) %]"> [% text %] <input type="hidden" name="id" value="[% problem.id %]"><input type="submit" class="green-btn" value="Add support"> </form> [% ELSE %] diff --git a/templates/web/default/report/new/category.html b/templates/web/default/report/new/category.html index 49be4d25d..a701e0851 100644 --- a/templates/web/default/report/new/category.html +++ b/templates/web/default/report/new/category.html @@ -7,7 +7,8 @@ <select name='category' id='form_category'[% ' onchange="form_category_onchange()"' IF category_extras.size %]> [% FOREACH cat_op IN category_options %] [% cat_op_lc = cat_op | lower %] - <option value='[% cat_op | html %]'[% ' selected' IF report.category == cat_op || category == cat_op_lc %]>[% cat_op | html %]</option> + <option value='[% cat_op | html %]'[% ' selected' IF report.category == cat_op || category == cat_op_lc -%] + >[% IF loop.first %][% cat_op %][% ELSE %][% cat_op | html %][% END %]</option> [% END %] </select> [% END %] diff --git a/templates/web/default/report/new/councils_text.html b/templates/web/default/report/new/councils_text.html index 1da5746c1..f526beb28 100644 --- a/templates/web/default/report/new/councils_text.html +++ b/templates/web/default/report/new/councils_text.html @@ -1,7 +1,7 @@ [% FILTER collapse %] -[% IF area_ids_to_list.size == 0 %] +[% IF bodies_to_list.size == 0 %] [% PROCESS 'report/new/councils_text_none.html' %] -[% ELSIF area_ids_to_list.size == all_councils.size %] +[% ELSIF bodies_to_list.size == bodies.size %] [% PROCESS 'report/new/councils_text_all.html' %] [% ELSE %] [% PROCESS 'report/new/councils_text_some.html' %] diff --git a/templates/web/default/report/new/councils_text_all.html b/templates/web/default/report/new/councils_text_all.html index af5d822b0..e9a008e90 100644 --- a/templates/web/default/report/new/councils_text_all.html +++ b/templates/web/default/report/new/councils_text_all.html @@ -1,23 +1,24 @@ +[%# XXX The below type checking is assuming that a body ID can be used to look up a mapit type. %] <p> -[% IF area_ids_to_list.0 != 2489 && area_ids_to_list.0 != 2482 && all_councils.${area_ids_to_list.0}.type == 'LBO' %] +[% IF bodies_to_list.0 != 2489 && bodies_to_list.0 != 2482 && all_areas.${bodies_to_list.0}.type == 'LBO' %] [% tprintf( loc('All the information you provide here will be sent to <strong>%s</strong> or a relevant local body such as <strong>TfL</strong>, via the London Report-It system.'), - all_council_names.join( '</strong>' _ loc(' or ') _ '<strong>' ) + all_body_names.join( '</strong>' _ loc(' or ') _ '<strong>' ) ); %] -[% ELSIF all_councils.${area_ids_to_list.0}.type == 'LGD' %] +[% ELSIF all_areas.${bodies_to_list.0}.type == 'LGD' %] [% tprintf( loc('All the information you provide here will be sent to <strong>%s</strong> or <strong>Roads Service</strong>.'), - all_council_names.join( '</strong>' _ loc(' or ') _ '<strong>' ) + all_body_names.join( '</strong>' _ loc(' or ') _ '<strong>' ) ); %] [% ELSE %] [% tprintf( loc('All the information you provide here will be sent to <strong>%s</strong>.'), - all_council_names.join( '</strong>' _ loc(' or ') _ '<strong>' ) + all_body_names.join( '</strong>' _ loc(' or ') _ '<strong>' ) ); %] [% END %] diff --git a/templates/web/default/report/new/councils_text_none.html b/templates/web/default/report/new/councils_text_none.html index 06a4bbe49..3c445b085 100644 --- a/templates/web/default/report/new/councils_text_none.html +++ b/templates/web/default/report/new/councils_text_none.html @@ -1,11 +1,8 @@ - - <p>[% - nget( "We do not yet have details for the council that covers this location.", "We do not yet have details for the councils that cover this location.", - all_councils.size + missing_details_bodies.size || all_areas.size ); %] [% @@ -14,7 +11,7 @@ [% tprintf( loc("You can help us by finding a contact email address for local problems for %s and emailing it to us at <a href='mailto:%s'>%s</a>."), - all_council_names.join( loc(' or ') ), + missing_details_body_names.join( loc(' or ') ) || all_area_names.join( loc(' or ') ), c.cobrand.contact_email, c.cobrand.contact_email ); diff --git a/templates/web/default/report/new/councils_text_some.html b/templates/web/default/report/new/councils_text_some.html index 042e89914..8d4768612 100644 --- a/templates/web/default/report/new/councils_text_some.html +++ b/templates/web/default/report/new/councils_text_some.html @@ -1,9 +1,9 @@ <p> [% loc('All the information you provide here will be sent to') %] -[% FOREACH council_id IN area_ids_to_list %] +[% FOREACH body_id IN bodies_to_list %] [% loc( ' or ') IF ! loop.first %] - <strong>[% all_councils.$council_id.name %]</strong> + <strong>[% bodies.$body_id.name %]</strong> [%- '.' IF loop.last %] [% END %] @@ -14,13 +14,13 @@ nget( "We do <strong>not</strong> yet have details for the other council that covers this location.", "We do <strong>not</strong> yet have details for the other councils that cover this location.", - missing_details_councils.size + missing_details_bodies.size ); %] [% tprintf( loc("You can help us by finding a contact email address for local problems for %s and emailing it to us at <a href='mailto:%s'>%s</a>."), - missing_details_council_names.join( loc(' or ') ), + missing_details_body_names.join( loc(' or ') ), c.cobrand.contact_email, c.cobrand.contact_email ); diff --git a/templates/web/default/report/new/fill_in_details_form.html b/templates/web/default/report/new/fill_in_details_form.html index 0befb344e..5eff4e147 100644 --- a/templates/web/default/report/new/fill_in_details_form.html +++ b/templates/web/default/report/new/fill_in_details_form.html @@ -40,8 +40,8 @@ -[% IF field_errors.council %] - <div class='form-error'>[% field_errors.council %]</div> +[% IF field_errors.bodies %] + <div class='form-error'>[% field_errors.bodies %]</div> [% END %] [% IF field_errors.title %] diff --git a/templates/web/default/report/update-form.html b/templates/web/default/report/update-form.html index d993ce28f..50bc2906c 100644 --- a/templates/web/default/report/update-form.html +++ b/templates/web/default/report/update-form.html @@ -23,7 +23,7 @@ <textarea name="update" id="form_update" rows="7" cols="30" required>[% update.text | html %]</textarea> </div> - [% IF c.user && c.user.belongs_to_council( problem.council ) %] + [% IF c.user && c.user.belongs_to_body( problem.bodies_str ) %] <div class="form-field"> <label for="form_state">[% loc( 'State:' ) %]</label> <select name="state" id="form_state"> diff --git a/templates/web/default/report/updates.html b/templates/web/default/report/updates.html index 09c5d4b54..04a8bec33 100644 --- a/templates/web/default/report/updates.html +++ b/templates/web/default/report/updates.html @@ -7,21 +7,21 @@ [% IF update.whenanswered %] [%# A questionnaire update, currently saying report is still open %] - [% tprintf( loc( 'Still open, via questionnaire, %s' ), prettify_epoch( update.whenanswered_local.epoch ) ) %] + [% tprintf( loc( 'Still open, via questionnaire, %s' ), prettify_dt( update.whenanswered_local ) ) %] [% RETURN %] [% END %] [% IF update.anonymous || update.name == '' %] - [% tprintf( loc( 'Posted anonymously at %s' ), prettify_epoch( update.confirmed_local.epoch ) ) -%] - [%- ELSIF update.user.from_council; + [% tprintf( loc( 'Posted anonymously at %s' ), prettify_dt( update.confirmed_local ) ) -%] + [%- ELSIF update.user.from_body; user_name = update.user.name | html; - council = update.user.council; - IF council == 'Bromley Council'; - council = "$council <img src='/cobrands/bromley/favicon.png' alt=''>"; + body = update.user.body; + IF body == 'Bromley Council'; + body = "$body <img src='/cobrands/bromley/favicon.png' alt=''>"; END %] - [% tprintf( loc( 'Posted by %s (<strong>%s</strong>) at %s' ), user_name, council, prettify_epoch( update.confirmed_local.epoch ) ) -%] + [% tprintf( loc( 'Posted by %s (<strong>%s</strong>) at %s' ), user_name, body, prettify_dt( update.confirmed_local ) ) -%] [%- ELSE %] - [% tprintf( loc( 'Posted by %s at %s' ), update.name, prettify_epoch( update.confirmed_local.epoch ) ) | html -%] + [% tprintf( loc( 'Posted by %s at %s' ), update.name, prettify_dt( update.confirmed_local ) ) | html -%] [%- END -%] [%- update_state = '' %] [%- IF update.mark_fixed %][% update_state = ", " _ loc( 'marked as fixed' ) %][% END %] diff --git a/templates/web/default/reports/_list-entry.html b/templates/web/default/reports/_list-entry.html index 14863c4a1..445a5315f 100755 --- a/templates/web/default/reports/_list-entry.html +++ b/templates/web/default/reports/_list-entry.html @@ -1,6 +1,6 @@ <li><a href="[% c.uri_for('/report/' _ problem.id) %]">[% problem.title | html %]</a> - [% IF problem.councils > 1 %] <small>[% loc('(sent to both)') %]</small> [% END %] + [% IF problem.bodies_str_ids.size > 1 %] <small>[% loc('(sent to both)') %]</small> [% END %] [% IF c.cobrand.moniker != 'emptyhomes' %] - [% IF problem.councils == 0 %] <small>[% loc('(not sent to council)') %]</small> [% END %] + [% IF problem.bodies_str_ids.size == 0 %] <small>[% loc('(not sent to council)') %]</small> [% END %] [% END %] </li> diff --git a/templates/web/default/reports/body.html b/templates/web/default/reports/body.html index 40f2fd1f8..cc0ba1a49 100755 --- a/templates/web/default/reports/body.html +++ b/templates/web/default/reports/body.html @@ -1,9 +1,9 @@ [% IF ward %] - [% name = "$ward.name, $council.name" + [% name = "$ward.name, $body.name" thing = loc('ward') %] [% ELSE %] - [% name = council.name + [% name = body.name thing = loc('council') %] [% END %] @@ -31,13 +31,13 @@ <h1 id="reports_heading"> [% IF ward %] - [% ward.name %]<span>, </span><a href="[% council_url %]">[% council.name %]</a> + [% ward.name %]<span>, </span><a href="[% body_url %]">[% body.name %]</a> [% ELSE %] - [% council.name %] + [% body.name %] [% END %] </h1> -[% IF council.generation_high == 10 AND c.cobrand.country == 'GB' %] +[% IF NOT body.areas.size AND c.cobrand.country == 'GB' %] <p id="unknown" class="alert">This council no longer exists. [% IF council.name.match('Penwith|Kerrier|Carrick|Restormel|Caradon|North Cornwall') %] Its area is now covered by <a href="/reports/Cornwall">Cornwall Council</a>. @@ -82,7 +82,7 @@ <section class="full-width"> [% INCLUDE column - problems = problems.${council.id} + problems = problems.${body.id} %] </section> diff --git a/templates/web/default/reports/index.html b/templates/web/default/reports/index.html index 76c2afcd2..e4b4c3033 100755 --- a/templates/web/default/reports/index.html +++ b/templates/web/default/reports/index.html @@ -22,17 +22,17 @@ </thead> <tbody> -[% FOREACH area IN areas_info_sorted %] +[% FOREACH body IN bodies %] <tr align="center" -[%- IF area.generation_high == 10 %] class="gone" +[%- IF NOT body.areas.size %] class="gone" [%- ELSIF ! (loop.count % 2) %] class="a" [%- END %]> -<td class="title"><a href="[% area.url %]">[% area.name %]</a></td> -<td class="data">[% open.${area.id}.new or 0 %]</td> -<td class="data">[% open.${area.id}.older or 0 %]</td> -<td class="data">[% open.${area.id}.unknown or 0 %]</td> -<td class="data">[% fixed.${area.id}.new or 0 %]</td> -<td class="data">[% fixed.${area.id}.old or 0 %]</td> +<td class="title"><a href="[% body.url(c) %]">[% body.name %]</a></td> +<td class="data">[% open.${body.id}.new or 0 %]</td> +<td class="data">[% open.${body.id}.older or 0 %]</td> +<td class="data">[% open.${body.id}.unknown or 0 %]</td> +<td class="data">[% fixed.${body.id}.new or 0 %]</td> +<td class="data">[% fixed.${body.id}.old or 0 %]</td> </tr> [% TRY %][% PROCESS "reports/_extras.html" %][% CATCH file %][% END %] [% END %] diff --git a/templates/web/default/tokens/confirm_problem.html b/templates/web/default/tokens/confirm_problem.html index b6d82968f..723d515e1 100644 --- a/templates/web/default/tokens/confirm_problem.html +++ b/templates/web/default/tokens/confirm_problem.html @@ -13,13 +13,12 @@ You can <a href="[% c.cobrand.base_url_for_report( problem ) %][% problem.url %] [% ELSE %] [% loc('You have successfully confirmed your problem'); - - IF problem.council; + IF problem.bodies_str; loc(' and <strong>we will now send it to the council</strong>'); - END; - + END; %]. +[% tprintf( - loc( '. You can <a href="%s%s">view the problem on this site</a>.' ), + loc( 'You can <a href="%s%s">view the problem on this site</a>.' ), c.cobrand.base_url_for_report( problem ), problem.url ); diff --git a/templates/web/emptyhomes/report/new/councils_text_all.html b/templates/web/emptyhomes/report/new/councils_text_all.html index a9dae5762..5769e6cd5 100644 --- a/templates/web/emptyhomes/report/new/councils_text_all.html +++ b/templates/web/emptyhomes/report/new/councils_text_all.html @@ -2,7 +2,7 @@ [% tprintf( loc('All the information you provide here will be sent to <strong>%s</strong>. On the site, we will show the subject and details of the problem.'), - all_council_names.join( '</strong>' _ loc(' or ') _ '<strong>' ) + all_body_names.join( '</strong>' _ loc(' or ') _ '<strong>' ) ); %] </p> diff --git a/templates/web/emptyhomes/report/new/councils_text_none.html b/templates/web/emptyhomes/report/new/councils_text_none.html index dbe9cd510..088e6fa1d 100644 --- a/templates/web/emptyhomes/report/new/councils_text_none.html +++ b/templates/web/emptyhomes/report/new/councils_text_none.html @@ -3,7 +3,7 @@ nget( "We do not yet have details for the council that covers this location.", "We do not yet have details for the councils that cover this location.", - all_councils.size + all_areas.size ); %] [% loc("If you submit a report here it will be left on the site, but not reported to the council – please still leave your report, so that we can show to the council the activity in their area."); %] diff --git a/templates/web/emptyhomes/reports/index.html b/templates/web/emptyhomes/reports/index.html index 8eaeeb618..6d80fa0d6 100755 --- a/templates/web/emptyhomes/reports/index.html +++ b/templates/web/emptyhomes/reports/index.html @@ -12,15 +12,15 @@ <th>[% loc('Older problems') %]</th> </tr> -[% FOREACH area IN areas_info_sorted %] +[% FOREACH body IN bodies %] <tr align="center" -[%- IF area.generation_high == 10 %] class="gone" +[%- IF NOT body.areas.size %] class="gone" [%- ELSIF loop.count % 2 %] class="a" [%- END -%] > -<td align="left"><a href="[% area.url %]">[% area.name %]</a></td> -<td>[% open.${area.id}.new or 0 %]</td> -<td>[% (open.${area.id}.older or 0) + (open.${area.id}.unknown or 0) + (fixed.${area.id}.new or 0) + (fixed.${area.id}.old or 0) %]</td> +<td align="left"><a href="[% body.url(c) %]">[% body.name %]</a></td> +<td>[% open.${body.id}.new or 0 %]</td> +<td>[% (open.${body.id}.older or 0) + (open.${body.id}.unknown or 0) + (fixed.${body.id}.new or 0) + (fixed.${body.id}.old or 0) %]</td> </tr> [% END %] diff --git a/templates/web/emptyhomes/tokens/confirm_problem.html b/templates/web/emptyhomes/tokens/confirm_problem.html index 7bcf8acdf..5e77ca59f 100644 --- a/templates/web/emptyhomes/tokens/confirm_problem.html +++ b/templates/web/emptyhomes/tokens/confirm_problem.html @@ -2,7 +2,7 @@ <h1>[% loc('Confirmation') %]</h1> -[% IF problem.council %] +[% IF problem.bodies_str %] <p>[% loc( 'Thank you for reporting an empty property on ReportEmptyHomes.com. We have emailed the lead officer for empty homes in the council responsible with details, and asked them to do whatever they can to get the empty property back into use as soon as possible.' diff --git a/templates/web/fiksgatami/nn/reports/index.html b/templates/web/fiksgatami/nn/reports/index.html index 3cbb2bf8d..05296ba76 100755 --- a/templates/web/fiksgatami/nn/reports/index.html +++ b/templates/web/fiksgatami/nn/reports/index.html @@ -14,18 +14,18 @@ <th>[% loc('Older fixed') %]</th> </tr> -[% FOREACH area IN areas_info_sorted %] -[% NEXT IF area.id == 301 %] +[% FOREACH body IN bodies %] +[% NEXT IF body.id == 301 %] <tr align="center" [%- IF loop.count % 2 %] class="a" [%- END -%] > -<td align="left"><a href="[% area.url %]">[% area.name %]</a></td> -<td>[% open.${area.id}.new or 0 %]</td> -<td>[% open.${area.id}.older or 0 %]</td> -<td>[% open.${area.id}.unknown or 0 %]</td> -<td>[% fixed.${area.id}.new or 0 %]</td> -<td>[% fixed.${area.id}.old or 0 %]</td> +<td align="left"><a href="[% body.url(c) %]">[% body.name %]</a></td> +<td>[% open.${body.id}.new or 0 %]</td> +<td>[% open.${body.id}.older or 0 %]</td> +<td>[% open.${body.id}.unknown or 0 %]</td> +<td>[% fixed.${body.id}.new or 0 %]</td> +<td>[% fixed.${body.id}.old or 0 %]</td> </tr> [% END %] </table> diff --git a/templates/web/fiksgatami/reports/index.html b/templates/web/fiksgatami/reports/index.html index 1ba90ece3..3235b96c4 100755 --- a/templates/web/fiksgatami/reports/index.html +++ b/templates/web/fiksgatami/reports/index.html @@ -14,17 +14,17 @@ <th>[% loc('Older fixed') %]</th> </tr> -[% FOREACH area IN areas_info_sorted %] +[% FOREACH body IN bodies %] <tr align="center" [%- IF loop.count % 2 %] class="a" [%- END -%] > -<td align="left"><a href="[% area.url %]">[% area.name %]</a></td> -<td>[% open.${area.id}.new or 0 %]</td> -<td>[% open.${area.id}.older or 0 %]</td> -<td>[% open.${area.id}.unknown or 0 %]</td> -<td>[% fixed.${area.id}.new or 0 %]</td> -<td>[% fixed.${area.id}.old or 0 %]</td> +<td align="left"><a href="[% body.url(c) %]">[% body.name %]</a></td> +<td>[% open.${body.id}.new or 0 %]</td> +<td>[% open.${body.id}.older or 0 %]</td> +<td>[% open.${body.id}.unknown or 0 %]</td> +<td>[% fixed.${body.id}.new or 0 %]</td> +<td>[% fixed.${body.id}.old or 0 %]</td> </tr> [% END %] </table> diff --git a/templates/web/fixmybarangay/around/tabbed_lists.html b/templates/web/fixmybarangay/around/tabbed_lists.html index c9f1c2a38..342b03f0e 100644 --- a/templates/web/fixmybarangay/around/tabbed_lists.html +++ b/templates/web/fixmybarangay/around/tabbed_lists.html @@ -1,4 +1,4 @@ -[% allow_creation = !c.cobrand.only_authed_can_create || (c.user && c.user.from_council); +[% allow_creation = !c.cobrand.only_authed_can_create || (c.user && c.user.from_body); IF allow_creation %] <menu id="problems-nav" class="tab-nav"> diff --git a/templates/web/fixmybarangay/header.html b/templates/web/fixmybarangay/header.html index 911a72022..06a8b71a1 100644 --- a/templates/web/fixmybarangay/header.html +++ b/templates/web/fixmybarangay/header.html @@ -11,23 +11,25 @@ <meta name="HandHeldFriendly" content="true"> <meta name="mobileoptimized" content="0"> - <link rel="stylesheet" href="[% version('/cobrands/fixmybarangay/base.css') %]"> - <link rel="stylesheet" href="[% version('/cobrands/fixmybarangay/layout.css') %]" media="(min-width:48em)"> +[% SET start = c.config.ADMIN_BASE_URL IF admin %] + + <link rel="stylesheet" href="[% start %][% version('/cobrands/fixmybarangay/base.css') %]"> + <link rel="stylesheet" href="[% start %][% version('/cobrands/fixmybarangay/layout.css') %]" media="(min-width:48em)"> [% extra_css %] <!--[if (lt IE 9) & (!IEMobile)]> - <link rel="stylesheet" href="[% version('/cobrands/fixmybarangay/layout.css') %]"> + <link rel="stylesheet" href="[% start %][% version('/cobrands/fixmybarangay/layout.css') %]"> <![endif]--> - <script src="[% version('/js/modernizr.custom.js') %]" charset="utf-8"></script> - <script src="[% version('/cobrands/fixmybarangay/position_map.js') %]" charset="utf-8"></script> + <script src="[% start %][% version('/js/modernizr.custom.js') %]" charset="utf-8"></script> + <script src="[% start %][% version('/cobrands/fixmybarangay/position_map.js') %]" charset="utf-8"></script> [% INCLUDE 'common_header_tags.html', site_title = 'FixMyBarangay', js_override = '/cobrands/fixmystreet/fixmystreet.js' %] [% extra_js %] - [% allow_creation = !c.cobrand.only_authed_can_create || (c.user && c.user.from_council); %] + [% allow_creation = !c.cobrand.only_authed_can_create || (c.user && c.user.from_body); %] [% IF allow_creation %] - <link rel="stylesheet" href="[% version('/js/fancybox/jquery.fancybox-1.3.4.css') %]"> - <script src="[% version('/js/fancybox/jquery.fancybox-1.3.4.pack.js') %]" charset="utf-8"></script> - <script src="[% version('/cobrands/fixmybarangay/message_manager_client.js') %]" charset="utf-8"></script> + <link rel="stylesheet" href="[% start %][% version('/js/fancybox/jquery.fancybox-1.3.4.css') %]"> + <script src="[% start %][% version('/js/fancybox/jquery.fancybox-1.3.4.pack.js') %]" charset="utf-8"></script> + <script src="[% start %][% version('/cobrands/fixmybarangay/message_manager_client.js') %]" charset="utf-8"></script> <script> $(document).ready(function() { diff --git a/templates/web/fixmybarangay/report/_message_manager.html b/templates/web/fixmybarangay/report/_message_manager.html index 950ed2db8..2860689be 100644 --- a/templates/web/fixmybarangay/report/_message_manager.html +++ b/templates/web/fixmybarangay/report/_message_manager.html @@ -1,4 +1,4 @@ -[% IF c.user && c.user.from_council %] +[% IF c.user && c.user.from_body %] [% IF problem.external_source_id && problem.external_source == c.config.MESSAGE_MANAGER_URL %] <p class="mm-submitted-by-sms"> diff --git a/templates/web/fixmybarangay/reports/index.html b/templates/web/fixmybarangay/reports/index.html index 2d8da17c6..984e0d472 100755 --- a/templates/web/fixmybarangay/reports/index.html +++ b/templates/web/fixmybarangay/reports/index.html @@ -22,17 +22,16 @@ </thead> <tbody> -[% FOREACH area IN areas_info_sorted %] +[% FOREACH body IN bodies %] <tr align="center" -[%- IF area.generation_high == 10 %] class="gone" -[%- ELSIF ! (loop.count % 2) %] class="a" +[%- IF ! (loop.count % 2) %] class="a" [%- END %]> -<td class="title"><a href="[% area.url %]">[% area.name %]</a></td> -<td class="data">[% open.${area.id}.new or 0 %]</td> -<td class="data">[% open.${area.id}.older or 0 %]</td> -<td class="data">[% open.${area.id}.unknown or 0 %]</td> -<td class="data">[% fixed.${area.id}.new or 0 %]</td> -<td class="data">[% fixed.${area.id}.old or 0 %]</td> +<td class="title"><a href="[% body.url(c) %]">[% body.name %]</a></td> +<td class="data">[% open.${body.id}.new or 0 %]</td> +<td class="data">[% open.${body.id}.older or 0 %]</td> +<td class="data">[% open.${body.id}.unknown or 0 %]</td> +<td class="data">[% fixed.${body.id}.new or 0 %]</td> +<td class="data">[% fixed.${body.id}.old or 0 %]</td> </tr> [% TRY %][% PROCESS "reports/_extras.html" %][% CATCH file %][% END %] [% END %] @@ -40,20 +39,4 @@ </table> -<p> -[%# (this will change when we have 'body' logic in place, meanwhile: hardcoded) %] -See also the maps of reports submitted to these departments: -</p> -<ul> -<li> -<a href="/reports/depw" title="Department of Engineering and Public Works">DEPW</a> — city road maintenance -</li> -<li> -<a href="/reports/dps" title="Department of Public Services">DPS</a> — streetlight maintenance -</li> -<li> -<a href="/reports/dpwh" title="Department of Public Works and Highways">DPWH</a> — national road maintenance -</li> -</ul> -</p> [% INCLUDE 'footer.html', pagefooter = 'yes' %] diff --git a/templates/web/fixmystreet/around/postcode_form.html b/templates/web/fixmystreet/around/postcode_form.html index d48a53183..ed5d700f0 100644 --- a/templates/web/fixmystreet/around/postcode_form.html +++ b/templates/web/fixmystreet/around/postcode_form.html @@ -18,7 +18,7 @@ <label for="pc">[% question %]:</label> <div> <input type="text" name="pc" value="[% pc | html %]" id="pc" size="10" maxlength="200" placeholder="[% tprintf(loc('e.g. ‘%s’ or ‘%s’'), c.cobrand.example_places) %]"> - <input type="submit" value="[% loc('Go') %]" id="submit"> + <input type="submit" value="[% loc('Go') %]" id="sub"> </div> [% IF partial_token %] diff --git a/templates/web/fixmystreet/contact/index.html b/templates/web/fixmystreet/contact/index.html index 368fb0628..450b6e2ef 100644 --- a/templates/web/fixmystreet/contact/index.html +++ b/templates/web/fixmystreet/contact/index.html @@ -19,9 +19,9 @@ <blockquote> <p> [% IF update.anonymous %] - [% tprintf( loc('Update below added anonymously at %s'), prettify_epoch( update.confirmed_local.epoch ) ) %] + [% tprintf( loc('Update below added anonymously at %s'), prettify_dt( update.confirmed_local ) ) %] [% ELSE %] - [% tprintf( loc('Update below added by %s at %s'), update.name, prettify_epoch( update.confirmed_local.epoch ) ) | html %] + [% tprintf( loc('Update below added by %s at %s'), update.name, prettify_dt( update.confirmed_local ) ) | html %] [% END %] </p> @@ -43,9 +43,9 @@ <p> [% IF problem.anonymous %] - [% tprintf( loc('Reported anonymously at %s'), prettify_epoch( problem.confirmed_local.epoch ) ) %] + [% tprintf( loc('Reported anonymously at %s'), prettify_dt( problem.confirmed_local ) ) %] [% ELSE %] - [% tprintf( loc('Reported by %s at %s'), problem.user.name, prettify_epoch( problem.confirmed_local.epoch ) ) | html %] + [% tprintf( loc('Reported by %s at %s'), problem.user.name, prettify_dt( problem.confirmed_local ) ) | html %] [% END %] </p> diff --git a/templates/web/fixmystreet/footer.html b/templates/web/fixmystreet/footer.html index c45c3c536..c1b04750a 100644 --- a/templates/web/fixmystreet/footer.html +++ b/templates/web/fixmystreet/footer.html @@ -5,9 +5,8 @@ <h4>Mobile apps</h4> <ul> - <li><a class="m-app-iphone" href="http://itunes.apple.com/gb/app/fixmystreet/id297456545">iPhone</a></li> - <li><a class="m-app-droid" href="https://market.android.com/details?id=com.android.fixmystreet">Android</a></li> <li><a class="m-app-nokia" href="http://store.ovi.com/content/107557">Nokia</a></li> + <li style="line-height:1"><small>New iPhone and Android<br>apps coming soon</small></li> </ul> </div> diff --git a/templates/web/fixmystreet/my/my.html b/templates/web/fixmystreet/my/my.html index 258f147c6..3134c335f 100644 --- a/templates/web/fixmystreet/my/my.html +++ b/templates/web/fixmystreet/my/my.html @@ -57,7 +57,7 @@ END %] <li>“[% u.text | html %]” – <a href="[% c.uri_for( '/report', u.problem_id ) %]#update_[% u.id %]">[% u.problem.title | html %]</a>. <p><small class="council_sent_info"> - [% tprintf( loc("Added %s"), prettify_epoch( u.confirmed_local.epoch, 'date' ) ) %] + [% tprintf( loc("Added %s"), prettify_dt( u.confirmed_local, 'date' ) ) %] </small></p> </li> [% "</ul>" IF loop.last %] diff --git a/templates/web/fixmystreet/report/_item.html b/templates/web/fixmystreet/report/_item.html index 6014074e0..508b02614 100644 --- a/templates/web/fixmystreet/report/_item.html +++ b/templates/web/fixmystreet/report/_item.html @@ -4,17 +4,14 @@ <img class="img" height="60" width="90" src="/photo/[% problem.id %].fp.jpeg" alt=""> [% END %] <h4>[% problem.title | html %]</h4> - <small>[% IF problem.confirmed_local %] - [%- prettify_epoch( problem.confirmed_local.epoch, 1 ) %] - [%- ELSE %] - [%- prettify_epoch( problem.confirmed, 1 ) %] - [%- END %] + <small>[% prettify_dt( problem.confirmed_local, 1 ) %] [%- IF dist %], [% dist %]km[% END %] - [%- IF include_lastupdate AND problem.confirmed != problem.lastupdate AND problem.whensent != problem.lastupdate %], last updated [% prettify_epoch( problem.lastupdate, 1 ) %] + [%- IF include_lastupdate AND problem.confirmed != problem.lastupdate AND problem.whensent != problem.lastupdate %], + [% tprintf('last updated %s', prettify_dt( problem.lastupdate_local, 1 ) ) %] [%- END %] [% IF include_lastupdate %] - [% IF problem.councils > 1 %] [% loc('(sent to both)') %] - [% ELSIF problem.councils == 0 %] [% loc('(not sent to council)') %] + [% IF problem.bodies_str_ids.size > 1 %] [% loc('(sent to both)') %] + [% ELSIF problem.bodies_str_ids.size == 0 %] [% loc('(not sent to council)') %] [% END %] [% END %] [% IF NOT no_fixed AND problem.is_fixed %] diff --git a/templates/web/fixmystreet/report/display.html b/templates/web/fixmystreet/report/display.html index 26e6fe992..9bcf1e5b9 100644 --- a/templates/web/fixmystreet/report/display.html +++ b/templates/web/fixmystreet/report/display.html @@ -12,6 +12,12 @@ [% map_html %] + [% IF c.cobrand.moniker == 'zurich' %] + <p id='sub_map_links'> + <a class="hidden-nojs" id="map_layer_toggle" href="">Stadtplan</a> + </p> + [% END %] + </div> [% INCLUDE 'report/banner.html' %] @@ -21,18 +27,24 @@ <div class="shadow-wrap"> <ul id="key-tools"> - [% IF c.user_exists AND c.cobrand.users_can_hide AND c.user.belongs_to_council( c.cobrand.council_id ) %] + [% IF c.user_exists AND c.cobrand.users_can_hide AND c.user.belongs_to_body( c.cobrand.council_id ) %] <li><form method="post" action="/report/delete/[% problem.id %]"> <input type="submit" id="key-tool-report-abuse" class="abuse" value="Remove from site"> </form></li> - [% ELSE %] + [% ELSIF c.cobrand.moniker != 'zurich' %] <li><a rel="nofollow" id="key-tool-report-abuse" class="abuse" href="[% c.uri_for( '/contact', { id => problem.id } ) %]">[% loc('Report abuse' ) %]</a></li> [% END %] + [% IF c.cobrand.moniker != 'zurich' %] <li><a rel="nofollow" id="key-tool-report-updates" class="feed" href="[% c.uri_for( '/alert/subscribe', { id => problem.id } ) %]">[% loc('Get updates' ) %]</a></li> + [% END %] [% IF c.cobrand.moniker == 'fixmystreet' %] <li><a rel="nofollow" id="key-tool-report-share" class="share" href="#report-share">[% loc('Share') %]</a></li> [% END %] + [% IF c.cobrand.moniker == 'zurich' %] + <li><a class="chevron" id="key-tool-problems-nearby" href="[% c.uri_for( '/around', { lat => short_latitude, lon => short_longitude } ) %]">[% loc( 'Problems on the map' ) %]</a></li> + [% ELSE %] <li><a class="chevron" id="key-tool-problems-nearby" href="[% c.uri_for( '/around', { lat => short_latitude, lon => short_longitude } ) %]">[% loc( 'Problems nearby' ) %]</a></li> + [% END %] </ul> [% IF c.cobrand.moniker == 'fixmystreet' %] diff --git a/templates/web/fixmystreet/report/new/fill_in_details_form.html b/templates/web/fixmystreet/report/new/fill_in_details_form.html index fb342d487..e2e091460 100644 --- a/templates/web/fixmystreet/report/new/fill_in_details_form.html +++ b/templates/web/fixmystreet/report/new/fill_in_details_form.html @@ -15,7 +15,7 @@ [% PROCESS 'report/new/councils_text.html' %] [% END %] - [% IF c.cobrand.moniker != 'fixmybarangay' || ( c.user && c.user.from_council ) %] + [% IF c.cobrand.moniker != 'fixmybarangay' || ( c.user && c.user.from_body ) %] <div id="report-a-problem-sidebar"> <!-- The text for this section needs checking, but I can't work out which bit comes from where @@ -51,8 +51,8 @@ [% INCLUDE 'report/new/form_heading.html' %] - [% IF field_errors.council %] - <p class='form-error'>[% field_errors.council %]</p> + [% IF field_errors.bodies %] + <p class='form-error'>[% field_errors.bodies %]</p> [% END %] @@ -129,7 +129,7 @@ <label class="inline" for="form_may_show_name">[% loc('Show my name publicly') %] </label> </div> - [% IF c.cobrand.moniker != 'fixmybarangay' || c.user.from_council %] + [% IF c.cobrand.moniker != 'fixmybarangay' || c.user.from_body %] <div class="general-sidebar-notes"> <p>[% loc('We never show your email address or phone number.') %]</p> </div> diff --git a/templates/web/fixmystreet/report/new/notes.html b/templates/web/fixmystreet/report/new/notes.html index d508b1929..657390c79 100644 --- a/templates/web/fixmystreet/report/new/notes.html +++ b/templates/web/fixmystreet/report/new/notes.html @@ -2,8 +2,10 @@ <ul class="plain-list"> <li>[% loc("We will only use your personal information in accordance with our <a href=\"/privacy\">privacy policy.</a>") %]</li> + [% IF c.cobrand.moniker != 'zurich' %] <li>[% loc("Please be polite, concise and to the point.") %]</li> <li>[% loc("Please do not be abusive — abusing your council devalues the service for all users.") %]</li> <li>[% loc("Writing your message entirely in block capitals makes it hard to read, as does a lack of punctuation.") %]</li> + [% END %] <li>[% loc("Remember that FixMyStreet is primarily for reporting physical problems that can be fixed. If your problem is not appropriate for submission via this site remember that you can contact your council directly using their own website.") %]</li> </ul> diff --git a/templates/web/fixmystreet/report/update-form.html b/templates/web/fixmystreet/report/update-form.html index a632cfc4a..add176549 100644 --- a/templates/web/fixmystreet/report/update-form.html +++ b/templates/web/fixmystreet/report/update-form.html @@ -1,4 +1,4 @@ -[% allow_creation = !c.cobrand.only_authed_can_create || (c.user && c.user.from_council) %] +[% allow_creation = !c.cobrand.only_authed_can_create || (c.user && c.user.from_body) %] [% IF allow_creation %] <div id="update_form"> <h2>[% loc( 'Provide an update') %]</h2> @@ -22,7 +22,7 @@ [% END %] <textarea rows="7" cols="30" name="update" id="form_update" placeholder="[% loc('Please write your update here') %]" required>[% update.text | html %]</textarea> - [% IF c.user && c.user.belongs_to_council( problem.council ) %] + [% IF c.user && c.user.belongs_to_body( problem.bodies_str ) %] <label for="form_state">[% loc( 'State' ) %]</label> <select name="state" id="form_state"> [% FOREACH state IN [ ['confirmed', loc('Open')], ['investigating', @@ -137,7 +137,7 @@ [% IF field_errors.name %] <p class='form-error'>[% field_errors.name %]</p> [% END %] - <input type="text" [% IF problem.council == '2482' %]class="validName" [% END %]name="name" id="form_name" value="[% update.name || c.user.name | html %]" placeholder="[% loc('Your name') %]"> + <input type="text" [% IF problem.bodies_str == '2482' %]class="validName" [% END %]name="name" id="form_name" value="[% update.name || c.user.name | html %]" placeholder="[% loc('Your name') %]"> <div class="checkbox-group"> <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' IF update.anonymous==0 OR (c.cobrand.default_show_name AND update.anonymous=='') %]> diff --git a/templates/web/fixmystreet/report/updates-sidebar-notes.html b/templates/web/fixmystreet/report/updates-sidebar-notes.html index e59d61fec..bdbcae518 100644 --- a/templates/web/fixmystreet/report/updates-sidebar-notes.html +++ b/templates/web/fixmystreet/report/updates-sidebar-notes.html @@ -1,5 +1,5 @@ <p> - [% IF ( problem.council != '2482' AND !problem.council.match('2347') ) OR problem.send_method_used != 'Open311' %] + [% IF ( problem.bodies_str != '2482' AND !problem.bodies_str.match('2347') ) OR problem.send_method_used != 'Open311' %] [% loc( 'Please note that updates are not sent to the council.' ) %] [% END %] [% loc( 'Your information will only be used in accordance with our <a href="/privacy">privacy policy</a>' ) %]</p> diff --git a/templates/web/seesomething/js/validation_strings.html b/templates/web/seesomething/js/translation_strings.html index 64251c163..0ae40bf97 100644 --- a/templates/web/seesomething/js/validation_strings.html +++ b/templates/web/seesomething/js/translation_strings.html @@ -1,4 +1,4 @@ - validation_strings = { + translation_strings = { detail: '[% loc('Please enter some details') | replace("'", "\\'") %]', name: { validName: '[% loc('Please enter your full name, councils need this information – if you do not wish your name to be shown on the site, untick the box below') | replace("'", "\\'") %]' @@ -11,5 +11,5 @@ }, email: { email: '[% loc('Please enter a valid email') | replace("'", "\\'") %]' - }, + } }; diff --git a/templates/web/zurich/admin/body-form.html b/templates/web/zurich/admin/body-form.html new file mode 100644 index 000000000..5ae8eb8a6 --- /dev/null +++ b/templates/web/zurich/admin/body-form.html @@ -0,0 +1,50 @@ + <form method="post" action="[% body ? c.uri_for('body', body.id) : c.uri_for('bodies') %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> + + <p> + <label for="name">[% loc('Name') %]</label> + <input type="text" name="name" id="name" value="[% body.name %]" size="50"> + </p> + + <p> + <label for="email">[% loc('Email') %]</label> + <input type="text" name="endpoint" id="email" value="[% body.endpoint %]" size="50"> + </p> + +[% IF admin_type == 'super' %] + <p> + <label for="parent">[% loc('Parent') %]</label> + <select name="parent" id="parent"> + <option value=""> -- [% loc('Select a body') %] -- </option> + [% FOR b IN bodies %] + <option value="[% b.id %]"[% ' selected' IF body.parent.id == b.id %]>[% b.name %]</option> + [% END %] + </select> + </p> + + <p> + <label for="area_ids">[% loc('Area covered') %]</label> + <select name="area_ids" id="area_ids" multiple> + <option value=""> -- [% loc('Select an area') %] -- </option> + [% FOR area IN areas %] + [% SET aid = area.id %] + <option value="[% area.id %]"[% ' selected' IF body.areas.$aid %]>[% area.name %]</option> + [% END %] + </select> + </p> +[% END %] + + <input type="hidden" name="send_method" value="Email"> + <input type="hidden" name="jurisdiction" id="jurisdiction" value="[% body.jurisdiction %]"> + <input type="hidden" name="api_key" id="api_key" value="[% body.api_key %]"> + <input type="hidden" id="send_comments" name="send_comments" value="[% body.send_comments %]"> + <input type="hidden" name="comment_user_id" value="[% body.comment_user_id %]"> + <input type="hidden" id="suppress_alerts" name="suppress_alerts" value="[% body.suppress_alerts %]"> + <input type="hidden" id="can_be_devolved" name="can_be_devolved" value="[% body.can_be_devolved %]"> + + <p> + <input type="hidden" name="posted" value="body"> + <input type="hidden" name="token" value="[% token %]"> + <input type="submit" value="[% body ? loc('Update body') : loc('Add body') %]"> + </p> + </form> + diff --git a/templates/web/zurich/admin/body.html b/templates/web/zurich/admin/body.html new file mode 100644 index 000000000..764ad9bd8 --- /dev/null +++ b/templates/web/zurich/admin/body.html @@ -0,0 +1,67 @@ +[% INCLUDE 'admin/header.html' title=tprintf(loc('Council contacts for %s'), body.name) -%] +[% PROCESS 'admin/report_blocks.html' %] + +[% IF updated %] +<p> +<em>[% updated %]</em> +</p> +[% END %] + +[% IF admin_type == 'super' AND body.parent AND NOT body.parent.parent # A division %] + <table cellspacing="0" cellpadding="2" border="1"> + <tr> + <th>[% loc('Category') %]</th> + <th>[% loc('Email') %]</th> + <th>[% loc('Last editor') %]</th> + <th>[% loc('Note') %]</th> + <th>[% loc('When edited') %]</th> + </tr> + [% WHILE ( contact = contacts.next ) %] + <tr> + <td><a href="[% c.uri_for( 'body_edit', body_id, contact.category ) %]">[% contact.category %]</a></td> + <td>[% contact.email | html %]</td> + <td>[% contact.editor %]</td> + <td>[% contact.note | html %]</td> + <td>[% PROCESS format_date this_date=contact.whenedited %]</td> + </tr> + [% END %] + </table> + + <h2>[% loc('Add new category') %]</h2> + + <form method="post" action="[% c.uri_for('body', body_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> + + [% IF c.cobrand.moniker != 'emptyhomes' %] + <p> + <strong>[% loc('Category:') %] </strong><input type="text" name="category" size="30"> + </p> + [% END %] + + <p> + <strong>[% loc('Email:') %] </strong><input type="text" name="email" size="30"> + </p> + + <input type="hidden" name="confirmed" value="1" id="confirmed"> + + <p> + <strong>[% loc('Note:') %] </strong> <textarea name="note" rows="3" cols="40"></textarea> + </p> + + <p> + <input type="hidden" name="posted" value="new" > + <input type="hidden" name="token" value="[% token %]" > + <input type="submit" name="Create category" value="[% loc('Create category') %]" > + </p> + + <div> + <input type="hidden" name=".cgifields" value="confirmed" > + <input type="hidden" name=".cgifields" value="deleted" > + </div> + </form> + +[% END %] + + <h2>[% loc('Edit body details') %]</h2> + [% INCLUDE 'admin/body-form.html' %] + +[% INCLUDE 'admin/footer.html' %] diff --git a/templates/web/zurich/admin/edit-league.html b/templates/web/zurich/admin/edit-league.html new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/templates/web/zurich/admin/edit-league.html diff --git a/templates/web/zurich/admin/header.html b/templates/web/zurich/admin/header.html new file mode 100644 index 000000000..41cb520f5 --- /dev/null +++ b/templates/web/zurich/admin/header.html @@ -0,0 +1,22 @@ +[% + SET bodyclass = bodyclass || 'fullwidthpage'; + INCLUDE 'header.html' admin = 1, bodyclass = bodyclass _ ' admin'; + + states = { + 'unconfirmed' = loc('Submitted'), + 'confirmed' = loc('Open'), + 'in progress' = loc('In progress'), + 'planned' = loc('Planned'), + 'fixed - council' = loc('Closed'), + 'hidden' = loc('Hidden'), + 'closed' = loc('Closed'), + } +%] +<style type="text/css"> + .adminhidden { color: #666666; } + .error { color: red; } + .overdue { background-color: #ffcccc; } + select { width: auto; } +</style> + + <h1 style="clear:both;">[% title %]</h1> diff --git a/templates/web/zurich/admin/index-dm.html b/templates/web/zurich/admin/index-dm.html new file mode 100644 index 000000000..a88100ee4 --- /dev/null +++ b/templates/web/zurich/admin/index-dm.html @@ -0,0 +1,36 @@ +[% PROCESS 'admin/header.html' title=loc('Summary') -%] +[% PROCESS 'admin/report_blocks.html' %] + +[% status_message %] + +<h2>[% loc('Submitted') %]</h2> +[% INCLUDE list, problems = unconfirmed.all %] + +<h2>[% loc('Planned') %]</h2> +[% INCLUDE list, problems = approval.all %] + +<h2>[% loc('All reports') %]</h2> +[% INCLUDE list, problems = other.all, include_subdiv = 1 %] + +[% INCLUDE 'admin/footer.html' %] + +[% BLOCK list %] +<table cellspacing="0" cellpadding="2" border="1"> + <tr> + <th>[% loc('ID') %]</th> + <th>[% loc('Description') %]</th> + <th>[% loc('Category') %]</th> + <th>[% loc('Submitted') %]</th> + <th>[% loc('Updated') %]</th> + <th>[% loc('Status') %]</th> + [% IF include_subdiv %] + <th>[% loc('Subdivision/Body') %]</th> + [% END %] + <th>*</th> + </tr> + <tr class="filter-row"> + <td colspan="8"><input type="text" placeholder="[%= loc('Filter report list') %]" /></td> + </tr> +[% INCLUDE 'admin/problem_row.html' %] +</table> +[% END %] diff --git a/templates/web/zurich/admin/index-sdm.html b/templates/web/zurich/admin/index-sdm.html new file mode 100644 index 000000000..4e4009c16 --- /dev/null +++ b/templates/web/zurich/admin/index-sdm.html @@ -0,0 +1,33 @@ +[% PROCESS 'admin/header.html' title=loc('Summary') -%] +[% PROCESS 'admin/report_blocks.html' %] + +<h2>[% loc('New reports') %]</h2> +[% INCLUDE list, problems = reports_new.all %] + +<h2>[% loc('Reports awaiting approval') %]</h2> +[% INCLUDE list, problems = reports_unpublished.all, no_edit = 1 %] + +<h2>[% loc('Reports published') %]</h2> +[% INCLUDE list, problems = reports_published.all, no_edit = 1 %] + +[% INCLUDE 'admin/footer.html' %] + +[% BLOCK list %] +<table cellspacing="0" cellpadding="2" border="1"> + <tr> + <th>[% loc('ID') %]</th> + <th>[% loc('Description') %]</th> + <th>[% loc('Category') %]</th> + <th>[% loc('Submitted') %]</th> + <th>[% loc('Updated') %]</th> + <th>[% loc('Status') %]</th> + [% IF NOT no_edit %] + <th>*</th> + [% END %] + </tr> + <tr class="filter-row"> + <td colspan="8"><input type="text" placeholder="[%= loc('Filter report list') %]" /></td> + </tr> +[% INCLUDE 'admin/problem_row.html' %] +</table> +[% END %] diff --git a/templates/web/zurich/admin/index.html b/templates/web/zurich/admin/index.html new file mode 100644 index 000000000..ab835b5a3 --- /dev/null +++ b/templates/web/zurich/admin/index.html @@ -0,0 +1,23 @@ +[% PROCESS 'admin/header.html' title=loc('Summary') -%] + +<ul> + <li>[% tprintf( loc('<strong>%d</strong> live problems'), total_problems_live ) %]; + [% tprintf( loc('from %d different users'), total_problems_users ) %]</li> + <li>[% tprintf( loc('%d council contacts – %d confirmed, %d unconfirmed'), contacts.total, contacts.1, contacts.0) %]</li> +</ul> + +[% IF c.cobrand.admin_show_creation_graph -%] + <p> + <a href="[% c.config.BASE_URL %]/fms-live-creation.png">[% loc('Graph of problem creation by status over time') %]</a> + </p> +[% END -%] + +<h2>[% loc('Problem breakdown by state') %]</h2> +<ul> + [% FOREACH state IN problems.keys.sort %] + [% NEXT IF NOT states.$state %] + <li>[% problems.$state %] [% states.$state %]</li> + [% END %] +</ul> + +[% INCLUDE 'admin/footer.html' %] diff --git a/templates/web/zurich/admin/list_updates.html b/templates/web/zurich/admin/list_updates.html new file mode 100644 index 000000000..7a78d4c63 --- /dev/null +++ b/templates/web/zurich/admin/list_updates.html @@ -0,0 +1,16 @@ +<h2>[% loc('Updates') %]</h2> + +<table cellspacing="0" cellpadding="2" border="1"> + <tr> + <th>[% loc('ID') %]</th> + <th>[% loc('Created') %]</th> + <th>[% loc('Text') %]</th> + </tr> +[% FOREACH update IN updates -%] + <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>[% update.text | html %]</td> + </tr> +[% END -%] +</table> diff --git a/templates/web/zurich/admin/problem_row.html b/templates/web/zurich/admin/problem_row.html new file mode 100644 index 000000000..617490232 --- /dev/null +++ b/templates/web/zurich/admin/problem_row.html @@ -0,0 +1,38 @@ +[%- FOR problem IN problems %] + [% SET p_body = problem.bodies.values.0 %] + [% IF page == 'search' %] + [% NEXT IF admin_type == 'sdm' AND p_body.id != body.id %] + [% NEXT IF admin_type == 'dm' AND p_body.id != body.id AND p_body.parent.id != body.id %] + [% END %] + <tr[% + ' class="adminhidden"' IF problem.state == 'hidden'; + ' class="overdue"' IF c.cobrand.overdue( problem ); + %]> + <td class="record-id">[%- IF problem.is_visible -%] + <a href="[% c.uri_for_email( '/report', problem.id ) %]">[% problem.id %]</a> + [%- ELSE %] + [%- problem.id %] + [%- END -%]</td> + <td>[% PROCESS value_or_nbsp value=problem.title %]</td> + <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> + + [% IF include_subdiv %] + <td> + [%- IF p_body.parent.parent.id -%][%# ...it's a subdivision %] + [% PROCESS value_or_nbsp value=p_body.name %] + [%- ELSIF problem.external_body %] + [% PROCESS value_or_nbsp value=problem.body(c).name %] + [%- ELSE -%] + + [%- END -%] + </td> + [% END %] + + [% IF NOT no_edit %] + <td><a href="[% c.uri_for( 'report_edit', problem.id ) %]">[% loc('Edit') %]</a></td> + [% END %] + </tr> +[%- END -%] diff --git a/templates/web/zurich/admin/report_edit-sdm.html b/templates/web/zurich/admin/report_edit-sdm.html new file mode 100644 index 000000000..faad3ec55 --- /dev/null +++ b/templates/web/zurich/admin/report_edit-sdm.html @@ -0,0 +1,57 @@ +[% PROCESS 'admin/header.html' title=tprintf(loc('Editing problem %d'), problem.id ) -%] +[% PROCESS 'admin/report_blocks.html' %] + +[% 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> +<li><a href="[% c.uri_for_email( '/report', problem.id ) %]">[% loc('View report on site' )%]</a></li> +<li>[% loc('Details:') %] [% 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>[% loc('Co-ordinates:') %] [% problem.local_coords.join(',') %] +([% + 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>[% loc('Category:') %] [% problem.category | html %] </li> +<li>[% loc('Name:') %] [% problem.name | html %] +<li>[% loc('Email:') %] [% problem.user.email | html %] +[% IF NOT problem.extra.email_confirmed %]<span class="error">[% loc('Unconfirmed') %]</span>[% END %] +<li>[% loc('Phone:') %] [% IF problem.user.phone %][% problem.user.phone | html %][% ELSE %]<em>[% loc('None') %]</em>[% END %]</li> +<li>[% loc('Created:') %] [% PROCESS format_date this_date=problem.created %] [% problem.created.hms %]</li> + +[% IF problem.photo %] +[% photo = problem.get_photo_params %] +<li><img alt="" src="[% c.cobrand.base_url %][% photo.url %]"></li> +[% END %] + +<li>[% loc('State:') %] [% states.${problem.state} %]</li> + +<li><label for="internal_notes">[% loc('Internal notes:') %]</label> +<textarea name='internal_notes' id='internal_notes' cols=60 rows=5>[% problem.extra.internal_notes | html %]</textarea></li> + +<li><label for="status_update">[% loc('New update:') %]</label> +<textarea name='status_update' id='status_update' cols=60 rows=5></textarea></li> + +</ul> + +<p><input type="submit" name="Submit changes" value="[% loc('Submit changes') %]" ></p> +<p align="right"><input type="submit" name="no_more_updates" value="[% loc('No further updates') %]"></p> +</form> + +[% INCLUDE 'admin/list_updates.html' %] + +[% INCLUDE 'admin/footer.html' %] diff --git a/templates/web/zurich/admin/report_edit.html b/templates/web/zurich/admin/report_edit.html new file mode 100644 index 000000000..7fdaeabff --- /dev/null +++ b/templates/web/zurich/admin/report_edit.html @@ -0,0 +1,179 @@ +[% + PROCESS "maps/zurich.html"; + INCLUDE 'admin/header.html' + title = tprintf(loc('Editing problem %d'), problem.id ), + bodyclass = 'mappage'; + PROCESS 'admin/report_blocks.html' +-%] + +[% 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" > + +<ul> +<li><a href="[% c.uri_for_email( '/report', problem.id ) %]">[% loc('View report on site' )%]</a></li> + +[% IF problem.state == 'fixed - council' OR problem.state == 'closed' %] + <li>[% loc('Details:') %] [% problem.detail | html %] + [% IF problem.extra.original_detail %] + <br>[% + SET detail_safe = problem.extra.original_detail | html; + tprintf( loc('originally entered: “%s”'), detail_safe ) + %] + [% 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> + [% IF problem.extra.original_detail %] + [% + SET detail_safe = problem.extra.original_detail | html; + tprintf( loc('originally entered: “%s”'), detail_safe ) + %] + [% END %] + </li> +[% END %] + +<li>[% loc('Co-ordinates:') %] [% problem.local_coords.join(',') %] +([% + 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>[% loc('Name:') %] [% problem.name | html %] <input type='hidden' name='name' id='name' value='[% problem.name | html %]'></li> +<li>[% loc('Email:') %] [% 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>[% loc('Phone:') %] [% IF problem.user.phone %][% problem.user.phone | html %][% ELSE %]<em>[% loc('None') %]</em>[% END %]</li> +<li>[% loc('Created:') %] [% PROCESS format_date this_date=problem.created %] [% problem.created.hms %]</li> + + +[% IF problem.photo %] +[% photo = problem.get_photo_params %] +<li><img alt="" src="[% c.cobrand.base_url %][% photo.url %]"> +<br> +[% IF rotated %]Photo may be cached for a while.<br>[% END %] +<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> + +<p><label for="internal_notes">[% loc('Internal notes:') %]</label> +<textarea name='internal_notes' id='internal_notes' cols=60 rows=5>[% problem.extra.internal_notes | html %]</textarea></p> + +<p>[% loc('State:') %] <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> + [% END %] +</select></p> + +[% IF problem.state == 'unconfirmed' OR problem.state == 'confirmed' %] + +<ul> +<li class="assignation"> +<label for="body_subdivision">[% loc('Assign to subdivision:') %]</label> + <select name="body_subdivision" id="body_subdivision"> + <option value="">--</option> + [% 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 %] + </select> + +<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 %] + <option value="[% body.id %]"[% IF body.id == problem.bodies_str %] selected[% END %]>[% body.name %]</option> + [% 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> + +<script type="text/javascript"> +$(function(){ + $('.assignation select').change(function(){ + if (this.value == "") { + $('.assignation').css('color', '#000'); + } else { + var a = $(this).closest('li').css('color', '#000'); + $('.assignation select').not(this).val(""); + $('.assignation').not(a).css('color', '#999'); + } + }); +}); +</script> + +[% ELSIF problem.state == 'planned' %] + +<ul> + <li class="assignation"> + <label for="body_subdivision">[% loc('Assign to subdivision:') %]</label> + <select name="body_subdivision" id="body_subdivision"> + <option value="" selected>--</option> + [% FOR body IN bodies %] + [% NEXT UNLESS body.parent.id == c.user.from_body.id %] + <option value="[% body.id %]">[% body.name %]</option> + [% END %] + </select> + </li> + + <li><label for="status_update">[% loc('Public response:') %]</label> + + <textarea name='status_update' id='status_update' cols=60 rows=5>[% problem.extra.public_response | html %]</textarea> + </li> +</ul> + +[% END %] + +<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> + +[% INCLUDE 'admin/list_updates.html' %] + +[% INCLUDE 'admin/footer.html' %] diff --git a/templates/web/zurich/admin/reports.html b/templates/web/zurich/admin/reports.html new file mode 100644 index 000000000..f8c022630 --- /dev/null +++ b/templates/web/zurich/admin/reports.html @@ -0,0 +1,27 @@ +[% PROCESS 'admin/header.html' title=loc('Search Reports') %] +[% PROCESS 'admin/report_blocks.html' %] + +<form method="get" action="[% c.uri_for('reports') %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> + <p><label for="search">[% loc('Search:') %]</label> <input type="text" name="search" size="30" id="search" value="[% searched | html %]"> +</form> + + +[% IF searched %] +<table cellspacing="0" cellpadding="2" border="1"> + <tr> + <th>[% loc('ID') %]</th> + <th>[% loc('Description') %]</th> + <th>[% loc('Category') %]</th> + <th>[% loc('Submitted') %]</th> + <th>[% loc('Updated') %]</th> + <th>[% loc('Status') %]</th> + <th>*</th> + </tr> + [% INCLUDE 'admin/problem_row.html', page = 'search' %] +</table> + +[% INCLUDE 'admin/list_updates.html' %] + +[% END %] + +[% INCLUDE 'admin/footer.html' %] diff --git a/templates/web/zurich/admin/update_edit.html b/templates/web/zurich/admin/update_edit.html new file mode 100644 index 000000000..ab40981a5 --- /dev/null +++ b/templates/web/zurich/admin/update_edit.html @@ -0,0 +1,40 @@ +[% INCLUDE 'admin/header.html' title=tprintf(loc('Editing update %d'), update.id ) -%] +[% PROCESS 'admin/report_blocks.html' %] + +[% status_message %] + +<form method="post" action="[% c.uri_for( 'update_edit', update.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> +<li><a href="[% c.uri_for_email( '/report', update.problem_id ) %]#update_[% update.id %]">[% loc('View report on site' )%]</a></li> + +<li><label for='detail'>[% loc('Text:') %]</label> +<textarea name='text' id='text' cols=60 rows=5>[% update.text | html %]</textarea></li> + +<input type="hidden" name="anonymous" value="[% update.anonymous %]"> + +<li>[% loc('State:') %] <select name="state" id="state"> + [% FOREACH state IN [ ['confirmed', loc('Open')], ['hidden', loc('Hidden')], ['unconfirmed',loc('Unconfirmed')] ] %] + <option [% 'selected ' IF state.0 == update.state %] value="[% state.0 %]">[% state.1 %]</option> + [% END %] +</select></li> +<input type='hidden' name='name' id='name' value='[% update.name | html %]'> +<input type='hidden' id='email' name='email' value='[% update.user.email | html %]'> +[% IF update.problem_state %] +<li>[% tprintf(loc('Update changed problem state to %s'), update.problem_state) %]</li> +[% END %] +</li> + +<li>[% loc('Created:') %] [% PROCESS format_date this_date=update.created %] [% update.created.hms %]</li> + +[% IF update.photo %] +[% photo = update.get_photo_params %] +<li><img alt="" height="[% photo.height %]" width="[% photo.width %]" src="[% photo.url %]"> +<input type="checkbox" id="remove_photo" name="remove_photo" value="1"> +<label for="remove_photo" class="inline">[% loc("Remove photo (can't be undone!)") %]</label></li> +[% END %] +</ul> +<input type="submit" name="Submit changes" value="[% loc('Submit changes') %]" ></form> + +[% INCLUDE 'admin/footer.html' %] diff --git a/templates/web/zurich/around/_updates.html b/templates/web/zurich/around/_updates.html new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/templates/web/zurich/around/_updates.html diff --git a/templates/web/zurich/around/intro.html b/templates/web/zurich/around/intro.html index c113afca7..f7a4904e3 100644 --- a/templates/web/zurich/around/intro.html +++ b/templates/web/zurich/around/intro.html @@ -1 +1,16 @@ <h1>[% loc('Report, view, or discuss local problems') %]</h1> + +<!-- FIXME Better place for this --> +<script> + $(function() { + $( "#pc" ).autocomplete({ + minLength: 3, + select: function(event, ui) { + $(this).val(ui.item.value); + this.form.submit(); + return true; + }, + source: "/ajax/geocode" + }); + }); +</script> diff --git a/templates/web/fixmybarangay/auth/sign_out.html b/templates/web/zurich/auth/sign_out.html index 11888089a..644118f63 100644 --- a/templates/web/fixmybarangay/auth/sign_out.html +++ b/templates/web/zurich/auth/sign_out.html @@ -2,7 +2,6 @@ <h1>[% loc('You have been signed out') %]</h1> -<p>Please feel free to <a href="[% c.uri_for('/auth') %]">sign in again</a>, or -go back to the <a href="/">FixMyBarangay front page</a>.</p> +<p>[% tprintf( loc('Please feel free to <a href="%s">sign in again</a>, or go back to the <a href="/">front page</a>.'), c.uri_for('/admin') ) %]</p> [% INCLUDE 'footer.html' %] diff --git a/templates/web/zurich/faq/faq-de.html b/templates/web/zurich/faq/faq-de-ch.html index a739f1b74..a739f1b74 100755 --- a/templates/web/zurich/faq/faq-de.html +++ b/templates/web/zurich/faq/faq-de-ch.html diff --git a/templates/web/zurich/footer.html b/templates/web/zurich/footer.html index 2e4717360..a570a66a3 100644 --- a/templates/web/zurich/footer.html +++ b/templates/web/zurich/footer.html @@ -4,15 +4,24 @@ <div class="nav-wrapper"> <div class="nav-wrapper-2"> - <div id="main-nav" role="navigation"> - <ul id="main-menu"> - <li><[% IF c.req.uri.path == '/' %]span[% ELSE %]a href="/"[% END %] + <div class="nav-wrapper-3"> + <div id="main-nav" role="navigation"> + [% IF c.user_exists %] + <p> + [% tprintf(loc('Hi %s'), c.user.name || c.user.email) %] + </p><p><a href="/auth/sign_out">[% loc('sign out') %]</a> + </p> + [% ELSE %] + <ul id="main-menu" class="mob-only"> + <li><[% IF c.req.uri.path == '/' %]span[% ELSE %]a href="/"[% END %] >[% loc("Report a problem") %]</[% c.req.uri.path == '/' ? 'span' : 'a' %]></li>[% - %]<li><[% IF c.req.uri.path == '/reports' %]span[% ELSE %]a href="/reports"[% END + %]<li><[% IF c.req.uri.path == '/reports' %]span[% ELSE %]a href="/reports"[% END %]>[% loc("All reports") %]</[% c.req.uri.path == '/reports' ? 'span' : 'a' %]></li>[% - %]<li><[% IF c.req.uri.path == '/faq' %]span[% ELSE %]a href="/faq"[% END + %]<li><[% IF c.req.uri.path == '/faq' %]span[% ELSE %]a href="/faq"[% END %]>[% loc("Help") %]</[% c.req.uri.path == '/faq' ? 'span' : 'a' %]></li> - </ul> + </ul> + [% END %] + </div> </div> </div> </div> diff --git a/templates/web/zurich/header.html b/templates/web/zurich/header.html index 9fa43f3fa..8c8e49775 100644 --- a/templates/web/zurich/header.html +++ b/templates/web/zurich/header.html @@ -11,21 +11,23 @@ <meta name="HandHeldFriendly" content="true"> <meta name="mobileoptimized" content="0"> - <link rel="stylesheet" href="[% version('/cobrands/' _ c.cobrand.moniker _ '/base.css') %]"> - <link rel="stylesheet" href="[% version('/cobrands/' _ c.cobrand.moniker _ '/layout.css') %]" media="(min-width:48em)"> +[% 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)"> [% extra_css %] <!--[if (lt IE 9) & (!IEMobile)]> - <link rel="stylesheet" href="[% version('/cobrands/' _ c.cobrand.moniker _ '/layout.css') %]"> + <link rel="stylesheet" href="[% start %][% version('/cobrands/' _ c.cobrand.moniker _ '/layout.css') %]"> <![endif]--> - <script src="[% version('/js/modernizr.custom.js') %]" charset="utf-8"></script> - <script src="[% version('/cobrands/fixmystreet/position_map.js') %]" charset="utf-8"></script> - [% INCLUDE 'common_header_tags.html', js_override = '/cobrands/fixmystreet/fixmystreet.js', site_title = 'FixMyZürich' %] +<!-- CDN for now FIXME --><link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/redmond/jquery-ui.css"> + + <script src="[% start %][% version('/js/modernizr.custom.js') %]" charset="utf-8"></script> + <script src="[% start %][% version('/cobrands/fixmystreet/position_map.js') %]" charset="utf-8"></script> + [% INCLUDE 'common_header_tags.html', js_override = '/cobrands/fixmystreet/fixmystreet.js', site_title = 'FixMyZurich' %] [% extra_js %] - - [% IF c.req.uri.host == 'osm.fixmystreet.com' %] - <link rel="canonical" href="http://www.fixmystreet.com[% c.req.uri.path_query %]"> - [% END %] + +<!-- CDN for now FIXME --><script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js" charset="utf-8"></script> [% INCLUDE 'tracking_code.html' %] @@ -36,25 +38,52 @@ <div class="table-cell"> <header id="site-header" role="banner"> <div class="container"> - <a href="/" id="site-logo">FixMyStreet</a> + <a href="http://www.stadt-zuerich.ch/" id="site-logo">FixMyZurich</a> <a href="#main-nav" id="nav-link">Main Navigation</a> </div> </header> - <div id="user-meta"> - [% IF c.user_exists %] - <p> - [% tprintf(loc('Hi %s'), c.user.name || c.user.email) %] - <a href="/auth/sign_out">[% loc('sign out') %]</a> - </p> - [% ELSE %] - <!-- <a href="/auth">[% loc('Sign in') %]</a> --> - [% END %] - </div> + <div class="container"> - [% pre_container_extra %] +[% IF admin %] + <div class="admin-nav-wrapper"> + <div class="admin-nav"> + <ul> + [% pagename = c.req.uri.path %] + [% pagename = pagename.replace('/admin/?(\w*).*', '$1') %] + + <li [% IF pagename == 'summary' OR pagename == '' %]class="current"[% END %]> + <a href="/admin/summary">[% loc('Summary') %]</a> + </li> + <li [% IF pagename == 'reports' OR pagename == 'report_edit' %]class="current"[% END %]> + <a href="/admin/reports">[% loc('Reports') %]</a> + </li> + [% IF admin_type == 'dm' OR admin_type == 'super' %] + <li [% IF pagename == 'bodies' OR pagename == 'body' %]class="current"[% END %]> + <a href="/admin/bodies">[% loc('Bodies') %]</a> + </li> + [% END %] + [% IF admin_type == 'super' %] + <li [% IF pagename == 'users' OR pagename == 'user_edit' %]class="current"[% END %]> + <a href="/admin/users">[% loc('Users') %]</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"> + <input type="text" name="search" size="20" id="search" placeholder="[% loc('Search reports') %]"> + </form> + + </li> + </ul> + </div> + </div> +[% END %] - <div class="container"> <div class="content[% " $mainclass" | html IF mainclass %]" role="main"> + [% IF NOT admin %] + [% INCLUDE 'nav_over_content.html' %] + [% END %] + + [% pre_container_extra %] <!-- [% INCLUDE 'debug_header.html' %] --> diff --git a/templates/web/zurich/nav_over_content.html b/templates/web/zurich/nav_over_content.html new file mode 100644 index 000000000..4dbe87652 --- /dev/null +++ b/templates/web/zurich/nav_over_content.html @@ -0,0 +1,10 @@ + <div id="zurich-main-nav" class="desk-only"> + <ul> + <li><[% IF c.req.uri.path == '/around' || c.req.uri.path == '/' %]span[% ELSE %]a href="/"[% END %] + >[% loc("Report a problem") %]</[% c.req.uri.path == '/around' ? 'span' : 'a' %]></li>[% + %]<li><[% IF c.req.uri.path == '/reports' %]span[% ELSE %]a href="/reports"[% END + %]>[% loc("All reports") %]</[% c.req.uri.path == '/reports' ? 'span' : 'a' %]></li>[% + %]<li><[% IF c.req.uri.path == '/faq' %]span[% ELSE %]a href="/faq"[% END + %]>[% loc("Help") %]</[% c.req.uri.path == '/faq' ? 'span' : 'a' %]></li> + </ul> + </div> diff --git a/templates/web/zurich/report/_item.html b/templates/web/zurich/report/_item.html new file mode 100644 index 000000000..41164cdd1 --- /dev/null +++ b/templates/web/zurich/report/_item.html @@ -0,0 +1,22 @@ +<li> +<a class="text" href="[% c.uri_for('/report', problem.id ) %]"> + [% IF problem.state != 'unconfirmed' AND problem.photo AND problem.extra.publish_photo %] + <img class="img" height="60" width="90" src="/photo/[% problem.id %].fp.jpeg" alt=""> + [% END %] + [% IF problem.state != 'unconfirmed' %] + <h4>[% problem.title | html %]</h4> + [% ELSE %] + <h4><em>[% loc('Awaiting moderation') %]</em></h4> + [% END %] + <small>[% prettify_dt( problem.created_local, 'zurich' ) %] + [%- IF dist %], [% dist %]km[% END %] + [%- IF include_lastupdate AND problem.created != problem.lastupdate AND problem.whensent != problem.lastupdate %], + [% tprintf('last updated %s', prettify_dt( problem.lastupdate_local, 'zurich' ) ) %] + [%- END %] + [% IF NOT no_fixed AND problem.is_fixed %] + [% loc('(fixed)') %] + [% ELSIF NOT no_fixed AND problem.is_closed %] + [% loc('(closed)') %] + [% END %]</small> +</a> +</li> diff --git a/templates/web/zurich/report/_main.html b/templates/web/zurich/report/_main.html new file mode 100644 index 000000000..e6c310873 --- /dev/null +++ b/templates/web/zurich/report/_main.html @@ -0,0 +1,17 @@ +<div class="problem-header cf"> + <h1>[% tprintf( loc('Reported in the %s category'), problem.category ) %]</h1> + <p class="sub"> + [% prettify_dt( problem.created_local, 'zurich' ) %] + [%- IF !problem.used_map %]<br>[% loc('there is no pin shown as the user did not use the map') %][% END %] + </p> + + [% IF problem.state != 'unconfirmed' %] + [% IF problem.extra.publish_photo %] + [% INCLUDE 'report/photo.html' object=problem %] + [% END %] + [% add_links( problem.detail ) | html_para %] + [% ELSE %] + [% loc('This report is awaiting moderation.') %] + [% END %] + +</div> diff --git a/templates/web/zurich/report/banner.html b/templates/web/zurich/report/banner.html new file mode 100644 index 000000000..eda70a0de --- /dev/null +++ b/templates/web/zurich/report/banner.html @@ -0,0 +1,17 @@ +[% 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 %] + diff --git a/templates/web/zurich/report/new/councils_text_all.html b/templates/web/zurich/report/new/councils_text_all.html new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/templates/web/zurich/report/new/councils_text_all.html 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 a4029c527..1cecf036d 100644 --- a/templates/web/zurich/report/new/fill_in_details_form.html +++ b/templates/web/zurich/report/new/fill_in_details_form.html @@ -1,20 +1,6 @@ <div id="report-a-problem-main"> <h1>[% loc('Reporting a problem') %]</h1> - [% IF js %] - <p id="councils_text"> - [% - tprintf( - loc('All the information you provide here will be sent to <strong>%s</strong>.'), - loc('the local council') - ); - %] - [% loc('The subject and details of the problem will be public, plus your name if you give us permission.') %] - </p> - [% ELSE %] - [% PROCESS 'report/new/councils_text.html' %] - [% END %] - <div id="report-a-problem-sidebar"> <!-- The text for this section needs checking, but I can't work out which bit comes from where @@ -49,8 +35,8 @@ [% INCLUDE 'report/new/form_heading.html' %] - [% IF field_errors.council %] - <p class='form-error'>[% field_errors.council %]</p> + [% IF field_errors.bodies %] + <p class='form-error'>[% field_errors.bodies %]</p> [% END %] <label for="form_detail">[% loc('Details') %]</label> diff --git a/templates/web/zurich/report/updates.html b/templates/web/zurich/report/updates.html new file mode 100644 index 000000000..69c8af99f --- /dev/null +++ b/templates/web/zurich/report/updates.html @@ -0,0 +1,17 @@ +[% IF problem.state == 'fixed - council' OR problem.state == 'closed' %] + <h4 class="static-with-rule">[% loc('Updates') %]</h4> + <ul class="issue-list"> + <li> + <div class="update-wrap"> + <div class="update-text"> + <p class="meta-2">[% prettify_dt( problem.lastupdate_local, 'zurich' ) %]</p> + [% IF problem.state == 'fixed - council' %] + [% 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> + </li> + </ul> +[% END %] diff --git a/templates/web/zurich/reports/index.html b/templates/web/zurich/reports/index.html new file mode 100755 index 000000000..670746753 --- /dev/null +++ b/templates/web/zurich/reports/index.html @@ -0,0 +1,33 @@ +[% + PROCESS "maps/${map.type}.html"; + INCLUDE 'header.html', + title = loc('Summary reports'), + bodyclass = 'mappage'; +%] +[% map_html %] + <p id='sub_map_links'> + <a class="hidden-nojs" id="map_layer_toggle" href="">Stadtplan</a> + </p> +</div> + +<div id="side"> + +<h1>[% loc('All Reports') %]</h1> + +[% INCLUDE 'pagination.html', param = 'p' %] + +<section class="full-width"> + [% IF problems.0 %] + <ul class="issue-list-a"> + [% FOREACH problem IN problems.0 %] + [% INCLUDE 'reports/_list-entry.html' %] + [% END %] + </ul> + [% END %] +</section> + +[% INCLUDE 'pagination.html', param = 'p' %] + +</div> +[% INCLUDE 'footer.html' %] + diff --git a/templates/web/zurich/tokens/confirm_problem.html b/templates/web/zurich/tokens/confirm_problem.html new file mode 100644 index 000000000..d61cf3ffa --- /dev/null +++ b/templates/web/zurich/tokens/confirm_problem.html @@ -0,0 +1,15 @@ +[% INCLUDE 'header.html', title = loc('Confirmation') %] + +<h1>[% loc('Confirmation') %]</h1> + +[% + loc('You have successfully confirmed your email address.'); + tprintf( + loc( 'You can <a href="%s%s">view the problem on this site</a>.' ), + c.cobrand.base_url_for_report( problem ), + problem.url + ); +%] +</p> + +[% INCLUDE 'footer.html' %] |