diff options
Diffstat (limited to 'templates')
131 files changed, 2995 insertions, 745 deletions
diff --git a/templates/email/default/confirm_report_sent.txt b/templates/email/default/confirm_report_sent.txt new file mode 100644 index 000000000..42f200213 --- /dev/null +++ b/templates/email/default/confirm_report_sent.txt @@ -0,0 +1,9 @@ +Subject: Problem Report Sent: <?=$values['title']?> + +Hi, + +Your report about "<?=$values['title']?>" has been sent to <?=$values['councils_name']?>. + +Thanks + +<?=$values['signature']?> diff --git a/templates/email/fixmybarangay/login.txt b/templates/email/fixmybarangay/login.txt new file mode 100644 index 000000000..3ca8d1323 --- /dev/null +++ b/templates/email/fixmybarangay/login.txt @@ -0,0 +1,14 @@ +Subject: [% loc('Your FixMyBarangay.com account details') %] + +Please click on the link below to confirm your email address. Then you will be +able to view your problem reports and manage them more easily. + +[% c.uri_for_action( 'auth/token', token ) %] + +Note that your can't create new reports on FixMyBarangay unless your account has +been authorised as a staff account, which we can do after it has been created. +Get in touch with the team if you think this applies to you, and we haven't yet +authorised your account. + +[% INCLUDE 'signature.txt' %] + diff --git a/templates/email/fixmybarangay/signature.txt b/templates/email/fixmybarangay/signature.txt new file mode 100644 index 000000000..eb5000f58 --- /dev/null +++ b/templates/email/fixmybarangay/signature.txt @@ -0,0 +1,2 @@ +Yours, +The FixMyBarangay team diff --git a/templates/email/fixmybarangay/site-name.txt b/templates/email/fixmybarangay/site-name.txt new file mode 100644 index 000000000..075d881b5 --- /dev/null +++ b/templates/email/fixmybarangay/site-name.txt @@ -0,0 +1 @@ +FixMyBarangay diff --git a/templates/email/seesomething/confirm_report_sent.txt b/templates/email/seesomething/confirm_report_sent.txt new file mode 100644 index 000000000..d62a50c49 --- /dev/null +++ b/templates/email/seesomething/confirm_report_sent.txt @@ -0,0 +1,10 @@ +Subject: See Something, Say Something report sent + +Thank you for your report. It will help us to direct our policing activity to make public transport even safer. Find out more of what we are doing at: + +Safer Travel Partnership + +http://www.safertravel.info + +Follow us on Twitter: https://www.twitter.com/ST_Police +or on Facebook: http://www.facebook.com/safertravelpolice diff --git a/templates/email/seesomething/submit.txt b/templates/email/seesomething/submit.txt new file mode 100644 index 000000000..0682425fe --- /dev/null +++ b/templates/email/seesomething/submit.txt @@ -0,0 +1,25 @@ +Subject: Report on See Something, Say Something + +A user of +See Something, Say Something has submitted the following report +of a problem that they believe might require your attention. + +<?=$values['image_url']?> +---------- + +<?=$values['user_details']?> + +<?=$values['phone_line']?><?=$values['category_line']?><?=$values['subcategory_line']?> + +Details: <?=$values['detail']?> + +<?=$values['easting_northing']?>Latitude: <?=$values['latitude']?> + +Longitude: <?=$values['longitude']?> + +<?=$values['closest_address']?>---------- + +Replies to this email will go to the user who submitted the problem +unless it is an anonymous report in which case they will be discarded. + +<?=$values['signature']?> diff --git a/templates/email/zurich/alert-moderation-overdue.txt b/templates/email/zurich/alert-moderation-overdue.txt new file mode 100644 index 000000000..85906b9cb --- /dev/null +++ b/templates/email/zurich/alert-moderation-overdue.txt @@ -0,0 +1,10 @@ +Subject: eskalierte Meldungen auf FixMyZürich
+
+
+ +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:
+ +<?=$values['admin_url']?>
\ No newline at end of file diff --git a/templates/email/zurich/alert-overdue.txt b/templates/email/zurich/alert-overdue.txt new file mode 100644 index 000000000..90c8ee02f --- /dev/null +++ b/templates/email/zurich/alert-overdue.txt @@ -0,0 +1,13 @@ +Subject: Rückmeldung erforderlich auf FixMyZürich
+
+ +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 diff --git a/templates/email/zurich/problem-confirm.txt b/templates/email/zurich/problem-confirm.txt new file mode 100755 index 000000000..e770aa69e --- /dev/null +++ b/templates/email/zurich/problem-confirm.txt @@ -0,0 +1,16 @@ +Subject: Fix My Zürich: Meldung #[% ---report.ID--- | trim %] + +
+
+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 diff --git a/templates/email/zurich/reply-autoresponse.txt b/templates/email/zurich/reply-autoresponse.txt new file mode 100755 index 000000000..ef5d69d41 --- /dev/null +++ b/templates/email/zurich/reply-autoresponse.txt @@ -0,0 +1,10 @@ +Subject: Automatische Antwort auf Ihr E-Mail
+
+Guten Tag
+
+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 Fragen zu Fix My Zürich haben, senden Sie ein E-Mail an gis-zentrum@zuerich.ch
diff --git a/templates/email/zurich/submit.txt b/templates/email/zurich/submit.txt new file mode 100755 index 000000000..a95b02cde --- /dev/null +++ b/templates/email/zurich/submit.txt @@ -0,0 +1,10 @@ +Subject: Fix My Zürich: #<?=----$values['ID']----?> + +
+
+<?=$values['url']?>
+
+
+<?=$values['detail']?> + +
diff --git a/templates/web/bromley/around/intro.html b/templates/web/bromley/around/intro.html new file mode 100644 index 000000000..ee4685b9c --- /dev/null +++ b/templates/web/bromley/around/intro.html @@ -0,0 +1 @@ + <h1 class="main mob-only">Reporting a problem in Bromley’s streets or parks</h1> diff --git a/templates/web/default/admin/council_contacts.html b/templates/web/default/admin/council_contacts.html index ac6698510..56850a82b 100644 --- a/templates/web/default/admin/council_contacts.html +++ b/templates/web/default/admin/council_contacts.html @@ -1,5 +1,7 @@ [% INCLUDE 'admin/header.html' title=tprintf(loc('Council contacts for %s'), council_name) -%] +[% conf = open311.next %] + [% IF updated %] <p> <em>[% updated %]</em> @@ -36,8 +38,10 @@ <th>[% loc('Email') %]</th> <th>[% loc('Confirmed') %]</th> <th>[% loc('Deleted') %]</th> + <th>[% loc('Devolved') %]</th> <th>[% loc('Last editor') %]</th> <th>[% loc('Note') %]</th> + <th>[% loc('Public') %]</th> <th>[% loc('When edited') %]</th> <th>[% loc('Confirm') %]</th> </tr> @@ -47,8 +51,10 @@ <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>[% contact.editor %]</td> <td>[% contact.note | html %]</td> + <td>[% contact.non_public ? loc('Non Public') : loc('Public') %]</td> <td>[% contact.whenedited.ymd _ ' ' _ contact.whenedited.hms %]</td> <td><input type="checkbox" name="confirmed" value="[% contact.category %]"></td> </tr> @@ -79,10 +85,10 @@ <p> <input type="checkbox" name="confirmed" value="1" id="confirmed"> - <label for="confirmed">[% loc('Confirmed') %]</label> + <label for="confirmed" class="inline">[% loc('Confirmed') %]</label> - <input type="checkbox" name="deleted" value="1"id="deleted"> - <label for="deleted">[% loc('Deleted') %]</label> + <input type="checkbox" name="deleted" value="1" id="deleted"> + <label for="deleted" class="inline">[% loc('Deleted') %]</label> </p> <p> @@ -90,6 +96,11 @@ </p> <p> + <input type="checkbox" name="non_public" value="1" id="non_public"> + <label for="non_public" class="inline">[% loc('Private') %]</label> + </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 %]" > @@ -104,24 +115,23 @@ <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"> - [% conf = open311.next %] <p> - <label for="endpoint">Endpoint</label>: + <label for="endpoint">Endpoint</label> <input type="text" name="endpoint" id="endpoint" value="[% conf.endpoint %]" size="50"> </p> <p> - <label for="jurisdiction">Jurisdiction</label>: + <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>: + <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>: + <label for="send_method">Send Method</label> <select name="send_method"> <option value=""> -- Select a method -- </option> [% FOR method IN send_methods %] @@ -131,18 +141,23 @@ </p> <p> - <label for="send_comments">Use Open311 comment sending extension</label>: <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>: + <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> - <label for="suppress_alerts">Do not send email alerts on fetched comments to problem creator</label>: <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> diff --git a/templates/web/default/admin/council_edit.html b/templates/web/default/admin/council_edit.html index 0968d3570..408466b51 100644 --- a/templates/web/default/admin/council_edit.html +++ b/templates/web/default/admin/council_edit.html @@ -26,10 +26,38 @@ <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><br> + <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> + <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"> + <p> + <label for="endpoint">Endpoint</label>: + <input type="text" name="endpoint" id="endpoint" value="[% contact.endpoint %]" size="50"> + </p> + + <p> + <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>: + <input type="text" name="api_key" id="api_key" value="[% contact.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 contact.send_method == method %]>[% method %]</option> + [% END %] + </select> + </p> + <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') %]"> diff --git a/templates/web/default/admin/footer.html b/templates/web/default/admin/footer.html index 308b1d01b..4c891c4ff 100644 --- a/templates/web/default/admin/footer.html +++ b/templates/web/default/admin/footer.html @@ -1,2 +1 @@ -</body> -</html> +[% INCLUDE 'footer.html' %] diff --git a/templates/web/default/admin/header.html b/templates/web/default/admin/header.html index e0317cca0..93254f5e3 100644 --- a/templates/web/default/admin/header.html +++ b/templates/web/default/admin/header.html @@ -1,18 +1,16 @@ -<html> -<head> -<title>[% title %] - [% loc('FixMyStreet administration') %]</title> +[% INCLUDE 'header.html' admin = 1, bodyclass = 'fullwidthpage' %] <style type="text/css"> dt { clear: left; float: left; font-weight: bold; } dd { margin-left: 8em; } -.hidden { color: #666666; } +.adminhidden { color: #666666; } .error { color: red; } +select { width: auto; } </style> -</head> -<body> - <strong>[% loc('FixMyStreet admin:') %]</strong> + <p><strong>[% loc('FixMyStreet admin:') %]</strong> [%- FOREACH link IN allowed_links %] <a href="[% c.uri_for( link ) %]">[% allowed_pages.$link.0 %]</a> - [%- END %] + [% IF NOT loop.last %]|[% END %] + [% END %]</p> <h1>[% title %]</h1> diff --git a/templates/web/default/admin/index.html b/templates/web/default/admin/index.html index b1eddaa3a..2c5ee55db 100644 --- a/templates/web/default/admin/index.html +++ b/templates/web/default/admin/index.html @@ -21,7 +21,7 @@ [% IF c.cobrand.admin_show_creation_graph -%] <p> - <a href="[% c.config.BASE_URL %]/bci-live-creation.png">[% loc('Graph of problem creation by status over time') %]</a> + <a href="[% c.config.BASE_URL %]/fms-live-creation.png">[% loc('Graph of problem creation by status over time') %]</a> </p> [% END -%] diff --git a/templates/web/default/admin/list_updates.html b/templates/web/default/admin/list_updates.html index 0a05ba4ac..d21919b16 100644 --- a/templates/web/default/admin/list_updates.html +++ b/templates/web/default/admin/list_updates.html @@ -15,7 +15,7 @@ <th>*</th> </tr> [% FOREACH update IN updates -%] - <tr[% ' class="hidden"' IF update.state == 'hidden' || update.problem.state == 'hidden' %]> + <tr[% ' class="adminhidden"' IF update.state == 'hidden' || update.problem.state == 'hidden' %]> <td>[%- IF update.state == 'confirmed' && update.problem.state != 'hidden' -%] [%- cobrand_data = update.cobrand_data %] [%- cobrand_data = c.data_for_generic_update IF !update.cobrand %] diff --git a/templates/web/default/admin/problem_row.html b/templates/web/default/admin/problem_row.html index 22825429a..5aa8bbfee 100644 --- a/templates/web/default/admin/problem_row.html +++ b/templates/web/default/admin/problem_row.html @@ -1,5 +1,5 @@ [%- FOR problem IN problems %] - <tr[% ' class="hidden"' IF problem.state == 'hidden' %]> + <tr[% ' class="adminhidden"' IF problem.state == 'hidden' %]> <td>[%- IF problem.is_visible -%] [%- cobrand_data = problem.cobrand_data %] [%- cobrand_data = c.data_for_generic_problem IF !problem.cobrand %] diff --git a/templates/web/default/admin/report_edit.html b/templates/web/default/admin/report_edit.html index 9ef7e8248..ea98a9be9 100644 --- a/templates/web/default/admin/report_edit.html +++ b/templates/web/default/admin/report_edit.html @@ -40,6 +40,7 @@ <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> [% IF problem.photo %] [% photo = problem.get_photo_params %] diff --git a/templates/web/default/admin/search_abuse.html b/templates/web/default/admin/search_abuse.html deleted file mode 100644 index 0984e85cf..000000000 --- a/templates/web/default/admin/search_abuse.html +++ /dev/null @@ -1,21 +0,0 @@ -[% INCLUDE 'admin/header.html' title=loc('Search Abuse Table') %] - -<form method="get" action="[% c.uri_for('search_abuse') %]" 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> - - -[% IF emails.size > 0 %] -<table cellspacing="0" cellpadding="2" border="1"> - <tr> - <th>[% loc('Email') %]</th> - </tr> -[%- FOREACH foo IN emails %] - <tr> - <td>[%- foo.email | html -%]</td> - </tr> -[%- END -%] -</table> -[% END %] - -[% INCLUDE 'admin/footer.html' %] diff --git a/templates/web/default/admin/search_users.html b/templates/web/default/admin/search_users.html index 18c964dfe..0b4ba88e7 100644 --- a/templates/web/default/admin/search_users.html +++ b/templates/web/default/admin/search_users.html @@ -20,8 +20,8 @@ <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>[% user.flagged ? loc('Yes') : ' ' %]</td> - <td><a href="[% c.uri_for( 'user_edit', user.id ) %]">[% loc('Edit') %]</a></td> + <td>[% user.flagged == 2 ? loc('(Email in abuse table)') : user.flagged ? loc('Yes') : ' ' %]</td> + <td>[% IF user.id %]<a href="[% c.uri_for( 'user_edit', user.id ) %]">[% loc('Edit') %]</a>[% END %]</td> </tr> [%- END -%] </table> diff --git a/templates/web/default/admin/stats.html b/templates/web/default/admin/stats.html index 3b9f4a264..234600837 100644 --- a/templates/web/default/admin/stats.html +++ b/templates/web/default/admin/stats.html @@ -2,7 +2,7 @@ [% IF show_count %] <p> -<strong>[% tprintf( loc( '%sreports between %s and %s' ), ( unconfirmed ? loc( 'All' ) _ ' ' : loc( 'Confirmed' ) _ ' ' ), start_date.ymd, end_date.ymd ) | html %]</strong> +<strong>[% tprintf( unconfirmed ? loc( 'All reports between %s and %s' ) : loc( 'Confirmed reports between %s and %s' ), start_date.ymd, end_date.ymd ) | html %]</strong> </p> [% IF bymonth %] <table> @@ -73,11 +73,11 @@ </p> <p> - <input type="checkbox" name="unconfirmed" id="unconfirmed"[% unconfirmed ? ' checked' : '' %] /><label for="unconfirmed">[% loc('Include unconfirmed reports') %]</label> + <input type="checkbox" name="unconfirmed" id="unconfirmed"[% unconfirmed ? ' checked' : '' %] /><label class="inline" for="unconfirmed">[% loc('Include unconfirmed reports') %]</label> </p> <p> - <input type="checkbox" name="bymonth" id="bymonth"[% bymonth ? ' checked' : '' %] /><label for="bymonth">[% loc('By Date') %]</label> + <input type="checkbox" name="bymonth" id="bymonth"[% bymonth ? ' checked' : '' %] /><label class="inline" for="bymonth">[% loc('By Date') %]</label> </p> <p> diff --git a/templates/web/default/admin/update_edit.html b/templates/web/default/admin/update_edit.html index e1783fd7c..1d5ee80b4 100644 --- a/templates/web/default/admin/update_edit.html +++ b/templates/web/default/admin/update_edit.html @@ -45,7 +45,7 @@ [% 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">[% loc("Remove photo (can't be undone!)") %]</label></li> +<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> diff --git a/templates/web/default/around/_report_banner.html b/templates/web/default/around/_report_banner.html new file mode 100755 index 000000000..024fe08d9 --- /dev/null +++ b/templates/web/default/around/_report_banner.html @@ -0,0 +1,10 @@ +<p id="text_map" class="banner"> + [% loc( 'To <strong>report a problem</strong>, click on the map at the correct location.' ) %] + [% + tprintf( + loc("<small>If you cannot see the map, <a href='%s' rel='nofollow'>skip this step</a>.</small>"), + url_skip + ) + %] + <span id="text_map_arrow"></span> +</p> diff --git a/templates/web/default/around/_updates.html b/templates/web/default/around/_updates.html new file mode 100755 index 000000000..8110a6c7c --- /dev/null +++ b/templates/web/default/around/_updates.html @@ -0,0 +1,12 @@ +<h1>[% loc('Problems in this area') %]</h1> + +<p id="alert_links_area"> + <a id="email_alert" rel="nofollow" href="[% email_url | html %]"> + [%- loc('Email me new local problems') -%] +</a> | + <a href="[% rss_url | html %]" id="rss_alert"> + <span>[% rss_alt %]</span> + <img src="/i/feed.png" width="16" height="16" title="[% rss_title %]" alt="[% rss_alt %]" border="0" style="vertical-align: top"> + </a> +</p> + diff --git a/templates/web/default/around/around_index.html b/templates/web/default/around/around_index.html index f58d13d80..a143e90a2 100644 --- a/templates/web/default/around/around_index.html +++ b/templates/web/default/around/around_index.html @@ -1,34 +1,24 @@ -[% INCLUDE 'header.html', title => loc('Reporting a problem') %] - -[% - # NOTE ON PARTIAL REPORTS: - # - # partial reports get a bit of extra text added, the form goes to - # '/report/new' and the partial hidden field is added to the form. -%] - -[% INCLUDE 'around/postcode_form.html' %] - -[% IF location_error %] - <p class="error">[% location_error %]</p> -[% END %] - -[% IF possible_location_matches %] - <p>[% loc('We found more than one match for that location. We show up to ten matches, please try a different search if yours is not here.') %]</p> - <ul class="pc_alternatives"> - [% FOREACH match IN possible_location_matches %] - <li><a href="/around?latitude=[% match.latitude | uri %];longitude=[% match.longitude | uri %]">[% match.address | html %]</a></li> - [% END %] - </ul> -[% END %] - -[% IF partial_token %] - <p style="margin-top: 0; color: #cc0000;"> - <img align="right" src="/photo/[% report.id %].jpeg" hspace="5"> - [% loc("Thanks for uploading your photo. We now need to locate your problem, so please enter a nearby street name or postcode in the box below :") %] - </p> -[% END %] - - +[% INCLUDE 'header.html', title => loc('Reporting a problem'), bodyclass = 'mappage' %] + +<form action="[% c.uri_for('/around') %]" method="get" name="mapForm" id="mapForm"> + <div id="side-form"> + <div id="report-a-problem-main"> + [% INCLUDE 'around/postcode_form.html' %] + + [% IF location_error %] + <p class="error">[% location_error %]</p> + [% END %] + + [% IF possible_location_matches %] + <p>[% loc('We found more than one match for that location. We show up to ten matches, please try a different search if yours is not here.') %]</p> + <ul class="pc_alternatives"> + [% FOREACH match IN possible_location_matches %] + <li><a href="/around?latitude=[% match.latitude | uri %];longitude=[% match.longitude | uri %]">[% match.address | html %]</a></li> + [% END %] + </ul> + [% END %] + </div> + </div> +</form> [% INCLUDE 'footer.html' %] diff --git a/templates/web/default/around/display_location.html b/templates/web/default/around/display_location.html index 88f8b89ae..d50009299 100755 --- a/templates/web/default/around/display_location.html +++ b/templates/web/default/around/display_location.html @@ -32,97 +32,72 @@ INCLUDE 'header.html', title => loc('Viewing a location') rss => [ loc('Recent local problems, FixMyStreet'), rss_url ], + bodyclass => 'mappage', robots => 'noindex,nofollow'; + + allow_creation = !c.cobrand.only_authed_can_create || (c.user && c.user.from_council); %] +[% IF allow_creation %] <form action="[% c.uri_for('/report/new') %]" method="post" name="mapForm" id="mapForm" enctype="multipart/form-data" class="validate"> -[% IF c.req.params.map_override %] -<input type="hidden" name="map_override" value="[% c.req.params.map_override | html %]"> + [% IF c.req.params.map_override %] + <input type="hidden" name="map_override" value="[% c.req.params.map_override | html %]"> + [% END %] + <input type="hidden" name="pc" value="[% pc | html %]"> + + <input type="hidden" name="latitude" id="fixmystreet.latitude" value="[% short_latitude | html %]"> + <input type="hidden" name="longitude" id="fixmystreet.longitude" value="[% short_longitude | html %]"> [% END %] -<input type="hidden" name="pc" value="[% pc | html %]"> -<input type="hidden" name="latitude" id="fixmystreet.latitude" value="[% short_latitude | html %]"> -<input type="hidden" name="longitude" id="fixmystreet.longitude" value="[% short_longitude | html %]"> + [% map_html %] -[% map_html %] + <p id='sub_map_links'> + [% 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 %] + <a id='hide_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => 1 } ) %]'>[% loc('Hide pins') %]</a> + [% END %] + [% IF c.cobrand.country == 'GB' || c.cobrand.country == 'NO' %] + <span class="hidden">|</span> + [% IF c.req.params.all_pins %] + <a id='all_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => undef, all_pins => undef } ) %]'>[% loc('Hide old') %]</a> + [% ELSE %] + <a id='all_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => undef, all_pins => 1 } ) %]'>[% loc('Show old') %]</a> + [% END %] + [% END %] + </p> -<p id='sub_map_links'> - [% 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 %] - <a id='hide_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => 1 } ) %]'>[% loc('Hide pins') %]</a> - [% END %] - [% IF c.cobrand.country == 'GB' || c.cobrand.country == 'NO' %] - | - [% IF c.req.params.all_pins %] - <a id='all_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => undef, all_pins => undef } ) %]'>[% loc('Hide old') %]</a> - [% ELSE %] - <a id='all_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => undef, all_pins => 1 } ) %]'>[% loc('Show old') %]</a> + </div> + + + + + <div id="side"> + + [% IF allow_creation %] + [% INCLUDE 'around/_report_banner.html' %] + [% TRY %][% INCLUDE 'around/extra_text.html' %][% CATCH file %][% END %] [% END %] - [% END %] -</p> - -</div> -<div id="side"> - -<p id="text_map" class="banner"> - [% loc( 'To <strong>report a problem</strong>, click on the map at the correct location.' ) %] - [% - tprintf( - loc("<small>If you cannot see the map, <a href='%s' rel='nofollow'>skip this step</a>.</small>"), - url_skip - ) + + [% INCLUDE 'around/_updates.html' %] + + <section class="full-width"> + [% INCLUDE "around/tabbed_lists.html" %] + </section> + </div> + + [% IF allow_creation %] + <div style="display:none" id="side-form"> + [% INCLUDE "report/new/fill_in_details_form.html" + js = 1, + report.used_map = 1 + report.name = c.user.name %] - <span id="text_map_arrow"></span> -</p> - -[% TRY %][% INCLUDE 'around/extra_text.html' %][% CATCH file %][% END %] - -<h1>[% loc('Problems in this area') %]</h1> - -<p id="alert_links_area"> - <a id="email_alert" rel="nofollow" href="[% email_url | html %]"> - [%- loc('Email me new local problems') -%] -</a> | - <a href="[% rss_url | html %]" id="rss_alert"> - <span>[% rss_alt %]</span> - <img src="/i/feed.png" width="16" height="16" title="[% rss_title %]" alt="[% rss_alt %]" border="0" style="vertical-align: top"> - </a> -</p> - -<div id="nearby_lists"> - - <h2>[% loc('Reports on and around the map') %]</h2> - - <ul id="current"> - [% INCLUDE "around/on_map_list_items.html" %] - </ul> - - - <h2> - [% - tprintf( - loc( 'Closest nearby problems <small>(within %skm)</small>' ), - distance - ) - %] - </h2> - - <ul id="current_near"> - [% INCLUDE "around/around_map_list_items.html" %] - </ul> - -</div> - -</div> - -<div style="display:none" id="side-form"> -[% INCLUDE "report/new/fill_in_details_form.html" - js = 1, - report.used_map = 1 -%] -</div> + </div> + [% END %] +[% IF allow_creation %] </form> +[% END %] [% INCLUDE 'footer.html' %] diff --git a/templates/web/default/around/tabbed_lists.html b/templates/web/default/around/tabbed_lists.html new file mode 100755 index 000000000..4ad7b35fc --- /dev/null +++ b/templates/web/default/around/tabbed_lists.html @@ -0,0 +1,23 @@ +<div id="nearby_lists"> + + <h2>[% loc('Reports on and around the map') %]</h2> + + <ul id="current"> + [% INCLUDE "around/on_map_list_items.html" %] + </ul> + + <h2> + [% + tprintf( + loc( 'Closest nearby problems <small>(within %skm)</small>' ), + distance + ) + %] + </h2> + + <ul id="current_near"> + [% INCLUDE "around/around_map_list_items.html" %] + </ul> + +</div> + diff --git a/templates/web/default/common_header_tags.html b/templates/web/default/common_header_tags.html index 9d32164f7..4839249ac 100644 --- a/templates/web/default/common_header_tags.html +++ b/templates/web/default/common_header_tags.html @@ -1,6 +1,7 @@ [% USE date %][% USE Math %] <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="/jslib/jquery-1.7.2.min.js"></script> diff --git a/templates/web/default/dashboard/index.html b/templates/web/default/dashboard/index.html index e3695e5ec..f5a3cfba3 100644 --- a/templates/web/default/dashboard/index.html +++ b/templates/web/default/dashboard/index.html @@ -17,6 +17,7 @@ </hgroup> <div class="filters"> + [% IF c.cobrand.moniker != 'fixmybarangay' %] <p> <label for="ward">Ward:</label> <select name="ward"><option value=''>All</option> @@ -25,6 +26,7 @@ [% END %] </select> </p> + [% END %] <p> <label for="category">Report category:</label> diff --git a/templates/web/default/faq/faq-en-gb.html b/templates/web/default/faq/faq-en-gb.html index f0030dcb9..26f93afb8 100755 --- a/templates/web/default/faq/faq-en-gb.html +++ b/templates/web/default/faq/faq-en-gb.html @@ -190,7 +190,7 @@ rights reserved, Ministry of Justice 100037819 2008), Yahoo! for their BSD-licensed JavaScript libraries, the entire free software community (this particular project was brought to you by Perl, PostgreSQL, and the number 161.290) and <a -href="http://www.m247.com/">M247</a> (who kindly host all +href="http://www.bytemark.co.uk/">Bytemark</a> (who kindly host all our servers). Let us know if we’ve missed anyone.</dd> diff --git a/templates/web/default/index-steps.html b/templates/web/default/index-steps.html new file mode 100644 index 000000000..8a83abf07 --- /dev/null +++ b/templates/web/default/index-steps.html @@ -0,0 +1,25 @@ +<h2>[% loc('How to report a problem') %]</h2> + +<ol class="big-numbers"> +[% IF c.cobrand.moniker == 'fixmybarangay' %] + <li>Text LUZ or BSN followed by your report to 12345</li> + <li>Visit the Barangay Center in person</li> + <li>Staff? <a href="/auth">Sign in</a> and click on the map! +[% ELSE %] + <li>[% question %]</li> + <li>[% loc('Locate the problem on a map of the area') %]</li> + <li>[% loc('Enter details of the problem') %]</li> + [% IF c.cobrand.is_council %] + <li>Confirm the report and [% c.cobrand.council_name %] will investigate</li> + [% ELSIF c.cobrand.moniker == 'zurich' %] + [% ELSE %] + <li>[% loc('We send it to the council on your behalf') %]</li> + [% END %] +[% END %] +</ol> + +<section class="full-width"> +[% INCLUDE "front/stats.html" %] +[% TRY %][% INCLUDE "front/tips.html" %][% CATCH file %][% END %] +</section> + diff --git a/templates/web/default/index.html b/templates/web/default/index.html index 159a595bc..375316000 100644 --- a/templates/web/default/index.html +++ b/templates/web/default/index.html @@ -1,4 +1,4 @@ -[% INCLUDE 'header.html', title => '' %] +[% INCLUDE 'header.html', title = '' %] [% IF error %] <p class="error">[% error %]</p> @@ -8,7 +8,7 @@ [% subhead = c.cobrand.moniker == 'southampton' - ? '(like graffiti, fly tipping, or broken paving slabs)' + ? '' : loc('(like graffiti, fly tipping, broken paving slabs, or street lighting)'); %] @@ -24,19 +24,7 @@ [% PROCESS 'around/postcode_form.html' %] <div id="front_intro"> - - <h2>[% loc('How to report a problem') %]</h2> - - <ol> - <li>[% question %]</li> - <li>[% loc('Locate the problem on a map of the area') %]</li> - <li>[% loc('Enter details of the problem') %]</li> - <li>[% loc('We send it to the council on your behalf') %]</li> - </ol> - - [% INCLUDE "front/stats.html" %] - [% TRY %][% INCLUDE "front/tips.html" %][% CATCH file %][% END %] - + [% INCLUDE 'index-steps.html' %] </div> [% @@ -44,7 +32,6 @@ probs = c.cobrand.recent(); %] - [% IF probs.size || recent_photos.size %] <div id="front_recent"> <h2>[% loc('Recently reported problems') %]</h2> @@ -58,8 +45,6 @@ [% END %] [% IF probs.size %] - - <ul id="nearby_lists"> [% FOREACH p IN probs %] <li> diff --git a/templates/web/default/js/validation_rules.html b/templates/web/default/js/validation_rules.html new file mode 100644 index 000000000..409d0971f --- /dev/null +++ b/templates/web/default/js/validation_rules.html @@ -0,0 +1,7 @@ + validation_rules = { + title: { required: true }, + detail: { required: true }, + email: { required: true }, + update: { required: true }, + rznvy: { required: true } + }; diff --git a/templates/web/default/js/validation_strings.html b/templates/web/default/js/validation_strings.html index 3148d1993..c33bd2b81 100644 --- a/templates/web/default/js/validation_strings.html +++ b/templates/web/default/js/validation_strings.html @@ -17,5 +17,7 @@ }, fms_extra_title: '[% loc('Please enter your title') | replace("'", "\\'") %]', first_name: '[% loc('Please enter your first name') | replace("'", "\\'") %]', - last_name: '[% loc('Please enter your second name') | replace("'", "\\'") %]' + last_name: '[% loc('Please enter your second name') | replace("'", "\\'") %]', + geolocate: '[% loc('or locate me automatically') | replace("'", "\\'") %]', + report_problem_heading: '[% loc('Click map to report a problem') | replace("'", "\\'") %]' }; diff --git a/templates/web/default/maps/openlayers.html b/templates/web/default/maps/openlayers.html index e815642f1..b75e2bbd8 100644 --- a/templates/web/default/maps/openlayers.html +++ b/templates/web/default/maps/openlayers.html @@ -8,7 +8,7 @@ <script type="text/javascript"> var fixmystreet = { 'page': '[% page %]', - 'area': '[% map.area %]', + 'area': [ [% map.area.join(',') %] ], 'all_pins': '[% all_pins %]', 'latitude': [% map.latitude %], 'longitude': [% map.longitude %], diff --git a/templates/web/default/questionnaire/completed-open.html b/templates/web/default/questionnaire/completed-open.html index 7c5469259..06e17cc0b 100644 --- a/templates/web/default/questionnaire/completed-open.html +++ b/templates/web/default/questionnaire/completed-open.html @@ -1,5 +1,11 @@ +[% IF c.cobrand.is_council %] +<p style="font-size: 150%"> +Thank you very much for filling in our questionnaire. +</p> +[% ELSE %] [% loc('<p style="font-size:150%">We’re sorry to hear that. We have two suggestions: why not try writing to your local representative or, if it’s a problem that could be fixed by local people working together, why not <a href="http://www.pledgebank.com/new">make and publicise a pledge</a>? </p>') %] +[% END %] diff --git a/templates/web/default/questionnaire/completed.html b/templates/web/default/questionnaire/completed.html index a125d48bd..52c20652c 100644 --- a/templates/web/default/questionnaire/completed.html +++ b/templates/web/default/questionnaire/completed.html @@ -10,12 +10,12 @@ get some more information about the status of your problem, please come back to the site and leave an update.</p>') %] -[% ELSIF new_state == 'confirmed' OR (!new_state AND problem.is_open) %] +[% ELSIF new_state == 'confirmed' OR (!new_state AND problem.is_open) OR (!new_state AND problem.is_closed) %] [% INCLUDE 'questionnaire/completed-open.html' %] [% advert_outcome = 0 %] -[% ELSE %] +[% ELSIF been_fixed == 'Yes' %] [% loc('<p style="font-size:150%">Thank you very much for filling in our questionnaire; glad to hear it’s been fixed.</p>') %] diff --git a/templates/web/default/questionnaire/index.html b/templates/web/default/questionnaire/index.html index 5b48f8915..6783bca57 100644 --- a/templates/web/default/questionnaire/index.html +++ b/templates/web/default/questionnaire/index.html @@ -80,9 +80,13 @@ href="http://www.emptyhomes.com/getinvolved/campaign.html">http://www.emptyhomes </p> [% END %] +[% IF c.cobrand.moniker == 'southampton' %] +<p>Add a public update (please note it will not be sent to the council)</p> +[% ELSE %] <p>[% loc('If you wish to leave a public update on the problem, please enter it here (please note it will not be sent to the council). For example, what was your experience of getting the problem fixed?') %]</p> +[% END %] <p><textarea name="update" style="max-width:90%" rows="7" cols="30">[% update | html %]</textarea></p> diff --git a/templates/web/default/report/_main.html b/templates/web/default/report/_main.html index 3a9e60e7b..b9779db69 100644 --- a/templates/web/default/report/_main.html +++ b/templates/web/default/report/_main.html @@ -1,20 +1,27 @@ -<h1>[% problem.title | html %]</h1> +<div class="problem-header cf"> + <h1>[% problem.title | html %]</h1> -<p><em>[% problem.meta_line(c) | html %] -[% IF problem.council %] - [% IF problem.whensent || problem.can_display_external_id %] - <small class="council_sent_info"><br> - [% problem.processed_summary_string(c) %] - </small> - [% END %] -[% ELSE %] -<br><small>[% loc('Not reported to council') %]</small> -[% END %] - -</em></p> - -[% add_links( problem.detail ) | html_para %] - -[% INCLUDE 'report/photo.html' object=problem center=1 %] + <p><em> + [% problem.meta_line(c) | html %] + [%- IF !problem.used_map %]; <strong>[% loc('there is no pin shown as the user did not use the map') %]</strong>[% END %] + [% IF problem.council %] + [% IF problem.whensent || problem.can_display_external_id %] + <small class="council_sent_info"><br> + [% problem.processed_summary_string(c) %] + </small> + [% END %] + [% ELSE %] + <br><small>[% loc('Not reported to council') %]</small> + [% END %] + </em></p> + [% INCLUDE 'report/_support.html' %] + [% IF c.cobrand.moniker == 'southampton' %] + [% add_links( problem.detail ) | html_para %] + [% INCLUDE 'report/photo.html' object=problem %] + [% ELSE %] + [% INCLUDE 'report/photo.html' object=problem %] + [% add_links( problem.detail ) | html_para %] + [% END %] +</div> diff --git a/templates/web/default/report/_support.html b/templates/web/default/report/_support.html new file mode 100644 index 000000000..e8b958940 --- /dev/null +++ b/templates/web/default/report/_support.html @@ -0,0 +1,11 @@ +[% 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' ) %]"> + [% text %] <input type="hidden" name="id" value="[% problem.id %]"><input type="submit" class="green-btn" value="Add support"> + </form> + [% ELSE %] + [% text %] + [% END %] +</small></p> +[% END %] diff --git a/templates/web/default/report/display.html b/templates/web/default/report/display.html index 2ac58d9a9..18b4bf51a 100644 --- a/templates/web/default/report/display.html +++ b/templates/web/default/report/display.html @@ -44,175 +44,8 @@ </div> [% INCLUDE 'report/updates.html' %] - -<div id="update_form"> - - <h2> - [% loc( 'Provide an update') %] - </h2> - - [% IF c.cobrand.moniker != 'emptyhomes' %] - <p> - <small>[% loc( 'Please note that updates are not sent to the council. If you leave your name it will be public. Your information will only be used in accordance with our <a href="/faq#privacy">privacy policy</a>' ) %]</small> - </p> - [% END %] - - [% INCLUDE 'errors.html' %] - - <form method="post" action="[% c.uri_for( '/report/update' ) %]" name="updateForm" class="fieldset validate"[% IF c.cobrand.allow_photo_upload %] enctype="multipart/form-data"[% END %]> - - <input type="hidden" name="submit_update" value="1"> - <input type="hidden" name="id" value="[% problem.id | html %]"> - - [% IF field_errors.update %] - <div class='form-error'>[% field_errors.update %]</div> - [% END %] - <div class="form-field"> - <label for="form_update">[% loc( 'Update:' ) %]</label> - <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 ) %] - <div class="form-field"> - <label for="form_state">[% loc( 'State:' ) %]</label> - <select name="state" id="form_state"> - [% FOREACH state IN [ ['confirmed', loc('Open')], ['investigating', - loc('Investigating')], ['action scheduled', loc('Action Scheduled')], - ['in progress', loc('In Progress')], ['duplicate', loc('Duplicate')], - ['unable to fix', loc('Unable to fix')], ['not responsible', loc('Not Responsible')], - ['fixed', loc('Fixed')] ] %] - <option [% 'selected ' IF state.0 == problem.state %] value="[% state.0 %]">[% state.1 %]</option> - [% END %] - </select> - </div> - [% ELSE %] - [% IF problem.is_fixed AND c.user_exists AND c.user.id == problem.user_id %] - <div class="checkbox"> - <input type="checkbox" name="reopen" id="form_reopen" value="1"[% ' checked' IF update.mark_open %]> - <label for="form_reopen">[% loc('This problem has not been fixed') %]</label> - </div> - [% ELSIF !problem.is_fixed %] - <div class="checkbox"> - <input type="checkbox" name="fixed" id="form_fixed" value="1"[% ' checked' IF update.mark_fixed %]> - <label for="form_fixed">[% loc('This problem has been fixed') %]</label> - </div> - [% END %] - [% END %] - - [% IF c.cobrand.allow_photo_upload %] - [% IF field_errors.photo %] - <div class='form-error'>[% field_errors.photo %]</div> - [% END %] - <div id="fileupload_normalUI"> - [% IF upload_fileid %] - <p>[% loc('You have already attached a photo to this update, attaching another one will replace it.') %]</p> - <input type="hidden" name="upload_fileid" value="[% upload_fileid %]"> - [% END %] - <label for="form_photo">[% loc('Photo:') %]</label> - <input type="file" name="photo" id="form_photo" style="width:20em"> - </div> - [% END %] - -[% IF c.user_exists %] - - [% INCLUDE name %] - - <div class="checkbox"> - <input type="submit" id="update_post" value="[% loc('Post') %]"> - </div> - -[% ELSE %] - - [% IF field_errors.email %] - <div class='form-error'>[% field_errors.email %]</div> - [% END %] - <div class="form-field"> - <label for="form_rznvy">[% loc('Your email:' ) %]</label> - <input type="email" name="rznvy" id="form_rznvy" value="[% update.user.email | html %]" size="30" required> - </div> - -<div id="form_sign_in"> - <h3>[% loc("Now to submit your update… do you have a FixMyStreet password?") %]</h3> - - <div id="form_sign_in_yes"> - - [% IF field_errors.password %] - <div class='form-error'>[% field_errors.password %]</div> - [% END %] - - <p> - <label class="n" for="password_sign_in">[% loc('<strong>Yes</strong> I have a password') %]</label> - <input type="password" name="password_sign_in" id="password_sign_in" value="" size="25"> - </p> - - <div class="fieldset"> - - <p> - <input type="checkbox" id="remember_me" name="remember_me" value='1'[% ' checked' IF remember_me %]> - <label class="n" for="remember_me"> - [% loc('Keep me signed in on this computer') %] - </label> - </p> - - <p> - <input type="submit" name="submit_sign_in" id="submit_sign_in" value="[% loc('Post') %]"> - </p> - - </div> - - </div> - <div id="form_sign_in_no"> - - <p>[% loc('<strong>No</strong>, let me confirm my update by email:') %]</p> - - <div class="fieldset"> - - [% INCLUDE name %] - - <div class="form-field"> - <label for="password_register">[% loc('Enter a new password:') %]</label> - <input type="password" name="password_register" id="password_register" value="" size="25"> - </div> - - <p style="clear:both"><small>[% loc('Providing a password is optional, but doing so will allow you to more easily report problems, leave updates and manage your reports.') %]</small></p> - - <p> - <input type="submit" name="submit_register" id="submit_register" value="[% loc('Post') %]"> - </p> - - </div> - - </div> - -</div> - -[% END %] - - </form> -</div> +[% INCLUDE 'report/update-form.html' %] </div> [% INCLUDE 'footer.html' %] - -[% BLOCK name %] - [% IF field_errors.name %] - <div class='form-error'>[% field_errors.name %]</div> - [% END %] - - <div> - <label for="form_name">[% loc('Your name:') %]</label> - <input type="text" name="name" id="form_name" value="[% update.name || c.user.name | html %]" size="25"> - </div> - - <div class="checkbox"> - <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' UNLESS update.anonymous %]> - <label for="form_may_show_name">[% loc('Show my name publicly') %]</label> - <small>[% loc('(we never show your email)') %]</small> - </div> - - <div class="checkbox"> - <input type="checkbox" name="add_alert" id="form_add_alert" value="1"[% ' checked' IF add_alert %]> - <label for="form_add_alert">[% loc( 'Alert me to future updates' ) %]</label> - </div> -[% END %] diff --git a/templates/web/default/report/new/category.html b/templates/web/default/report/new/category.html index 8bff539c4..49be4d25d 100644 --- a/templates/web/default/report/new/category.html +++ b/templates/web/default/report/new/category.html @@ -3,7 +3,7 @@ [% IF category; category = category | lower; END; %] - <label for='form_category'>[% category_label | html %]</label> + <label for='form_category' id="form_category_label">[% category_label | html %]</label> <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 %] diff --git a/templates/web/default/report/new/category_extras.html b/templates/web/default/report/new/category_extras.html index 7be69e30c..928b61041 100644 --- a/templates/web/default/report/new/category_extras.html +++ b/templates/web/default/report/new/category_extras.html @@ -13,8 +13,8 @@ <label for="form_[% meta_name %]">[% meta.description _ ':' %]</label> [% IF meta.exists('values') %] <select name="[% meta_name %]" id="form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]> - [% FOR option IN meta.values.value.keys %] - <option value="[% meta.values.value.$option.key %]">[% option %]</option> + [% FOR option IN meta.values.value.value %] + <option value="[% option.key.0 %]"[% IF option.key.0 == report_meta.$meta_name.value %] selected[% END %]>[% option.name.0 %]</option> [% END %] </select> [% ELSE %] 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 9c9451914..0befb344e 100644 --- a/templates/web/default/report/new/fill_in_details_form.html +++ b/templates/web/default/report/new/fill_in_details_form.html @@ -206,7 +206,7 @@ <div class="checkbox"> [%# if there is nothing in the name field then set check box as default on form %] - <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' IF !report.anonymous %]> + <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' IF report.anonymous==0 OR (c.cobrand.default_show_name AND report.anonymous=='') %]> <label for="form_may_show_name">[% loc('Show my name publicly') %]</label> <br><small>[% loc('(we never show your email address or phone number)') %]</small> </div> diff --git a/templates/web/default/report/new/notes.html b/templates/web/default/report/new/notes.html index be605ddaa..68408acc7 100644 --- a/templates/web/default/report/new/notes.html +++ b/templates/web/default/report/new/notes.html @@ -4,7 +4,7 @@ <li>[% loc("We will only use your personal information in accordance with our <a href=\"/faq#privacy\">privacy policy.</a>") %]</li> <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("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> <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> diff --git a/templates/web/default/report/photo.html b/templates/web/default/report/photo.html index 451a0479c..02ab9228b 100644 --- a/templates/web/default/report/photo.html +++ b/templates/web/default/report/photo.html @@ -1,6 +1,8 @@ [% IF c.cobrand.allow_photo_display && object.photo %] [% photo = object.get_photo_params %] -<p[% ' align="center"' IF center %]> - <img alt="" height="[% photo.height %]" width="[% photo.width %]" src="[% photo.url %]"> -</p> +<div class="update-img"> + [% IF photo.url_full %]<a href="[% photo.url_full %]" rel="fancy">[% END + %]<img alt="Photo of this report" [% IF photo.height %]height="[% photo.height %]" width="[% photo.width %]"[% END %] src="[% photo.url %]"> + [%- IF photo.url_full %]<span>zoom</span></a>[% END %] +</div> [% END %] diff --git a/templates/web/default/report/update-form.html b/templates/web/default/report/update-form.html new file mode 100644 index 000000000..d993ce28f --- /dev/null +++ b/templates/web/default/report/update-form.html @@ -0,0 +1,165 @@ +<div id="update_form"> + + <h2>[% loc( 'Provide an update') %]</h2> + + [% IF c.cobrand.moniker != 'emptyhomes' %] + <p> + <small>[% loc( 'Please note that updates are not sent to the council. If you leave your name it will be public. Your information will only be used in accordance with our <a href="/faq#privacy">privacy policy</a>' ) %]</small> + </p> + [% END %] + + [% INCLUDE 'errors.html' %] + + <form method="post" action="[% c.uri_for( '/report/update' ) %]" name="updateForm" class="fieldset validate"[% IF c.cobrand.allow_photo_upload %] enctype="multipart/form-data"[% END %]> + + <input type="hidden" name="submit_update" value="1"> + <input type="hidden" name="id" value="[% problem.id | html %]"> + + [% IF field_errors.update %] + <div class='form-error'>[% field_errors.update %]</div> + [% END %] + <div class="form-field"> + <label for="form_update">[% loc( 'Update:' ) %]</label> + <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 ) %] + <div class="form-field"> + <label for="form_state">[% loc( 'State:' ) %]</label> + <select name="state" id="form_state"> + [% FOREACH state IN [ ['confirmed', loc('Open')], ['investigating', + loc('Investigating')], ['action scheduled', loc('Action Scheduled')], + ['in progress', loc('In Progress')], ['duplicate', loc('Duplicate')], + ['unable to fix', loc('Unable to fix')], ['not responsible', loc('Not Responsible')], + ['fixed', loc('Fixed')] ] %] + <option [% 'selected ' IF state.0 == problem.state %] value="[% state.0 %]">[% state.1 %]</option> + [% END %] + </select> + </div> + [% ELSE %] + [% IF problem.is_fixed AND c.user_exists AND c.user.id == problem.user_id %] + <div class="checkbox"> + <input type="checkbox" name="reopen" id="form_reopen" value="1"[% ' checked' IF update.mark_open %]> + <label class="inline" for="form_reopen">[% loc('This problem has not been fixed') %]</label> + </div> + [% ELSIF !problem.is_fixed %] + <div class="checkbox"> + <input type="checkbox" name="fixed" id="form_fixed" value="1"[% ' checked' IF update.mark_fixed %]> + <label class="inline" for="form_fixed">[% loc('This problem has been fixed') %]</label> + </div> + [% END %] + [% END %] + + [% IF c.cobrand.allow_photo_upload %] + [% IF field_errors.photo %] + <div class='form-error'>[% field_errors.photo %]</div> + [% END %] + <div id="fileupload_normalUI"> + [% IF upload_fileid %] + <p>[% loc('You have already attached a photo to this update, attaching another one will replace it.') %]</p> + <input type="hidden" name="upload_fileid" value="[% upload_fileid %]"> + [% END %] + <label for="form_photo">[% loc('Photo:') %]</label> + <input type="file" name="photo" id="form_photo" style="width:20em"> + </div> + [% END %] + +[% IF c.user_exists %] + + [% INCLUDE name %] + + <div class="checkbox"> + <input type="submit" id="update_post" value="[% loc('Post') %]"> + </div> + +[% ELSE %] + + [% IF field_errors.email %] + <div class='form-error'>[% field_errors.email %]</div> + [% END %] + <div class="form-field"> + <label for="form_rznvy">[% loc('Your email:' ) %]</label> + <input type="email" name="rznvy" id="form_rznvy" value="[% update.user.email | html %]" size="30" required> + </div> + +<div id="form_sign_in"> + <h3>[% loc("Now to submit your update… do you have a FixMyStreet password?") %]</h3> + + <div id="form_sign_in_yes"> + + [% IF field_errors.password %] + <div class='form-error'>[% field_errors.password %]</div> + [% END %] + + <p> + <label class="n" for="password_sign_in">[% loc('<strong>Yes</strong> I have a password') %]</label> + <input type="password" name="password_sign_in" id="password_sign_in" value="" size="25"> + </p> + + <div class="fieldset"> + + <p> + <input type="checkbox" id="remember_me" name="remember_me" value='1'[% ' checked' IF remember_me %]> + <label class="n" for="remember_me"> + [% loc('Keep me signed in on this computer') %] + </label> + </p> + + <p> + <input type="submit" name="submit_sign_in" id="submit_sign_in" value="[% loc('Post') %]"> + </p> + + </div> + + </div> + <div id="form_sign_in_no"> + + <p>[% loc('<strong>No</strong>, let me confirm my update by email:') %]</p> + + <div class="fieldset"> + + [% INCLUDE name %] + + <div class="form-field"> + <label for="password_register">[% loc('Enter a new password:') %]</label> + <input type="password" name="password_register" id="password_register" value="" size="25"> + </div> + + <p style="clear:both"><small>[% loc('Providing a password is optional, but doing so will allow you to more easily report problems, leave updates and manage your reports.') %]</small></p> + + <p> + <input type="submit" name="submit_register" id="submit_register" value="[% loc('Post') %]"> + </p> + + </div> + + </div> + +</div> + +[% END %] + + </form> +</div> + +[% BLOCK name %] + [% IF field_errors.name %] + <div class='form-error'>[% field_errors.name %]</div> + [% END %] + + <div> + <label for="form_name">[% loc('Your name:') %]</label> + <input type="text" name="name" id="form_name" value="[% update.name || c.user.name | html %]" size="25"> + </div> + + <div class="checkbox"> + <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=='') %]> + <label for="form_may_show_name">[% loc('Show my name publicly') %]</label> + <small>[% loc('(we never show your email)') %]</small> + </div> + + <div class="checkbox"> + <input type="checkbox" name="add_alert" id="form_add_alert" value="1"[% ' checked' IF add_alert %]> + <label class="inline" for="form_add_alert">[% loc( 'Alert me to future updates' ) %]</label> + </div> +[% END %] diff --git a/templates/web/default/report_created.html b/templates/web/default/report_created.html new file mode 100644 index 000000000..81083654b --- /dev/null +++ b/templates/web/default/report_created.html @@ -0,0 +1,9 @@ +[% INCLUDE 'header.html', title => loc('Report created') %] + +<h1>[% loc("Report created") %]</h1> + +<p> +[% loc('Your report has been created and will shortly be sent.') %] +</p> + +[% INCLUDE 'footer.html' %] diff --git a/templates/web/default/reports/council.html b/templates/web/default/reports/body.html index 134c9d4fc..134c9d4fc 100755 --- a/templates/web/default/reports/council.html +++ b/templates/web/default/reports/body.html diff --git a/templates/web/default/reports/index.html b/templates/web/default/reports/index.html index 283df5285..76c2afcd2 100755 --- a/templates/web/default/reports/index.html +++ b/templates/web/default/reports/index.html @@ -34,6 +34,7 @@ <td class="data">[% fixed.${area.id}.new or 0 %]</td> <td class="data">[% fixed.${area.id}.old or 0 %]</td> </tr> +[% TRY %][% PROCESS "reports/_extras.html" %][% CATCH file %][% END %] [% END %] </tbody> </table> diff --git a/templates/web/default/reports/ward.html b/templates/web/default/reports/ward.html index 8b65ffb28..4b2ea29a5 100755 --- a/templates/web/default/reports/ward.html +++ b/templates/web/default/reports/ward.html @@ -1 +1 @@ -[% INCLUDE reports/council.html %] +[% INCLUDE reports/body.html %] diff --git a/templates/web/emptyhomes/faq/faq-cy.html b/templates/web/emptyhomes/faq/faq-cy.html index 3bea990c8..c462b9719 100644 --- a/templates/web/emptyhomes/faq/faq-cy.html +++ b/templates/web/emptyhomes/faq/faq-cy.html @@ -54,7 +54,7 @@ Os taw’r llywodraeth neu un o’i hasiantaethau sy’n berchen ar yr eiddo gwa , Y Weinyddiaeth Gyfiawnder 100037819 2008), Yahoo! am eu llyfrgelloedd JavaScript wedi’u trwyddedu gan BSD, y gymuned meddalwedd am ddim gyfan (daethpwyd â’r prosiect arbennig hwn i chi gan Perl, PostgreSQL, a’r rhif 161.290) ac <a - href="http://www.m247.com/">M247</a> (sydd mor garedig â gwesteia’n holl weinyddion). + href="http://www.bytemark.co.uk/">Bytemark</a> (sydd mor garedig â gwesteia’n holl weinyddion). Rhowch wybod i ni os ydym wedi hepgor unrhyw un.</dd> diff --git a/templates/web/emptyhomes/faq/faq-en-gb.html b/templates/web/emptyhomes/faq/faq-en-gb.html index 9f66613a7..e010ddae0 100755 --- a/templates/web/emptyhomes/faq/faq-en-gb.html +++ b/templates/web/emptyhomes/faq/faq-en-gb.html @@ -98,7 +98,7 @@ rights reserved, Ministry of Justice 100037819 2008), Yahoo! for their BSD-licensed JavaScript libraries, the entire free software community (this particular project was brought to you by Perl, PostgreSQL, and the number 161.290) and <a -href="http://www.m247.com/">M247</a> (who kindly host all +href="http://www.bytemark.co.uk/">Bytemark</a> (who kindly host all our servers). Let us know if we’ve missed anyone.</dd> diff --git a/templates/web/emptyhomes/report/display.html b/templates/web/emptyhomes/report/display.html index e9a101e3e..545a4ca44 100644 --- a/templates/web/emptyhomes/report/display.html +++ b/templates/web/emptyhomes/report/display.html @@ -9,7 +9,7 @@ [% IF problem.is_fixed %] <p class="banner" id="fixed"> - [% loc('This problem has been fixed') . '.' %]; + [% loc('This problem has been fixed') %]. </p> [% END %] diff --git a/templates/web/emptyhomes/reports/council.html b/templates/web/emptyhomes/reports/body.html index 8ba9bf1ca..8ba9bf1ca 100755 --- a/templates/web/emptyhomes/reports/council.html +++ b/templates/web/emptyhomes/reports/body.html diff --git a/templates/web/fixmybarangay/_barangay_buttons.html b/templates/web/fixmybarangay/_barangay_buttons.html new file mode 100644 index 000000000..2925a487d --- /dev/null +++ b/templates/web/fixmybarangay/_barangay_buttons.html @@ -0,0 +1,4 @@ +<p id="barangay_buttons"> + <a href="/around?latitude=10.322;longitude=123.907" class="yellow-btn">Bgy. Luz</a> + <a href="/around?latitude=10.288;longitude=123.870" class="yellow-btn">Bgy. Basak San Nicolas</a> +</p> diff --git a/templates/web/fixmybarangay/alert/_list.html b/templates/web/fixmybarangay/alert/_list.html new file mode 100644 index 000000000..8491b4562 --- /dev/null +++ b/templates/web/fixmybarangay/alert/_list.html @@ -0,0 +1,45 @@ + <input type="hidden" name="type" value="local"> + <input type="hidden" name="pc" value="[% pc | html %]"> + + + <p> + [% loc("Subscribe to an alert based upon what baranagay you’re in:") %] + </p> + + [% INCLUDE 'errors.html' %] + + <div id="rss_list"> + <p><strong> + [% loc('Problems within the boundary of:') %] + </strong></p> + <ul class="plain-list"> + + [% FOREACH option IN options %] + <li[% IF ! (loop.count % 2) %] class="a"[% END %]> + <input type="radio" name="feed" id="[% option.id %]" value="[% option.id %]"[% IF option.id == selected_feed %] checked[% END %]> + <label class="inline" for="[% option.id %]">[% option.text %]</label> + <a href="[% option.uri %]"><img src="/i/feed.png" width="16" height="16" +title="[% option.rss_text %]" alt="RSS feed" border="0"></a> + </li> + [% END %] +</ul> + + <p> + <input type="submit" name="rss" value="[% loc('Give me an RSS feed') %]"> + <p> + + <p id="alert_or"> + [% loc('or') %] + </p> + + [% UNLESS c.user_exists %] + <p> + [% loc('Your email:') %] <input type="text" id="rznvy" name="rznvy" value="[% rznvy | html %]" size="30"> + </p> + [% END %] + + <p> + <input type="submit" name="alert" value="[% loc('Subscribe me to an email alert') %]"> + </p> + </div> <!-- ???? --> + diff --git a/templates/web/fixmybarangay/alert/index.html b/templates/web/fixmybarangay/alert/index.html new file mode 100644 index 000000000..d9bb74ee9 --- /dev/null +++ b/templates/web/fixmybarangay/alert/index.html @@ -0,0 +1,45 @@ +[% INCLUDE 'header.html', title = loc('Local RSS feeds and email alerts'), bodyclass = 'twothirdswidthpage' %] + +<h1>[% loc('Local RSS feeds and email alerts') %]</h1> + +<p> +FixMyBarangay has a RSS feeds and email alerts for local problems. +</p> + +[% IF location_error %] + <div class="error">[% location_error %]</div> +[% ELSE %] + [% INCLUDE 'errors.html' %] +[% END %] + +[% options = [ { + id => 'council:1:Luz', + text => 'Luz', + uri => '/rss/reports/Luz' + }, + { + id => 'council:2:Basak_San_Nicolas', + text => 'Basak San Nicolas' + uri => '/rss/reports/Basak+San_Nicolas' + } ]; +%] + +<form id="alerts" name="alerts" method="post" action="/alert/subscribe"> + +[% IF photos.size %] +<div class="sticky-sidebar" id="alert_recent"> + <aside> + <h2>[% loc('Some photos of recent reports') %]</h2> + [% FOREACH p IN photos %] + <a href="/report/[% p.id %]"><img border="0" height="100" + src="/photo/[% p.id %].tn.jpeg" alt="[% p.title | html %]" title="[% p.title | html %]"></a> + [% END %] + </aside> +</div> +[% END %] + +[% INCLUDE 'alert/_list.html' %] + +</form> + +[% INCLUDE 'footer.html' %] diff --git a/templates/web/fixmybarangay/around/tabbed_lists.html b/templates/web/fixmybarangay/around/tabbed_lists.html new file mode 100644 index 000000000..c9f1c2a38 --- /dev/null +++ b/templates/web/fixmybarangay/around/tabbed_lists.html @@ -0,0 +1,18 @@ +[% allow_creation = !c.cobrand.only_authed_can_create || (c.user && c.user.from_council); + +IF allow_creation %] +<menu id="problems-nav" class="tab-nav"> + <ul> + <li><a href="#current">Problems on the map</a></li> + <li><a href="#message_manager">Problems via text</a></li> + </ul> +</menu> +[% END %] + +<ul id="current" class="issue-list-a tab"> + [% INCLUDE "around/on_map_list_items.html" %] +</ul> + +[% IF allow_creation %] + [% INCLUDE 'report/_message_manager.html' %] +[% END %] diff --git a/templates/web/fixmybarangay/auth/sign_out.html b/templates/web/fixmybarangay/auth/sign_out.html new file mode 100644 index 000000000..11888089a --- /dev/null +++ b/templates/web/fixmybarangay/auth/sign_out.html @@ -0,0 +1,8 @@ +[% INCLUDE 'header.html', title = loc('Sign out'), bodyclass = 'fullwidthpage' %] + +<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> + +[% INCLUDE 'footer.html' %] diff --git a/templates/web/fixmybarangay/faq/faq-en-gb.html b/templates/web/fixmybarangay/faq/faq-en-gb.html new file mode 100644 index 000000000..320a7528e --- /dev/null +++ b/templates/web/fixmybarangay/faq/faq-en-gb.html @@ -0,0 +1,135 @@ +[% INCLUDE 'header.html', title => loc('Frequently Asked Questions'), bodyclass => 'twothirdswidthpage' %] + +<div class="sticky-sidebar"> + <aside> + <ul class="plain-list"> + <li><a href="#faq">Frequently Asked Questions</a></li> + <li><a href="#practical">Staff Questions</a></li> + <li><a href="#organisation">Organisation Questions</a></li> + </ul> + </aside> +</div> + +<h1><a name="faq"></a>Frequently Asked Questions</h1> + <dl> + <dt>What is FixMyBarangay?</dt> + <dd>FixMyBarangay is a site to help people report, view, +or discuss local problems they’ve found to the city departments. +The pilot project lets you report the problems by SMS (or dropping +into the barangay center). +</dd> + <dt>What areas are covered?</dt> + <dd> + The pilot project is just running in two barangays in Cebu – + Luz and Basak San Nicolas. + </dd> + <dt>What sort of problems should I report with FixMyBarangay?</dt> + <dd>The FixMyBarangay pilot project is just for potholes (and similar + road surface problems) and broken streetlights. + </dd> + + <dt>What isn’t FixMyBarangay for?</dt> + <dd>FixMyStreet is not a way of getting in touch with Cebu City Hall for other problems + – please use FixMyBarangay only for potholes and streetlights while the pilot + project is running.. + </dd> + + <dt>Staff only: How do I use the site?</dt> + <dd>If you have a staff login, you can view problems already reported in that area, +or report ones of your own simply by clicking on the map at the location of +the problem.</dd> + <dt>How are the problems solved?</dt> + <dd>Problems sent by SMS are initially handled by the barangay staff – they'll + confirm the problem and report it to the relevant department automatically. + Once it's in the department's problem-tracking system, they'll get onto it as + soon as they can.</dd> + <dt>Is it free?</dt> + <dd>The site is free to use, yes. The pilot project has been funded by the World Bank.</dd> + + </dl> + + <h2><a name="practical"></a>Staff questions</h2> + <dl> + <dt>What's my login?</dt> + <dd> + You can use your email address and set a password right away, but your + account won't be enabled as a <em>staff account</em> until one of the + system administrators has checked it. TODO: contact details. + </dd> + <dt>I've forgotten my password, what do I do?</dt> + <dd> + No problem — when you log in, if you can't remember your password we'll + send you a confirmation link which lasts for one session, and you can + reset your password once you've clicked on that. + </dd> + <dt>How do I sign out?</dt> + <dd> + Either click on <a href="/auth/sign_out">sign out</a> on the page you're on, + or quit the browser (just closing the window without quitting the browser is not enough). + </dd> + <dt>Reporting</dt> + <dd>TODO</dd> + <dt>How do I see the SMS messages people have sent?</dt> + <dd>When you look at the barangay problems, click on "Problems via text" + (or, if you're viewing a specific report, click "Show messages") to see the + currently available messages. You'll need a username and password + for the Message Manager (your manager will have told you what these + are). Note that you can only see messages that have not yet been used to + create a report (and also their replies). + </dd> + <dt>Is my Message Manager username and password the same as the ones I use for FixMyBarangay?</dt> + <dd> + No, it's a separate account (some FMB users don't have any access to the SMS messages). + Your manager will tell you what your login for Message Manager system is, if you have one. + </dd> + <dt>I tried to work with a message but it said "lock not granted". What's up?</dt> + <dd> + This means another staff member is working on the message. To prevent you both creating + a report, or sending a reply, we use a first-come-first-serve locking mechanism. + Collisions like this are rare, but if they do happen, try again a few minutes later + because the lock may have expired by then. + </dd> + <dt>Can I delete a message?</dt> + <dd> + Yes. Click on the red cross when you hover over it (although really you're only hiding it). + You need an <em>administrator</em> account in the Message Manager to be able to see the + messages that have been hidden, so hiding them is as good as deleting them. + </dd> + <dt>It looks like an incoming message is wrongly shown as a reply. Can I fix it?</dt> + <dd> + FixMyBarangay tries to recognise SMS replies, and automatically matches them to the right thread. If it + gets this wrong, the reply may appear as a new "available" message, or a new message might be + mistaken for a reply. You need to ask an administrator to log into Message Manager to sort this out for you. + </dd> + <dt>How do the replies get back to the original sender?</dt> + <dd> + Although you're replying from within FixMyBarangay, the replies are sent by SMS. + There may be a delay of a few minutes between the moment you press <strong>reply</strong> + and the message's arrival. + </dd> + + <h2><a name="organisation"></a>Organisation Questions</h2> + <dl> + <dt>Who built FixMyBarangay?</dt> + <dd>This site was built by <a href="http://www.mysociety.org/">mySociety</a>, in conjunction with the <a href="www.worldbank.org/">World Bank</a>. +mySociety is the project of a registered charity which has grown out of the community of +volunteers who built sites like <a href="http://www.theyworkforyou.com/">TheyWorkForYou.com</a> in the UK. +mySociety’s primary mission is to build Internet projects which give people simple, tangible +benefits in the civic and community aspects of their lives. +The charity is called UK Citizens Online Democracy and is charity number 1076346. mySociety +can be contacted by email at <a href="mailto:hello@mysociety.org">hello@mysociety.org</a>, +or by post at:<br> +mySociety<br> +483 Green Lanes<br> +London<br> +N13 4BS<br> +UK</dd> + <dt>I’d like a site like this for my own location/ where’s the "source code" to this site?</dt> + <dd> +The software behind this site is open source, and available +to you mainly under the GNU Affero GPL software license. +See <a href="http://code.fixmystreet.com/">code.fixmystreet.com</a> for more information about setting up +and running sites like these. +</dd> + </dl> +[% INCLUDE 'footer.html' pagefooter = 'yes' %] diff --git a/templates/web/fixmybarangay/footer.html b/templates/web/fixmybarangay/footer.html new file mode 100644 index 000000000..88f18db4b --- /dev/null +++ b/templates/web/fixmybarangay/footer.html @@ -0,0 +1,158 @@ + </div><!-- .content role=main --> + </div><!-- .container --> + </div><!-- .table-cell --> + + <div class="nav-wrapper"> + <div class="nav-wrapper-2"> + <div id="main-nav" role="navigation"> + <ul id="mysoc-menu"> + <li><a id="mysoc-logo" href="http://www.mysociety.org/">mySociety</a></li>[% + %]<!--<li><a href="http://mysociety.org/donate/">Donate</a></li>[% + %]<li><a href="http://www.mysociety.org/projects/">Our Sites</a></li>--> + </ul> + + <ul id="main-menu"> + <li><a href="/around?latitude=10.322;longitude=123.907" class="fmb-bgy-btn">Luz</a></li> + <li><a href="/around?latitude=10.288;longitude=123.870" class="fmb-bgy-btn">BSN</a></li> + <li><[% IF c.req.uri.path == '/' %]span[% ELSE %]a href="/"[% END %] class="report-a-problem-btn" + >View problems</[% c.req.uri.path == '/' ? '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 == '/alert' %]span[% ELSE %]a href="/alert[% pc ? '/list?pc=' : '' %][% pc | uri %]"[% END + %]>[% loc("Local alerts") %]</[% c.req.uri.path == '/alert' ? '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> + </div> + </div> + +[% IF global.want_fmb_hidden_dialogs %] + <!-- fancybox hidden dialogues for message-manager reply/hide/help --> + <div style="display:none"> + <div id="reply-form-container"> + <form action="#" id="reply-form" onsubmit="event.returnValue = false; return false;" method="post" accept-charset="utf-8"> + <div style="display:none;"> + <input type="hidden" name="_method" value="POST"/> + </div> + <!-- populated by Ajax call --> + <div class="input" id="mm-boilerplate-replies-box"> + <label for="boilerplate-replies">Use preloaded reply:</label> + <select name="boilerplate-replies" id="mm-boilerplate-replies"></select> + </div> + <div class="input text"> + <label for="reply_text">Reply text</label> + <textarea name="reply_text" id="reply_text" cols="32" rows="3"></textarea> + </div> + <input type="hidden" name="message_id" id="reply_to_msg_id"/> + <div class="submit"> + <input id="reply-submit" type="submit" value="Send Reply"/> + </div> + </form> + </div> + </div> + <div style="display:none"> + <div id="hide-form-container"> + <p style="color:#000">Hiding message: <span id="hide-form-message-text"></span></p> + <form action="#" id="hide-form" onsubmit="event.returnValue = false; return false;" method="post" accept-charset="utf-8"> + <div style="display:none;"> + <input type="hidden" name="_method" value="POST"/> + </div> + <!-- populated by Ajax call --> + <div class="input" id="mm-boilerplate-hide-reasons-box"> + <label for="boilerplate-hide-reasons">Use preloaded reason:</label> + <select name="boilerplate-hide-reasons" id="mm-hide-reasons"></select> + </div> + <div class="input textarea"> + <label for="reason_text">Reason for hiding message</label> + <textarea name="reason_text" id="reason_text" cols="32" rows="3"></textarea> + </div> + <input type="hidden" name="msg_id" id="hide_msg_id"/> + <div class="submit"> + <input id="hide-submit" type="submit" value="Hide Message"/> + </div> + </form> + </div> + </div> + <div style="display:none"> + <div id="mm-help" style="font-size:90%;"> + <h2> Accessing Message Manager from FixMyBarangay (FMB)</h2> + <h3> + Logging into Message Manager + </h3> + <p> + You'll need a username and password (ask your manager if you haven't already got one). Your Message Manager password + might not be the same as your FMB password. + </p> + <p> + When you've logged in, you'll see the currently available messages (and any replies that have been sent to them). + You <em>only</em> see messages that are waiting to be used to make reports, and which are tagged with the keywords + your login allows you to see (these may mean you only see messages for your own barangay). + If you want to see any other messages, you'll need to have a manager or admin account on Message Manager: click on the + <a href="[% c.config.MESSAGE_MANAGER_URL %]">admin</a> link to get there. + </p> + <p> + [% IF global.is_fmb_creation_page %] + <h3> + Creating a new report from a message + </h3> + <p> + If you want to use a message to create a problem report, you'll need to select it first. Click on the radio button. When the message + is selected, it will go bright green. Now when you click on the map, the report will be used to create the report. + </p> + <p> + To stop two people replying to a message at the same time, if anyone else has just started working on it, you'll see a message + warning you, and you won't be able to select the radio button. Normally, if nobody works with a message, such a lock is released + after about 3 minutes. + </p> + [% ELSE %] + <p> + Click <strong>show messages for this report</strong> to see + the message (or messages) that contributed to this report. Often this will be a single message + if the problem was submitted by SMS. But it will also include any messages that have been + added as updates, as well as any replies that were sent back by barangay staff. + As well as letting you review the background to the report, this also lets you reply (for example, + to notify the original reporter that the problem has been fixed). + </p> + <h3> + Adding a message as an update to this report + </h3> + <p> + If you want to add this message's contents as an update to this report, you'll need to select it first. Click + on the radio button. When the message is selected, it will go bright green. Now when you click on the + <strong>COPY TO UPDATE</strong> button, the message text will be added to this report's update text. + You can edit the text before clicking <strong>POST</strong>. + </p> + [% END %] + <h3> + Replying to a message + </h3> + <p> + You can send an SMS back to the original sender: just hover over the message and click <span class="demo_reply_btn">reply</span>. It will usually + take a few minutes for the message to arrive. + </p> + <h3> + Getting message info + </h3> + <p> + Hover over a message and click on its <span class="demo_info_btn">i</span> button to see when it was sent. + You can also see the sender, although not their + actual number (instead the number is scrambled, but will be the <em>same scrambled number</em> on other messages they've sent). + </p> + <h3> + Hiding a message + </h3> + <p> + If a message can't be used to create a report, you can hide it by hovering over it and clicking its <span class="demo_hide_btn">X</span> button. If you're not + going to create a problem report with this message, you might like to reply first, to tell the person who sent the message why not. + When you click the X, give a reason why you're hiding it so other staff (managers in Message Manager) can see why the message was hidden. + </p> + </div> + </div> + +[% END %] + +<!-- [% INCLUDE 'debug_footer.html' %] --> + </div> <!-- .wrapper --> +</body> +</html> diff --git a/templates/web/fixmybarangay/header.html b/templates/web/fixmybarangay/header.html new file mode 100644 index 000000000..911a72022 --- /dev/null +++ b/templates/web/fixmybarangay/header.html @@ -0,0 +1,77 @@ +<!doctype html> +<!--[if lt IE 7]><html class="no-js ie6 oldie" lang="[% lang_code %]"><![endif]--> +<!--[if IE 7]> <html class="no-js ie7 oldie" lang="[% lang_code %]"><![endif]--> +<!--[if IE 8]> <html class="no-js ie8 oldie" lang="[% lang_code %]"><![endif]--> +<!--[if IE 9]> <html class="no-js ie9 oldie" lang="[% lang_code %]"><![endif]--> +<!--[if gt IE 9]><!--><html class="no-js" lang="[% lang_code %]"><!--<![endif]--> + <head> + <meta name="viewport" content="initial-scale=1.0"> + + <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> + <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)"> + [% extra_css %] + <!--[if (lt IE 9) & (!IEMobile)]> + <link rel="stylesheet" href="[% 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> + [% 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); %] + [% 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> + <script> + $(document).ready(function() { + + $('#mm_sign_out').click(function(){ + message_manager.sign_out(); + }); + + [% IF c.req.params.external_source_id && problem && problem.external_source_id.match('^\d+$') %] + var mm_msg_id ="[% c.req.params.external_source_id %]"; + var fms_id = "[% problem.id %]"; + if (mm_msg_id && fms_id) { + message_manager.config({url_root: "[% c.config.MESSAGE_MANAGER_URL %]"}); + message_manager.assign_fms_id(mm_msg_id, fms_id); + } + [% END %] + }); + </script> + [% END %] + </head> + <body class="[% bodyclass | html IF bodyclass %]"> + + <div class="wrapper"> + <div class="table-cell"> + <header id="site-header" role="banner"> + <div class="container"> + <a href="/" id="site-logo">FixMyBarangay</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" id="mm_sign_out">[% loc('sign out') %]</a> + </p> + [% ELSE %] + <!-- <a href="/auth">[% loc('Sign in') %]</a> --> + [% END %] + </div> + + [% pre_container_extra %] + + <div class="container"> + <div class="content[% " $mainclass" | html IF mainclass %]" role="main"> + + <!-- [% INCLUDE 'debug_header.html' %] --> diff --git a/templates/web/fixmybarangay/report/_message_manager.html b/templates/web/fixmybarangay/report/_message_manager.html new file mode 100644 index 000000000..5f6b515e5 --- /dev/null +++ b/templates/web/fixmybarangay/report/_message_manager.html @@ -0,0 +1,293 @@ +[% IF c.user && c.user.from_council %] + +[% IF problem.external_source_id && problem.external_source == c.config.MESSAGE_MANAGER_URL %] + <p class="mm-submitted-by-sms"> + [%# OK to link to Message Manager here because (currently) we're only showing this to staff users %] + <a href="[%= problem.external_source %]messages/view/[%= problem.external_source_id %]" + title="view in Message Manager admin"><img + src="/cobrands/fixmybarangay/images/mobile-22x40.png" alt="SMS"></a> + This report was submitted via SMS. + </p> +[% END %] + +[% IF problem.id %] + <div id="mm-container-for-report-btns"> + <input type="button" class="green-btn" value="Show Messages" id="show_messages"> + </div> +[% END %] + +<ul id="message_manager" class="issue-list-a tab" style="display: none"> + <li id="mm-admin-buttons"> + [% IF problem.id %] + <a style="float:left" id="mm-link-to-toggle-archive" href="#" title="show the message(s) associated with this report">show message for <b>this</b> report</a> + [% END %] + <a id="mm-link-to-refresh" href="#" title="update list of messages">refresh</a> + <a id="mm-link-to-admin" href="[% c.config.MESSAGE_MANAGER_URL %]" title="jump to Message Manager admin">admin</a> + <a id="mm-link-to-help" href="#mm-help" title="show help information">help</a> + </li> + <li id="message-control"> + <div id="mm-username-container">username: <span id="mm-received-username"></span></div> + <div id="mm-status-message-container"> + <img id="mm-spinner" src="/cobrands/fixmybarangay/images/fmb-spinner-16x16.gif" alt=""/> + <p id="mm-status-message"></p> + </div> + <div id="mm-login-container"> + <div> + <label for="mm-htauth-username">Username:</label> + <input name="mm-htauth-username" id="mm-htauth-username" type="text"/> + </div> + <div> + <label for="mm-htauth-password">Password:</label> + <input name="mm-htauth-password" id="mm-htauth-password" type="password"/> + </div> + <div class="submit"> + <input id="available-submit" type="submit" value="Get available messages" class="green-btn"/> + </div> + </div> + </li> + <li> + <div id="mm-message-list" style="min-height:1em;"></div> + </li> +</ul> + +<script type="text/javascript"> + +$(document).ready(function() { + var $mm_message_list = $('#mm-message-list'); + var mm_url = "[% c.config.MESSAGE_MANAGER_URL %]"; // from config + + [%# note that the presence of a problem id implies that this is a report view page, not a problem creation page %] + var problem_id = "[% problem.id %]"; + + var dummy_busy = false; + var fms_username = "[% c.user.email | replace('\@.*', '') %]"; + var timeout_id = 0; + var can_refresh = true; // disable refresh + var refresh_period = 60000 * 3; // refresh messages every three minutes + var has_archive_message = false; + + function sanitise_id(css_id) { + return css_id.replace(/\D/g, ""); + } + + // call this to push the auto-refresh timeout off so it's only triggered + // if there's no activity for a while + function reset_timeout() { + if (refresh_period && can_refresh) { + if (timeout_id) { + clearTimeout(timeout_id); + } + timeout_id = setTimeout(mm_refresh_messages, refresh_period); + } + } + + var mm_refresh_messages = function() { + $('#mm-link-to-refresh').fadeOut(); + $('#available-submit').click(); + } + + var mm_populate_list = function(data) { + $('#mm-status-message-container').find('p').text("Accessed Message Manager as " + data['username']); + $('input[name=mm_text]').prop('checked', false); // uncheck all + $('#mm-link-to-refresh').delay(2000).fadeIn(); + reset_timeout(); + } + + var mm_selected_message = function(data) { + var msg_text = ""; + var service_id = ""; + $('li.msg-is-active', $mm_message_list).removeClass('msg-is-active'); + if (data['success']) { + // msg_text = $('#form_detail').val( $('input[name=mm_text]:checked').val() ); # == message data + msg_text = data['data']['Message']['message']; + service_id = data['data']['Message']['id']; + $('#msg-' + service_id).addClass('msg-is-active'); + } else { + $('input[name=mm_text]').prop('checked', false); // uncheck all + } + $('#form_detail').val(msg_text); + $('#external_source_id').val(service_id); + } + + var dummy_reply_cleanup = function(data) { + reset_timeout(); + $('#reply_text').val(''); + dummy_busy = false; + mm_refresh_messages(); + } + + var dummy_hide_cleanup = function(data) { + reset_timeout(); + $('#reason_text').val(''); + dummy_busy = false; + } + + var custom_tooltips; + if (problem_id) { // this page is viewing, not creating + custom_tooltips = {tt_radio: "Select before clicking 'Copy to Update' to add this message as an update"}; + } + message_manager.config({ + url_root: mm_url, + tooltips: custom_tooltips, + want_nice_msgs: true + }); + message_manager.setup_click_listener({callback:mm_selected_message}); + + // problem form hidden input "external_source_id": pass the MM id into FMS, if used + var $problem_form = $('#problem_form').size()? $('#problem_form') : $('#form_update_form'); + $('<input type="hidden"/>').attr({ + 'id': 'external_source_id', + 'name': 'external_source_id', + }).appendTo($problem_form); + + $('#available-submit').click(function(e){ + e.preventDefault(); + reset_timeout(); + message_manager.get_available_messages({ + callback: mm_populate_list, + suggest_username: fms_username, + fms_id: problem_id, + anim_duration: 500 + }); + }); + $('#available-submit').click(); + + $mm_message_list.on('mouseover', 'li.mm-msg', function(e){ + e.stopPropagation(); // because replies are nested + $('.mm-msg-action', $mm_message_list).stop().fadeOut(200); + $(this).find('> .mm-msg-action').stop().show(); + }); + + $('#mm-message-list').on('click', '.mm-info', function(e){ + reset_timeout(); + message_manager.show_info(sanitise_id($(this).parent().attr('id'))); + }); + + $('#mm-hide-reasons').change(function(e){ + $('#reason_text').val($(this).val()); // load reason_text with boilerplate reason + }); + $('#mm-boilerplate-replies').change(function(e){ + $('#reply_text').val($(this).val()); // load reason_text with boilerplate reason + }); + + $('#reply-submit').click(function(e) { + e.preventDefault(); + // TODO: pending fancybox callbacks working, force dummy_busy here + // this is possibly overly cautious anyway + dummy_busy = false; + if (! dummy_busy) { + dummy_busy = true; + message_manager.reply( + $('#reply_to_msg_id').val(), + $('#reply_text').val(), + {callback:dummy_reply_cleanup}); + } + }); + + $('#hide-submit').click(function(e) { + e.preventDefault(); + reset_timeout(); + // TODO: pending fancybox callbacks working, force dummy_busy here + // this is possibly overly cautious anyway + dummy_busy = false; + if (! dummy_busy) { + dummy_busy = true; + message_manager.hide( + $('#hide_msg_id').val(), + $('#reason_text').val(), + {callback:dummy_hide_cleanup}); + } + }); + $("a#reply").fancybox({onClosed: function(){dummy_busy=false;}}); + + // only show on problem display page + if (problem_id) { + $('<input type="button" value="Copy to update"/>').attr({ + 'id': 'copy_to_update', + 'name': 'copy_to_update', + 'class': 'green-btn', + 'title': "add the selected message's text as an update to this report" + }).appendTo($('#mm-container-for-report-btns')); + } + + $('#copy_to_update').click(function(e){ + reset_timeout(); + e.preventDefault(); + $('#mm-message-list input:checked').each( function(index) { + var id = $(this).attr('id'); + id = id.replace('mm_text_',''); + $('#external_source_id').val(id); + $('#form_update').val( $(this).val() ); + $('#form_update_form').on('submit', function(e) { + message_manager.assign_fms_id( $('#external_source_id').val(), problem_id, { 'is_async': false } ); + }); + }); + }); + + $('#show_messages').on('click', function(e) { + $('#message_manager').slideToggle(1000); + if ($('#show_messages').val() == 'Show Messages') { + $('#show_messages').val('Hide Messages'); + $('#copy_to_update').stop(true,true).fadeIn(); + } else { + $('#show_messages').val('Show Messages'); + $('#copy_to_update').stop(true,true).fadeOut(); + } + + }); + + $('#mm-link-to-refresh').on('click', function(e) { + e.preventDefault(); + mm_refresh_messages(); + }); + + // suppress fading control while archive messages are displayed, for now + $('#mm-link-to-toggle-archive').on('click', function(e) { + e.preventDefault(); + $('#mm-link-to-toggle-archive').fadeOut(); + if ($('.mm-current', $mm_message_list).is(':visible')) { + $('#copy_to_update').stop(true,true).fadeOut(); + $('#mm-link-to-refresh').stop(true,true).fadeOut(); + $('.mm-empty', $mm_message_list).stop(true,true).fadeOut(); + $('.mm-current', $mm_message_list).stop(true,true).slideUp(1000, function(){ + if($('.mm-archive', $mm_message_list).find('li').length == 0) { + message_manager.say_status("No messages found for this report,"); + } else { + message_manager.say_status("Messages for this report:"); + }; + $('.mm-archive', $mm_message_list).stop(true,true).slideDown(1000, function(){ + $('#mm-link-to-toggle-archive').html('show all available messages') + .attr('title', 'show all available messages (for adding updates)'); + $('#mm-link-to-toggle-archive').fadeIn(); + can_refresh = false; + }) + }); + } else { + $('.mm-archive', $mm_message_list).stop(true,true).slideUp(1000, function(){ + message_manager.say_status("Available messages:"); + $('.mm-current', $mm_message_list).stop(true,true).slideDown(1000, function(){ + $('#mm-link-to-toggle-archive').html("show message for <b>this</b> report") + .attr('title', 'show the original message(s) for this report'); + $('#copy_to_update').stop(true,true).fadeIn(); + $('#mm-link-to-toggle-archive').stop(true,true).fadeIn(); + $('#mm-link-to-refresh').stop(true,true).fadeIn(); + $('.mm-empty', $mm_message_list).stop(true,true).fadeIn(); + can_refresh = true; + reset_timeout(); + }) + }); + } + }); + + $("a#mm-link-to-help").fancybox(); + + message_manager.populate_boilerplate_strings('hide-reason'); + message_manager.populate_boilerplate_strings('reply'); +}); + +</script> + +[% global.want_fmb_hidden_dialogs = 1 %] +[% global.is_fmb_creation_page = problem.id? 0 : 1 %] + +[% END %] diff --git a/templates/web/fixmybarangay/report/new/councils_text.html b/templates/web/fixmybarangay/report/new/councils_text.html new file mode 100644 index 000000000..24c54ea50 --- /dev/null +++ b/templates/web/fixmybarangay/report/new/councils_text.html @@ -0,0 +1,5 @@ +<p> +The information provided here will be displayed publicly on the site as well as being sent to the +relevant authority (DPWH, DEPW, or DPS). If you select the Fix Locally category then the +information will not be sent anywhere. +</p> diff --git a/templates/web/fixmybarangay/report/new/fill_in_details_text.html b/templates/web/fixmybarangay/report/new/fill_in_details_text.html new file mode 100644 index 000000000..51dc1e3f1 --- /dev/null +++ b/templates/web/fixmybarangay/report/new/fill_in_details_text.html @@ -0,0 +1,12 @@ +[% + IF area_ids_to_list.size != 0; + loc('Please fill in details of the problem below. Leave as much detail as you can, +and if possible describe the exact location of +the problem (e.g. if there is a streetlight number or road name).'); + IF category_extras; + ' ' _ loc('Some categories may require additional information.'); + END; + ELSE; + loc('Please fill in details of the problem below.'); + END; +%] diff --git a/templates/web/fixmybarangay/report/new/notes.html b/templates/web/fixmybarangay/report/new/notes.html new file mode 100644 index 000000000..8195051db --- /dev/null +++ b/templates/web/fixmybarangay/report/new/notes.html @@ -0,0 +1,11 @@ +<p style="clear:both">[% loc("Please note:") %]</p> + +<ul> +<!-- + <li>[% loc("We will only use your personal information in accordance with our <a href=\"/faq#privacy\">privacy policy.</a>") %]</li> +--> + <li>[% loc("Be sure to choose the right category, because we use that to determine to whom the report is sent.") %]</li> + <li>[% loc("Writing your message entirely in block capitals makes it hard to read, as does a lack of punctuation.") %]</li> + <li>[% loc("Remember that, for the pilot project, FixMyBarangay is only for reporting potholes and streetlights in bgy. Luz or Basak San Nicolas.") %]</li> + +</ul> diff --git a/templates/web/fixmybarangay/reports/index.html b/templates/web/fixmybarangay/reports/index.html new file mode 100755 index 000000000..2d8da17c6 --- /dev/null +++ b/templates/web/fixmybarangay/reports/index.html @@ -0,0 +1,59 @@ +[% INCLUDE 'header.html', title = loc('Summary reports'), bodyclass => 'fullwidthpage' %] + +<h1>[% loc('All Reports') %]</h1> + +<div class="intro"> +<p> +[% loc('This is a summary of all reports on this site; select a particular barangay to see the reports sent there.') %] + +</p> +</div> + +<table cellpadding="3" cellspacing="1" border="0" class="nicetable"> +<thead> +<tr> +<th class="title">[% loc('Name') %]</th> +<th class="data">[% loc('New <br>problems') %]</th> +<th class="data">[% loc('Older <br>problems') %]</th> +<th class="data">[% loc('Old / unknown <br>problems') %]</th> +<th class="data">[% loc('Recently <br>fixed') %]</th> +<th class="data">[% loc('Older <br>fixed') %]</th> +</tr> +</thead> + +<tbody> +[% FOREACH area IN areas_info_sorted %] +<tr align="center" +[%- IF area.generation_high == 10 %] 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> +</tr> +[% TRY %][% PROCESS "reports/_extras.html" %][% CATCH file %][% END %] +[% END %] +</tbody> +</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/_report_banner.html b/templates/web/fixmystreet/around/_report_banner.html new file mode 100755 index 000000000..9edf6e171 --- /dev/null +++ b/templates/web/fixmystreet/around/_report_banner.html @@ -0,0 +1,14 @@ +<h1 class="big-green-banner"> + [% loc( 'Click map to report a problem' ) %] + [% IF c.cobrand.moniker == 'bromley' %] + <span>Yellow pins show existing reports</span> + [% END %] +</h1> +<p id="skip-this-step"> + [% + tprintf( + loc("Can't see the map? <a href='%s' rel='nofollow'>Skip this step</a>"), + url_skip + ) + %] +</p> diff --git a/templates/web/fixmystreet/around/_updates.html b/templates/web/fixmystreet/around/_updates.html new file mode 100755 index 000000000..75327c935 --- /dev/null +++ b/templates/web/fixmystreet/around/_updates.html @@ -0,0 +1,5 @@ +<div class="shadow-wrap"> + <ul id="key-tools" class="singleton"> + <li><a class="feed" id="key-tool-around-updates" href="[% email_url | html %]">Get updates</a></li> + </ul> +</div> diff --git a/templates/web/fixmystreet/around/display_location.html b/templates/web/fixmystreet/around/display_location.html deleted file mode 100755 index a7240688f..000000000 --- a/templates/web/fixmystreet/around/display_location.html +++ /dev/null @@ -1,121 +0,0 @@ -[% - - rss_alt = loc('RSS feed'); - rss_title = loc('RSS feed of recent local problems'); - - rss_url - = pc - ? c.uri_for( "/rss/pc", pc ) - : c.uri_for( "/rss/l/$short_latitude,$short_longitude" ); - - email_url = c.uri_for( - '/alert/list', - { - lat => short_latitude, - lon => short_longitude, - feed => "local:$short_latitude:$short_longitude", - } - ); - - url_skip = c.uri_for( - '/report/new', - { - pc => pc - latitude => short_latitude, - longitude => short_longitude, - skipped => 1, - } - ); - - PROCESS "maps/${map.type}.html"; - - INCLUDE 'header.html', - title => loc('Viewing a location') - rss => [ loc('Recent local problems, FixMyStreet'), rss_url ], - bodyclass => 'mappage', - robots => 'noindex,nofollow'; -%] - -<form action="[% c.uri_for('/report/new') %]" method="post" name="mapForm" id="mapForm" enctype="multipart/form-data" class="validate"> - [% IF c.req.params.map_override %] - <input type="hidden" name="map_override" value="[% c.req.params.map_override | html %]"> - [% END %] - <input type="hidden" name="pc" value="[% pc | html %]"> - - <input type="hidden" name="latitude" id="fixmystreet.latitude" value="[% short_latitude | html %]"> - <input type="hidden" name="longitude" id="fixmystreet.longitude" value="[% short_longitude | html %]"> - - [% map_html %] - - <p id='sub_map_links'> - [% 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 %] - <a id='hide_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => 1 } ) %]'>[% loc('Hide pins') %]</a> - [% END %] - [% IF c.cobrand.country == 'GB' || c.cobrand.country == 'NO' %] - [% IF c.req.params.all_pins %] - <a id='all_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => undef, all_pins => undef } ) %]'>[% loc('Hide old') %]</a> - [% ELSE %] - <a id='all_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => undef, all_pins => 1 } ) %]'>[% loc('Show old') %]</a> - [% END %] - [% END %] - </p> - - </div> - - - - - <div id="side"> - - <h1 class="big-green-banner">[% - loc( 'Click map to report a problem' ); - IF c.cobrand.moniker == 'bromley'; - '<span>Yellow pins show existing reports</span>'; - END - %]</h1> - - <p id="skip-this-step"> - [% - tprintf( - loc("Can't see the map? <a href='%s' rel='nofollow'>Skip this step</a>"), - url_skip - ) - %] - </p> - - <div class="shadow-wrap"> - <ul id="key-tools" class="singleton"> - <li><a class="feed" id="key-tool-around-updates" href="[% email_url | html %]">Get updates</a></li> - </ul> - </div> - - <section class="full-width"> - <menu id="problems-nav" class="tab-nav"> - <ul> - <li><a href="#current">[% loc('Problems on the map') %]</a></li> - <li><a href="#current_near">[% loc( 'Problems nearby' ) %]</a></li> - </ul> - </menu> - - <ul id="current" class="issue-list-a tab"> - [% INCLUDE "around/on_map_list_items.html" %] - </ul> - - <ul id="current_near" class="issue-list-a tab"> - [% INCLUDE "around/around_map_list_items.html" %] - </ul> - </section> - </div> - - <div style="display:none" id="side-form"> - [% INCLUDE "report/new/fill_in_details_form.html" - js = 1, - report.used_map = 1 - report.name = c.user.name - %] - </div> -</form> - -[% INCLUDE 'footer.html' %] diff --git a/templates/web/fixmystreet/around/intro.html b/templates/web/fixmystreet/around/intro.html new file mode 100644 index 000000000..d71dad1d5 --- /dev/null +++ b/templates/web/fixmystreet/around/intro.html @@ -0,0 +1,2 @@ + <h1>[% loc('Report, view, or discuss local problems') %]</h1> + <h2>[% loc('(like graffiti, fly tipping, broken paving slabs, or street lighting)') %]</h2> diff --git a/templates/web/fixmystreet/around/postcode_form.html b/templates/web/fixmystreet/around/postcode_form.html index a98959d3a..d48a53183 100644 --- a/templates/web/fixmystreet/around/postcode_form.html +++ b/templates/web/fixmystreet/around/postcode_form.html @@ -1,16 +1,19 @@ <div id="front-main"> <div id="front-main-container"> - [% IF c.cobrand.moniker == 'bromley' %] - <h1 class="main mob-only">Reporting a problem in Bromley’s streets or parks</h1> + [% IF c.cobrand.moniker == 'fixmybarangay' %] + <h1>View local problems</h1> + <h2>(potholes or street lighting)</h2> [% ELSE %] - <h1>[% loc('Report, view, or discuss local problems') %]</h1> - <h2>[% loc('(like graffiti, fly tipping, broken paving slabs, or street lighting)') %]</h2> + [% INCLUDE 'around/intro.html' %] [% END %] [% question = c.cobrand.enter_postcode_text || loc('Enter a nearby street name and area'); %] + [% IF c.cobrand.moniker == 'fixmybarangay' %] + [% INCLUDE '_barangay_buttons.html' %] + [% ELSE %] <form action="[% c.uri_for('/around') %]" method="get" name="postcodeForm" id="postcodeForm"> <label for="pc">[% question %]:</label> <div> @@ -18,10 +21,11 @@ <input type="submit" value="[% loc('Go') %]" id="submit"> </div> - [% IF partial_token %] - <input type="hidden" name="partial" value="[% partial_token.token %]"> - [% END %] + [% IF partial_token %] + <input type="hidden" name="partial" value="[% partial_token.token %]"> + [% END %] </form> + [% END %] </div> </div> diff --git a/templates/web/fixmystreet/around/tabbed_lists.html b/templates/web/fixmystreet/around/tabbed_lists.html new file mode 100644 index 000000000..77c5a521b --- /dev/null +++ b/templates/web/fixmystreet/around/tabbed_lists.html @@ -0,0 +1,14 @@ +<menu id="problems-nav" class="tab-nav"> + <ul> + <li><a href="#current">[% loc('Problems on the map') %]</a></li> + <li><a href="#current_near">[% loc( 'Problems nearby' ) %]</a></li> + </ul> +</menu> + +<ul id="current" class="issue-list-a tab"> + [% INCLUDE "around/on_map_list_items.html" %] +</ul> + +<ul id="current_near" class="issue-list-a tab"> + [% INCLUDE "around/around_map_list_items.html" %] +</ul> diff --git a/templates/web/fixmystreet/auth/general.html b/templates/web/fixmystreet/auth/general.html index 6ecbcadc5..7fa2b57fe 100644 --- a/templates/web/fixmystreet/auth/general.html +++ b/templates/web/fixmystreet/auth/general.html @@ -26,7 +26,11 @@ <input type="email" class="required email" id="email" name="email" value="[% email | html %]" placeholder="[% loc('Your email address') %]"> <div id="form_sign_in"> + [% IF c.cobrand.moniker == 'fixmybarangay' %] + <h3>[% loc("Do you have a FixMyBarangay password?") %]</h3> + [% ELSE %] <h3>[% loc("Do you have a FixMyStreet password?") %]</h3> + [% END %] <div id="form_sign_in_yes" class="form-box"> <h5>[% loc('<strong>Yes</strong> I have a password') %]</h5> diff --git a/templates/web/fixmystreet/faq/faq-en-gb.html b/templates/web/fixmystreet/faq/faq-en-gb.html index bd94ecd38..8628085e5 100755 --- a/templates/web/fixmystreet/faq/faq-en-gb.html +++ b/templates/web/fixmystreet/faq/faq-en-gb.html @@ -7,6 +7,7 @@ <li><a href="#practical">Practical Questions</a></li> <li><a href="#organisation">Organisation Questions</a></li> <li><a href="/privacy">Privacy and cookies</a></li> + <li><a href="/contact">Contact FixMyStreet</a></li> </ul> </aside> </div> @@ -18,6 +19,8 @@ or discuss local problems they’ve found to their local council by simply locating them on a map. It launched in early February 2007.</dd> + <dt>How do I get in touch with FixMyStreet?</dt> + <dd>Here’s our <a href="/contact">contact page</a>.</dd> <dt>What sort of problems should I report with FixMyStreet?</dt> <dd>FixMyStreet is primarily for reporting things which are <strong>broken or dirty or damaged or dumped, and need fixing, cleaning @@ -184,7 +187,7 @@ rights reserved, Ministry of Justice 100037819 2008), Yahoo! for their BSD-licensed JavaScript libraries, the entire free software community (this particular project was brought to you by Perl, PostgreSQL, and the number 161.290) and <a -href="http://www.m247.com/">M247</a> (who kindly host all +href="http://www.bytemark.co.uk/">Bytemark</a> (who kindly host all our servers). Let us know if we’ve missed anyone.</dd> diff --git a/templates/web/fixmystreet/header.html b/templates/web/fixmystreet/header.html index 8d10d4c04..85ed2c0e1 100644 --- a/templates/web/fixmystreet/header.html +++ b/templates/web/fixmystreet/header.html @@ -11,16 +11,18 @@ <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 = 'FixMyStreet' %] + <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 = c.cobrand.site_title %] [% extra_js %] [% IF c.req.uri.host == 'osm.fixmystreet.com' %] @@ -30,13 +32,14 @@ [% INCLUDE 'tracking_code.html' %] </head> + [% TRY %][% PROCESS 'set_body_class.html' %][% CATCH file %][% END %] <body class="[% bodyclass | html IF bodyclass %]"> <div class="wrapper"> <div class="table-cell"> <header id="site-header" role="banner"> <div class="container"> - <a href="/" id="site-logo">FixMyStreet</a> + <a href="/" id="site-logo">[% c.cobrand.site_title | html %]</a> <a href="#main-nav" id="nav-link">Main Navigation</a> </div> </header> diff --git a/templates/web/fixmystreet/index.html b/templates/web/fixmystreet/index.html index 492adbbe5..5d7d31baa 100644 --- a/templates/web/fixmystreet/index.html +++ b/templates/web/fixmystreet/index.html @@ -33,26 +33,9 @@ kinds of problems like missed bins use our <div class="tablewrapper"> <div id="front-howto"> - <h2>[% loc('How to report a problem') %]</h2> - - <ol class="big-numbers"> - <li>[% question %]</li> - <li>[% loc('Locate the problem on a map of the area') %]</li> - <li>[% loc('Enter details of the problem') %]</li> - [% IF c.cobrand.is_council %] - <li>Confirm the report and [% c.cobrand.council_name %] will investigate</li> - [% ELSE %] - <li>[% loc('We send it to the council on your behalf') %]</li> - [% END %] - </ol> - - <section class="full-width"> - [% INCLUDE "front/stats.html" %] - [% TRY %][% INCLUDE "front/tips.html" %][% CATCH file %][% END %] - </section> + [% INCLUDE 'index-steps.html' %] </div> - [% recent_photos = c.cobrand.recent_photos('front', 5); %] diff --git a/templates/web/fixmystreet/my/my.html b/templates/web/fixmystreet/my/my.html index e170202de..258f147c6 100644 --- a/templates/web/fixmystreet/my/my.html +++ b/templates/web/fixmystreet/my/my.html @@ -13,6 +13,10 @@ <h1>[% loc('Your Reports') %]</h1> +[% IF c.cobrand.moniker == 'fixmybarangay' %] + [% INCLUDE '_barangay_buttons.html' %] +[% END %] + [% INCLUDE 'pagination.html', pager = problems_pager, param = 'p' diff --git a/templates/web/fixmystreet/questionnaire/completed-open.html b/templates/web/fixmystreet/questionnaire/completed-open.html index 2bb3bad1f..f39083cce 100644 --- a/templates/web/fixmystreet/questionnaire/completed-open.html +++ b/templates/web/fixmystreet/questionnaire/completed-open.html @@ -1,6 +1,12 @@ +[% IF c.cobrand.is_council %] +<p style="font-size: 150%"> +Thank you very much for filling in our questionnaire. +</p> +[% ELSE %] [% loc('<p style="font-size:150%">We’re sorry to hear that. We have two suggestions: why not try <a href="http://www.writetothem.com/">writing direct to your councillor(s)</a> or, if it’s a problem that could be fixed by local people working together, why not <a href="http://www.pledgebank.com/new">make and publicise a pledge</a>? </p>' ) %] +[% END %] diff --git a/templates/web/fixmystreet/report/_main.html b/templates/web/fixmystreet/report/_main.html deleted file mode 100644 index 7ceb1f6a5..000000000 --- a/templates/web/fixmystreet/report/_main.html +++ /dev/null @@ -1,21 +0,0 @@ -<div class="problem-header cf"> - <h1>[% problem.title | html %]</h1> - - <p><em> - [% problem.meta_line(c) | html %] - [% IF problem.council %] - [% IF problem.whensent || problem.can_display_external_id %] - <small class="council_sent_info"><br> - [% problem.processed_summary_string(c) %] - </small> - [% END %] - [% ELSE %] - <br><small>[% loc('Not reported to council') %]</small> - [% END %] - </em></p> - - [% INCLUDE 'report/photo.html' object=problem center=1 %] - - [% add_links( problem.detail ) | html_para %] - -</div> diff --git a/templates/web/fixmystreet/report/display.html b/templates/web/fixmystreet/report/display.html index e9c8ee21d..26e6fe992 100644 --- a/templates/web/fixmystreet/report/display.html +++ b/templates/web/fixmystreet/report/display.html @@ -7,7 +7,7 @@ title = problem_title rss = [ loc('Updates to this problem, FixMyStreet'), "/rss/$problem.id" ] robots = 'index, nofollow' - bodyclass = 'mappage' + bodyclass = 'mappage'; %] [% map_html %] @@ -15,20 +15,39 @@ </div> [% INCLUDE 'report/banner.html' %] + [% INCLUDE 'report/_main.html' %] +[% TRY %][% INCLUDE 'report/_message_manager.html' %][% CATCH file %][% END %] <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 ) %] + <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 %] <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 %] <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> + [% IF c.cobrand.moniker == 'fixmystreet' %] + <li><a rel="nofollow" id="key-tool-report-share" class="share" href="#report-share">[% loc('Share') %]</a></li> + [% END %] <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> </ul> +[% IF c.cobrand.moniker == 'fixmystreet' %] + <div id="report-share" class="hidden-js" align="center"> + <a href="https://twitter.com/share" class="twitter-share-button" data-text="I just reported ‘[% problem.title | html %]’" data-via="fixmystreet" data-related="mysociety" data-count="none" data-dnt="true">Tweet</a> +<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> + <iframe src="//www.facebook.com/plugins/like.php?href=[% c.req.uri | uri %]&send=false&layout=button_count&width=90&show_faces=false&action=like&colorscheme=light&font&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true"></iframe> + </div> +[% END %] + <div id="report-updates-data" class="hidden-js"> <form action="[% c.uri_for( '/alert/subscribe' ) %]" method="post"> - <p><a href="[% c.uri_for( '/rss', problem.id ) %]"> - <img src="/i/feed.png" width="16" height="16" title="[% loc('RSS feed') %]" alt="[% loc('RSS feed of updates to this problem' ) %]" border="0" style="float: right"> - </a></p> + <a href="[% c.uri_for( '/rss', problem.id ) %]"> + <img src="/i/feed.png" width="16" height="16" title="[% loc('RSS feed') %]" alt="[% loc('RSS feed of updates to this problem' ) %]" border="0"> + </a> <p>[% loc('Receive email when updates are left on this problem.' ) %]</p> <fieldset> <label class="hidden n" for="alert_rznvy">[% loc('Your email') %]</label> @@ -45,149 +64,5 @@ </div> [% INCLUDE 'report/updates.html' %] - -<div id="update_form"> - <h2>[% loc( 'Provide an update') %]</h2> - - [% IF c.cobrand.moniker != 'emptyhomes' %] - <div class="general-sidebar-notes"> - [% INCLUDE 'report/updates-sidebar-notes.html' %] - </div> - [% END %] - - [% INCLUDE 'errors.html' %] - - <form method="post" action="[% c.uri_for( '/report/update' ) %]" name="updateForm" class="validate"[% IF c.cobrand.allow_photo_upload %] enctype="multipart/form-data"[% END %]> - <fieldset> - <input type="hidden" name="submit_update" value="1"> - <input type="hidden" name="id" value="[% problem.id | html %]"> - - <label for="form_update">[% loc( 'Update' ) %]</label> - [% IF field_errors.update %] - <div class='form-error'>[% field_errors.update %]</div> - [% 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 ) %] - <label for="form_state">[% loc( 'State' ) %]</label> - <select name="state" id="form_state"> - [% FOREACH state IN [ ['confirmed', loc('Open')], ['investigating', - loc('Investigating')], ['action scheduled', loc('Action Scheduled')], - ['in progress', loc('In Progress')], ['duplicate', loc('Duplicate')], - ['unable to fix', loc('Unable to fix')], ['not responsible', loc('Not Responsible')], - ['fixed', loc('Fixed')] ] %] - <option [% 'selected ' IF state.0 == problem.state %] value="[% state.0 %]">[% state.1 %]</option> - [% END %] - </select> - [% ELSE %] - [% IF problem.is_fixed AND c.user_exists AND c.user.id == problem.user_id %] - - <input type="checkbox" name="reopen" id="form_reopen" value="1"[% ' checked' IF update.mark_open %]> - <label class="inline" for="form_reopen">[% loc('This problem has not been fixed') %]</label> - - [% ELSIF !problem.is_fixed %] - - <div class="checkbox-group"> - <input type="checkbox" name="fixed" id="form_fixed" value="1"[% ' checked' IF update.mark_fixed %]> - <label class="inline" for="form_fixed">[% loc('This problem has been fixed') %]</label> - </div> - - [% END %] - [% END %] - - [% IF c.cobrand.allow_photo_upload %] - <div id="fileupload_normalUI"> - [% IF upload_fileid %] - <img align="right" src="/photo/[% upload_fileid %].temp.jpeg" alt=""> - <p>[% loc('You have already attached a photo to this update, attaching another one will replace it.') %]</p> - <input type="hidden" name="upload_fileid" value="[% upload_fileid %]"> - [% END %] - <label for="form_photo">[% loc('Photo') %]</label> - [% IF field_errors.photo %] - <p class='form-error'>[% field_errors.photo %]</p> - [% END %] - <input type="file" name="photo" id="form_photo"> - </div> - [% END %] - - [% IF c.user_exists %] - - [% INCLUDE name %] - - <input class="final-submit green-btn" type="submit" id="update_post" value="[% loc('Post') %]"> - - - [% ELSE %] - - <label for="form_rznvy">[% loc('Email' ) %]</label> - [% IF field_errors.email %] - <p class='form-error'>[% field_errors.email %]</p> - [% END %] - <input type="email" name="rznvy" id="form_rznvy" value="[% update.user.email | html %]" placeholder="[% loc('Your email address' ) %]" required> - - <div id="form_sign_in"> - <h3>[% loc("Now to submit your update…") %]</h3> - <h2>[% loc("Do you have a FixMyStreet password?") %]</h2> - - <div id="form_sign_in_yes" class="form-box"> - <h5>[% loc('<strong>Yes</strong> I have a password') %]</h5> - - <label class="hidden-js n" for="password_sign_in">[% loc('Yes I have a password') %]</label> - [% IF field_errors.password %] - <p class='form-error'>[% field_errors.password %]</p> - [% END %] - <div class="form-txt-submit-box"> - <input type="password" name="password_sign_in" id="password_sign_in" value="" placeholder="[% loc('Your password') %]"> - <input class="green-btn" type="submit" name="submit_sign_in" id="submit_sign_in" value="[% loc('Post') %]"> - </div> - - <div class="checkbox-group"> - <input type="checkbox" id="remember_me" name="remember_me" value='1'[% ' checked' IF remember_me %]> - <label class="inline n" for="remember_me">[% loc('Keep me signed in on this computer') %]</label> - </div> - </div> - <div id="form_sign_in_no" class="form-box"> - <h5>[% loc('<strong>No</strong> Let me confirm my update by email') %]</h5> - - [% INCLUDE name %] - - <div class="general-sidebar-notes"> - <p class="dark">[% loc('We never show your email') %]</p> - <p>[% loc('Providing a password is optional, but doing so will allow you to more easily report problems, leave updates and manage your reports.') %]</p> - </div> - - <label for="password_register">[% loc('Password (optional)') %]</label> - - <div class="form-txt-submit-box"> - <input type="password" name="password_register" id="password_register" value="" placeholder="[% loc('Enter a password') %]"> - <input class="green-btn" type="submit" name="submit_register" id="submit_register" value="[% loc('Post') %]"> - </div> - </div> - </div> - - [% END %] - </fieldset> - </form> -</div> - - - +[% INCLUDE 'report/update-form.html' %] [% INCLUDE 'footer.html' %] - -[% BLOCK name %] - [% INCLUDE 'report/new/extra_name.html' %] - <label for="form_name">[% loc('Name') %]</label> - [% 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') %]"> - - <div class="checkbox-group"> - <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' UNLESS update.anonymous %]> - <label class="inline" for="form_may_show_name">[% loc('Show my name publicly') %]</label> - </div> - <div class="checkbox-group"> - <input type="checkbox" name="add_alert" id="form_add_alert" value="1"[% ' checked' IF add_alert %]> - <label class="inline" for="form_add_alert">[% loc( 'Alert me to future updates' ) %]</label> - </div> -[% END %] diff --git a/templates/web/fixmystreet/report/new/category_extras.html b/templates/web/fixmystreet/report/new/category_extras.html index c2a213225..ae1214c35 100644 --- a/templates/web/fixmystreet/report/new/category_extras.html +++ b/templates/web/fixmystreet/report/new/category_extras.html @@ -11,14 +11,14 @@ [% END -%] [% IF meta.exists('values') %] <select name="[% meta_name %]" id="form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]> - [% FOR option IN meta.values.value.keys %] - <option value="[% meta.values.value.$option.key %]">[% option %]</option> + [% FOR option IN meta.values.value %] + <option value="[% option.key.0 %]"[% IF option.key.0 == report_meta.$meta_name.value %] selected[% END %]>[% option.name.0 %]</option> [% END %] </select> [% ELSE %] - <input type="text" value="[% report_meta.$meta_name | html %]" name="[% meta_name %]" id="form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]> + <input type="text" value="[% report_meta.$meta_name.value | html %]" name="[% meta_name %]" id="form_[% meta_name %]"[% meta.required == 'true' ? ' required' : '' %]> [% END %] [%- END %] [%- END %] -</div>
\ No newline at end of file +</div> 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 237533657..fb342d487 100644 --- a/templates/web/fixmystreet/report/new/fill_in_details_form.html +++ b/templates/web/fixmystreet/report/new/fill_in_details_form.html @@ -15,6 +15,7 @@ [% PROCESS 'report/new/councils_text.html' %] [% END %] + [% IF c.cobrand.moniker != 'fixmybarangay' || ( c.user && c.user.from_council ) %] <div id="report-a-problem-sidebar"> <!-- The text for this section needs checking, but I can't work out which bit comes from where @@ -35,12 +36,13 @@ [% END %] </p> </div> - + <div class="sidebar-notes"> [% INCLUDE 'report/new/notes.html' %] </div> </div> + [% END %] [% INCLUDE 'errors.html' %] <fieldset> @@ -87,11 +89,7 @@ [%- END %] [% IF c.cobrand.allow_photo_upload %] - [% IF field_errors.photo %] - <p class='form-error'>[% field_errors.photo %]</p> - [% END %] - - + <label for="form_photo">[% loc('Photo') %]</label> [% IF upload_fileid || report.photo %] [% IF upload_fileid %] <img align="right" src="/photo/[% upload_fileid %].temp.jpeg" alt=""> @@ -104,14 +102,19 @@ <img align="right" src="/photo/[% report.id %].jpeg"> [% END %] [% END %] - - <label for="form_photo">[% loc('Photo') %]</label> + + [% IF field_errors.photo %] + <p class='form-error'>[% field_errors.photo %]</p> + [% END %] <input type="file" name="photo" id="form_photo"> [% END %] [% IF c.user_exists %] <div class="form-box"> + <label for="form_email">[% loc('Your email') %]</label> + <input disabled type="text" value="[% c.user.email | html %]"> + [% INCLUDE 'report/new/extra_name.html' %] <label for="form_name">[% loc('Name') %]</label> @@ -122,13 +125,15 @@ [%# if there is nothing in the name field then set check box as default on form %] <div class="checkbox-group"> - <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' IF !report.anonymous %]> - <label class="inline" for="form_may_show_name">[% loc('Show my name publicly') %]</label> + <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' IF report.anonymous==0 OR (c.cobrand.default_show_name AND report.anonymous=='') %]> + <label class="inline" for="form_may_show_name">[% loc('Show my name publicly') %] </label> </div> + [% IF c.cobrand.moniker != 'fixmybarangay' || c.user.from_council %] <div class="general-sidebar-notes"> <p>[% loc('We never show your email address or phone number.') %]</p> </div> + [% END %] <label for="form_phone">[% loc('Phone number (optional)') %]</label> <input class="" type="text" value="[% report.user.phone | html %]" name="phone" id="form_phone" placeholder="[% loc('Your phone number') %]"> @@ -166,6 +171,12 @@ <input type="checkbox" id="remember_me" name="remember_me" value='1'[% ' checked' IF remember_me %]> <label class="n inline" for="remember_me">[% loc('Keep me signed in on this computer') %]</label> </div> + + <div class="general-sidebar-notes" id="forgotten-pw"> + <p class="dark">[% loc('Forgotten your password?') %]</p> + <p>[% loc('Confirm by email below, providing a new password at that point. When you confirm, your password will be updated.') %]</p> + </div> + </div> <div id="form_sign_in_no" class="form-box"> @@ -182,7 +193,7 @@ [%# if there is nothing in the name field then set check box as default on form %] <div class="checkbox-group"> - <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' IF !report.anonymous %]> + <input type="checkbox" name="may_show_name" id="form_may_show_name" value="1"[% ' checked' IF report.anonymous==0 OR (c.cobrand.default_show_name AND report.anonymous=='') %]> <label class="inline" for="form_may_show_name">[% loc('Show my name publicly') %]</label> </div> diff --git a/templates/web/fixmystreet/report/new/fill_in_details_text.html b/templates/web/fixmystreet/report/new/fill_in_details_text.html index 8b5e3a2ad..05527bb24 100644 --- a/templates/web/fixmystreet/report/new/fill_in_details_text.html +++ b/templates/web/fixmystreet/report/new/fill_in_details_text.html @@ -1,9 +1,6 @@ [% IF area_ids_to_list.size != 0; - loc('The council won’t be able to help unless you leave as much -detail as you can. Please describe the exact location of the problem (e.g. on a -wall), what it is, how long it has been there, a description (and a photo of -the problem if you have one), etc.'); + loc('The council won’t be able to help unless you leave as much detail as you can. Please describe the exact location of the problem (e.g. on a wall), what it is, how long it has been there, a description (and a photo of the problem if you have one), etc.'); IF category_extras; ' ' _ loc('Some categories may require additional information.'); END; diff --git a/templates/web/fixmystreet/report/new/notes.html b/templates/web/fixmystreet/report/new/notes.html index aa73f0694..d508b1929 100644 --- a/templates/web/fixmystreet/report/new/notes.html +++ b/templates/web/fixmystreet/report/new/notes.html @@ -3,7 +3,7 @@ <ul class="plain-list"> <li>[% loc("We will only use your personal information in accordance with our <a href=\"/privacy\">privacy policy.</a>") %]</li> <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("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> <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/photo.html b/templates/web/fixmystreet/report/photo.html deleted file mode 100644 index 02ab9228b..000000000 --- a/templates/web/fixmystreet/report/photo.html +++ /dev/null @@ -1,8 +0,0 @@ -[% IF c.cobrand.allow_photo_display && object.photo %] -[% photo = object.get_photo_params %] -<div class="update-img"> - [% IF photo.url_full %]<a href="[% photo.url_full %]" rel="fancy">[% END - %]<img alt="Photo of this report" [% IF photo.height %]height="[% photo.height %]" width="[% photo.width %]"[% END %] src="[% photo.url %]"> - [%- IF photo.url_full %]<span>zoom</span></a>[% END %] -</div> -[% END %] diff --git a/templates/web/fixmystreet/report/update-form.html b/templates/web/fixmystreet/report/update-form.html new file mode 100644 index 000000000..a632cfc4a --- /dev/null +++ b/templates/web/fixmystreet/report/update-form.html @@ -0,0 +1,150 @@ +[% allow_creation = !c.cobrand.only_authed_can_create || (c.user && c.user.from_council) %] +[% IF allow_creation %] +<div id="update_form"> + <h2>[% loc( 'Provide an update') %]</h2> + + [% IF c.cobrand.moniker != 'emptyhomes' AND c.cobrand.moniker != 'stevenage' %] + <div class="general-sidebar-notes"> + [% INCLUDE 'report/updates-sidebar-notes.html' %] + </div> + [% END %] + + [% INCLUDE 'errors.html' %] + + <form method="post" action="[% c.uri_for( '/report/update' ) %]" id="form_update_form" name="updateForm" class="validate"[% IF c.cobrand.allow_photo_upload %] enctype="multipart/form-data"[% END %]> + <fieldset> + <input type="hidden" name="submit_update" value="1"> + <input type="hidden" name="id" value="[% problem.id | html %]"> + + <label for="form_update">[% loc( 'Update' ) %]</label> + [% IF field_errors.update %] + <div class='form-error'>[% field_errors.update %]</div> + [% 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 ) %] + <label for="form_state">[% loc( 'State' ) %]</label> + <select name="state" id="form_state"> + [% FOREACH state IN [ ['confirmed', loc('Open')], ['investigating', + loc('Investigating')], ['action scheduled', loc('Action Scheduled')], + ['in progress', loc('In Progress')], ['duplicate', loc('Duplicate')], + ['unable to fix', loc('Unable to fix')], ['not responsible', loc('Not Responsible')], + ['fixed', loc('Fixed')] ] %] + <option [% 'selected ' IF state.0 == problem.state %] value="[% state.0 %]">[% state.1 %]</option> + [% END %] + </select> + [% ELSE %] + [% IF problem.is_fixed AND c.user_exists AND c.user.id == problem.user_id %] + + <input type="checkbox" name="reopen" id="form_reopen" value="1"[% ' checked' IF update.mark_open %]> + <label class="inline" for="form_reopen">[% loc('This problem has not been fixed') %]</label> + + [% ELSIF !problem.is_fixed %] + + <div class="checkbox-group"> + <input type="checkbox" name="fixed" id="form_fixed" value="1"[% ' checked' IF update.mark_fixed %]> + <label class="inline" for="form_fixed">[% loc('This problem has been fixed') %]</label> + </div> + + [% END %] + [% END %] + + [% IF c.cobrand.allow_photo_upload %] + <div id="fileupload_normalUI"> + [% IF upload_fileid %] + <img align="right" src="/photo/[% upload_fileid %].temp.jpeg" alt=""> + <p>[% loc('You have already attached a photo to this update, attaching another one will replace it.') %]</p> + <input type="hidden" name="upload_fileid" value="[% upload_fileid %]"> + [% END %] + <label for="form_photo">[% loc('Photo') %]</label> + [% IF field_errors.photo %] + <p class='form-error'>[% field_errors.photo %]</p> + [% END %] + <input type="file" name="photo" id="form_photo"> + </div> + [% END %] + + [% IF c.user_exists %] + + [% INCLUDE name %] + + <input class="final-submit green-btn" type="submit" id="update_post" value="[% loc('Post') %]"> + + + [% ELSE %] + + <label for="form_rznvy">[% loc('Email' ) %]</label> + [% IF field_errors.email %] + <p class='form-error'>[% field_errors.email %]</p> + [% END %] + <input type="email" name="rznvy" id="form_rznvy" value="[% update.user.email | html %]" placeholder="[% loc('Your email address' ) %]" required> + + <div id="form_sign_in"> + <h3>[% loc("Now to submit your update…") %]</h3> + <h2>[% loc("Do you have a FixMyStreet password?") %]</h2> + + <div id="form_sign_in_yes" class="form-box"> + <h5>[% loc('<strong>Yes</strong> I have a password') %]</h5> + + <label class="hidden-js n" for="password_sign_in">[% loc('Yes I have a password') %]</label> + [% IF field_errors.password %] + <p class='form-error'>[% field_errors.password %]</p> + [% END %] + <div class="form-txt-submit-box"> + <input type="password" name="password_sign_in" id="password_sign_in" value="" placeholder="[% loc('Your password') %]"> + <input class="green-btn" type="submit" name="submit_sign_in" id="submit_sign_in" value="[% loc('Post') %]"> + </div> + + <div class="checkbox-group"> + <input type="checkbox" id="remember_me" name="remember_me" value='1'[% ' checked' IF remember_me %]> + <label class="inline n" for="remember_me">[% loc('Keep me signed in on this computer') %]</label> + </div> + + <div class="general-sidebar-notes" id="forgotten-pw"> + <p class="dark">[% loc('Forgotten your password?') %]</p> + <p>[% loc('Confirm by email below, providing a new password at that point. When you confirm, your password will be updated.') %]</p> + </div> + + </div> + <div id="form_sign_in_no" class="form-box"> + <h5>[% loc('<strong>No</strong> Let me confirm my update by email') %]</h5> + + [% INCLUDE name %] + + <div class="general-sidebar-notes"> + <p class="dark">[% loc('We never show your email') %]</p> + <p>[% loc('Providing a password is optional, but doing so will allow you to more easily report problems, leave updates and manage your reports.') %]</p> + </div> + + <label for="password_register">[% loc('Password (optional)') %]</label> + + <div class="form-txt-submit-box"> + <input type="password" name="password_register" id="password_register" value="" placeholder="[% loc('Enter a password') %]"> + <input class="green-btn" type="submit" name="submit_register" id="submit_register" value="[% loc('Post') %]"> + </div> + </div> + </div> + + [% END %] + </fieldset> + </form> +</div> +[% END %] + +[% BLOCK name %] + [% INCLUDE 'report/new/extra_name.html' %] + <label for="form_name">[% loc('Name') %]</label> + [% 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') %]"> + + <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=='') %]> + <label class="inline" for="form_may_show_name">[% loc('Show my name publicly') %]</label> + </div> + <div class="checkbox-group"> + <input type="checkbox" name="add_alert" id="form_add_alert" value="1"[% ' checked' IF add_alert %]> + <label class="inline" for="form_add_alert">[% loc( 'Alert me to future updates' ) %]</label> + </div> +[% END %] diff --git a/templates/web/fixmystreet/report/updates-sidebar-notes.html b/templates/web/fixmystreet/report/updates-sidebar-notes.html index 1bd07b765..e59d61fec 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' OR problem.send_method_used != 'Open311' %] + [% IF ( problem.council != '2482' AND !problem.council.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/fixmystreet/reports/_extras.html b/templates/web/fixmystreet/reports/_extras.html new file mode 100755 index 000000000..e210b9c07 --- /dev/null +++ b/templates/web/fixmystreet/reports/_extras.html @@ -0,0 +1,24 @@ +[% + fms_councils = { + 'Bromley Council' = 'fix.bromley.gov.uk' + 'Barnet Borough Council' = 'barnet.fixmystreet.com' + 'Lichfield District Council' = 'lichfielddc.fixmystreet.com' + 'Reading Borough Council' = 'reading.fixmystreet.com' + 'Southampton City Council' = 'southampton.fixmystreet.com' + } + secure = { + 'fix.bromley.gov.uk' = 's' + } + site = fms_councils.${area.name} +%] +[% IF site %] +<tr align="center" +[%- IF ! (loop.count % 2) %] class="a" +[%- END %]> +<td class="title" colspan="6" style="padding-top:0"> + <small title="This council's online reporting is powered by FixMyStreet">(includes reports from + <a href="http[% secure.$site %]://[% site %]">[% site %]</a> using + <a href="http://www.mysociety.org/for-councils/fixmystreet/">FixMyStreet for Councils</a>)</small> +</td> +</tr> +[% END %] diff --git a/templates/web/oxfordshire/around/intro.html b/templates/web/oxfordshire/around/intro.html new file mode 100644 index 000000000..81b2569f6 --- /dev/null +++ b/templates/web/oxfordshire/around/intro.html @@ -0,0 +1 @@ + <h1 class="main">Reporting a problem in Oxfordshire</h1> diff --git a/templates/web/oxfordshire/faq/faq-en-gb.html b/templates/web/oxfordshire/faq/faq-en-gb.html new file mode 100755 index 000000000..02dd23cd9 --- /dev/null +++ b/templates/web/oxfordshire/faq/faq-en-gb.html @@ -0,0 +1,206 @@ +[% INCLUDE 'header.html', title => loc('Frequently Asked Questions'), bodyclass => 'twothirdswidthpage' %] + +<div class="sticky-sidebar"> + <aside> + <ul class="plain-list"> + <li><a href="#faq">Frequently Asked Questions</a></li> + <li><a href="#practical">Practical Questions</a></li> + <li><a href="#organisation">Organisation Questions</a></li> + <li><a href="/privacy">Privacy and cookies</a></li> + <li><a href="/contact">Contact FixMyStreet</a></li> + </ul> + </aside> +</div> + +<h1><a name="faq"></a>Frequently Asked Questions</h1> + <dl> + <dt>What is FixMyStreet?</dt> + <dd>FixMyStreet is a site to help people report, view, +or discuss local problems they’ve found to their local council by +simply locating them on a map. It launched in early February +2007.</dd> + + <dt>What sort of problems should I report with FixMyStreet?</dt> + <dd>FixMyStreet is primarily for reporting things which are +<strong>broken or dirty or damaged or dumped, and need fixing, cleaning +or clearing</strong>, such as: + + <ul><li>Abandoned vehicles + <li>Dog Fouling + <li>Flyposting or graffiti + <li>Flytipping or litter + <li>Streetcleaning, such as broken glass in a cycle lane + <li>Unlit lamposts + <li>Potholes + </ul> + </dd> + + <dt>What isn’t FixMyStreet for?</dt> + <dd>FixMyStreet is not a way of getting in touch with the council for all + issues – please use FixMyStreet only for problems such as the above. We + often route problem reports via cleansing services or highways and so using + FixMyStreet for other matters may result in a delay in your report getting + to the right department. <strong>You will need to contact the council + directly for problems such as</strong>: + + <ul><li>Anti-social behaviour + <li>Any urgent or emergency problems + <li>Noise pollution or barking dogs + <li>Fires and smoke/smell pollution + <li>Missing wheelie bins or recycling boxes or missed rubbish collections + <li>Proposals for speed bumps/ CCTV/ pedestrian crossings/ new road layouts/ etc. + <li>Complaining about your neighbours + <li>Complaining about the council + <li>Joy riding, drug taking, animal cruelty, or other criminal activity + </ul> + <p>Councils often have direct hotlines for these sorts of issues.</p> + </dd> + + <dt><a name="pothole"></a>Should I report a pothole on this site, or call?</dt> +<dd> +<p>Please use the following chart to determine the size of any pot holes being +reported and whether to submit a report online or by telephone.</p> + +<ul> +<li>Depth of a milk bottle, <em>or</em> size of a dustbin lid? <strong>Call</strong>. +<li>Depth of a golf/ping pong ball? <strong>Report online</strong> +<li>Depth of a tennis ball, size of a dinner plate, <em>and</em> on a busy carriageway? <strong>Call</strong> +<li>Depth of a tennis ball, otherwise? <strong>Report online</strong> +<li>Depth of a coke can, on a pathway or busy carriageway? <strong>Call</strong> +<li>Depth of a coke can, size of a dinner plate, on a quiet carriageway? <strong>Call</strong> +<li>Depth of a coke can, otherwise? <strong>Report online</strong> +</ul> + +</dd> + + <dt>How do I use the site?</dt> + <dd>After entering a postcode or location, you are presented +with a map of that area. You can view problems already reported in that area, +or report ones of your own simply by clicking on the map at the location of +the problem.</dd> + + <dt>How are the problems solved?</dt> + <dd>They are reported to the council by email. The +council can then resolve the problem the way they normally would. +Alternatively, you can discuss the problem on the website with others, and +then together lobby the council to fix it, or fix it directly yourselves.</dd> + + <dt>Is it free?</dt> + <dd>The site is free to use, yes. FixMyStreet is run +by a registered charity, though, so if you want to make a contribution, <a +href="https://secure.mysociety.org/donate/">please do</a>.</dd> + + <dt>Can I use FixMyStreet on my mobile?</dt> + <dd> + <p>The FixMyStreet website should work on your mobile phone, adapting to + the size of your screen automatically. We plan to release updated native + apps in the near future. + <ul> + <li><em>iPhone:</em> Our basic app from 2008 is available for download + on the App Store: + <a href="http://itunes.apple.com/gb/app/fixmystreet/id297456545">FixMyStreet</a>, + <li><em>Android:</em> A volunteer, Anna Powell-Smith, has written an app + available from the + <a href="https://market.android.com/details?id=com.android.fixmystreet">Android Market</a>. + <li><em>Nokia:</em> A volunteer, Thomas Forth, has written an app available from the + <a href="http://store.ovi.com/content/107557">Ovi Store</a>. + </ul> + </dd> + + </dl> + + <h2><a name="practical"></a>Practical Questions</h2> + <dl> + <dt>Do you remove silly or illegal content?</dt> + <dd>FixMyStreet is not responsible for the content and accuracy +of material submitted by its users. We reserve the right to edit or remove any +problems or updates which we consider to be inappropriate upon being informed +by a user of the site.</dd> + + <dt>Why does the site use kilometres for measurements?</dt> + <dd>Thanks for asking politely – we never quite understand why some of the rudest + emails we receive are on this topic. The British national + grid reference system, devised by Ordnance Survey (the British national + mapping agency) around the time of the second world war, uses eastings and + northings measured in metres and kilometres; the maps we use are from + Ordnance Survey and so this is what we use to display distances. + There you have it: not everything British is in miles!</dd> + + <dt>Why can’t I zoom out more on the reporting map?</dt> + <dd>We want to keep FixMyStreet locally focused, so restrict the ability to + move radically between areas. The map on Your Reports will let you see all + the reports you’ve made, wherever they are. If you’re from the + council then the emailed version of the problem report also contains the + closest road and postcode to the pin on the map.</dd> + + <dt>This site is great – why aren’t you better publicised?</dt> + <dd>As a tiny charity we simply don’t have a publicity budget, and we + rely on word of mouth to advertise the site. We have a whole <a + href="posters/">array of posters, flyers and badges</a> if you’d like + to publicise us on the web or in your local area, and why not write to your + local paper to let them know about us?</dd> </dl> + + <h2><a name="organisation"></a>Organisation Questions</h2> + <dl> + <dt>Who built FixMyStreet?</dt> + <dd>This site was built by <a href="http://www.mysociety.org/">mySociety</a>, + in conjunction with the <a href="http://www.youngfoundation.org.uk/">Young Foundation</a>. +mySociety is the project of a registered charity which has grown out of the community of +volunteers who built sites like <a href="http://www.theyworkforyou.com/">TheyWorkForYou.com</a>. +mySociety’s primary mission is to build Internet projects which give people simple, tangible +benefits in the civic and community aspects of their lives. Our first project +was <a href="http://www.writetothem.com/">WriteToThem</a>, where you can write to any of your +elected representatives, for free. The charity is called UK Citizens Online Democracy and is charity number 1076346. mySociety +can be contacted by email at <a href="mailto:hello@mysociety.org">hello@mysociety.org</a>, +or by post at mySociety, 483 Green Lanes, London, N13 4BS, UK.</dd> + <dt><img src="/i/moj.png" align="right" alt="Ministry of Justice" hspace="10">Who pays for it?</dt> + <dd>FixMyStreet was originally paid for via the Department for + Constitutional Affairs Innovations Fund. It is now funded by a variety of means, from commercial + work to <a href="http://www.mysociety.org/donate/">donations</a>.</dd> + <dt><a name="nfi"></a>Wasn’t this site called Neighbourhood Fix-It?</dt> + <dd>Yes, we changed the name mid June 2007. We decided +Neighbourhood Fix-It was a bit of a mouthful, hard to spell, and hard to publicise (does the URL have a dash in it or not?). The domain FixMyStreet became available, and everyone liked the name.</dd> + <dt>Do you need any help with the project?</dt> + <dd>Yes, we can use help in all sorts of ways, technical or +non-technical. Please see our <a +href="http://www.mysociety.org/helpus/">Get Involved page</a>.</dd> + <dt>I’d like a site like this for my own location/ where’s the "source code" to this site?</dt> + <dd> +The software behind this site is open source, and available +to you mainly under the GNU Affero GPL software license. You can <a +href="http://github.com/mysociety/fixmystreet">download the +source code</a> and help us develop it. +You’re welcome to use it in your own projects, although you must also +make available the source code to any such projects. +<a href="http://www.fiksgatami.no/">Fiksgatami</a> is an example of our code +being used in a Norwegian version of this site. +</dd> +<dt>I’d prefer code in a different language?</dt> +<dd> +VisibleGovernment.ca wrote their own code for +<a href="http://www.fixmystreet.ca/">http://www.fixmystreet.ca/</a>, which is +written in GeoDjango and available under an MIT licence at <a +href="http://github.com/visiblegovernment/django-fixmystreet/tree/master">github</a>. +Or <a href="http://www.fixmystreet.org.nz/">FixMyStreet.org.nz</a> is written in +Drupal. +</p> +</dd> + <dt>People build things, not organisations. Who <em>actually</em> built it?</dt> + <dd>Matthew Somerville and Francis Irving wrote the site, +Chris Lightfoot wrote the tileserver and map cutter, Richard Pope created +our pins, Deborah Kerr keeps things up-to-date and does user support, +Ayesha Garrett designed our posters, and Tom Steinberg managed it all. + +Thanks also to +<a href="http://www.ordnancesurvey.co.uk">Ordnance Survey</a> (for the maps, +UK postcodes, and UK addresses – data © Crown copyright, all +rights reserved, Ministry of Justice 100037819 2008), +Yahoo! for their BSD-licensed JavaScript libraries, the entire free software +community (this particular project was brought to you by Perl, PostgreSQL, +and the number 161.290) and <a +href="http://www.bytemark.co.uk/">Bytemark</a> (who kindly host all +our servers). + +Let us know if we’ve missed anyone.</dd> + </dl> +[% INCLUDE 'footer.html' pagefooter = 'yes' %] diff --git a/templates/web/oxfordshire/footer.html b/templates/web/oxfordshire/footer.html new file mode 100644 index 000000000..cfca706c8 --- /dev/null +++ b/templates/web/oxfordshire/footer.html @@ -0,0 +1,51 @@ + [% IF pagefooter %] + <footer role="content-info"> + <p><a href="/privacy">Privacy and cookies</a></p> + </footer> + [% END %] + </div><!-- .content role=main --> + </div><!-- .container --> + </div><!-- .table-cell --> + + <div class="nav-wrapper"> + <div class="nav-wrapper-2"> + <div id="main-nav" role="navigation"> + <ul id="mysoc-menu"> + <li><a id="mysoc-logo" href="http://www.fixmystreet.com/">Powered by <img src="/cobrands/oxfordshire/images/fms-logo-105x20.png" alt="FixMyStreet"></a></li> + </ul> + + <ul id="main-menu"> + <li><[% IF c.req.uri.path == '/' %]span[% ELSE %]a href="/"[% END %] class="report-a-problem-btn" + >[% loc("Report a problem") %]</[% c.req.uri.path == '/' ? 'span' : 'a' %]></li>[% + %]<li><[% IF c.req.uri.path == '/my' %]span[% ELSE %]a href="/my"[% END + %]>[% loc("Your reports") %]</[% c.req.uri.path == '/my' ? '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 == '/alert' %]span[% ELSE %]a href="/alert[% pc ? '/list?pc=' : '' %][% pc | uri %]"[% END + %]>[% loc("Local alerts") %]</[% c.req.uri.path == '/alert' ? '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> + </div> + </div> + +<!-- [% INCLUDE 'debug_footer.html' %] --> + </div> <!-- .wrapper --> + <div id="oxford-footer" class="desk-only"> + <address> + <strong>Oxfordshire County Council</strong><br> + <a href="http://www.oxfordshire.gov.uk/cms/public-site/contact-oxfordshire-county-council" title="Contac the council">Contact the council</a> + </address> + <ul><!-- use | between items --> + <li> + <a href="/contact" title="Contact the FixMyStreet team">Contact</a> | + </li> + <li class="powered-by-fms"> + <a href="http://www.fixmystreet.com/">Powered by <img src="/cobrands/oxfordshire/images/fms-logo-inverse.png" alt="FixMyStreet"></a> + </li> + </ul> + </div> +</div> <!-- oxford-wrapper --> +</body> +</html> diff --git a/templates/web/oxfordshire/header.html b/templates/web/oxfordshire/header.html new file mode 100644 index 000000000..6c338452a --- /dev/null +++ b/templates/web/oxfordshire/header.html @@ -0,0 +1,94 @@ +<!doctype html> +<!--[if lt IE 7]><html class="no-js ie6 oldie" lang="[% lang_code %]"><![endif]--> +<!--[if IE 7]> <html class="no-js ie7 oldie" lang="[% lang_code %]"><![endif]--> +<!--[if IE 8]> <html class="no-js ie8 oldie" lang="[% lang_code %]"><![endif]--> +<!--[if IE 9]> <html class="no-js ie9 oldie" lang="[% lang_code %]"><![endif]--> +<!--[if gt IE 9]><!--><html class="no-js" lang="[% lang_code %]"><!--<![endif]--> + <head> + <meta name="viewport" content="initial-scale=1.0"> + + <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> + <meta name="HandHeldFriendly" content="true"> + <meta name="mobileoptimized" content="0"> + +[% 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="[% start %][% version('/cobrands/' _ c.cobrand.moniker _ '/layout.css') %]"> + <![endif]--> + + <script src="[% start %][% version('/js/modernizr.custom.js') %]" charset="utf-8"></script> + <script src="[% start %][% version('/cobrands/oxfordshire/position_map.js') %]" charset="utf-8"></script> + [% INCLUDE 'common_header_tags.html', js_override = '/cobrands/fixmystreet/fixmystreet.js', site_title = 'FixMyStreet' %] + [% extra_js %] + + [% IF c.req.uri.host == 'osm.fixmystreet.com' %] + <link rel="canonical" href="http://www.fixmystreet.com[% c.req.uri.path_query %]"> + [% END %] + + [% INCLUDE 'tracking_code.html' %] + + </head> + <body class="[% bodyclass | html IF bodyclass %]"> +<div id="oxford-wrapper"> + <div id="oxford-header" class="desk-only"> + <a href="http://www.oxfordshire.gov.uk/" title="Home" class="logo">Oxfordshire County Council<span></span></a> + <span id="oxford-links"> + <a href="http://www.oxfordshire.gov.uk/" title="">Oxfordshire County Council home</a>|<a href="/" title="">FixMyStreet</a> + </span> + <div style="clear:both"></div> + <span class="header"><a href="/">FixMyStreet</a></span> + <div class="oxford-user"> + <p> + [% IF c.user_exists %] + [% tprintf(loc('Hi %s'), c.user.name || c.user.email) %] + <a href="/auth/sign_out">[% loc('sign out') %]</a> + [% END %] + </p> + </div> + </div> <!-- end of oxford header --> + <div id="oxford-main-menu" class="desk-only"> + <ul class="tabs"> + <li class="home first"><[% IF c.req.uri.path == '/' %]span[% ELSE %]a href="/"[% END %] class="report-a-problem-btn" + >[% "Report" %]</[% c.req.uri.path == '/' ? 'span' : 'a' %]></li>[% + %]<li><[% IF c.req.uri.path == '/my' OR ( c.req.uri.path == '/auth' AND c.req.params.r == 'my' ) %]span[% ELSE %]a href="/my"[% END + %]>[% loc("Your reports") %]</[% ( c.req.uri.path == '/my' OR ( c.req.uri.path == '/auth' AND c.req.params.r == 'my' ) ) ? 'span' : 'a' %]></li>[% + %]<li><[% IF c.req.uri.path == '/reports/Oxfordshire' %]span[% ELSE %]a href="/reports/Oxfordshire"[% END + %]>[% loc("All reports") %]</[% c.req.uri.path == '/reports' ? 'span' : 'a' %]></li>[% + %]<li><[% IF c.req.uri.path == '/alert' %]span[% ELSE %]a href="/alert[% pc ? '/list?pc=' : '' %][% pc | uri %]"[% END + %]>[% loc("Local alerts") %]</[% c.req.uri.path == '/alert' ? 'span' : 'a' %]></li>[% + %]<li class="last"><[% IF c.req.uri.path == '/faq' %]span[% ELSE %]a href="/faq"[% END + %]>[% loc("Help") %]</[% c.req.uri.path == '/faq' ? 'span' : 'a' %]></li> + </ul> + </div> + + <div class="wrapper"> + + <div class="table-cell"> + <header id="site-header" role="banner"> + <div class="container"> + <a href="/" id="site-logo">Oxfordshire FixMyStreet</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> + + [% pre_container_extra %] + + <div class="container"> + <div class="content[% " $mainclass" | html IF mainclass %]" role="main"> + + <!-- [% INCLUDE 'debug_header.html' %] --> diff --git a/templates/web/oxfordshire/report/new/councils_text_all.html b/templates/web/oxfordshire/report/new/councils_text_all.html new file mode 100644 index 000000000..e71a400ac --- /dev/null +++ b/templates/web/oxfordshire/report/new/councils_text_all.html @@ -0,0 +1,18 @@ +<p>You can use this form to report a problem or to make an enquiry about roads +and pavements in your area. All the information you provide here will be sent +to <strong>[% all_council_names.join( '</strong> or <strong>' ) %]</strong>. +The subject and details of the problem will be public, plus your name if you +give us permission. If you report a fault on a road that is not owned by +Oxfordshire County Council we will pass the report on to the relevant body. + +<p>Our opening hours are 8.30 to 5, Monday to Thursday and 8.30 to 4 on +Fridays. Please <strong>do not</strong> use this form for reporting +<strong>emergencies and urgent</strong> problems. You should report these by +contacting 0845 310 11 11. If your enquiry is related to Highways and is +outside of our opening hours and cannot wait, please contact Thames Valley +Police on 101.</p> + +<p>Please use <a href="/faq#pothole" target="_blank">our chart</a> to determine +the size of any pot holes being reported and whether to submit a report using +this online form or by telephone.</p> + diff --git a/templates/web/oxfordshire/report/new/fill_in_details_text.html b/templates/web/oxfordshire/report/new/fill_in_details_text.html new file mode 100644 index 000000000..065005956 --- /dev/null +++ b/templates/web/oxfordshire/report/new/fill_in_details_text.html @@ -0,0 +1,6 @@ +Oxfordshire County Council won’t be able to help unless you leave as much +detail as you can. Please describe the exact location of the problem (e.g. in +the carriageway), what it is, how long it has been there, a description and a +photo of the problem if you have one. Please be aware that you can only attach +one picture so ensure that you provide a picture that clearly shows the +location not just the fault. diff --git a/templates/web/oxfordshire/report/new/notes.html b/templates/web/oxfordshire/report/new/notes.html new file mode 100644 index 000000000..e03fd8644 --- /dev/null +++ b/templates/web/oxfordshire/report/new/notes.html @@ -0,0 +1,10 @@ +<p>[% loc("Please note:") %]</p> + +<ul class="plain-list"> + <li>[% loc("We will only use your personal information in accordance with our <a href=\"/privacy\">privacy policy.</a>") %]</li> + <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> + <li>Remember that FixMyStreet is primarily for reporting physical problems that can be fixed. Remember that you can contact Oxfordshire County Council for additional issues that are not covered on this reporting facility.</li> +</ul> + diff --git a/templates/web/seesomething/admin/footer.html b/templates/web/seesomething/admin/footer.html new file mode 100644 index 000000000..bdd42e2e4 --- /dev/null +++ b/templates/web/seesomething/admin/footer.html @@ -0,0 +1,7 @@ + </div><!-- .content role=main --> + </div><!-- .container --> + </div><!-- .table-cell --> +<!-- [% INCLUDE 'debug_footer.html' %] --> + </div> <!-- .wrapper --> +</body> +</html> diff --git a/templates/web/seesomething/admin/header.html b/templates/web/seesomething/admin/header.html new file mode 100644 index 000000000..40bea25bf --- /dev/null +++ b/templates/web/seesomething/admin/header.html @@ -0,0 +1,2 @@ +[% INCLUDE 'header.html' admin = 1, bodyclass = 'admin fullwidthpage' %] + <h1>[% title %]</h1> diff --git a/templates/web/seesomething/admin/stats.html b/templates/web/seesomething/admin/stats.html new file mode 100644 index 000000000..713c3fb6d --- /dev/null +++ b/templates/web/seesomething/admin/stats.html @@ -0,0 +1,63 @@ +[% INCLUDE 'admin/header.html' title=loc('Reports') %] +[% PROCESS 'admin/report_blocks.html' %] + +[% BLOCK options %] + [% FOR option IN option_list %] + <option value="[% option %]"[% ' selected' IF selected == option %]>[% option %]</opytion> + [% END %] +[% END %] + +<form method="post" action="[% c.uri_for('stats') %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8" id="filter-form"> + <label for="form_category">Transport Type: </label> + <select name="category" id="form_category"> + <option value="">Select</option> + [% PROCESS options, option_list = [ 'Bus', 'Metro', 'Train' ], selected = category %] + </select> + + <label for="form_subcategory">Incident Type: </label> + <select name="subcategory" id="form_subcategory"> + <option value="">Select</option> + [% PROCESS options, option_list = ['Smoking', 'Drugs', 'Anti-social Behaviour', 'Loud Music', 'Damage', 'Feet on Seats', 'Other'], selected = subcategory %] + </select> + + <label for="form_service">Device: </label> + <select name="service" id="form_service"> + <option value="">Select</option> + [% PROCESS options, option_list = [ 'Android', 'iPhone' ], selected = service %] + </select> + + <input type="submit" name="getcounts" size="30" id="getcounts" value="Look Up" /> +</form> + +[% IF pager.total_entries == 0 %] +<p align="center"> +No Results found +</p> +[% ELSE %] +<table class="admin-report"> + <thead> + <tr> + <th>Device</th> + <th>Transport Category</th> + <th>Incident Category</th> + <th>Area</th> + <th>Submitted</th> + </tr> + </thead> + <tbody> + [%- WHILE (report = reports.next) %] + <tr> + <td>[% report.service || 'Other' %]</td> + <td>[% report.category %]</td> + <td class="nowrap">[% report.subcategory %]</td> + <td class="nowrap">[% council_details.${report.council}.name %]</td> + <td class="nowrap">[% PROCESS format_time time=report.confirmed %]</td> + </tr> + [%- END %] + </tbody> +</table> +[% END %] + +[% INCLUDE 'pagination.html', param = 'p' %] + +[% INCLUDE 'admin/footer.html' %] diff --git a/templates/web/seesomething/around/around_index.html b/templates/web/seesomething/around/around_index.html new file mode 100644 index 000000000..a143e90a2 --- /dev/null +++ b/templates/web/seesomething/around/around_index.html @@ -0,0 +1,24 @@ +[% INCLUDE 'header.html', title => loc('Reporting a problem'), bodyclass = 'mappage' %] + +<form action="[% c.uri_for('/around') %]" method="get" name="mapForm" id="mapForm"> + <div id="side-form"> + <div id="report-a-problem-main"> + [% INCLUDE 'around/postcode_form.html' %] + + [% IF location_error %] + <p class="error">[% location_error %]</p> + [% END %] + + [% IF possible_location_matches %] + <p>[% loc('We found more than one match for that location. We show up to ten matches, please try a different search if yours is not here.') %]</p> + <ul class="pc_alternatives"> + [% FOREACH match IN possible_location_matches %] + <li><a href="/around?latitude=[% match.latitude | uri %];longitude=[% match.longitude | uri %]">[% match.address | html %]</a></li> + [% END %] + </ul> + [% END %] + </div> + </div> +</form> + +[% INCLUDE 'footer.html' %] diff --git a/templates/web/seesomething/around/display_location.html b/templates/web/seesomething/around/display_location.html new file mode 100644 index 000000000..e90d1aa0e --- /dev/null +++ b/templates/web/seesomething/around/display_location.html @@ -0,0 +1,49 @@ +[% + + url_skip = c.uri_for( + '/report/new', + { + pc => pc + latitude => short_latitude, + longitude => short_longitude, + skipped => 1, + } + ); + + PROCESS "maps/${map.type}.html"; + + INCLUDE 'header.html', + title => loc('Viewing a location') + bodyclass => 'mappage', + robots => 'noindex,nofollow'; + +%] + +<form action="[% c.uri_for('/report/new') %]" method="post" name="mapForm" id="mapForm" enctype="multipart/form-data" class="validate"> + [% IF c.req.params.map_override %] + <input type="hidden" name="map_override" value="[% c.req.params.map_override | html %]"> + [% END %] + <input type="hidden" name="pc" value="[% pc | html %]"> + + <input type="hidden" name="latitude" id="fixmystreet.latitude" value="[% short_latitude | html %]"> + <input type="hidden" name="longitude" id="fixmystreet.longitude" value="[% short_longitude | html %]"> + + [% map_html %] + + </div> + + <div id="side"> + [% INCLUDE 'around/_report_banner.html' %] + </div> + + <div style="display:none" id="side-form"> + [% INCLUDE "report/new/fill_in_details_form.html" + js = 1, + report.used_map = 1 + report.name = c.user.name + %] + </div> + +</form> + +[% INCLUDE 'footer.html' %] diff --git a/templates/web/seesomething/around/postcode_form.html b/templates/web/seesomething/around/postcode_form.html new file mode 100644 index 000000000..56fcdca97 --- /dev/null +++ b/templates/web/seesomething/around/postcode_form.html @@ -0,0 +1,17 @@ +<div id="front-main"> + <div id="front-main-container"> + [% + question = c.cobrand.enter_postcode_text || loc('Enter a nearby street name and area'); + %] + + <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"> + </div> + + [% IF partial_token %] + <input type="hidden" name="partial" value="[% partial_token.token %]"> + [% END %] + </div> +</div> diff --git a/templates/web/seesomething/auth/general.html b/templates/web/seesomething/auth/general.html new file mode 100644 index 000000000..4fe2829d3 --- /dev/null +++ b/templates/web/seesomething/auth/general.html @@ -0,0 +1,46 @@ +[% INCLUDE 'header.html', title = loc('Sign in or create an account') %] + +<h1>[% loc('Sign in') %]</h1> + +<form action="[% c.uri_for() %]" method="post" name="general_auth" class="validate"> + <fieldset> + <input type="hidden" name="r" value="[% c.req.params.r | html %]"> + + [% IF email_error; + + # other keys include fqdn, mxcheck if you'd like to write a custom error message + + errors = { + missing => loc('Please enter your email'), + other => loc('Please check your email address is correct') + }; + + loc_email_error = errors.$email_error || errors.other; + END %] + <label class="n" for="email">[% loc('Email') %]</label> + [% IF loc_email_error %] + <div class="form-error">[% loc_email_error %]</div> + [% ELSIF sign_in_error %] + <div class="form-error">[% loc('There was a problem with your email/password combination. If you cannot remember your password, or do not have one, please fill in the ‘sign in by email’ section of the form.') %]</div> + [% END %] + <input type="email" class="required email" id="email" name="email" value="[% email | html %]" placeholder="[% loc('Your email address') %]"> + + <div class="form-txt-submit-box"> + <label class="n" for="password_sign_in">Password</label> + <input type="password" name="password_sign_in" id="password_sign_in" value="" placeholder="[% loc('Your password') %]"> + </div> + + <div class="form-txt-submit-box"> + <input type="checkbox" id="remember_me" name="remember_me" value='1'[% ' checked' IF remember_me %]> + <label class="inline n" for="remember_me">[% loc('Keep me signed in on this computer') %]</label> + </div> + + <div class="form-txt-submit-box"> + <input class="green-btn" type="submit" name="sign_in" value="[% loc('Sign in') %]"> + </div> + + </fieldset> +</form> + + +[% INCLUDE 'footer.html' %] diff --git a/templates/web/seesomething/auth/sign_out.html b/templates/web/seesomething/auth/sign_out.html new file mode 100644 index 000000000..ef1d11b58 --- /dev/null +++ b/templates/web/seesomething/auth/sign_out.html @@ -0,0 +1,7 @@ +[% INCLUDE 'header.html', title = loc('Sign out'), bodyclass = 'fullwidthpage' %] + +<h1>[% loc('You have been signed out') %]</h1> + +<p>Please feel free to <a href="[% c.uri_for('/auth', { r => 'admin/stats' } ) %]">sign in again</a></p> + +[% INCLUDE 'footer.html' %] diff --git a/templates/web/seesomething/footer.html b/templates/web/seesomething/footer.html new file mode 100644 index 000000000..95297f33d --- /dev/null +++ b/templates/web/seesomething/footer.html @@ -0,0 +1,22 @@ + </div><!-- .content role=main --> + </div><!-- .container --> + </div><!-- .table-cell --> + + <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 %] class="report-a-problem-btn" + >[% loc("Report a problem") %]</[% c.req.uri.path == '/' ? '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> + </div> + </div> + +<!-- [% INCLUDE 'debug_footer.html' %] --> + </div> <!-- .wrapper --> +</body> +</html> diff --git a/templates/web/seesomething/front/stats.html b/templates/web/seesomething/front/stats.html new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/templates/web/seesomething/front/stats.html diff --git a/templates/web/seesomething/front/tips.html b/templates/web/seesomething/front/tips.html new file mode 100644 index 000000000..34712656d --- /dev/null +++ b/templates/web/seesomething/front/tips.html @@ -0,0 +1,3 @@ + <p> + If you are unsure about where the incident took place as you where on a moving train or bus then use the location of the start of your journey and mention which bus or train you where on in your report. + </p> diff --git a/templates/web/seesomething/index.html b/templates/web/seesomething/index.html new file mode 100644 index 000000000..cccd15709 --- /dev/null +++ b/templates/web/seesomething/index.html @@ -0,0 +1,43 @@ +[%# Assumes fixmystreet cobrand is using FMS map template - for bonus points preload all the right map elements. %] + +[% PROCESS "maps/fms.html" %] +[% INCLUDE 'header.html', title = '', bodyclass = 'mappage' %] + +<form action="[% c.uri_for('/around') %]" method="get" name="mapForm" id="mapForm"> +<script type="text/javascript"> +var fixmystreet = { + 'page': '', + 'latitude': 52.505241, + 'longitude': -1.815285, + 'zoom': 3, + 'numZoomLevels': 5, + 'zoomOffset': 13, + 'map_type': "" + +} +</script> +<div id="map_box"> + <div id="map"></div> + </div> + + <div id="side-form"> + <div id="report-a-problem-main"> + [% form = PROCESS 'around/postcode_form.html' %] + [% form %] + + [% IF error %] + <p class="form-error">[% error %]</p> + [% END %] + + <div class="tablewrapper"> + <div id="front-howto"> + [% INCLUDE 'index-steps.html' %] + </div> + + </div> + + </div> + </div> +</form> + +[% INCLUDE 'footer.html' pagefooter = 'yes' %] diff --git a/templates/web/seesomething/js/validation_rules.html b/templates/web/seesomething/js/validation_rules.html new file mode 100644 index 000000000..cef5fce7e --- /dev/null +++ b/templates/web/seesomething/js/validation_rules.html @@ -0,0 +1,13 @@ + validation_rules = { + detail: { required: true }, + category: { required: true }, + subcategory: { required: true } + }; + + $(function(){ + $('#submit_noname').click( function(e) { + $('#form_category').addClass('required validCategory').removeClass('valid'); + $('#form_subcategory').addClass('required validCategory').removeClass('valid'); + }); + }); + diff --git a/templates/web/seesomething/js/validation_strings.html b/templates/web/seesomething/js/validation_strings.html new file mode 100644 index 000000000..64251c163 --- /dev/null +++ b/templates/web/seesomething/js/validation_strings.html @@ -0,0 +1,15 @@ + validation_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("'", "\\'") %]' + }, + category: '[% loc('Please choose a transport category') | replace("'", "\\'") %]', + subcategory: '[% loc('Please choose an incident category') | replace("'", "\\'") %]', + rznvy: { + required: '[% loc('Please enter your email') | replace("'", "\\'") %]', + email: '[% loc('Please enter a valid email') | replace("'", "\\'") %]' + }, + email: { + email: '[% loc('Please enter a valid email') | replace("'", "\\'") %]' + }, + }; diff --git a/templates/web/seesomething/report/display.html b/templates/web/seesomething/report/display.html new file mode 100644 index 000000000..93b0048a2 --- /dev/null +++ b/templates/web/seesomething/report/display.html @@ -0,0 +1,9 @@ +[% + INCLUDE 'header.html' + robots = 'index, nofollow', + bobyclass = 'mappage'; +%] + +Reports to this site are private + +[% INCLUDE 'footer.html' %] diff --git a/templates/web/seesomething/report/new/category.html b/templates/web/seesomething/report/new/category.html new file mode 100644 index 000000000..26d750b52 --- /dev/null +++ b/templates/web/seesomething/report/new/category.html @@ -0,0 +1,14 @@ +[% FILTER collapse %] +[% IF category_options.size %] + [% IF category; + category = category | lower; + END; %] + <label for='form_category' class="select">[% category_label | html %]</label> + <select name='category' data-theme="c" 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> + [% END %] + </select> +[% END %] +[% END -%] diff --git a/templates/web/seesomething/report/new/fill_in_details_form.html b/templates/web/seesomething/report/new/fill_in_details_form.html new file mode 100644 index 000000000..659fadd04 --- /dev/null +++ b/templates/web/seesomething/report/new/fill_in_details_form.html @@ -0,0 +1,104 @@ +<div id="report-a-problem-main"> + <p>Click and drag on the map to reposition the pin.</p> + <h1>[% loc('Reporting a problem') %]</h1> + + + [% INCLUDE 'errors.html' %] + <fieldset> + <div id="problem_form"> + + [% INCLUDE 'report/new/form_heading.html' %] + + [% IF field_errors.council %] + <p class='form-error'>[% field_errors.council %]</p> + [% END %] + + <label for="form_detail">[% loc('Details') %]</label> + [% IF field_errors.detail %] + <p class='form-error'>[% field_errors.detail %]</p> + [% END %] + <textarea rows="7" cols="26" name="detail" id="form_detail" placeholder="[% loc('Please fill in details of the problem.') %]" required>[% report.detail | html %]</textarea> + + [% IF js %] + <div id="form_category_row"> + <label for="form_category">[% loc('Transport Category') %]</label> + <select name="category" id="form_category" required><option>[% loc('Loading...') %]</option></select> + </div> + [% ELSE %] + [% IF category_options.size %] + [% IF field_errors.category %] + <p class='form-error'>[% field_errors.category %]</p> + [% END %] + + [% PROCESS "report/new/category.html" %] + [% END %] + [% END %] + + <div id="form_subcategory_row"> + <label for="form_subcategory">[% loc('Incident Category') %]</label> + <select name="subcategory" id="form_subcategory" required> + <option value="">-- Pick a category --</option> + <option value="Smoking/other drugs">Smoking/other drugs</option> + <option value="Drugs">Drugs</option> + <option value="Anti-social behaviour">Anti-social behaviour</option> + <option value="Loud music">Loud music</option> + <option value="Damage">Damage</option> + <option value="Feet on seats">Feet on seats</option> + <option value="Other">Other</option> + </select> + </div> + + [% IF c.cobrand.allow_photo_upload %] + <label for="form_photo">[% loc('Photo') %]</label> + [% IF upload_fileid || report.photo %] + [% IF upload_fileid %] + <img align="right" src="/photo/[% upload_fileid %].temp.jpeg" alt=""> + <input type="hidden" name="upload_fileid" value="[% upload_fileid %]"> + [% END %] + + <p>[% loc('You have already attached a photo to this report, attaching another one will replace it.') %]</p> + + [% IF report.photo %] + <img align="right" src="/photo/[% report.id %].jpeg"> + [% END %] + [% END %] + + [% IF field_errors.photo %] + <p class='form-error'>[% field_errors.photo %]</p> + [% END %] + <input type="file" name="photo" id="form_photo"> + [% END %] + + <h2>Personal Details:</h2> + + <label for="form_name">[% loc('Name (optional)') %]</label> + [% IF field_errors.name %] + <p class='form-error'>[% field_errors.name %]</p> + [% END %] + + <input type="text" class="form-focus-trigger validName" value="[% report.name | html %]" name="name" id="form_name" placeholder="[% loc('Your name') %]"> + + <label for="form_email">[% loc('Your email (optional)') %]</label> + [% IF field_errors.email %] + <p class='form-error'>[% field_errors.email %]</p> + [% END %] + <input type="email" value="[% report.user.email | html %]" name="email" id="form_email" placeholder="[% loc('Please enter your email address') %]"> + + + + <label class="" for="form_phone">[% loc('Phone number (optional)') %]</label> + <input class="" type="text" value="[% report.user.phone | html %]" name="phone" id="form_phone" placeholder="[% loc('Your phone number') %]"> + + <div class="form-txt-submit-box "> + <input class="green-btn" type="submit" id="submit_noname" name="submit_noname" value="[% loc('Submit') %]"> + </div> + + </div> + </fieldset> + + [% IF partial_token %] + <input type="hidden" name="partial" value="[% partial_token.token %]"> + [% END %] + + <input type="hidden" name="submit_problem" value="1"> +</div> diff --git a/templates/web/seesomething/report_created.html b/templates/web/seesomething/report_created.html new file mode 100644 index 000000000..4a11d14b4 --- /dev/null +++ b/templates/web/seesomething/report_created.html @@ -0,0 +1,29 @@ +[% + + IF report.used_map; + PROCESS "maps/${map.type}.html"; + END; + + INCLUDE 'header.html', + title => loc('Report created') + bodyclass => 'mappage', + robots => 'noindex,nofollow'; +%] + + + [% IF report.used_map %] + [% map_html %] + + </div> + [% END %] + + <div id="side"> +<div id="report-a-problem-main"> + <h1>Complete</h1> + <p>Your report has been sent. If you included contact details we may be in touch to follow up or request more details.</p> + <p>Thank you for saying something and making our transport safer.</p> + <p><img src="../cobrands/seesomething/images/btp-wmp-logos.png" alt="British Transport Police and the West Midlands Police" width="271" height="116"></p> +</div> + </div> + +[% INCLUDE 'footer.html' %] diff --git a/templates/web/seesomething/set_body_class.html b/templates/web/seesomething/set_body_class.html new file mode 100644 index 000000000..b613706f2 --- /dev/null +++ b/templates/web/seesomething/set_body_class.html @@ -0,0 +1 @@ +[% bodyclass = ( bodyclass ? bodyclass : 'mappage' ) %] diff --git a/templates/web/southampton/front/news.html b/templates/web/southampton/front/news.html new file mode 100644 index 000000000..79d51542c --- /dev/null +++ b/templates/web/southampton/front/news.html @@ -0,0 +1,9 @@ +<div class="news"> +<p>Fix My Street is for reporting non-urgent, local problems like graffiti, fly +tipping, or broken paving slabs; reports will be reviewed within 48 working +hours.</p> + +<p>If you are reporting an urgent or dangerous matter, for example a fallen +tree or a very deep pot hole that may cause damage, please contact us +directly on 023 8083 3008</p> +</div> diff --git a/templates/web/southampton/header.html b/templates/web/southampton/header.html index 43553468c..e02083a99 100644 --- a/templates/web/southampton/header.html +++ b/templates/web/southampton/header.html @@ -51,7 +51,6 @@ </form> </div> - <a class="mctv" href="http://www.southampton.mycounciltv.org"><img src="/cobrands/southampton/mctv.png" alt="Link to MyCouncilTV videos" /></a> <ul id="topNav"> <li><a href="http://www.southampton.gov.uk/online/">Do it online</a></li> <li><a href="http://www.southampton.gov.uk/customer-service/">Customer Services</a></li> diff --git a/templates/web/southampton/report/photo.html b/templates/web/southampton/report/photo.html deleted file mode 100644 index 07b6a8558..000000000 --- a/templates/web/southampton/report/photo.html +++ /dev/null @@ -1,6 +0,0 @@ -[% IF c.cobrand.allow_photo_display && object.photo %] -[% photo = object.get_photo_params %] -<p> - <img alt="" height="[% photo.height %]" width="[% photo.width %]" src="[% photo.url %]"> -</p> -[% END %] diff --git a/templates/web/southampton/tokens/confirm_problem.html b/templates/web/southampton/tokens/confirm_problem.html new file mode 100644 index 000000000..f6bc2bc6c --- /dev/null +++ b/templates/web/southampton/tokens/confirm_problem.html @@ -0,0 +1,14 @@ +[% INCLUDE 'header.html', title = loc('Confirmation') %] + +<h1>[% loc('Confirmation') %]</h1> + +<p class="confirmed"> +Thank you for your report which will be updated as soon as possible. +You can <a href="[% c.cobrand.base_url_for_report( problem ) %][% problem.url %]">view the problem on this site</a>. +</p> + +<p>Your reference for this problem is [% problem.id %], please quote it in any enquiries. + +[% display_crosssell_advert( problem.user.email, problem.name ) %] + +[% INCLUDE 'footer.html' %] diff --git a/templates/web/stevenage/around/intro.html b/templates/web/stevenage/around/intro.html new file mode 100644 index 000000000..488b587da --- /dev/null +++ b/templates/web/stevenage/around/intro.html @@ -0,0 +1,2 @@ + <h1>[% loc('Report, view, or discuss local problems') %]</h1> + <h2>(like Graffiti, Fly Tipping and Abandoned Vehicles)</h2> diff --git a/templates/web/stevenage/footer.html b/templates/web/stevenage/footer.html new file mode 100644 index 000000000..92449916f --- /dev/null +++ b/templates/web/stevenage/footer.html @@ -0,0 +1,56 @@ + [% IF pagefooter %] + <footer role="content-info"> + <div class="tablewrapper bordered"> + <div id="footer-mobileapps"> + <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> + </ul> + </div> + + <div id="footer-help"> + <ul> + <li> + <h4>[% loc('Are you a developer?') %]</h4> + <p>[% loc('Would you like to contribute to FixMyStreet? Our code is open source and <a href="http://github.com/mysociety/fixmystreet">available on GitHub</a>.') %]</p> + </li> + <li> + <h4>[% loc('Are you from a council?') %]</h4> + <p>[% loc('Would you like better integration with FixMyStreet? <a href="http://www.mysociety.org/for-councils/fixmystreet/">Find out about FixMyStreet for councils</a>.') %]</p> + </li> + </ul> + </div> + </div> + <p><a href="/privacy">Privacy and cookies</a></p> + </footer> + [% END %] + </div><!-- .content role=main --> + </div><!-- .container --> + </div><!-- .table-cell --> + + <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 %] class="report-a-problem-btn" + >[% loc("Report a problem") %]</[% c.req.uri.path == '/' ? 'span' : 'a' %]></li>[% + %]<li><[% IF c.req.uri.path == '/my' %]span[% ELSE %]a href="/my"[% END + %]>[% loc("Your reports") %]</[% c.req.uri.path == '/my' ? 'span' : 'a' %]></li>[% + %]<li><[% IF c.req.uri.path == '/reports/Stevenage' %]span[% ELSE %]a href="/reports/Stevenage"[% END + %]>[% loc("All reports") %]</[% c.req.uri.path == '/reports' ? 'span' : 'a' %]></li>[% + %]<li><[% IF c.req.uri.path == '/alert' %]span[% ELSE %]a href="/alert[% pc ? '/list?pc=' : '' %][% pc | uri %]"[% END + %]>[% loc("Local alerts") %]</[% c.req.uri.path == '/alert' ? '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> + </div> + </div> + +<!-- [% INCLUDE 'debug_footer.html' %] --> + </div> <!-- .wrapper --> +</body> +</html> diff --git a/templates/web/stevenage/header.html b/templates/web/stevenage/header.html new file mode 100644 index 000000000..e04ea77bb --- /dev/null +++ b/templates/web/stevenage/header.html @@ -0,0 +1,110 @@ +<!doctype html> +<!--[if lt IE 7]><html class="no-js ie6 oldie" lang="[% lang_code %]"><![endif]--> +<!--[if IE 7]> <html class="no-js ie7 oldie" lang="[% lang_code %]"><![endif]--> +<!--[if IE 8]> <html class="no-js ie8 oldie" lang="[% lang_code %]"><![endif]--> +<!--[if IE 9]> <html class="no-js ie9 oldie" lang="[% lang_code %]"><![endif]--> +<!--[if gt IE 9]><!--><html class="no-js" lang="[% lang_code %]"><!--<![endif]--> + <head> + <meta name="viewport" content="initial-scale=1.0"> + + <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> + <meta name="HandHeldFriendly" content="true"> + <meta name="mobileoptimized" content="0"> + + <link rel="stylesheet" href="[% version('/cobrands/stevenage/base.css') %]"> + <link rel="stylesheet" href="[% version('/cobrands/stevenage/layout.css') %]" media="(min-width:48em)"> + [% extra_css %] + <!--[if (lt IE 9) & (!IEMobile)]> + <link rel="stylesheet" href="[% 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 = 'Stevenage: FixMyStreet' %] + [% extra_js %] + + [% IF c.req.uri.host == 'osm.fixmystreet.com' %] + <link rel="canonical" href="http://www.fixmystreet.com[% c.req.uri.path_query %]"> + [% END %] + + [% INCLUDE 'tracking_code.html' %] + + </head> + <body class="[% bodyclass | html IF bodyclass %]"> + + <div class="wrapper"> + <div class="table-cell"> + <header id="stevenage_cc_header" role="banner"> + <div id="stv-headerWrapper"> + <div id="stv-header"> + <div class="stv-inner"> + + <div id="stv-logo"> + <h1><a href="/"><img src="http://www.stevenage.gov.uk/Images/logo.gif" alt="Stevenage Borough Council"></a></h1> + </div> + + <div class="stv-mapLogo"> + <img src="http://www.stevenage.gov.uk/Images/mapLogo.gif" alt=""> + </div> + + <div id="stv-pageTools" class="stv-floatHolder"> + <div id="stv-searchStatic"> + <label for="search">Search</label> <input type="hidden" name="view" value="Search results"> <input name="search" type="text" value="" placeholder="Search for..." id="stv-search" class="stv-searchInput"> <input type="submit" value="GO"> + </div> + </div> + + <div class="stv-parf stv-floatHolder"> + <a href="http://www.stevenage.gov.uk/pay/"><span class="stv-title">Pay</span> your Council Tax bill and more</a> <a href="http://www.stevenage.gov.uk/apply/"><span class="stv-title">Apply</span> for planning permission and more</a> <a href="http://www.stevenage.gov.uk/report/"><span class="stv-title">Report</span> a missed bin and more</a> <a href="http://www.stevenage.gov.uk/find/" class="stv-find"><span class="stv-title">Find</span> your local councillor and more</a> + </div> + + </div> + </div> + <div id="stv-menu"> + <div id="stv-primaryNavigation"> + <ul id="stv-ctl00_ctl00_PrimaryNavigationLinks" class="stv-floatHolder"> + <li> + <a href="http://www.stevenage.gov.uk/council-services/">Council Services</a> + </li> + <li> + <a href="http://www.stevenage.gov.uk/about-the-council/">About the Council</a> + </li> + <li> + <a href="http://www.stevenage.gov.uk/about-stevenage/">About Stevenage</a> + </li> + <li> + <a href="http://www.stevenage.gov.uk/news-and-events/">News and Events</a> + </li> + <li> + <a href="http://www.stevenage.gov.uk/links/">Popular Links</a> + </li> + <li> + <a href="http://www.stevenage.gov.uk/have-your-say/">Have Your Say</a> + </li> + </ul> + </div> + </div> + </div> + </header> + <header id="site-header"> + <div class="container"> + <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> + + [% pre_container_extra %] + + <div class="container"> + <div class="content[% " $mainclass" | html IF mainclass %]" role="main"> + + <!-- [% INCLUDE 'debug_header.html' %] --> diff --git a/templates/web/zurich/around/intro.html b/templates/web/zurich/around/intro.html new file mode 100644 index 000000000..c113afca7 --- /dev/null +++ b/templates/web/zurich/around/intro.html @@ -0,0 +1 @@ + <h1>[% loc('Report, view, or discuss local problems') %]</h1> diff --git a/templates/web/zurich/faq/faq-de.html b/templates/web/zurich/faq/faq-de.html index bd94ecd38..a739f1b74 100755 --- a/templates/web/zurich/faq/faq-de.html +++ b/templates/web/zurich/faq/faq-de.html @@ -184,7 +184,7 @@ rights reserved, Ministry of Justice 100037819 2008), Yahoo! for their BSD-licensed JavaScript libraries, the entire free software community (this particular project was brought to you by Perl, PostgreSQL, and the number 161.290) and <a -href="http://www.m247.com/">M247</a> (who kindly host all +href="http://www.bytemark.co.uk/">Bytemark</a> (who kindly host all our servers). Let us know if we’ve missed anyone.</dd> diff --git a/templates/web/zurich/footer.html b/templates/web/zurich/footer.html new file mode 100644 index 000000000..2e4717360 --- /dev/null +++ b/templates/web/zurich/footer.html @@ -0,0 +1,31 @@ + </div><!-- .content role=main --> + </div><!-- .container --> + </div><!-- .table-cell --> + + <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 %] + >[% loc("Report a problem") %]</[% c.req.uri.path == '/' ? '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> + </div> + </div> + +<!-- [% INCLUDE 'debug_footer.html' %] --> + </div> <!-- .wrapper --> + + <div id="zurich-footer" class="desk-only"> + © 2012 Stadt Zürich + <span class="hidden">|</span> <a href="http://www.stadt-zuerich.ch/content/portal/de/index/footer/rechtliche_hinweise.html">Rechtliche Hinweise</a> + <span class="hidden">|</span> <a href="http://www.stadt-zuerich.ch/content/portal/de/index/footer/impressum.html">Impressum</a> + <span class="hidden">|</span> <a href="http://www.stadt-zuerich.ch/content/portal/de/index/footer/barrierefreiheit.html">Barrierefreiheit</a> + </div> + +</body> +</html> diff --git a/templates/web/zurich/maps/zurich.html b/templates/web/zurich/maps/zurich.html new file mode 100644 index 000000000..492ccc556 --- /dev/null +++ b/templates/web/zurich/maps/zurich.html @@ -0,0 +1,14 @@ +[% map_js = BLOCK %] +<script type="text/javascript" src="[% version('/js/OpenLayers.2.11.zurich.js') %]"></script> +<script type="text/javascript" src="[% version('/js/OpenLayers.Projection.CH1903.js') %]"></script> +<script type="text/javascript" src="[% version('/js/map-OpenLayers.js') %]"></script> +<script type="text/javascript" src="[% version('/js/map-wmts-zurich.js') %]"></script> +<script type="text/javascript" src="[% version('/js/jquery.ba-hashchange.min.js') %]"></script> +<!--[if lte IE 6]> + <link rel="stylesheet" href="/jslib/OpenLayers-2.10/theme/default/ie6-style.css" type="text/css" /> +<![endif]--> +[% END %] + +[% map_html = BLOCK %] +[% INCLUDE maps/openlayers.html %] +[% END %] diff --git a/templates/web/zurich/report/new/fill_in_details_form.html b/templates/web/zurich/report/new/fill_in_details_form.html new file mode 100644 index 000000000..a4029c527 --- /dev/null +++ b/templates/web/zurich/report/new/fill_in_details_form.html @@ -0,0 +1,136 @@ +<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 + --> + <div class="sidebar-tips"> + [% IF report.used_map %] + [% IF partial_token %] + <p id="unknown">[% loc('Please note your report has <strong>not yet been sent</strong>. Choose a category and add further information below, then submit.') %]</p> + [% END %] + <p>[% loc('You have located the problem at the point marked with a green pin on the map. If this is not the correct location, simply click on the map again. ') %]</p> + [% END %] + + <p> + [% IF report.used_map %] + [% INCLUDE 'report/new/fill_in_details_text.html' %] + [% ELSE %] + [% loc('Please fill in the form below with details of the problem, and describe the location as precisely as possible in the details box.') %] + [% END %] + </p> + </div> + + <div class="sidebar-notes"> + [% INCLUDE 'report/new/notes.html' %] + </div> + + </div> + + [% INCLUDE 'errors.html' %] + <fieldset> + <div id="problem_form"> + + [% INCLUDE 'report/new/form_heading.html' %] + + + [% IF field_errors.council %] + <p class='form-error'>[% field_errors.council %]</p> + [% END %] + + <label for="form_detail">[% loc('Details') %]</label> + [% IF field_errors.detail %] + <p class='form-error'>[% field_errors.detail %]</p> + [% END %] + <textarea rows="7" cols="26" name="detail" id="form_detail" placeholder="[% loc('Please fill in details of the problem.') %]" required>[% report.detail | html %]</textarea> + + [% IF js %] + <div id="form_category_row"> + <label for="form_category">[% loc('Category') %]</label> + <select name="category" id="form_category" required><option>[% loc('Loading...') %]</option></select> + </div> + [% ELSE %] + [% IF category_options.size %] + [% IF field_errors.category %] + <p class='form-error'>[% field_errors.category %]</p> + [% END %] + + [% PROCESS "report/new/category.html" %] + [% END %] + [% END %] + + [%- IF category_extras %] + [% PROCESS "report/new/category_extras.html" %] + [%- END %] + + [% IF c.cobrand.allow_photo_upload %] + <label for="form_photo">[% loc('Photo') %]</label> + [% IF upload_fileid || report.photo %] + [% IF upload_fileid %] + <img align="right" src="/photo/[% upload_fileid %].temp.jpeg" alt=""> + <input type="hidden" name="upload_fileid" value="[% upload_fileid %]"> + [% END %] + + <p>[% loc('You have already attached a photo to this report, attaching another one will replace it.') %]</p> + + [% IF report.photo %] + <img align="right" src="/photo/[% report.id %].jpeg"> + [% END %] + [% END %] + + [% IF field_errors.photo %] + <p class='form-error'>[% field_errors.photo %]</p> + [% END %] + <input type="file" name="photo" id="form_photo"> + [% END %] + + <label for="form_email">[% loc('Your email') %]</label> + [% IF field_errors.email %] + <p class='form-error'>[% field_errors.email %]</p> + [% END %] + <input type="email" value="[% report.user.email | html %]" name="email" id="form_email" placeholder="[% loc('Please enter your email address') %]" required> + + <!-- + <div class="general-sidebar-notes"> + <p class="dark">[% loc('We never show your email address or phone number.') %]</p> + </div> + --> + + <label for="form_name">[% loc('Name') %] [% loc('(optional)') %]</label> + [% IF field_errors.name %] + <p class='form-error'>[% field_errors.name %]</p> + [% END %] + <input type="text" value="[% report.name | html %]" name="name" id="form_name" placeholder="[% loc('Your name') %]"> + + <label for="form_phone">[% loc('Phone number (optional)') %]</label> + <input type="text" value="[% report.user.phone | html %]" name="phone" id="form_phone" placeholder="[% loc('Your phone number') %]"> + + <div class="form-txt-submit-box"> + [%# ID of submit_sign_in so name can be option, name of submit_register so it doesn't try and sign us in %] + <p><input class="green-btn" type="submit" id="submit_sign_in" name="submit_register" value="[% loc('Submit') %]"> + </div> + + </div> + </fieldset> + + [% IF partial_token %] + <input type="hidden" name="partial" value="[% partial_token.token %]"> + [% END %] + + <input type="hidden" name="submit_problem" value="1"> +</div> diff --git a/templates/web/zurich/report/update-form.html b/templates/web/zurich/report/update-form.html new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/templates/web/zurich/report/update-form.html |