diff options
Diffstat (limited to 'templates/web/default')
80 files changed, 3320 insertions, 0 deletions
diff --git a/templates/web/default/admin/council_contacts.html b/templates/web/default/admin/council_contacts.html new file mode 100644 index 000000000..669f137f9 --- /dev/null +++ b/templates/web/default/admin/council_contacts.html @@ -0,0 +1,89 @@ +[% INCLUDE 'admin/header.html' title=tprintf(loc('Council contacts for %s'), council_name) -%] + +<p> +<em>[% updated %]</em> +</p> + +<p> +[% IF example_pc %] +<a href="[% c.uri_for_email( '/around', { pc => example_pc } ) %]">[% tprintf( loc('Example postcode %s'), example_pc ) | html %]</a> | +[% END %] +<a href="[% c.uri_for_email( '/reports/' _ area_id ) %]">[% loc('List all reported problems' ) %]</a> +<a href="[% c.uri_for( 'council_contacts', area_id, { text => 1 } ) %]">[% loc('Text only version') %]</a> +</p> + +<form method="post" action="[% c.uri_for('council_contacts', area_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> + + <table cellspacing="0" cellpadding="2" border="1"> + <tr> + <th>[% loc('Category') %]</th> + <th>[% loc('Email') %]</th> + <th>[% loc('Confirmed') %]</th> + <th>[% loc('Deleted') %]</th> + <th>[% loc('Last editor') %]</th> + <th>[% loc('Note') %]</th> + <th>[% loc('When edited') %]</th> + <th>[% loc('Confirm') %]</th> + </tr> + [% WHILE ( contact = contacts.next ) %] + <tr> + <td><a href="[% c.uri_for( 'council_edit', area_id, contact.category ) %]">[% contact.category %]</a></td> + <td>[% contact.email | html %]</td> + <td>[% IF contact.confirmed %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]</td> + <td>[% IF contact.deleted %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]</td> + <td>[% contact.editor %]</td> + <td>[% contact.note | html %]</td> + <td>[% contact.whenedited.ymd _ ' ' _ contact.whenedited.hms %]</td> + <td><input type="checkbox" name="confirmed" value="[% contact.category %]"></td> + </tr> + [% END %] + </table> + + <p> + <input type="hidden" name="area_id" value="[% area_id %]"> + <input type="hidden" name="posted" value="update"> + <input type="hidden" name="token" value="[% token %]"> + <input type="submit" name="Update statuses" value="[% loc('Update statuses') %]"> + </p> + </form> + + <h2>[% loc('Add new category') %]</h2> + + <form method="post" action="[% c.uri_for('council_contacts', area_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> + + [% IF c.cobrand.moniker != 'emptyhomes' %] + <p> + <strong>[% loc('Category:') %] </strong><input type="text" name="category" size="30"> + </p> + [% END %] + + <p> + <strong>[% loc('Email:') %] </strong><input type="text" name="email" size="30"> + </p> + + <p> + <input type="checkbox" name="confirmed" value="1" id="confirmed"> + <label for="confirmed">[% loc('Confirmed') %]</label> + + <input type="checkbox" name="deleted" value="1"id="deleted"> + <label for="deleted">[% loc('Deleted') %]</label> + </p> + + <p> + <strong>[% loc('Note:') %] </strong> <textarea name="note" rows="3" cols="40"></textarea> + </p> + + <p> + <input type="hidden" name="area_id" value="[% area_id %]" > + <input type="hidden" name="posted" value="new" > + <input type="hidden" name="token" value="[% token %]" > + <input type="submit" name="Create category" value="[% loc('Create category') %]" > + </p> + + <div> + <input type="hidden" name=".cgifields" value="confirmed" > + <input type="hidden" name=".cgifields" value="deleted" > + </div> + </form> + +[% INCLUDE 'admin/footer.html' %] diff --git a/templates/web/default/admin/council_contacts.txt b/templates/web/default/admin/council_contacts.txt new file mode 100644 index 000000000..2d1e04bfa --- /dev/null +++ b/templates/web/default/admin/council_contacts.txt @@ -0,0 +1,4 @@ +[% WHILE ( contact = contacts.next ) -%] +[%- NEXT IF contact.deleted || ! contact.confirmed %] +[% contact.category %] [% contact.email %] +[%- END %] diff --git a/templates/web/default/admin/council_edit.html b/templates/web/default/admin/council_edit.html new file mode 100644 index 000000000..0968d3570 --- /dev/null +++ b/templates/web/default/admin/council_edit.html @@ -0,0 +1,62 @@ +[% INCLUDE 'admin/header.html' title=tprintf(loc('Council contacts for %s'), council_name) -%] + +[% BLOCK highlightchanged_yesno %] +[%- output = loc('No') %] +[%- IF new.$value %][% output = loc('Yes') %][% END %] +[%- IF old && old.$value != new.$value %]<strong>[% output %]</strong>[% ELSE %][% output %][% END %] +[%- END %] + +[% BLOCK highlightchanged %] +[%- IF old && old.$value != new.$value %]<strong>[% new.$value %]</strong>[% ELSE %][% new.$value %][% END %] +[%- END %] +<p> +<em>[% updated %]</em> +</p> + +<p> +[% IF example_pc %] +<a href="[% c.uri_for_email( '/around', { pc => example_pc } ) %]">[% tprintf( loc('Example postcode %s'), example_pc ) | html %]</a> +[% END %] +</p> + +<form method="post" action="[% c.uri_for('council_contacts', area_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> + <strong>[% loc('Category:') %] </strong>[% contact.category | html %] + <input type="hidden" name="category" value="[% contact.category | html %]" > + <input type="hidden" name="token" value="[% token %]" > + <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> + + <strong>[% loc('Note:') %] </strong><textarea name="note" rows="3" cols="40">[% contact.note | html %]</textarea> <br> + + <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') %]"> +</form> + +<h2>[% loc('History') %]</h2> +<table border="1"> + <tr> + <th>[% loc('When edited') %]</th> + <th>[% loc('Email') %]</th> + <th>[% loc('Confirmed') %]</th> + <th>[% loc('Deleted') %]</th> + <th>[% loc('Editor') %]</th> + <th>[% loc('Note') %]</th> + </tr> + [%- prev = '' %] + [%- WHILE ( contact = history.next ) %] + <tr> + <td>[% contact.whenedited.ymd _ ' ' _ contact.whenedited.hms %]</td> + <td>[% PROCESS highlightchanged old=prev new=contact value='email' %]</td> + <td>[% PROCESS highlightchanged_yesno old=prev new=contact value='confirmed' %]</td> + <td>[% PROCESS highlightchanged_yesno old=prev new=contact value='deleted' %]</td> + <td>[% contact.editor %]</td> + <td>[% contact.note | html %]</td> + </tr> + [%- prev = contact %] + [%- END %] +</table> + +[% INCLUDE 'admin/footer.html' %] diff --git a/templates/web/default/admin/council_list.html b/templates/web/default/admin/council_list.html new file mode 100644 index 000000000..ac99368fe --- /dev/null +++ b/templates/web/default/admin/council_list.html @@ -0,0 +1,47 @@ +[% INCLUDE 'admin/header.html' title=loc('Council contacts') -%] + +[%- BLOCK details %] +[%- IF councils.size == 0 %] + [%- loc('None') %] +[%- ELSE %] +[%- FOREACH council IN councils %] + [%- IF council.parent_area %] + [%- + p_area = areas.$council.parent_area + parent = ', ' _ areas.$parent.name + %] + [%- ELSE %] + [%- parent = '' %] + [%- END %] + [%- '<ul>' IF loop.first %] + <li><a href="[% c.uri_for( 'council_contacts', council ) %]">[% areas.$council.name %] [% parent %][% tprintf( loc('%d addresses'), counts.$council.c) IF counts.$council && c.cobrand.moniker != 'emptyhomes' %]</a> + [%- '</ul>' IF loop.last %] +[%- END %] +[%- END %] +[%- END %] + +<h2>[% loc('Diligency prize league table') %]</h2> +[% IF edit_activity.count %] +<ul> + [% WHILE ( editor = edit_activity.next ) %] + <li>[% tprintf( loc('%d edits by %s'), editor.get_column('c'), editor.editor ) %]</li> + [% END %] +</ul> +[% ELSE %] +<p> +[% loc('No edits have yet been made.') %] +</p> +[% END %] + +<h2>[% loc('Councils') %]</h2> + +<h3>[% loc('No info at all') %]</h3> +[% PROCESS details councils=no_info %] +<h3>[% loc('Currently has 1+ deleted') %]</h3> +[% PROCESS details councils=one_plus_deleted %] +<h3>[% loc('Some unconfirmeds') %]</h3> +[% PROCESS details councils=unconfirmeds %] +<h3>[% loc('All confirmed') %]</h3> +[% PROCESS details councils=all_confirmed %] + +[% INCLUDE 'admin/footer.html' %] diff --git a/templates/web/default/admin/footer.html b/templates/web/default/admin/footer.html new file mode 100644 index 000000000..308b1d01b --- /dev/null +++ b/templates/web/default/admin/footer.html @@ -0,0 +1,2 @@ +</body> +</html> diff --git a/templates/web/default/admin/header.html b/templates/web/default/admin/header.html new file mode 100644 index 000000000..261f0efb2 --- /dev/null +++ b/templates/web/default/admin/header.html @@ -0,0 +1,17 @@ +<html> +<head> +<title>[% title %] - [% loc('FixMyStreet administration') %]</title> +<style type="text/css"> +dt { clear: left; float: left; font-weight: bold; } +dd { margin-left: 8em; } +.hidden { color: #666666; } +</style> +</head> +<body> + + <strong>[% loc('FixMyStreet admin:') %]</strong> + [%- FOREACH link IN allowed_links %] + <a href="[% c.uri_for( link ) %]">[% allowed_pages.$link.0 %]</a> + [%- END %] + + <h1>[% title %]</h1> diff --git a/templates/web/default/admin/index.html b/templates/web/default/admin/index.html new file mode 100644 index 000000000..d1ed09114 --- /dev/null +++ b/templates/web/default/admin/index.html @@ -0,0 +1,42 @@ +[% INCLUDE 'admin/header.html' title=loc('Summary') -%] + +[%- BLOCK states -%] +<h2>[% title %]</h2> + +[%- FOREACH state IN object.keys.sort %] +[%- '<ul>' IF loop.first %] + <li>[% object.$state %] [% state %]</li> +[%- "\n</ul>" IF loop.last %] +[%- END %] +[% END -%] + + <ul> + <li>[% tprintf( loc('<strong>%d</strong> live problems'), total_problems_live ) %]; + [% tprintf( loc('from %d different users'), total_problems_users ) %]</li> + <li>[% tprintf( loc('%d live updates'), comments.confirmed || 0 ) %]</li> + <li>[% tprintf( loc('%d confirmed alerts, %d unconfirmed'), alerts.1, alerts.0) %]</li> + <li>[% tprintf( loc('%d questionnaires sent – %d answered (%s%%)'), questionnaires.total, questionnaires.1, questionnaires_pc) %]</li> + <li>[% tprintf( loc('%d council contacts – %d confirmed, %d unconfirmed'), contacts.total, contacts.1, contacts.0) %]</li> + </ul> + +[% IF c.cobrand.admin_show_creation_graph -%] + <p> + <a href="">[% loc('Graph of problem creation by status over time') %]</a> + </p> +[% END -%] + +[% PROCESS states title=loc('Problem breakdown by state') object=problems %] + +[% PROCESS states title=loc('Update breakdown by state') object=comments %] + +[% FOREACH category IN categories %] + [% IF loop.first %] + <h2>[% loc('Category fix rate for problems > 4 weeks old') %]</h2> + <table> + <tr><th>[% loc('Category') %]</th><th>[% loc('Total') %]</th><th>[% loc('Fixed') %]</th></tr> + [% END %] + <tr><td>[% category.key %]</td><td>[% category.value.total %]</td><td>[% category.value.fixed / category.value.total * 100 | format('%.1f') %]%</td></tr> + [% '</table>' IF loop.last %] +[% END %] + +[% INCLUDE 'admin/footer.html' %] diff --git a/templates/web/default/admin/list_updates.html b/templates/web/default/admin/list_updates.html new file mode 100644 index 000000000..92f41f348 --- /dev/null +++ b/templates/web/default/admin/list_updates.html @@ -0,0 +1,34 @@ +<h2>[% loc('Updates') %]</h2> + +<table cellspacing="0" cellpadding="2" border="1"> + <tr> + <th>[% loc('ID') %]</th> + <th>[% loc('State') %]</th> + <th>[% loc('Name') %]</th> + <th>[% loc('Email') %]</th> + <th>[% loc('Created') %]</th> + <th>[% loc('Anonymous') %]</th> + <th>[% loc('Cobrand') %]</th> + <th>[% loc('Text') %]</th> + <th>*</th> + </tr> +[% FOREACH update IN updates -%] + <tr[% ' class="hidden"' IF update.state == 'hidden' || ( problem.state && problem.state == 'hidden' ) %]> + <td>[%- IF update.state == 'confirmed' -%] + [%- cobrand_data = update.cobrand_data %] + [%- cobrand_data = c.data_for_generic_update IF !update.cobrand %] + <a href="[% c.uri_for_email( '/report', update.problem.id, cobrand_data ) %]#update_[% update.id %]">[% update.id %]</a> + [%- ELSE %] + [%- update.id %] + [%- END -%]</td> + <td>[% update.state %]</td> + <td>[% update.name | html %]</td> + <td>[% update.user.email | html %]</td> + <td>[% PROCESS format_time time=update.created %]</td> + <td>[% IF update.anonymous %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]</td> + <td>[% update.cobrand %]<br>[% update.cobrand_data | html %]</td> + <td>[% update.text | html %]</td> + <td><a href="[% c.uri_for( 'update_edit', update.id ) %]">[% loc('Edit') %]</a></td> + <tr> +[% END -%] +</table> diff --git a/templates/web/default/admin/questionnaire.html b/templates/web/default/admin/questionnaire.html new file mode 100644 index 000000000..680e0d214 --- /dev/null +++ b/templates/web/default/admin/questionnaire.html @@ -0,0 +1,30 @@ +[% INCLUDE 'admin/header.html' title=loc('Survey Results') %] + +<table border="1"> + <tr> + <th>[% loc('Reported before') %]</th> + <th>[% loc('Not reported before') %]</th> + </tr> + [% IF questionnaires.total > 0 %] + <tr> + <td>[% questionnaires.1 %] ([% 100 * questionnaires.1 / questionnaires.total | format('%.1f') %]%)</td> + <td>[% questionnaires.0 %] ([% 100 * questionnaires.0 / questionnaires.total | format('%.1f') %]%)</td> + </tr> + [% ELSE %] + <tr> + <td>[% loc('n/a') %]</td> + <td>[% loc('n/a') %]</td> + </tr> + [% END %] +</table> + +<h2>[% loc('Problem state change based on survey results') %]</h2> + +<table> +<tr><th>[% loc('Old state') %]</th><th>[% loc('New state') %]</th><th>[% loc('Total') %]</th></tr> +[% WHILE ( s = state_changes.next ) %] +<tr><td>[% s.old_state %]</td><td>[% s.new_state %]</td><td>[% s.get_column('c') %] ([% 100 * s.get_column('c') / state_changes_count | format('%.1f') %]%)</td></tr> +[% END %] +</table> + +[% INCLUDE 'admin/footer.html' %] diff --git a/templates/web/default/admin/report_blocks.html b/templates/web/default/admin/report_blocks.html new file mode 100644 index 000000000..1fe650f15 --- /dev/null +++ b/templates/web/default/admin/report_blocks.html @@ -0,0 +1,7 @@ +[% BLOCK value_or_nbsp -%] + [%- IF value %][% value | html %][% ELSE %] [% END %] +[%- END %] + +[% BLOCK format_time -%] + [%- IF time %][% time.ymd %] [% time.hms %][% ELSE %][% no_time || ' ' %][% END %][% no_time = '' %] +[%- END %] diff --git a/templates/web/default/admin/report_edit.html b/templates/web/default/admin/report_edit.html new file mode 100644 index 000000000..9c38b014e --- /dev/null +++ b/templates/web/default/admin/report_edit.html @@ -0,0 +1,50 @@ +[% INCLUDE 'admin/header.html' title=tprintf(loc('Editing problem %d'), problem.id ) -%] +[% PROCESS 'admin/report_blocks.html' %] + +[% status_message %] + +<form method="post" action="[% c.uri_for( 'report_edit', problem.id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> + <input type="hidden" name="token" value="[% token %]" > + <input type="hidden" name="submit" value="1" > +<ul> + [%- cobrand_data = problem.cobrand_data %] + [%- cobrand_data = c.data_for_generic_problem IF !problem.cobrand %] +<li><a href="[% c.uri_for_email( '/report', problem.id, cobrand_data ) %]">[% loc('View report on site' )%]</a></li> +<li><label for='title'>[% loc('Subject:') %]</label> <input size=60 type='text' id='title' name='title' value='[% problem.title | html %]'></li> +<li><label for='detail'>[% loc('Details:') %]</label><br><textarea name='detail' id='detail' cols=60 rows=10>[% problem.detail | html %]</textarea></li> +<li>[% loc('Co-ordinates:') %] [% problem.latitude %], [% problem.longitude %] ( [% loc('originally entered') %] [% problem.postcode | html %] , [% IF problem.used_map %][% loc('used map') %][% ELSE %][% loc("didn't use map") %][% END %])</li> +<li>[% loc('For council(s):') %] [% IF problem.council %][% problem.council %][% ELSE %]<em>[% loc('None' ) %]</em>[% END %] ([% loc('other areas:') %] [% problem.areas | remove('^,') | remove( ',$' ) %])</li> +<li><label for="anonymous">[% loc('Anonymous:') %]</label> <select name="anonymous" id="anonymous"> +<option [% 'selected ' IF problem.anonymous %]value="1">[% loc('Yes') %]</option> +<option [% 'selected ' IF !problem.anonymous %]value="0">[% loc('No') %]</option> +</select></li> +<li><label for="state">[% loc('State:') %]</label> <select name="state" id="state"> + [% FOREACH state IN [ ['confirmed', loc('Open')], ['fixed', loc('Fixed')], ['hidden', loc('Hidden')], ['partial', loc('Partial')],['unconfirmed',loc('Unconfirmed')] ] %] + <option [% 'selected ' IF state.0 == problem.state %] value="[% state.0 %]">[% state.1 %]</option> + [% END %] +</select></li> +<li>[% loc('Category:') %] [% problem.category | html %] </li> +<li>[% loc('Name:') %] <input type='text' name='name' id='name' value='[% problem.name | html %]'></li> +<li>[% loc('Email:') %] <input type='text' id='email' name='email' value='[% problem.user.email | html %]'></li> +<li>[% loc('Phone:') %] [% problem.user.phone | html %]</li> +<li>[% loc('Created:') %] [% PROCESS format_time time=problem.created %]</li> +<li>[% loc('Confirmed:') %] [% PROCESS format_time time=problem.confirmed no_time='-' %]</li> +<li>[% loc('Sent:') %] [% PROCESS format_time time=problem.whensent %] [% IF problem.state == 'confirmed' %]<input onclick="return confirm('[% loc('You really want to resend?') %]')" type="submit" name="resend" value="[% loc('Resend report') %]">[% END %]</li> +<li>[% loc('Last update:') %] [% PROCESS format_time time=problem.lastupdate %]</li> +<li>[% loc('Service:') %] [% problem.service %]</li> +<li>[% loc('Cobrand:') %] [% problem.cobrand %]</li> +<li>[% loc('Cobrand data:') %] [% problem.cobrand_data %]</li> +<li>[% loc('Going to send questionnaire?') %] [% IF problem.send_questionnaire %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]</li> + +[% IF problem.photo %] +[% photo = problem.get_photo_params %] +<li><img alt="" height="[% photo.height %]" width="[% photo.width %]" src="[% c.cobrand.base_url %][% photo.url %]"> +<input type="checkbox" id="remove_photo" name="remove_photo" value="1"> +<label for="remove_photo">[% loc("Remove photo (can't be undone!)") %]</label></li> +[% END %] +</ul> +<input type="submit" name="Submit changes" value="[% loc('Submit changes') %]" ></form> + +[% INCLUDE 'admin/list_updates.html' %] + +[% INCLUDE 'admin/footer.html' %] diff --git a/templates/web/default/admin/search_reports.html b/templates/web/default/admin/search_reports.html new file mode 100644 index 000000000..3809965f6 --- /dev/null +++ b/templates/web/default/admin/search_reports.html @@ -0,0 +1,61 @@ +[% INCLUDE 'admin/header.html' title=loc('Search Reports') %] +[% PROCESS 'admin/report_blocks.html' %] + +<form method="get" action="[% c.uri_for('search_reports') %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> + <label for="search">[% loc('Search:') %]</label> <input type="text" name="search" size="30" id="search"> +</form> + + +[% IF searched %] +<table cellspacing="0" cellpadding="2" border="1"> + <tr> + <th>[% loc('ID') %]</th> + <th>[% loc('Title') %]</th> + <th>[% loc('Name') %]</th> + <th>[% loc('Email') %]</th> + <th>[% loc('Council') %]</th> + <th>[% loc('Category') %]</th> + <th>[% loc('Anonymous') %]</th> + <th>[% loc('Cobrand') %]</th> + <th>[% loc('Created') %]</th> + <th>[% loc('State') %]</th> + <th>[% loc('When sent') %]</th> + <th>*</th> + </tr> +[%- FOREACH problem IN problems %] + <tr[% ' class="hidden"' IF problem.state == 'hidden' %]> + <td>[%- IF problem.state == 'confirmed' || problem.state == 'fixed' -%] + [%- cobrand_data = problem.cobrand_data %] + [%- cobrand_data = c.data_for_generic_problem IF !problem.cobrand %] + <a href="[% c.uri_for_email( '/report', problem.id, cobrand_data ) %]">[% problem.id %]</a> + [%- ELSE %] + [%- problem.id %] + [%- END -%]</td> + <td>[% PROCESS value_or_nbsp value=problem.title %]</td> + <td>[% PROCESS value_or_nbsp value=problem.name %]</td> + <td>[% PROCESS value_or_nbsp value=problem.user.email %]</td> + <td>[%- IF edit_council_contacts -%] + <a href="[% c.uri_for('council_contacts', problem.council ) %]">[% PROCESS value_or_nbsp value=problem.council %]</a> + [%- ELSE -%] + [%- PROCESS value_or_nbsp value=problem.council -%] + [%- END -%]</td> + <td>[% PROCESS value_or_nbsp value=problem.category %]</td> + <td>[% IF problem.anonymous %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]</td> + <td>[% problem.cobrand %]<br>[% problem.cobrand_data | html %]</td> + <td>[% PROCESS format_time time=problem.created %]</td> + <td>[% problem.state %]<small> + [%- IF problem.state == 'fixed' || problem.state == 'confirmed' %]<br>[% loc('Confirmed:' ) %] [% PROCESS format_time time=problem.confirmed %][% END -%] + [%- IF problem.state == 'fixed' %]<br>[% loc('Fixed:') %] [% PROCESS format_time time=problem.lastupdate %][% END -%] + [%- IF problem.state == 'confirmed' %]<br>[% loc('Last update:') %] [% PROCESS format_time time=problem.lastupdate %][% END -%]</small> + </td> + <td>[% PROCESS format_time time=problem.whensent %]</td> + <td><a href="[% c.uri_for( 'report_edit', problem.id ) %]">[% loc('Edit') %]</a></td> + </tr> +[%- END -%] +</table> + +[% INCLUDE 'admin/list_updates.html' %] + +[% END %] + +[% INCLUDE 'admin/footer.html' %] diff --git a/templates/web/default/admin/timeline.html b/templates/web/default/admin/timeline.html new file mode 100644 index 000000000..95120e48c --- /dev/null +++ b/templates/web/default/admin/timeline.html @@ -0,0 +1,46 @@ +[% INCLUDE 'admin/header.html' title=loc('Timeline') %] +[%- USE f = DateTime::Format('DateTime::Format::Strptime', { pattern => "%A, %e %B %Y" }) %] +[%- USE alert_format = DateTime::Format('DateTime::Format::Strptime', { pattern => "%H:%M:%S %e %B %Y" }) %] + +[%- BLOCK problem_name %] + [%- tprintf(loc('by %s'), problem.name) | html %] <[% problem.user.email | html %]>, '[% problem.title | html %]' +[%- END %] + +[%- date = '' %] +[% FOREACH moment IN time.keys.sort.reverse %] + [%- curdate = f.format(time.$moment.0.date) -%] + [%- IF date != curdate %] + [% '</dl>' IF date %] + <h2>[% curdate %]</h2> + + <dl> + [%- date = curdate -%] + [%- END -%] + <dt><b>[% time.$moment.0.date.hms %]</b></dt> + <dd> + [% FOREACH item IN time.$moment %] + [%- SWITCH item.type -%] + [% CASE 'problemCreated' %] + [%- tprintf(loc('Problem %d created'), item.obj.id) %]; [% PROCESS problem_name problem=item.obj -%] + [% CASE 'problemConfirmed' %] + [%- tprintf( loc('Problem %s confirmed'), '<a href="' _ c.uri_for_email( '/report', item.obj.id, c.cobrand_data ) _ '">' _ item.obj.id _ '</a>') %]; [% PROCESS problem_name problem=item.obj -%] + [% CASE 'problemSent' %] + [% tprintf(loc("Problem %s sent to council %s"), '<a href="' _ c.uri_for_email( '/report', item.obj.id, c.cobrand_data ) _ '">' _ item.obj.id _ '</a>', item.obj.council ) %] + [% CASE 'quesSent' %] + [% tprintf(loc("Questionnaire %d sent for problem %d"), item.obj.id, item.obj.problem_id ) %] + [% CASE 'quesAnswered' %] + [% tprintf(loc("Questionnaire %d answered for problem %d, %s to %s"), item.obj.id, item.obj.problem_id, item.obj.old_state, item.obj.new_state ) %] + [% CASE 'update' %] + [% name = ( item.obj.name || 'anonymous' ) | html %] + [% tprintf(loc("Update %s created for problem %d; by %s"), "<a href='" _ c.uri_for_email( '/report', item.obj.problem_id, c.cobrand_data ) _ "#update_" _ item.obj.id _ "'>" _ item.obj.id _ "</a>", item.obj.problem_id, name) %] <[% item.obj.user.email | html %]> + [% CASE 'alertSub' %] + [% tprintf(loc("Alert %d created for %s, type %s, parameters %s / %s"), item.obj.id, item.obj.user.email, item.obj.alert_type.ref, item.obj.parameter, item.obj.parameter2) | html %] + [% CASE 'alertDel' %] + [% tprintf(loc("Alert %d disabled (created %s)"), item.obj.id, alert_format.format( item.obj.whensubscribed_local ) ) %] + [%- END %] + <br /> + [%- END %] + </dd> +[% END %] + +[% INCLUDE 'admin/footer.html' %] diff --git a/templates/web/default/admin/update_edit.html b/templates/web/default/admin/update_edit.html new file mode 100644 index 000000000..d7f212052 --- /dev/null +++ b/templates/web/default/admin/update_edit.html @@ -0,0 +1,38 @@ +[% INCLUDE 'admin/header.html' title=tprintf(loc('Editing update %d'), update.id ) -%] +[% PROCESS 'admin/report_blocks.html' %] + +[% status_message %] + +<form method="post" action="[% c.uri_for( 'update_edit', update.id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> + <input type="hidden" name="token" value="[% token %]" > + <input type="hidden" name="submit" value="1" > +<ul> + [%- cobrand_data = update.cobrand_data %] + [%- cobrand_data = c.data_for_generic_update IF !update.cobrand %] +<li><a href="[% c.uri_for_email( '/report', update.problem_id, cobrand_data ) %]#update_[% update.id %]">[% loc('View report on site' )%]</a></li> +<li><label for='detail'>[% loc('Text:') %]</label><br><textarea name='text' id='text' cols=60 rows=10>[% update.text | html %]</textarea></li> +<li><label for="anonymous">[% loc('Anonymous:') %]</label> <select name="anonymous" id="anonymous"> +<option [% 'selected ' IF update.anonymous %]value="1">[% loc('Yes') %]</option> +<option [% 'selected ' IF !update.anonymous %]value="0">[% loc('No') %]</option> +</select></li> +<li><label for="state">[% loc('State:') %]</label> <select name="state" id="state"> + [% FOREACH state IN [ ['confirmed', loc('Open')], ['hidden', loc('Hidden')], ['unconfirmed',loc('Unconfirmed')] ] %] + <option [% 'selected ' IF state.0 == update.state %] value="[% state.0 %]">[% state.1 %]</option> + [% END %] +</select></li> +<li>[% loc('Name:') %] <input type='text' name='name' id='name' value='[% update.name | html %]'></li> +<li>[% loc('Email:') %] <input type='text' id='email' name='email' value='[% update.user.email | html %]'></li> +<li>[% loc('Cobrand:') %] [% update.cobrand %]</li> +<li>[% loc('Cobrand data:') %] [% update.cobrand_data %]</li> +<li>[% loc('Created:') %] [% PROCESS format_time time=update.created %]</li> + +[% IF update.photo %] +[% photo = update.get_photo_params %] +<li><img alt="" height="[% photo.height %]" width="[% photo.width %]" src="[% photo.url %]"> +<input type="checkbox" id="remove_photo" name="remove_photo" value="1"> +<label for="remove_photo">[% loc("Remove photo (can't be undone!)") %]</label></li> +[% END %] +</ul> +<input type="submit" name="Submit changes" value="[% loc('Submit changes') %]" ></form> + +[% INCLUDE 'admin/footer.html' %] diff --git a/templates/web/default/alert/choose.html b/templates/web/default/alert/choose.html new file mode 100644 index 000000000..ef632e2d1 --- /dev/null +++ b/templates/web/default/alert/choose.html @@ -0,0 +1,14 @@ +[% INCLUDE 'header.html', title => loc('Local RSS feeds and email alerts') %] + +<h1>[% loc('Local RSS feeds and email alerts') %]</h1> + +[% 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="[% choose_target_uri %]?pc=[% match | uri %]">[% match | html %]</a></li> + [% END %] + </ul> +[% END %] + +[% INCLUDE 'footer.html' %] diff --git a/templates/web/default/alert/index.html b/templates/web/default/alert/index.html new file mode 100644 index 000000000..4d63e7f34 --- /dev/null +++ b/templates/web/default/alert/index.html @@ -0,0 +1,39 @@ +[% INCLUDE 'header.html', title => loc('Local RSS feeds and email alerts') %] + +<h1>[% loc('Local RSS feeds and email alerts') %]</h1> + +<p> +[% loc('FixMyStreet has a variety of RSS feeds and email alerts for local problems, including +alerts for all problems within a particular ward or council, or all problems +within a certain distance of a particular location.') %] +</p> + +[% IF location_offshore %] + <ul class="error"><li>[% loc('That location does not appear to be covered by a council, perhaps it is offshore - please try somewhere more specific.') %]</li></ul> +[% ELSIF location_error %] + <ul class="error"><li>[% location_error | html %]</li></ul> +[% ELSE %] + [% INCLUDE 'errors.html' %] +[% END %] + +<form method="get" action="/alert/list"> + <p> + [% loc('To find out what local alerts we have for you, please enter your GB +postcode or street name and area:' ) %] + <input type="text" name="pc" value="[% pc | html %]"> + <input type="submit" value="[% loc('Go') %]"> + [% cobrand_form_elements %] + </p> +</form> + +[% IF photos.size %] +<div id="alert_recent"> + <h2>[% loc('Some photos of recent reports') %]</h2> + [% FOREACH p IN photos %] + <a href="/report/[% p.id %]"><img border="0" height="100" + src="/photo?tn=1;id=[% p.id %]" alt="[% p.title | html %]" title="[% p.title | html %]"></a> + [% END %] +</div> +[% END %] + +[% INCLUDE 'footer.html' %] diff --git a/templates/web/default/alert/list.html b/templates/web/default/alert/list.html new file mode 100644 index 000000000..36bfaffd9 --- /dev/null +++ b/templates/web/default/alert/list.html @@ -0,0 +1,133 @@ +[% + IF pretty_pc; + title = tprintf( loc("Local RSS feeds and email alerts for ‘%s’"), pretty_pc ); + ELSE; + title = loc('Local RSS feeds and email alerts'); + END; +%] + +[% INCLUDE 'header.html', title => title %] + +[% IF pretty_pc %] + [% + pretty_pc = pretty_pc | html | replace(' ', ' '); + title = tprintf( loc("Local RSS feeds and email alerts for ‘%s’"), pretty_pc ); + %] +[% END %] + + +<h1>[% title %]</h1> + +<form id="alerts" name="alerts" method="post" action="/alert/subscribe"> + <input type="hidden" name="type" value="local"> + <input type="hidden" name="pc" value="[% pc | html %]"> + + [% cobrand_form_elements %] + + [% IF photos.size %] + <div id="alert_photos"> + <h2>[% loc('Photos of recent nearby reports') %]</h2> + [% FOREACH p IN photos %] + <a href="/report/[% p.id %]"><img border="0" height="100" + src="/photo?tn=1;id=[% p.id %]" alt="[% p.title | html %]" title="[% p.title | html %]"></a> + [% END %] + </div> + [% END %] + + <p> + [% IF pretty_pc %] + [% tprintf( loc('Here are the types of local problem alerts for ‘%s’.'), pretty_pc ) %] + [% END %] + [% loc('Select which type of alert you\'d like and click the button for an RSS feed, or enter your email address to subscribe to an email alert.') %] + </p> + + [% INCLUDE 'errors.html' %] + + <p> + [% loc('The simplest alert is our geographic one:') %] + </p> + + <p id="rss_local"> + <input type="radio" name="feed" id="[% rss_feed_id %]" value="[% rss_feed_id %]"[% IF rss_feed_id == selected_feed || selected_feed == '' %] checked[% END %]> + <label for="[% rss_feed_id %]">[% tprintf( loc('Problems within %.1fkm of this location'), population_radius ) %]</label> + [% loc('(a default distance which covers roughly 200,000 people)') %] <a href='[% rss_feed_uri %]'> + <img src='/i/feed.png' width='16' height='16' title='[% loc('RSS feed of nearby problems') %]' alt='[% loc('RSS feed') %]' border='0'></a> + </p> + + <p id="rss_local_alt"> + [% loc('(alternatively the RSS feed can be customised, within') %] + <a href="[% rss_feed_2k %]">2km</a> / <a href="[% rss_feed_5k %]">5km</a> / <a href="[% rss_feed_10k %]">10km</a> / <a href="[% rss_feed_20k %]">20km</a>) + </p> + + <p> + [% loc("Or you can subscribe to an alert based upon what ward or council you’re in:") %] + </p> + + [% IF reported_to_options %] + <div id="rss_list"> + <p><strong> + [% loc('Problems within the boundary of:') %] + </strong></p> + <ul> + [% ELSE %] + <div><ul id="rss_feed"> + [% END %] + + [% FOREACH option IN options %] + <li> + <input type="radio" name="feed" id="[% option.id %]" value="[% option.id %]"[% IF option.id == selected_feed %] checked[% END %]> + <label 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> + [% IF reported_to_options %] + <p><strong> + [% loc('Or problems reported to:') %] + </strong></p> + <ul> + [% FOREACH option IN reported_to_options %] + <li> + <input type="radio" name="feed" id="[% option.id %]" value="[% option.id %]"[% IF option.id == selected_feed %] checked[% END %]> + <label 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><small> + [% loc( 'FixMyStreet sends different categories of problem +to the appropriate council, so problems within the boundary of a particular council +might not match the problems sent to that council. For example, a graffiti report +will be sent to the district council, so will appear in both of the district +council’s alerts, but will only appear in the "Within the boundary" alert +for the county council.' ) %] + </small></p> +</div> +<div id="rss_buttons"> + [% END %] + + <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> <!-- ???? --> + </form> + +[% INCLUDE 'footer.html' %] diff --git a/templates/web/default/alert/updates.html b/templates/web/default/alert/updates.html new file mode 100644 index 000000000..76b5ef23e --- /dev/null +++ b/templates/web/default/alert/updates.html @@ -0,0 +1,22 @@ +[% title = loc('Local RSS feeds and email alerts') %] + +[% INCLUDE 'header.html', title => title %] + + +[% INCLUDE 'errors.html' %] + +<p> +[% loc('Receive email when updates are left on this problem.') %] +</p> + +<form action="/alert/subscribe" method="post"> +<label class="n" for="alert_rznvy">[% loc('Email:') %]</label> +<input type="email" name="rznvy" id="alert_rznvy" value="[% email | html %]" size="30"> +<input type="hidden" name="id" value="[% problem_id | html %]"> +<input type="hidden" name="type" value="updates"> +<input type="submit" value="[% loc('Subscribe') %]"> +[% cobrand_form_elements %] +</form> + + +[% INCLUDE 'footer.html' %] diff --git a/templates/web/default/around/around_index.html b/templates/web/default/around/around_index.html new file mode 100644 index 000000000..8c144e469 --- /dev/null +++ b/templates/web/default/around/around_index.html @@ -0,0 +1,50 @@ +[% 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. +%] + +[% + question + = c.cobrand.enter_postcode_text() + || loc("Enter a nearby GB postcode, or street name and area"); +%] + +<form action="[% c.uri_for('/around') %]" method="get" name="postcodeForm" id="postcodeForm"> + <label for="pc">[% question %]:</label> <input type="text" name="pc" value="[% pc | html %]" id="pc" size="10" maxlength="200"> <input type="submit" value="[% loc('Go') %]" id="submit"> +[% c.cobrand.form_elements('postcodeForm') %] + +[% IF partial_token %] + <input type="hidden" name="partial" value="[% partial_token.token %]"> +[% END %] + +</form> + +[% IF location_offshore %] + <p class="error">[% loc('That spot does not appear to be covered by a council. If you have tried to report an issue past the shoreline, for example, please specify the closest point on land.') %]</p> +[% ELSIF 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?pc=[% match | uri %]">[% match | html %]</a></li> + [% END %] + </ul> +[% END %] + +[% IF partial_token %] + <p style="margin-top: 0; color: #cc0000;"> + <img align="right" src="/photo?id=[% report.id %]" 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 'footer.html' %] diff --git a/templates/web/default/around/around_map_list_items.html b/templates/web/default/around/around_map_list_items.html new file mode 100644 index 000000000..a98f25dbe --- /dev/null +++ b/templates/web/default/around/around_map_list_items.html @@ -0,0 +1,16 @@ +[% IF around_map.size %] + [% FOREACH p IN around_map %] + + [% dist = tprintf("%.1f", (p.distance || 0) ) %] + + <li> + <a href="[% c.uri_for('/report', p.problem.id ) %]">[% p.problem.title | html %]</a> + <small>[% prettify_epoch( p.problem.confirmed_local.epoch, 1 ) %], [% dist %]km</small> + [% IF p.problem.state == 'fixed' %] + <small>[% loc('(fixed)') %]</small> + [% END %] + </li> + [% END %] +[% ELSE %] + <li>[% loc('No problems found.') %]</li> +[% END %] diff --git a/templates/web/default/around/display_location.html b/templates/web/default/around/display_location.html new file mode 100755 index 000000000..395054645 --- /dev/null +++ b/templates/web/default/around/display_location.html @@ -0,0 +1,124 @@ +[% + + 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 ], + robots => 'noindex,nofollow'; +%] + +<form action="[% c.uri_for('/report/new') %]" method="post" name="mapForm" id="mapForm"> +[% 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 %]"> +[% c.cobrand.form_elements('mapForm') %] + +<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' %] + | + [% 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 stale reports') %]</a> + [% ELSE %] + <a id='all_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => undef, all_pins => 1 } ) %]'>[% loc('Include stale reports') %]</a> + [% END %] + [% END %] +</p> + +</div> +<div id="side"> + +<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> + +[% IF location_error %] + <ul class="error"> + <li>[% location_error | html %]</li> + </ul> +[% END %] + +<p id="text_map"> + [% loc( 'To report a problem, simply <strong>click on the map</strong> 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 + ) + %] +</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> +</form> + +[% INCLUDE 'footer.html' %] diff --git a/templates/web/default/around/on_map_list_items.html b/templates/web/default/around/on_map_list_items.html new file mode 100644 index 000000000..2db7d00d2 --- /dev/null +++ b/templates/web/default/around/on_map_list_items.html @@ -0,0 +1,13 @@ +[% IF on_map.size %] + [% FOREACH p IN on_map %] + <li> + <a href="[% c.uri_for('/report', p.id ) %]">[% p.title | html %]</a> + <small>[% prettify_epoch( p.confirmed_local.epoch, 1 ) %]</small> + [% IF p.state == 'fixed' %] + <small>[% loc('(fixed)') %]</small> + [% END %] + </li> + [% END %] +[% ELSE %] + <li>[% loc('No problems have been reported yet.') %]</li> +[% END %] diff --git a/templates/web/default/auth/change_password.html b/templates/web/default/auth/change_password.html new file mode 100644 index 000000000..be7c14e43 --- /dev/null +++ b/templates/web/default/auth/change_password.html @@ -0,0 +1,43 @@ +[% INCLUDE 'header.html', title = loc('Change Password') %] + +<h1>[% loc('Change Password') %]</h1> + +[% IF password_changed %] + <p id="fixed">[% loc('Your password has been changed') %]</p> +[% END %] + + +<form action="[% c.uri_for('change_password') %]" method="post" name="change_password"> + + <div id="fieldset"> + + [% IF password_error; + + errors = { + missing => loc('Please enter a password'), + mismatch => loc('The passwords do not match'), + other => loc('Please check the passwords and try again'), + }; + + loc_password_error = errors.$password_error || errors.other; %] + <div class="form-error">[% loc_password_error %]</div> + [% END %] + + <div class="form-field"> + <label for="new_password">[% loc('Password:') %]</label> + <input type="password" name="new_password" value="[% new_password | html %]"> + </div> + <div class="form-field"> + <label for="confirm">[% loc('Again:') %]</label> + <input type="password" name="confirm" value="[% confirm | html %]"> + </div> + <div class="checkbox"> + <input type="submit" value="[% loc('Change Password') %]"> + </div> + + </div> + +</form> + + +[% INCLUDE 'footer.html' %] diff --git a/templates/web/default/auth/general.html b/templates/web/default/auth/general.html new file mode 100644 index 000000000..234aadf52 --- /dev/null +++ b/templates/web/default/auth/general.html @@ -0,0 +1,84 @@ +[% 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"> +<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 %] + + [% 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. Passwords and user accounts are a brand <strong>new</strong> service, so you probably do not have one yet – please fill in the right hand side of this form to get one.') %]</div> + [% END %] + + <div class="form-field"> + <label class="n" for="email">[% loc('Your email address:') %]</label> + <input type="email" size="30" id="email" name="email" value="[% email | html %]"> + </div> + +<div id="form_sign_in"> + <h3>[% loc("Do you have a FixMyStreet password?") %]</h3> + + <div id="form_sign_in_yes"> + + <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=""> + </p> + + <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="sign_in" value="[% loc('Sign in') %]"> + </p> + + </div> + <div id="form_sign_in_no"> + + <p>[% loc('<strong>No</strong>, I do not, let me sign in by email:') %]</p> + + <div id="fieldset"> + <div class="form-field"> + <label for="name">[% loc('Your name:') %]</label> + <input type="text" name="name" value=""> + </div> + + <div class="form-field"> + <label for="password_register">[% loc('Enter a new password:') %]</label> + <input type="password" name="password_register" id="password_register" value=""> + </div> + </div> + + <p><small>Providing a name and 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="email_sign_in" value="[% loc('Sign in by email') %]"> + </p> + + </div> + +</div> + +</form> + + +[% INCLUDE 'footer.html' %] diff --git a/templates/web/default/auth/sign_out.html b/templates/web/default/auth/sign_out.html new file mode 100644 index 000000000..3d8df60e4 --- /dev/null +++ b/templates/web/default/auth/sign_out.html @@ -0,0 +1,8 @@ +[% INCLUDE 'header.html', title => loc('Sign out') %] + +<h1>[% loc('You have been signed out') %]</h1> + +<p>Please feel free to <a href="[% c.uri_for('/auth') %]">sign in again</a>.</p> + + +[% INCLUDE 'footer.html' %] diff --git a/templates/web/default/auth/token.html b/templates/web/default/auth/token.html new file mode 100644 index 000000000..0f44d1074 --- /dev/null +++ b/templates/web/default/auth/token.html @@ -0,0 +1,27 @@ +[% INCLUDE 'header.html', title => loc('Confirm account') %] + +[% IF token_not_found %] + +<h1>[% loc('Error') %]</h1> + +<p>We have not been able to confirm your account - sorry. This may be because:</p> + +<ul> + <li>Link too old or already used</li> + <li>URL not copied correctly</li> + [%# FIXME - add more reasons here %] +</ul> + +[% ELSE %] + +<h1>[% loc('Please check your email') %]</h1> + +<p>[% loc("We have sent you an email containing a link to confirm your account.") %]</p> + +<p>[% loc("The confirmation email <strong>may</strong> take a few minutes to arrive — <em>please</em> be patient.") %]</p> + +<p>[% loc("If you use web-based email or have 'junk mail' filters, you may wish to check your bulk/spam mail folders: sometimes, our messages are marked that way.") %]</p> + +[% END %] + +[% INCLUDE 'footer.html' %] diff --git a/templates/web/default/common_header_tags.html b/templates/web/default/common_header_tags.html new file mode 100644 index 000000000..f9048b067 --- /dev/null +++ b/templates/web/default/common_header_tags.html @@ -0,0 +1,20 @@ +<meta http-equiv="content-type" content="text/html; charset=utf-8"> +<script type="text/javascript" src="/jslib/jquery-1.6.2.min.js"></script> +<script type="text/javascript" src="/js/fixmystreet.js"></script> + +[% map_js %] + +[% IF robots %] + <meta name="robots" content="[% robots %]"> +[% ELSIF c.config.STAGING_SITE %] + <meta name="robots" content="noindex,nofollow"> +[% END %] + +[% IF rss %] + <link rel="alternate" type="application/rss+xml" title="[% rss.0 %]" href="[% rss.1 %]"> +[% END %] + +<title> + [% "$title :: " | html IF title %] + [% c.cobrand.site_title %] +</title> diff --git a/templates/web/default/contact/address.html b/templates/web/default/contact/address.html new file mode 100644 index 000000000..b7ff37e5c --- /dev/null +++ b/templates/web/default/contact/address.html @@ -0,0 +1,11 @@ +<div class="contact-details"> +<p>FixMyStreet is a service provided by mySociety, which is the project of a +registered charity. The charity is called UK Citizens Online Democracy and is charity number 1076346.</p> +<p>mySociety can be contacted by email at <a href="mailto:hello@mysociety.org">hello@mysociety.org</a>, +or by post at:</p> +<p>mySociety<br> +483 Green Lanes<br> +London<br> +N13 4BS<br> +UK</p> +</div> diff --git a/templates/web/default/contact/blurb.html b/templates/web/default/contact/blurb.html new file mode 100644 index 000000000..22c9a3cef --- /dev/null +++ b/templates/web/default/contact/blurb.html @@ -0,0 +1,9 @@ +<p> +[% loc('Please do <strong>not</strong> report problems through this form; messages go to +the team behind FixMyStreet, not a council. To report a problem, +please <a href="/">go to the front page</a> and follow the instructions.') %] +</p> + +<p> +[% tprintf( loc("We'd love to hear what you think about this site. Just fill in the form, or send an email to <a href='mailto:%s'>%s</a>:"), contact_email, contact_email) %] +</p> diff --git a/templates/web/default/contact/index.html b/templates/web/default/contact/index.html new file mode 100644 index 000000000..dc64dd554 --- /dev/null +++ b/templates/web/default/contact/index.html @@ -0,0 +1,101 @@ +[% INCLUDE 'header.html', + title = loc('Contact Us') + robots = 'noindex,nofollow' +%] + +<h1>[% loc('Contact the team') %]</h1> + +<form method="post" action="/contact/submit"> + +[% INCLUDE 'errors.html' %] + +[% IF update %] + + <p> + [% loc('You are reporting the following update for being abusive, containing personal information, or similar:') %] + </p> + + <blockquote> + <p> + [% IF update.anonymous %] + [% tprintf( loc('Update below added anonymously at %s'), prettify_epoch( update.confirmed_local.epoch ) ) %] + [% ELSE %] + [% tprintf( loc('Update below added by %s at %s'), update.name, prettify_epoch( update.confirmed_local.epoch ) ) | html %] + [% END %] + </p> + + <p> + [% update.text | html %] + </p> + + </blockquote> + <input type="hidden" name="update_id" value="[% update.id %]"> + <input type="hidden" name="id" value="[% update.problem_id %]"> + +[% ELSIF problem %] + <p> + [% loc('You are reporting the following problem report for being abusive, containing personal information, or similar:') %] + </p> + + <blockquote> + <h2>[% problem.title | html %]</h2> + + <p> + [% IF problem.anonymous %] + [% tprintf( loc('Reported anonymously at %s'), prettify_epoch( problem.confirmed_local.epoch ) ) %] + [% ELSE %] + [% tprintf( loc('Reported by %s at %s'), problem.user.name, prettify_epoch( problem.confirmed_local.epoch ) ) | html %] + [% END %] + </p> + + <p> + [% problem.detail | html %] + </p> + + </blockquote> + <input type="hidden" name="id" value="[% problem.id %]"> + +[% ELSE %] + + [% INCLUDE 'contact/blurb.html' %] + +[% END %] + +[% IF field_errors.name %] + <div class="form-error">[% field_errors.name %]</div> +[% END %] +<div class="form-field"> +<label for="form_name">[% loc('Your name:') %]</label> +<input type="text" name="name" id="form_name" value="[% form_name | html %]" size="30"></div> + + +[% IF field_errors.em %] + <div class="form-error">[% field_errors.em %]</div> +[% END %] +<div class="form-field"> +<label for="form_email">[% loc('Your email:') %]</label> +<input type="text" name="em" id="form_email" value="[% em | html %]" size="30"></div> + +[% IF field_errors.subject %] + <div class="form-error">[% field_errors.subject %]</div> +[% END %] +<div class="form-field"> +<label for="form_subject">[% loc('Subject:') %]</label> +<input type="text" name="subject" id="form_subject" value="[% subject | html %]" size="30"></div> + +[% IF field_errors.message %] + <div class="form-error">[% field_errors.message %]</div> +[% END %] +<div class="form-field"> +<label for="form_message">[% loc('Message:') %]</label> + +<textarea name="message" id="form_message" rows="7" cols="50">[% message | html %]</textarea></div> +<div class="checkbox"><input type="submit" value="[% loc('Post') %]"></div> + +[% c.cobrand.form_elements('contactForm') %] + +</form> + +[% INCLUDE 'contact/address.html' %] + +[% INCLUDE 'footer.html' %] diff --git a/templates/web/default/contact/submit.html b/templates/web/default/contact/submit.html new file mode 100644 index 000000000..3845e9210 --- /dev/null +++ b/templates/web/default/contact/submit.html @@ -0,0 +1,20 @@ +[% INCLUDE 'header.html', title = loc('Contact Us') %] + +<h1>[% loc('Contact the team') %]</h1> + +[% IF success %] + + <p> + [% loc("Thanks for your feedback. We'll get back to you as soon as we can!") %] + </p> + [% display_crosssell_advert( em, form_name, 'emailunvalidated', 1 ) %] + +[% ELSE %] + + <p> + [% tprintf( loc('Failed to send message. Please try again, or <a href="mailto:%s">email us</a>.'), contact_email ) %] + </p> + +[% END %] + +[% INCLUDE 'footer.html' %] diff --git a/templates/web/default/debug_footer.html b/templates/web/default/debug_footer.html new file mode 100644 index 000000000..ffb3abbab --- /dev/null +++ b/templates/web/default/debug_footer.html @@ -0,0 +1,40 @@ +[% IF c.config.STAGING_SITE %] + +<hr style="clear: both;"> + +<ul> + <li>cobrand.moniker: [% c.cobrand.moniker %]</li> + <li>additional_template_paths: [% additional_template_paths.join(', ') || '--empty--' %]</li> + <li>lang_code: [% lang_code %]</li> + <li>user.id: [% c.user.id || '--not logged in--' %]</li> +</ul> + +<style type="text/css"> + #overrides_form { + font-size: 80%; + } + #overrides_form label { + float: left; + text-align: right; + padding-right: 0.5em; + width: 12em; + } + +</style> + +<!-- Use a post so that we don't clutter up the url --> +<form action="" method="post" id="overrides_form" name="overrides_form"> + + <label for="_override_clear_all">Clear all overrides:</label> + <input type="checkbox" name="_override_clear_all" id="_override_clear_all" value="1"><br> + + [% FOREACH k IN ['cobrand_moniker', 'lang'] %] + <label for="override_[% k %]">[% k %]:</label> + <input type="text" name="_override_[% k %]" id="override_[% k %]" value="[% c.get_override(k)%]"><br> + [% END %] + + <label> </label><input type="submit" value="Change overrides"> +</form> + +[% END %] + diff --git a/templates/web/default/debug_header.html b/templates/web/default/debug_header.html new file mode 100644 index 000000000..1468d171c --- /dev/null +++ b/templates/web/default/debug_header.html @@ -0,0 +1,5 @@ +[% IF c.config.STAGING_SITE %] + <p class="dev-site-notice"> + [% loc("This is a developer site; things might break at any time, and the database will be periodically deleted.") %] + </p> +[% END %] diff --git a/templates/web/default/email_sent.html b/templates/web/default/email_sent.html new file mode 100644 index 000000000..fd947022a --- /dev/null +++ b/templates/web/default/email_sent.html @@ -0,0 +1,30 @@ +[% INCLUDE 'header.html', title => loc('Create a report') %] + +[% + messages = { + problem => { + action => loc('your problem will not be posted'), + worry => loc("we'll hang on to your problem report while you're checking your email."), + }, + update => { + action => loc('your update will not be posted'), + worry => loc("we'll hang on to your update while you're checking your email."), + }, + alert => { + action => loc('your alert will not be activated'), + worry => loc("we'll hang on to your alert while you're checking your email."), + }, + } +%] + +<h1>[% loc("Nearly Done! Now check your email...") %]</h1> + +<p>[% loc("The confirmation email <strong>may</strong> take a few minutes to arrive — <em>please</em> be patient.") %]</p> + +<p>[% loc("If you use web-based email or have 'junk mail' filters, you may wish to check your bulk/spam mail folders: sometimes, our messages are marked that way.") %]</p> + +<p>[% tprintf( loc("You must now click the link in the email we've just sent you — if you do not, %s."), messages.$email_type.action ) %].</p> + +<p>[% tprintf( loc("(Don't worry — %s)"), messages.$email_type.worry ) %]</p> + +[% INCLUDE 'footer.html' %] diff --git a/templates/web/default/errors.html b/templates/web/default/errors.html new file mode 100644 index 000000000..e0f484ba5 --- /dev/null +++ b/templates/web/default/errors.html @@ -0,0 +1,5 @@ +[% FOREACH error IN errors %] + [% '<ul class="error">' IF loop.first %] + <li>[% error %]</li> + [% '</ul>' IF loop.last %] +[% END %] diff --git a/templates/web/default/errors/generic.html b/templates/web/default/errors/generic.html new file mode 100755 index 000000000..12aa8e170 --- /dev/null +++ b/templates/web/default/errors/generic.html @@ -0,0 +1,8 @@ +[% INCLUDE 'header.html', title = loc('Error') %] + +<h1>[% loc('Error') %]</h1> + +<p>[% message %]</p> + +[% INCLUDE 'footer.html' %] + diff --git a/templates/web/default/errors/page_error_404_not_found.html b/templates/web/default/errors/page_error_404_not_found.html new file mode 100644 index 000000000..77db18e89 --- /dev/null +++ b/templates/web/default/errors/page_error_404_not_found.html @@ -0,0 +1,20 @@ +[% INCLUDE 'header.html', title => loc('Page Not Found') %] + +<h1>[%loc('Page Not Found') %]</h1> + +[% IF error_msg %] + <p class="error">[% error_msg | html %]</p> +[% END %] + +<p> + [% + tprintf( + loc("The requested URL '%s' was not found on this server"), + c.req.uri + ) + %] +</p> + +[% # FIXME - add more helpful suggestions to this page %] + +[% INCLUDE 'footer.html' %] diff --git a/templates/web/default/faq/faq-en-gb.html b/templates/web/default/faq/faq-en-gb.html new file mode 100755 index 000000000..930a4c045 --- /dev/null +++ b/templates/web/default/faq/faq-en-gb.html @@ -0,0 +1,212 @@ +[% INCLUDE 'header.html', title => loc('Frequently Asked Questions') %] + +<h1>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 your 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 your 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>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 relevant 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><ul> + <li><em>iPhone:</em> There are two apps for FixMyStreet, one written by us + in 2008 and another much more recently by a volunteer, Martin Stephenson. + Both are available for download on the App Store: + <a href="http://itunes.apple.com/gb/app/fixmystreet/id297456545">FixMyStreet</a>, + <a href="http://itunes.apple.com/gb/app/streetreport/id371891859">StreetReport</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> + <p>We also hope to make the website itself much more mobile friendly in the future.</p> + </dd> + + <dt>Why do you only cover the countries of Great Britain?</dt> + <dd>We would love to cover Northern Ireland, but as we were funded for + FixMyStreet by the Department for Constitutional Affairs (now the Ministry + of Justice), we were covered for Ordnance Survey data (but not OSNI data) + by the Pan-Governmental Agreement. The cost for these maps would be + prohibitively expensive for the small charity that we are – if you know of + any way we could get access to the Ordnance Survey for Northern Ireland's + maps so that we can add them to the site, that'd be great.</dd> + </dl> + + <h2>Practical Questions</h2> + <dl> + <dt>I’m from a council, where do you send the reports?</dt> + <dd>You can either leave a test report or <a href="/contact">contact us</a> +to find out where reports go at the moment. Also <a href="/contact">contact us</a> +to update the address or addresses we use.</dd> + <dt>I’m from a council, can we have FixMyStreet on our website?</dt> + <dd>Yes you can! We offer branded, hosted versions of FixMyStreet for local council websites. <a href="http://www.mysociety.org/fixmystreet-for-local-council-websites/">Full details</a>.</dd> + <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 doesn’t dragging the map work on reporting-a-problem pages in Safari or Konqueror?</dt> + <dd>There’s a bug in these two browsers to do with setting images on form +submit buttons, which the map uses when reporting a problem. It’s fixed in the +latest nightly build of Safari, so will presumably be fixed in the next +release. Until then, I’ve sadly had to disable dragging to avoid people +dragging an empty square.</dd> + <dt>Why isn’t there a zoom button on the map?</dt> + <dd>There isn’t a zoom on the map as we want to keep things very local; + this might mean that you’ll need to pan around to figure out where the + problem is if you’re not familiar with the area. If you’re from the + council then the emailed version of the problem report will contain the + closest road 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="privacy"></a>Privacy Questions</h2> + <dl> + <dt>Who gets to see my email address?</dt> + <dd>If you submit a problem, we pass on your details, and details +of the problem, to the council contact or contacts responsible for the +area where you located the problem. Other than the council, who obviously get your +email address, only people we authorise to view the FixMyStreet administration interface +will be able to see your email address and they will never use it for anything other than +to help administer FixMyStreet. Similarly with email addresses from updates. We will never give or sell your email address to anyone else, +unless we are obliged to by law. Your name will not be published anywhere unless you let us.</dd> + <dt>Will you send nasty, brutish spam to my email address?</dt> + <dd>Never. We will email you if someone leaves an update on a +problem you’ve reported, and send you a questionnaire email four weeks +after you submit a problem, asking for a status update; we’ll only ever +send you emails in relation to your problem.</dd> + </dl> + <h2>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:<br> +mySociety<br> +483 Green Lanes<br> +London<br> +N13 4BS<br> +UK</dd> + <dt><img src="/i/moj.png" align="right" alt="Ministry of Justice" hspace="10">Who pays for it?</dt> + <dd>FixMyStreet was paid for via the Department for +Constitutional Affairs Innovations Fund.</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.m247.com/">M247</a> (who kindly host all +our servers). + +Let us know if we’ve missed anyone.</dd> + </dl> + +[% INCLUDE 'footer.html' %] diff --git a/templates/web/default/footer.html b/templates/web/default/footer.html new file mode 100644 index 000000000..657d9d826 --- /dev/null +++ b/templates/web/default/footer.html @@ -0,0 +1,26 @@ +</div> +</div> + +<h2 class="v">[% loc('Navigation') %]</h2> +<ul id="navigation"> +<li><a href="/">[% loc("Report a problem") %]</a></li> +<li id="nav_new"><a href="/my">[% loc("Your reports") %]</a></li> +<li><a href="/reports">[% loc("All reports") %]</a></li> +<li><a href="/alert[% pc ? '/list?pc=' : '' %][% pc | uri %]">[% loc("Local alerts") %]</a></li> +<li><a href="/faq">[% loc("Help") %]</a></li> +</ul> + +[% loc('<a href="http://www.mysociety.org/"><img id="logo" width="133" height="26" src="/i/mysociety-dark.png" alt="View mySociety.org"><span id="logoie"></span></a>') %] + +<p id="footer"> + [% loc('Built by <a href="http://www.mysociety.org/">mySociety</a>') %] + | <a href="http://github.com/mysociety/fixmystreet">[% loc('Source code') %]</a> + | <a href="/contact">[% loc("Contact FixMyStreet") %]</a> +</p> + +[% INCLUDE 'tracking_code.html' %] + +[% INCLUDE 'debug_footer.html' %] + +</body> +</html> diff --git a/templates/web/default/front/news.html b/templates/web/default/front/news.html new file mode 100644 index 000000000..080034a28 --- /dev/null +++ b/templates/web/default/front/news.html @@ -0,0 +1,11 @@ +[%# + news = [ + { date = '2008-12-11', text = '<a href="' _ c.config.IPHONE_URL _ '">' _ loc('Get FixMyStreet on your iPhone') _ '</a>' }, + ] +%] +[% FOREACH item IN news %] + <p align="center" style="margin-bottom:0"> + <img width="23" height="12" alt="[% loc('New!') %]" src="/i/new.png" border="0">[% item.date %] [% item.text %]</p> + </p> +[% END %] + diff --git a/templates/web/default/front/stats.html b/templates/web/default/front/stats.html new file mode 100644 index 000000000..4b98ef31e --- /dev/null +++ b/templates/web/default/front/stats.html @@ -0,0 +1,46 @@ +[% + USE Comma; + # Note - if we want to i18n the commas we should try + # 'Template::Plugin::Number::Format' +%] + +<h2>[% loc('FixMyStreet updates') %]</h2> + +[% + stats = c.cobrand.front_stats_data(); + + new_text = + stats.recency == '1 week' + ? nget( + "<big>%s</big> report in past week", + "<big>%s</big> reports in past week", + stats.new + ) + : nget( + "<big>%s</big> report recently", + "<big>%s</big> reports recently", + stats.new + ); + + fixed_text = nget( + "<big>%s</big> fixed in past month", + "<big>%s</big> fixed in past month", + stats.fixed + ); + + updates_text = nget( + "<big>%s</big> update on reports", + "<big>%s</big> updates on reports", + stats.updates + ); + +%] + +<div id="front_stats"> + <div>[% tprintf( new_text, stats.new ) | comma %]</div> + [% IF c.cobrand.moniker != 'emptyhomes' %] + <div>[% tprintf( fixed_text, stats.fixed ) | comma %]</div> + [% END %] + <div>[% tprintf( updates_text, stats.updates ) | comma %]</div> +</div> + diff --git a/templates/web/default/header.html b/templates/web/default/header.html new file mode 100644 index 000000000..431e6db65 --- /dev/null +++ b/templates/web/default/header.html @@ -0,0 +1,34 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html lang="[% lang_code %]"> + <head> + + [% INCLUDE 'common_header_tags.html' %] + + <style type="text/css">@import url("/css/core.css"); @import url("/css/main.css");</style> + <!--[if LT IE 7]> + <style type="text/css">@import url("/css/ie6.css");</style> + <![endif]--> + + [% IF c.req.uri.host == 'osm.fixmystreet.com' %] + <link rel="canonical" href="http://www.fixmystreet.com[% c.req.uri.path_query %]"> + [% END %] + + </head> + <body> + + [% IF NOT title AND NOT c.req.path %]<h1 id="header">[% ELSE %]<div id="header"><a href="/">[% END %] + [%- loc('Fix<span id="my">My</span>Street') %] + [%- IF NOT title AND NOT c.req.path %]</h1>[% ELSE %]</a></div>[% END %] + + <ul id="meta"> + [% IF c.user_exists %] + <li>[% tprintf(loc('Signed in as %s'), c.user.name || c.user.email) %] + <li><a href="/auth/sign_out">[% loc('Sign out') %]</a></li> + [% ELSE %] + <li> </li> + [% END %] + </ul> + + <div id="wrapper"><div id="mysociety"> + + [% INCLUDE 'debug_header.html' %] diff --git a/templates/web/default/index.html b/templates/web/default/index.html new file mode 100644 index 000000000..131701b0e --- /dev/null +++ b/templates/web/default/index.html @@ -0,0 +1,85 @@ +[% INCLUDE 'header.html', title => '' %] + +[% IF error %] + <p class="error">[% error %]</p> +[% END %] + +<p id="expl"> + [% + subhead + = c.cobrand.moniker == 'southampton' + ? '(like graffiti, fly tipping, or broken paving slabs)' + : loc('(like graffiti, fly tipping, broken paving slabs, or street lighting)'); + %] + + <strong>[% loc('Report, view, or discuss local problems') %]</strong> + + [% IF subhead != ' ' %] + <br><small>[% subhead %]</small> + [% END %] +</p> + +[% TRY %][% INCLUDE 'front/news.html' %][% CATCH file %][% END %] + +[% + question + = c.cobrand.enter_postcode_text() + || loc("Enter a nearby GB postcode, or street name and area"); +%] + +<form action="[% c.uri_for('/around') %]" method="get" name="postcodeForm" id="postcodeForm"> + <label for="pc">[% question %]:</label> + <input type="text" name="pc" value="" id="pc" size="10" maxlength="200"> + <input type="submit" value="[% loc('Go') %]" id="submit"> + [% c.cobrand.form_elements('postcodeForm') %] +</form> + + +<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 %] + +</div> + +[% + recent_photos = c.cobrand.recent_photos(3); + probs = c.cobrand.recent(); +%] + + +[% IF probs.size || recent_photos.size %] +<div id="front_recent"> + [% IF recent_photos.size %] + <h2>[% loc('Photos of recent reports') %]</h2> + [% FOREACH p IN recent_photos %] + <a href="/report/[% p.id %]"><img border="0" height="100" + src="/photo?tn=1;id=[% p.id %]" alt="[% p.title | html %]" title="[% p.title | html %]"></a> + [% END %] + [% END %] + + [% IF probs.size %] + + <h2>[% loc('Recently reported problems') %]</h2> + + <ul> + [% FOREACH p IN probs %] + <li> + <a href="/report/[% p.id %]">[% p.title | html %]</a> + </li> + [% END %] + </ul> + [% END %] +</div> +[% END %] + +[% INCLUDE 'footer.html' %] diff --git a/templates/web/default/maps/bing.html b/templates/web/default/maps/bing.html new file mode 100644 index 000000000..6b7114199 --- /dev/null +++ b/templates/web/default/maps/bing.html @@ -0,0 +1,18 @@ +[% map_js = BLOCK %] +<script type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0&mkt=en-GB"></script> +<script type="text/javascript" src="/js/map-bing.js"></script> +[% END %] + +[% map_html = BLOCK %] +<script type="text/javascript"> +var fixmystreet = { + 'key': '[% map.key %]', + 'latitude': [% map.latitude %], + 'longitude': [% map.longitude %], + 'pins': [% INCLUDE maps/pins_js.html %] +} +</script> +<div id="map_box"> + [% pre_map %] + <div id="map"></div> +[% END %] diff --git a/templates/web/default/maps/fms.html b/templates/web/default/maps/fms.html new file mode 100644 index 000000000..6e6d747bf --- /dev/null +++ b/templates/web/default/maps/fms.html @@ -0,0 +1,14 @@ +[% map_js = BLOCK %] +<!-- <script type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0&mkt=en-GB"></script> --> +<script type="text/javascript" src="/jslib/OpenLayers-2.10/OpenLayers.js"></script> +<script type="text/javascript" src="/js/map-OpenLayers.js"></script> +<script type="text/javascript" src="/js/map-bing-ol.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/default/maps/google.html b/templates/web/default/maps/google.html new file mode 100644 index 000000000..2e326734b --- /dev/null +++ b/templates/web/default/maps/google.html @@ -0,0 +1,17 @@ +[% map_js = BLOCK %] +<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> +<script type="text/javascript" src="/js/map-google.js"></script> +[% END %] + +[% map_html = BLOCK %] +<script type="text/javascript"> +var fixmystreet = { + 'latitude': [% map.latitude %], + 'longitude': [% map.longitude %], + 'pins': [% INCLUDE maps/pins_js.html %] +} +</script> +<div id="map_box"> + [% pre_map %] + <div id="map"></div> +[% END %] diff --git a/templates/web/default/maps/openlayers.html b/templates/web/default/maps/openlayers.html new file mode 100644 index 000000000..b84799fdd --- /dev/null +++ b/templates/web/default/maps/openlayers.html @@ -0,0 +1,94 @@ +[% IF map.clickable %] + [% map.img_type = 'input type="image"' %] +[% ELSE %] + [% map.img_type = 'img' %] +[% END %] + +<input type="hidden" name="zoom" value="[% map.zoom %]"> +<script type="text/javascript"> +var fixmystreet = { + 'page': '[% page %]', + 'area': '[% map.area %]', + 'all_pins': [% all_pins || "''" | html %], + 'latitude': [% map.latitude %], + 'longitude': [% map.longitude %], +[% IF map.any_zoom -%] + 'zoomToBounds': 1, +[%- END %] +[% IF map.zoom -%] + 'zoom': [% map.zoom %], +[%- END %] + 'numZoomLevels': [% map.numZoomLevels %], + 'zoomOffset': [% map.zoomOffset %], + 'map_type': [% map.map_type %], + 'pins': [% INCLUDE maps/pins_js.html %] +} +</script> +<div id="map_box"> + [% pre_map %] + <div id="map"><noscript> + <div id="drag"><[% map.img_type %] + alt="NW map tile" id="t2.2" + name="tile_[% map.x_tile - 1 %].[% map.y_tile - 1 %]" + src="[% map.tiles.0 %]" + style="top:0; left:0;"><[% map.img_type %] + alt="NE map tile" id="t2.3" + name="tile_[% map.x_tile %].[% map.y_tile - 1 %]" + src="[% map.tiles.1 %]" + style="top:0px; left:256px;"><br><[% map.img_type %] + alt="SW map tile" id="t3.2" + name="tile_[% map.x_tile - 1 %].[% map.y_tile %]" + src="[% map.tiles.2 %]" + style="top:256px; left:0;"><[% map.img_type %] + alt="SE map tile" id="t3.3" + name="tile_[% map.x_tile %].[% map.y_tile %]" + src="[% map.tiles.3 %]" + style="top:256px; left:256px;"></div> + <div id="pins">[% FOR pin IN map.pins %][% INCLUDE pin %][% END %]</div> + [% INCLUDE compass %] + </noscript></div> + <p id="copyright"> + [% map.copyright %] + </p> + + +[% BLOCK compass %] +[% + north = c.uri_with( { lat = map.compass.north.0, lon = map.compass.north.1, zoom = map.zoom } ) + south = c.uri_with( { lat = map.compass.south.0, lon = map.compass.south.1, zoom = map.zoom } ) + east = c.uri_with( { lat = map.compass.east.0, lon = map.compass.east.1, zoom = map.zoom } ) + west = c.uri_with( { lat = map.compass.west.0, lon = map.compass.west.1, zoom = map.zoom } ) + world = c.uri_with( { zoom = 0 } ); + SET zoom_in = c.uri_with( { zoom = map.zoom + 1 } ) IF map.zoom < map.numZoomLevels - 1; + SET zoom_out = c.uri_with( { zoom = map.zoom - 1 } ) IF map.zoom > 0; + SET zoom_in = '#' IF map.zoom >= map.numZoomLevels - 1; + SET zoom_out = '#' IF map.zoom <= 0; +%] +<div style="position: absolute; left: 4px; top: 4px; z-index: 1007;" class="olControlPanZoom olControlNoSelect" unselectable="on"> + <div style="position: absolute; left: 13px; top: 4px; width: 18px; height: 18px;"><a href="[% north %]"><img style="position: relative; width: 18px; height: 18px;" src="/jslib/OpenLayers-2.10/img/north-mini.png" border="0"></a></div> + <div style="position: absolute; left: 4px; top: 22px; width: 18px; height: 18px;"><a href="[% west %]"><img style="position: relative; width: 18px; height: 18px;" src="/jslib/OpenLayers-2.10/img/west-mini.png" border="0"></a></div> + <div style="position: absolute; left: 22px; top: 22px; width: 18px; height: 18px;"><a href="[% east %]"><img style="position: relative; width: 18px; height: 18px;" src="/jslib/OpenLayers-2.10/img/east-mini.png" border="0"></a></div> + <div style="position: absolute; left: 13px; top: 40px; width: 18px; height: 18px;"><a href="[% south %]"><img style="position: relative; width: 18px; height: 18px;" src="/jslib/OpenLayers-2.10/img/south-mini.png" border="0"></a></div> + <div style="position: absolute; left: 13px; top: 63px; width: 18px; height: 18px;"><a href="[% zoom_in %]"><img style="position: relative; width: 18px; height: 18px;" src="/jslib/OpenLayers-2.10/img/zoom-plus-mini.png" border="0"></a></div> + <div style="position: absolute; left: 13px; top: 81px; width: 18px; height: 18px;"><a href="[% world %]"><img style="position: relative; width: 18px; height: 18px;" src="/jslib/OpenLayers-2.10/img/zoom-world-mini.png" border="0"></a></div> + <div style="position: absolute; left: 13px; top: 99px; width: 18px; height: 18px;"><a href="[% zoom_out %]"><img style="position: relative; width: 18px; height: 18px;" src="/jslib/OpenLayers-2.10/img/zoom-minus-mini.png" border="0"></a></div> +</div> +[% END %] + + +[% BLOCK pin %] + +[% cols = { + red = 'R', green = 'G', blue = 'B', purple = 'P', + } +%] +[% IF pin.id %] +<a title="[% pin.title | html %]" href="[% c.uri_for('/report/' _ pin.id) %]"> +[%- END -%] +<img border="0" class="pin" src="[% c.uri_for('/i/pin' _ cols.${pin.colour} _ '.gif') %]" + alt="[% loc('Problem') %]" style="top:[% pin.py - 59 %]px; left:[% pin.px - 2 %]px; position: absolute;"> +[%- IF pin.id -%] +</a> +[% END %] + +[% END %] diff --git a/templates/web/default/maps/osm-streetview.html b/templates/web/default/maps/osm-streetview.html new file mode 100644 index 000000000..9de99c253 --- /dev/null +++ b/templates/web/default/maps/osm-streetview.html @@ -0,0 +1,12 @@ +[% map_js = BLOCK %] +<script type="text/javascript" src="/jslib/OpenLayers-2.10/OpenLayers.js"></script> +<script type="text/javascript" src="/js/map-OpenLayers.js"></script> +<script type="text/javascript" src="/js/map-streetview.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/default/maps/osm.html b/templates/web/default/maps/osm.html new file mode 100644 index 000000000..e2762ee26 --- /dev/null +++ b/templates/web/default/maps/osm.html @@ -0,0 +1,12 @@ +[% map_js = BLOCK %] +<script type="text/javascript" src="/jslib/OpenLayers-2.10/OpenLayers.js"></script> +<script type="text/javascript" src="/js/map-OpenLayers.js"></script> +<script type="text/javascript" src="/js/map-OpenStreetMap.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/default/maps/pins_js.html b/templates/web/default/maps/pins_js.html new file mode 100644 index 000000000..355fffaba --- /dev/null +++ b/templates/web/default/maps/pins_js.html @@ -0,0 +1,4 @@ +[ [% FOR pin IN map.pins -%] + [ [% pin.latitude %], [% pin.longitude %], '[% pin.colour %]', '[% pin.id %]', "[% pin.title | escape_js %]" ] + [%- IF !loop.last %],[% END %] +[% END %] ] diff --git a/templates/web/default/my/my.html b/templates/web/default/my/my.html new file mode 100644 index 000000000..2147ef5f2 --- /dev/null +++ b/templates/web/default/my/my.html @@ -0,0 +1,76 @@ +[% + PROCESS "maps/${map.type}.html" IF problems.size; + INCLUDE 'header.html', title = loc('Your Reports') +%] + +[% IF problems.size %] + [% map_html %] + </div> + <div id="side"> +[% ELSE %] + <div id="skipped-map"> +[% END %] + +<h1>[% loc('Your Reports') %]</h1> + +[% INCLUDE 'pagination.html', + pager = problems_pager, + param = 'p' +%] + +[% FOREACH p = problems.confirmed %] + [% IF loop.first %]<h2>[% loc('Open reports') %]</h2>[% END %] + [% INCLUDE problem %] +[% END %] + +[% FOREACH p = problems.fixed %] + [% IF loop.first %]<h2>[% loc('Fixed reports') %]</h2>[% END %] + [% INCLUDE problem %] +[% END %] + +[%# FOREACH p = problems.unconfirmed; + IF loop.first; + '<h2>' _ loc('Unconfirmed reports') _ '</h2>'; + END; + INCLUDE problem; +END %] + +[% FOREACH u IN updates %] + [% IF loop.first %] + <h2>[% loc('Your updates') %]</h2> + [% INCLUDE 'pagination.html', + pager = updates_pager, + param = 'u' + %] + <ul> + [% END %] + + <li>“[% u.text | html %]” + – <a href="[% c.uri_for( '/report', u.problem_id ) %]#update_[% u.id %]">[% u.problem.title | html %]</a>. + <em class="council_sent_info"> + [% tprintf( loc("Added %s"), prettify_epoch( u.confirmed_local.epoch, 'date' ) ) %] + </em> + </li> + [% "</ul>" IF loop.last %] +[% END %] + +</div> + +[% INCLUDE 'footer.html' %] + +[% BLOCK problem %] + [% "<ul>" IF loop.first %] + + <li><a href="[% c.uri_for( '/report', p.id ) %]">[% p.title | html %]</a> + <em class="council_sent_info"> – + [% IF p.whensent %] + [% tprintf( loc("Reported %s, to %s"), prettify_epoch( p.confirmed_local.epoch, 'date' ), p.body(c) ) %] + [% ELSE %] + [% tprintf( loc("Reported %s"), prettify_epoch( p.confirmed_local.epoch, 'date' ) ) %] + [% END %] + </em> + </li> + + [% "</ul>" IF loop.last %] +[% END %] + diff --git a/templates/web/default/pagination.html b/templates/web/default/pagination.html new file mode 100644 index 000000000..f5a1192d1 --- /dev/null +++ b/templates/web/default/pagination.html @@ -0,0 +1,17 @@ +[% IF pager.last_page > 1 %] + <p> + [% IF pager.previous_page %] + <a href="[% c.req.uri_with({ $param => pager.previous_page }) %]">← Previous</a> + [% ELSE %] + ← Previous + [% END %] + | + [% pager.first %] to [% pager.last %] of [% pager.total_entries %] + | + [% IF pager.next_page %] + <a href="[% c.req.uri_with({ $param => pager.next_page }) %]">Next →</a> + [% ELSE %] + Next → + [% END %] + </p> +[% END %] diff --git a/templates/web/default/questionnaire/completed.html b/templates/web/default/questionnaire/completed.html new file mode 100644 index 000000000..3762b25d0 --- /dev/null +++ b/templates/web/default/questionnaire/completed.html @@ -0,0 +1,33 @@ +[% + INCLUDE 'header.html', title = loc('Questionnaire') +%] + +[% advert_outcome = 1 %] + +[% IF been_fixed == 'Unknown' %] + +[% loc('<p>Thank you very much for filling in our questionnaire; if you +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.state == 'confirmed') %] + +[% tprintf( loc('<p style="font-size:150%%">We’re sorry to hear that. We have two suggestions: why not try +<a href="%s">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>'), c.cobrand.writetothem_url || 'http://www.writetothem.com/' ) %] + +[% advert_outcome = 0 %] + +[% ELSE %] + +[% loc('<p style="font-size:150%">Thank you very much for filling in our questionnaire; glad to hear it’s been fixed.</p>') %] + +[% END %] + +[% IF advert_outcome %] + [% display_crosssell_advert( problem.user.email, problem.name, 'council', problem.council ) %] +[% END %] + +[% INCLUDE 'footer.html' %] diff --git a/templates/web/default/questionnaire/creator_fixed.html b/templates/web/default/questionnaire/creator_fixed.html new file mode 100644 index 000000000..0d3181ec1 --- /dev/null +++ b/templates/web/default/questionnaire/creator_fixed.html @@ -0,0 +1,23 @@ +[% INCLUDE 'header.html', title = loc('Confirmation') %] + +<form method="post" action="/questionnaire/submit" id="questionnaire"> +<input type="hidden" name="problem" value="[% problem_id | html %]"> + +[% INCLUDE 'errors.html' %] + +<p> +[% loc("Thanks, glad to hear it's been fixed! Could we just ask if you have ever reported a problem to a council before?") %] +</p> + +<p align="center"> +<input type="radio" name="reported" id="reported_yes" value="Yes"[% ' checked' IF reported == 'Yes' %]> +<label for="reported_yes">[% loc('Yes') %]</label> +<input type="radio" name="reported" id="reported_no" value="No"[% ' checked' IF reported == 'No' %]> +<label for="reported_no">[% loc('No') %]</label> +</p> + +<p><input type="submit" name="submit" value="[% loc('Submit') %]"></p> + +</form> + +[% INCLUDE 'footer.html' %] diff --git a/templates/web/default/questionnaire/index.html b/templates/web/default/questionnaire/index.html new file mode 100644 index 000000000..d463ff2f9 --- /dev/null +++ b/templates/web/default/questionnaire/index.html @@ -0,0 +1,121 @@ +[% + pre_map = INCLUDE 'report/_main.html'; + PROCESS "maps/${map.type}.html"; + INCLUDE 'header.html', title = loc('Questionnaire') +%] + +[% map_html %] + +[% INCLUDE 'report/updates.html' %] + +</div> +<div id="side"> + +<h1>[% loc('Questionnaire') %]</h1> + +<form method="post" action="/questionnaire/submit" id="questionnaire" +[%- IF c.cobrand.allow_photo_upload -%] + enctype="multipart/form-data" +[%- END -%] +> + +<input type="hidden" name="token" value="[% token | html %]"> + +[% c.cobrand.form_elements('questionnaireForm') %] + +[% IF c.cobrand.moniker == 'emptyhomes' %] +[% IF num_questionnaire == 1 %] +[% loc('<p>Getting empty homes back into use can be difficult. You shouldn’t expect +the property to be back into use yet. But a good council will have started work +and should have reported what they have done on the website. If you are not +satisfied with progress or information from the council, now is the right time +to say. You may also want to try contacting some other people who may be able +to help. For advice on how to do this and other useful information please +go to <a href="http://www.emptyhomes.com/getinvolved/campaign.html">http://www.emptyhomes.com/getinvolved/campaign.html</a>.</p> +') %] +[% ELSE %] +[% loc('<p>Getting empty homes back into use can be difficult, but by now a good council +will have made a lot of progress and reported what they have done on the +website. Even so properties can remain empty for many months if the owner is +unwilling or the property is in very poor repair. If nothing has happened or +you are not satisfied with the progress the council is making, now is the right +time to say so. We think it’s a good idea to contact some other people who +may be able to help or put pressure on the council For advice on how to do +this and other useful information please go to <a +href="http://www.emptyhomes.com/getinvolved/campaign.html">http://www.emptyhomes.com/getinvolved/campaign.html</a>.</p> +') %] +[% END %] +[% END %] + +<p> +[% loc('The details of your problem are available on the right hand side of this page.') %] +[% loc('Please take a look at the updates that have been left.') IF updates %] +</p> + +[% IF errors %] +<ul class="error"> +<li>[% errors.join("</li>\n<li>") %]</li> +</ul> +[% END %] + +<p> +[% loc('An update marked this problem as fixed.') IF problem.state == 'fixed' %] +[% loc('Has this problem been fixed?') %] +</p> + +<p> +<input type="radio" name="been_fixed" id="been_fixed_yes" value="Yes"[% ' checked' IF been_fixed == 'Yes' %]> +<label for="been_fixed_yes">[% loc('Yes') %]</label> +<input type="radio" name="been_fixed" id="been_fixed_no" value="No"[% ' checked' IF been_fixed == 'No' %]> +<label for="been_fixed_no">[% loc('No') %]</label> +<input type="radio" name="been_fixed" id="been_fixed_unknown" value="Unknown"[% ' checked' IF been_fixed == 'Unknown' %]> +<label for="been_fixed_unknown">[% loc('Don’t know') %]</label> +</p> + +[% UNLESS answered_ever_reported %] +<p>[% loc('Have you ever reported a problem to a council before, or is this your first time?') %]</p> +<p> +<input type="radio" name="reported" id="reported_yes" value="Yes"[% ' checked' IF reported == 'Yes' %]> +<label for="reported_yes">[% loc('Reported before') %]</label> +<input type="radio" name="reported" id="reported_no" value="No"[% ' checked' IF reported == 'No' %]> +<label for="reported_no">[% loc('First time') %]</label> +</p> +[% END %] + +<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> + +<p><textarea name="update" style="max-width:90%" rows="7" cols="30">[% update | html %]</textarea></p> + +[% IF c.cobrand.allow_photo_upload %] +<div id="fileupload_normalUI"> + [% IF upload_fileid %] + <p>[% loc('You have already attached a photo to this report, 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"> +</div> +[% END %] + +[% IF c.cobrand.moniker != 'emptyhomes' %] +<div id="another_qn"> + <p>[% loc('Would you like to receive another questionnaire in 4 weeks, reminding you to check the status?') %]</p> + <p> + <input type="radio" name="another" id="another_yes" value="Yes"[% ' checked' IF another == 'Yes' %]> + <label for="another_yes">[% loc('Yes') %]</label> + <input type="radio" name="another" id="another_no" value="No"[% ' checked' IF another == 'No' %]> + <label for="another_no">[% loc('No') %]</label> + </p> +</div> +[% END %] + +<p><input type="submit" name="submit" value="[% loc('Submit questionnaire') %]"></p> + +</form> + +</div> + +[% INCLUDE 'footer.html' %] + diff --git a/templates/web/default/report/_main.html b/templates/web/default/report/_main.html new file mode 100644 index 000000000..8cc1efec2 --- /dev/null +++ b/templates/web/default/report/_main.html @@ -0,0 +1,18 @@ +<h1>[% problem.title | html %]</h1> + +<p><em>[% problem.meta_line(c) | html %] +[% IF problem.council %] + [% IF problem.whensent %] + <small class="council_sent_info"><br>[% problem.duration_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 %] + + diff --git a/templates/web/default/report/display.html b/templates/web/default/report/display.html new file mode 100644 index 000000000..4948f8808 --- /dev/null +++ b/templates/web/default/report/display.html @@ -0,0 +1,213 @@ +[% + PROCESS "maps/${map.type}.html"; + + problem_title = problem.title _ ' - ' _ loc('Viewing a problem') | html; + INCLUDE 'header.html' + title = problem_title + rss = [ loc('Updates to this problem, FixMyStreet'), "/rss/$problem.id" ] + robots = 'index, nofollow' +%] + +[% map_html %] + +[% IF c.cobrand.country == 'GB' %] +<p id='sub_map_links'> + <a href="http://maps.google.co.uk/maps?output=embed&z=16&q= + [%- problem.title _ ' - ' _ c.cobrand.base_url_for_emails _ '/report/' _ problem.id | uri -%] +@[% short_latitude %],[% short_longitude %]">View on Google Maps</a></p> +[% END %] + +</div> +<div id="side"> + +[% IF banner %] +<p id="[% banner.id %]"> + [% banner.text %] +</p> +[% END %] + +[% INCLUDE 'report/_main.html' %] + +<p align="right"> + <small> + <a rel="nofollow" href="[% c.uri_for( '/contact', { id => problem.id } ) %]">[% loc('Offensive? Unsuitable? Tell us' ) %]</a> + </small> +</p> + +<p style="padding-bottom: 0.5em; border-bottom: dotted 1px #999999;" align="right"> + <a href="[% c.uri_for( '/around', { lat => short_latitude, lon => short_longitude } ) %]">[% loc( 'More problems nearby' ) %]</a> +</p> + +<div id="alert_links"> + <a rel="nofollow" id="email_alert" href="[% c.uri_for( '/alert/subscribe', { id => problem.id } ) %]">[% loc('Email me updates' ) %]</a> + + <form action="[% c.uri_for( '/alert/subscribe' ) %]" method="post" id="email_alert_box"> + <p>[% loc('Receive email when updates are left on this problem.' ) %]</p> + <label class="n" for="alert_rznvy">[% loc('Email:') %]</label> + <input type="email" name="rznvy" id="alert_rznvy" value="[% email | html %]" size="30"> + <input type="hidden" name="id" value="[% problem.id %]"> + <input type="hidden" name="type" value="updates"> + <input type="submit" value="[% loc('Subscribe') %]"> + [% cobrand_alert_fields %] + </form> + + <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="vertical-align: middle"> + </a> +</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" id="fieldset"[% 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">[% update.text | html %]</textarea> + </div> + + [% IF problem.state == '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.state != '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 %] + + [% 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"> + </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> + + <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" value="[% loc('Post') %]"> + </p> + + </div> + <div id="form_sign_in_no"> + + <p>[% loc('<strong>No</strong>, let me confirm my update by email:') %]</p> + + <div id="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> + </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" value="[% loc('Post') %]"> + </p> + + </div> + +</div> + +[% END %] + + [% cobrand_update_fields %] + + </form> +</div> + +</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/all_councils_text.html b/templates/web/default/report/new/all_councils_text.html new file mode 100644 index 000000000..8514e0b0a --- /dev/null +++ b/templates/web/default/report/new/all_councils_text.html @@ -0,0 +1,19 @@ +<p> +[% IF all_councils.${area_ids_to_list.0}.type == 'LBO' %] +[% + tprintf( + loc('All the information you provide here will be sent to <strong>%s</strong> or a relevant local body such as <strong>TfL</strong>, via the London Report-It system.'), + all_council_names.join( '</strong>' _ loc(' or ') _ '<strong>' ) + ); +%] +[% ELSE %] +[% + tprintf( + loc('All the information you provide here will be sent to <strong>%s</strong>.'), + all_council_names.join( '</strong>' _ loc(' or ') _ '<strong>' ) + ); +%] +[% END %] + +[% loc('The subject and details of the problem will be public, plus your name if you give us permission.') %] +</p> diff --git a/templates/web/default/report/new/fill_in_details.html b/templates/web/default/report/new/fill_in_details.html new file mode 100644 index 000000000..8150ba894 --- /dev/null +++ b/templates/web/default/report/new/fill_in_details.html @@ -0,0 +1,238 @@ +[% + PROCESS "maps/${map.type}.html" IF report.used_map; + INCLUDE 'header.html', title => loc('Reporting a problem') +%] + +[% IF report.used_map %] +<form action="[% c.uri_for('/report/new') %]" method="post" name="mapForm" id="mapForm"[% IF c.cobrand.allow_photo_upload %] enctype="multipart/form-data"[% END %]> +[% 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 %]"> +[% c.cobrand.form_elements('mapForm') %] +[% ELSE %] +<form action="[% c.uri_for('/report/new') %]" method="post" name="mapSkippedForm"[% IF c.cobrand.allow_photo_upload %] enctype="multipart/form-data"[% END %]> +<input type="hidden" name="pc" value="[% pc | html %]"> +<input type="hidden" name="skipped" value="1"> +[% c.cobrand.form_elements('mapSkippedForm') %] +[% END %] + +<input type="hidden" name="latitude" id="fixmystreet.latitude" value="[% short_latitude | html %]"> +<input type="hidden" name="longitude" id="fixmystreet.longitude" value="[% short_longitude | html %]"> + +[% IF report.used_map %] + [% map_html %] + </div> + <div id="side"> +[% ELSE %] + <div id="skipped-map"> +[% END %] + +<h1>[% loc('Reporting a problem') %]</h1> + +[% 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 purple pin on the map. If this is not the correct location, simply click on the map again. ') %]</p> +[% END %] + +[% IF area_ids_to_list.size == 0 %] + [% INCLUDE 'report/new/no_councils_text.html' %] +[% ELSIF area_ids_to_list.size == all_councils.size %] + [% INCLUDE 'report/new/all_councils_text.html' %] +[% ELSE %] + [% INCLUDE 'report/new/some_councils_text.html' %] +[% END %] + +<p> +[% IF skipped %] + [% loc('Please fill in the form below with details of the problem, and describe the location as precisely as possible in the details box.') %] +[% ELSE %] + [% INCLUDE 'report/new/fill_in_details_text.html' %] +[% END %] +</p> + +[% INCLUDE 'errors.html' %] + +<div id="problem_form"> + +[% INCLUDE 'report/new/form_heading.html' %] + +<div id="fieldset"> + + + + + +[% IF field_errors.council %] + <div class='form-error'>[% field_errors.council %]</div> +[% END %] + +[% IF category_options.size %] + [% IF field_errors.category %] + <div class='form-error'>[% field_errors.category %]</div> + [% END %] + + <div class="form-field"> + <label for="form_category">[% category_label | html %]</label> + <select name="category" id="form_category"> + [%- FOREACH cat_op IN category_options %] + <option value="[% cat_op | html %]"[% ' selected' IF report.category == cat_op %]>[% cat_op | html %]</option> + [%- END %] + </select> + </div> +[% END %] + +[% IF field_errors.title %] + <div class='form-error'>[% field_errors.title %]</div> +[% END %] + +<div class="form-field"> + <label for="form_title">[% loc('Subject:') %]</label> + <input type="text" value="[% report.title | html %]" name="title" id="form_title" size="25"> +</div> + +[% IF field_errors.detail %] + <div class='form-error'>[% field_errors.detail %]</div> +[% END %] + +<div class="form-field"> + <label for="form_detail">[% loc('Details:') %]</label> + <textarea name="detail" id="form_detail" rows="7" cols="26">[% report.detail | html %]</textarea> +</div> + +[% IF c.cobrand.allow_photo_upload %] + [% IF field_errors.photo %] + <div class='form-error'>[% field_errors.photo %]</div> + [% END %] + + <div class='form-field'> + [% IF upload_fileid || report.photo %] + <p>[% loc('You have already attached a photo to this report, attaching another one will replace it.') %]</p> + [% IF upload_fileid %] + <input type="hidden" name="upload_fileid" value="[% upload_fileid %]" /> + [% END %] + [% IF report.photo %] + <img align="right" src="/photo?id=[% report.id %]" hspace="5"> + [% END %] + [% 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_phone %] + + [% INCLUDE 'report/new/notes.html' %] + + <p id="problem_submit"> + <input type="submit" value="[% loc('Submit') %]"> + </p> + +[% ELSE %] + + [% IF field_errors.email %] + <div class='form-error'>[% field_errors.email %]</div> + [% END %] + + <div class="form-field"> + <label for="form_email">[% loc('Your email:') %]</label> + <input type="email" value="[% report.user.email | html %]" name="email" id="form_email" size="25"> + </div> + +[% INCLUDE 'report/new/notes.html' %] + +<div id="form_sign_in"> + <h3>[% loc("Now to submit your report… 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> + + <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" value="[% loc('Submit') %]"> + </p> + + </div> + <div id="form_sign_in_no"> + + <p>[% loc('<strong>No</strong>, let me confirm my report by email:') %]</p> + + <div id="fieldset"> + + [% INCLUDE name_phone %] + + <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> + </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" value="[% loc('Submit') %]"> + </p> + + </div> + +</div> + +[% END %] + +[% IF partial_token %] + <input type="hidden" name="partial" value="[% partial_token.token %]"> +[% END %] + +<input type="hidden" name="submit_problem" value="1"> + +</div> +</div> + +</div> +</form> + +[% INCLUDE 'footer.html' %] + +[% BLOCK name_phone %] + [% IF field_errors.name %] + <div class='form-error'>[% field_errors.name %]</div> + [% END %] + + <div class="form-field"> + <label for="form_name">[% loc('Your name:') %]</label> + <input type="text" value="[% report.name | html %]" name="name" id="form_name" size="25"> + </div> + + <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 || !report.name %]> + <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> + + <div> + <label for="form_phone">[% loc('Phone:') %]</label> + <input type="text" value="[% report.user.phone | html %]" name="phone" id="form_phone" size="15"> + <small>[% loc('(optional)') %]</small> + </div> +[% END %] + diff --git a/templates/web/default/report/new/fill_in_details_text.html b/templates/web/default/report/new/fill_in_details_text.html new file mode 100644 index 000000000..44c60ed6e --- /dev/null +++ b/templates/web/default/report/new/fill_in_details_text.html @@ -0,0 +1,10 @@ +[% + IF details != 'none'; + loc('Please fill in details of the problem below. The council won\'t be able +to help unless you leave as much detail as you can, so 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.'); + ELSE; + loc('Please fill in details of the problem below.'); + END; +%] diff --git a/templates/web/default/report/new/form_heading.html b/templates/web/default/report/new/form_heading.html new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/templates/web/default/report/new/form_heading.html diff --git a/templates/web/default/report/new/no_councils_text.html b/templates/web/default/report/new/no_councils_text.html new file mode 100644 index 000000000..f991e031f --- /dev/null +++ b/templates/web/default/report/new/no_councils_text.html @@ -0,0 +1,20 @@ + + +<p>[% + + nget( + "We do not yet have details for the council that covers this location.", + "We do not yet have details for the councils that cover this location.", + all_councils.size + ); + + loc("If you submit a problem here the subject and details of the problem will be public, but the problem will <strong>not</strong> be reported to the council."); + + tprintf( + loc("You can help us by finding a contact email address for local problems for %s and emailing it to us at <a href='mailto:%s'>%s</a>."), + all_council_names.join( loc(' or ') ), + c.cobrand.contact_email, + c.cobrand.contact_email + ); + +%]</p> diff --git a/templates/web/default/report/new/notes.html b/templates/web/default/report/new/notes.html new file mode 100644 index 000000000..be605ddaa --- /dev/null +++ b/templates/web/default/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("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>[% 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/default/report/new/report_import.html b/templates/web/default/report/new/report_import.html new file mode 100644 index 000000000..7aa105afe --- /dev/null +++ b/templates/web/default/report/new/report_import.html @@ -0,0 +1,92 @@ +[% INCLUDE 'header.html', title => 'External import' %] + +<h1>External import</h1> + +<p>You may inject problem reports into FixMyStreet programatically using this +simple interface. Upon receipt, an email will be sent to the address given, +with a link the user must click in order to check the details of their report, +add any other information they wish, and then submit to the council. + +<p>This interface returns a plain text response; either <samp>SUCCESS</samp> if +the report has been successfully received, or if not, a list of errors, one per +line each starting with <samp>ERROR:</samp>. + +<p>You may submit the following information by POST to this URL +(i.e. <samp>[% c.uri_for('/import') %]</samp> ):</p> + +<style type="text/css" media="screen"> + input { + /* Hide the form elements - they are just here for simpler testing */ + display: none; + } +</style> + +<form method="POST" action="/import" enctype="multipart/form-data"> + +<dl> + <dt>service</dt> + <dd> + <em>Required</em>. + Name of application/service using this interface. + <input type="text" name="service" /> + </dd> + + <dt>id</dt> + <dd> + Unique ID of a user/device, for possible future use.<br> + <small>(e.g. used by Flickr import to know which accounts to look at)</small> + <input type="text" name="id" /> + </dd> + + <dt>subject</dt> + <dd> + <em>Required</em>. Subject of problem report. + <input type="text" name="subject" /> + </dd> + + <dt>detail</dt> + <dd> + Main body and details of problem report. + <input type="text" name="detail" /> + </dd> + + <dt>name</dt> + <dd> + <em>Required</em>. Name of problem reporter. + <input type="text" name="name" /> + </dd> + + <dt>email</dt> + <dd> + <em>Required</em>. Email address of problem reporter. + <input type="text" name="email" /> + </dd> + + <dt>phone</dt> + <dd> + Telephone number of problem reporter. + <input type="text" name="phone" /> + </dd> + + <dt>easting / northing</dt> + <dt>lat / lon</dt> + <dd> + Location of problem report. You can either supply eastings/northings, or WGS84 latitude/longitude. + <input type="text" name="easting" /> + <input type="text" name="northing" /> + <input type="text" name="lat" /> + <input type="text" name="lon" /> + </dd> + + <dt>photo</dt> + <dd> + Photo of problem (JPEG only). + <input type="file" name="photo" /> + </dd> +</dl> + +<input type="submit" /> + +</form> + +[% INCLUDE 'footer.html' %]
\ No newline at end of file diff --git a/templates/web/default/report/new/some_councils_text.html b/templates/web/default/report/new/some_councils_text.html new file mode 100644 index 000000000..042e89914 --- /dev/null +++ b/templates/web/default/report/new/some_councils_text.html @@ -0,0 +1,28 @@ +<p> +[% loc('All the information you provide here will be sent to') %] + +[% FOREACH council_id IN area_ids_to_list %] + [% loc( ' or ') IF ! loop.first %] + <strong>[% all_councils.$council_id.name %]</strong> + [%- '.' IF loop.last %] +[% END %] + +[% + loc('The subject and details of the problem will be public, plus your name if you give us permission.'); +%] +[% + nget( + "We do <strong>not</strong> yet have details for the other council that covers this location.", + "We do <strong>not</strong> yet have details for the other councils that cover this location.", + missing_details_councils.size + ); +%] +[% + tprintf( + loc("You can help us by finding a contact email address for local problems for %s and emailing it to us at <a href='mailto:%s'>%s</a>."), + missing_details_council_names.join( loc(' or ') ), + c.cobrand.contact_email, + c.cobrand.contact_email + ); +%] +</p> diff --git a/templates/web/default/report/photo.html b/templates/web/default/report/photo.html new file mode 100644 index 000000000..451a0479c --- /dev/null +++ b/templates/web/default/report/photo.html @@ -0,0 +1,6 @@ +[% 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> +[% END %] diff --git a/templates/web/default/report/updates.html b/templates/web/default/report/updates.html new file mode 100644 index 000000000..910430114 --- /dev/null +++ b/templates/web/default/report/updates.html @@ -0,0 +1,32 @@ +[% FOREACH update IN updates.all %] +[% IF loop.first %] +<div id="updates"> + <h2 class="problem-update-list-header">[% loc('Updates') %]</h2> +[% END %] + <div><div class="problem-update"><p><a name="update_[% update.id %]"></a><em> + [% IF update.anonymous || update.name == '' %] + [% tprintf( loc( 'Posted anonymously at %s' ), prettify_epoch( update.confirmed_local.epoch ) ) -%] + [%- ELSE %] + [% tprintf( loc( 'Posted by %s at %s' ), update.name, prettify_epoch( update.confirmed_local.epoch ) ) | html -%] + [%- END -%] + [%- c.cobrand.extra_update_meta_text(update) -%] + [%- ", " _ loc( 'marked as fixed' ) IF update.mark_fixed %] + [%- ", " _ loc( 'reopened' ) IF update.mark_open %] + </em></p> + + [% IF c.cobrand.allow_update_reporting %] + <p> + <a rel="nofollow" class="unsuitable-problem" href="[% c.uri_for( '/contact?id=' _ update.problem_id _ ';update_id' _ update.id ) %]">[% loc('Offensive? Unsuitable? Tell us') %]</a> + </p> + [% END %] + + </div> + + <div class="update-text"> + [% add_links( update.text ) | html_para %] + + [% INCLUDE 'report/photo.html' object=update %] + </div> + </div> +[% '</div>' IF loop.last %] +[% END %] diff --git a/templates/web/default/reports/council.html b/templates/web/default/reports/council.html new file mode 100755 index 000000000..2b004cf50 --- /dev/null +++ b/templates/web/default/reports/council.html @@ -0,0 +1,141 @@ +[% IF ward %] + [% name = "$ward.name, $council.name" + thing = loc('ward') + %] +[% ELSE %] + [% name = council.name + thing = loc('council') + %] +[% END %] + +[% + PROCESS "maps/${map.type}.html"; + INCLUDE 'header.html', + title = tprintf(loc('%s - Summary reports'), name) + context = 'reports' + rss = [ tprintf(loc('Problems within %s, FixMyStreet'), name), rss_url ] +%] + +[% map_html %] + +[% IF children.size %] +<h2 style="clear:right">[% loc('Wards of this council') %]</h2> +<p>[% loc('Follow a ward link to view only reports within that ward.') %]</p> +<ul> +[% FOR child IN children.values.sort('name') %] +<li><a href="[% child.url %]">[% child.name %]</a></p> +[% END %] +</ul> +[% END %] + +</div> +<div id="side"> + +[% IF council.generation_high == 10 AND c.cobrand.country == 'GB' %] +<p id="unknown">This council no longer exists. +[% IF council.name.match('Penwith|Kerrier|Carrick|Restormel|Caradon|North Cornwall') %] +Its area is now covered by <a href="/reports/Cornwall">Cornwall Council</a>. +[% ELSIF council.name.match('Durham|Easington|Sedgefield|Teesdale|Wear Valley|Derwentside|Chester le Street') %] +Its area is now covered by <a href="/reports/Durham+County">Durham County Council</a>. +[% ELSIF council.name.match('Blyth Valley|Wansbeck|Castle Morpeth|Tynedale|Alnwick|Berwick upon Tweed') %] +Its area is now covered by <a href="/reports/Northumberland">Northumberland County Council</a>. +[% ELSIF council.name.match('North Shropshire|Oswestry|Shrewsbury and Atcham|South Shropshire|Bridgnorth') %] +Its area is now covered by <a href="/reports/Shropshire">Shropshire Council</a>. +[% ELSIF council.name.match('Salisbury|West Wiltshire|Kennet|North Wiltshire') %] +Its area is now covered by <a href="/reports/Wiltshire">Wiltshire Council</a>. +[% ELSIF council.name.match('Ellesmere Port and Neston|Vale Royal|Chester') %] +Its area is now covered by <a href="/reports/Cheshire+West+and+Chester">Cheshire West and Chester Council</a>. +[% ELSIF council.name.match('Macclesfield|Congleton|Crewe and Nantwich') %] +Its area is now covered by <a href="/reports/Cheshire+East">Cheshire East Council</a>. +[% ELSIF council.name.match('Mid Bedfordshire|South Bedfordshire') %] +Its area is now covered by <a href="/reports/Central+Bedfordshire">Central Bedfordshire Council</a>. +[% ELSIF council.name.match('Cheshire') %] +Its area is now covered by <a href="/reports/Cheshire+West+and+Chester">Cheshire West and Chester Council</a> or +<a href="/reports/Cheshire+East">Cheshire East Council</a>. +[% ELSIF council.name.match('Bedfordshire') %] +Its area is now covered by <a href="/reports/Bedford">Bedford Borough Council</a> or +<a href="/reports/Central+Bedfordshire">Central Bedfordshire Council</a>. +[% END %] +</p> +[% ELSE %] +<p><a href="[% rss_url %]"><img align="right" src="/i/feed.png" width="16" height="16" title="[% loc('RSS feed') %]" alt="[% tprintf(loc('RSS feed of problems in this %s'), thing) %]" border="0" hspace="4"></a> +[% END %] + +[% IF c.cobrand.all_councils_report %] + [% tprintf( loc('This is a summary of all reports for one %s.'), thing ) %] +[% ELSE %] + [% tprintf( loc('This is a summary of all reports for this %s.'), thing ) %] +[% END %] + +[% IF ward %] +[% tprintf( loc('You can <a href="%s">view all reports for the council</a> or <a href="/reports">show all councils</a>.'), council_url ) %] +[% ELSE %] +[% loc('You can <a href="/reports">show all councils</a>.') %] +[% END %] + +<h2>[% name %]</h2> + +[% IF c.cobrand.moniker == '' %] +<p class="promo"> + FixMyStreet is now available for local council websites. + <a href="http://www.mysociety.org/fixmystreet-for-local-council-websites/">Find out more</a>. +</p> +[% END %] + + [% INCLUDE 'pagination.html', param = 'p' %] + + [% INCLUDE column + title = loc('Recently fixed') + problems = fixed.${council.id}.new + %] + + [% INCLUDE column + title = loc('New problems') + problems = open.${council.id}.new + %] + + [%# This doesn't really need a whole separate template %] + [% IF c.cobrand.moniker == 'emptyhomes' %] + [% + INCLUDE column + title = loc('Older problems') + problems = open.${council.id}.older.merge( open.${council.id}.unknown ) + %] + [% ELSE %] + [% INCLUDE column + title = loc('Older problems') + problems = open.${council.id}.older + %] + [% INCLUDE column + title = loc('Old problems, state unknown') + problems = open.${council.id}.unknown + %] + [% END %] + + [% INCLUDE column + title = loc('Old fixed') + problems = fixed.${council.id}.old + %] + +</div> +[% INCLUDE 'footer.html' %] + +[% BLOCK column %] +[% IF problems %] + +<h3>[% title %]</h3> + +<ul> +[% FOREACH problem IN problems %] + <li><a href="[% c.uri_for('/report/' _ problem.id) %]">[% problem.title | html %]</a> + [% IF problem.councils > 1 %] <small>[% loc('(sent to both)') %]</small> [% END %] + [% IF c.cobrand.moniker != 'emptyhomes' %] + [% IF problem.councils == 0 %] <small>[% loc('(not sent to council)') %]</small> [% END %] + [% END %] + </li> +[% END %] +</ul> + +[% END %] +[% END %] + diff --git a/templates/web/default/reports/index.html b/templates/web/default/reports/index.html new file mode 100755 index 000000000..f14fd079e --- /dev/null +++ b/templates/web/default/reports/index.html @@ -0,0 +1,35 @@ +[% INCLUDE 'header.html', title = loc('Summary reports') %] + +<p> +[% loc('This is a summary of all reports on this site; select a particular council to see the reports sent there.') %] +[% loc('Greyed-out lines are councils that no longer exist.') %] +</p> + +<table cellpadding="3" cellspacing="1" border="0"> +<tr> +<th>[% loc('Name') %]</th> +<th>[% loc('New problems') %]</th> +<th>[% loc('Older problems') %]</th> +<th>[% loc('Old problems,<br>state unknown') %]</th> +<th>[% loc('Recently fixed') %]</th> +<th>[% loc('Older fixed') %]</th> +</tr> + +[% FOREACH area IN areas_info_sorted %] +<tr align="center" +[%- IF area.generation_high == 10 %] class="gone" +[%- ELSIF loop.count % 2 %] class="a" +[%- END -%] +> +<td align="left"><a href="[% area.url %]">[% area.name %]</a></td> +<td>[% open.${area.id}.new or 0 %]</td> +<td>[% open.${area.id}.older or 0 %]</td> +<td>[% open.${area.id}.unknown or 0 %]</td> +<td>[% fixed.${area.id}.new or 0 %]</td> +<td>[% fixed.${area.id}.old or 0 %]</td> +</tr> +[% END %] +</table> + +[% INCLUDE 'footer.html' %] + diff --git a/templates/web/default/reports/ward.html b/templates/web/default/reports/ward.html new file mode 100755 index 000000000..8b65ffb28 --- /dev/null +++ b/templates/web/default/reports/ward.html @@ -0,0 +1 @@ +[% INCLUDE reports/council.html %] diff --git a/templates/web/default/static/about.html b/templates/web/default/static/about.html new file mode 100644 index 000000000..9c319f051 --- /dev/null +++ b/templates/web/default/static/about.html @@ -0,0 +1,9 @@ +[% INCLUDE 'header.html', title => loc('About us') %] + +<h1>[% loc('About us') %]</h1> + +<h2>FixMyStreet.com</h2> + +[%# FIXME - put in blurb here %] + +[% INCLUDE 'footer.html' %] diff --git a/templates/web/default/static/fun.html b/templates/web/default/static/fun.html new file mode 100644 index 000000000..abe9d4028 --- /dev/null +++ b/templates/web/default/static/fun.html @@ -0,0 +1,35 @@ +[% INCLUDE header.html + title = 'Weird and Wonderful reports' +%] + +<h1>Weird and Wonderful reports</h1> + +<p>Here are some of the best or strangest reports we’ve seen on FixMyStreet. +They’ve all been fixed, and in one case could have saved lives! +Do let us know if you find any more.</p> + +<ul style='list-style-type: none; margin:0; padding:0'> + +<li><img src='http://www.fixmystreet.com/photo?id=9468' align='right' hspace=8> + <h2>Dumped Piano (right)</h2> + <p>The reporter of this problem summed it up with their report, + which consisted solely of the one character “!”. — + <a href='http://www.fixmystreet.com/report/9468'>Problem report</a> + +<li><h2>Mad Seagull</h2> + <p>“A seagull is attacking various cars within this road. He starts at around 05:45 every morning and continues until around 19:30. This causes a lot of noisy banging and wakes up children.” — + <a href='http://www.fixmystreet.com/report/2722'>Problem report</a> + +<li><img src='http://www.fixmystreet.com/photo?id=6553' align='right' hspace=8> + <h2>Boxes full of cheese dumped (right)</h2> + <p>“About a dozen boxes full of mozzarella cheese have been dumped opposite 3 rufford street. if it warms up we could have nasty road topping problem (seriously there is a lot of cheese)” — + <a href='http://www.fixmystreet.com/report/6553'>Problem report</a> + +<li><h2>Dangerous Nivea Billboard</h2> + <p>“The Nivea 'Oxygen is a wonderful thing' billboard here has a device on it releasing bubbles and foam. This is blowing into the road which is both distracting and dangerous to drivers. A large ball of foam hit my windscreen unexpectedly and nearly caused me to have an accident” — + <a href='http://www.fixmystreet.com/report/7552'>Problem report</a> + +</ul> + +[% INCLUDE footer.html %] + diff --git a/templates/web/default/static/iphone.html b/templates/web/default/static/iphone.html new file mode 100755 index 000000000..8f7992713 --- /dev/null +++ b/templates/web/default/static/iphone.html @@ -0,0 +1,52 @@ +[% INCLUDE header.html + title = 'FixMyStreet for iPhone screenshots' +%] + +<h1>iPhone simulator simulator</h1> + +[% + SET screens = [ + [ "iphone-1start.png", 'Click the image to progress through the flow of using the iPhone FixMyStreet application. + <br>When launched, the user’s location automatically gets fetched…' ], + [ "iphone-2locfound.png", 'They want to take a photo.' ], + [ "iphone-pickpicture1.png", 'The simulator doesn’t have a camera, so we’re taken to the photo albums. Let’s pick Hawaii.' ], + [ "iphone-pickpicture2.png", 'That red clouds photo looks nice.' ], + [ "iphone-pickpicture3.png", 'After any moving or scaling we want, we select the photo.' ], + [ "iphone-3picture.png", 'Okay, now we need to edit the summary of the report.' ], + [ "iphone-editsummary.png", 'Enter some text.' ], + [ "iphone-editsummary2.png", 'And done.' ], + [ "iphone-4subject.png", 'I haven’t entered all my details yet, so that’s next.' ], + [ "iphone-5details.png", 'Your details are remembered so you only have to enter them once.' ], + [ "iphone-6emailkeyboard.png", 'The iPhone has different keyboards, this is the email one.' ], + [ "iphone-5details.png", 'Right, we need to enter a name.' ], + [ "iphone-editname.png", 'Slightly different keyboard to the email one.' ], + [ "iphone-detailsdone.png", 'Okay, details entered.' ], + [ "iphone-allready.png", 'That’s everything, hit Report!' ], + [ "iphone-7uploading.png", 'Uploading…' ], + [ "iphone-8response.png", 'The simulator always thinks it’s in the US, which FixMyStreet won’t like very much.' ], + [ "iphone-allready.png", 'Ah well, let’s read the About page instead' ], + [ "iphone-9about.png", 'Donate? :)' ], +]; +%] + +<script type="text/javascript"> +document.write('<style type="text/css">.vv { display: none; }</style>'); +function show(a) { + if (a==[% screens.size %]) b = 1; + else b = a+1; + document.getElementById('d' + a).style.display='none'; + document.getElementById('d' + b).style.display='block'; +} +</script> + +[% FOR screen IN screens %] + + <div id='d[% loop.count %]'[% " class='vv'" IF NOT loop.first %]> + <p>[% screen.1 %]</p> + <p align='center'><a onclick='show([% loop.count %]);return false' href='#d[% loop.count + 1 %]'><img src='[% screen.0 %]' width=414 border=0 height=770></a></p> + </div> + +[% END %] + +[% INCLUDE footer.html %] + diff --git a/templates/web/default/static/posters.html b/templates/web/default/static/posters.html new file mode 100644 index 000000000..77abbb5fc --- /dev/null +++ b/templates/web/default/static/posters.html @@ -0,0 +1,43 @@ +[% INCLUDE header.html + title = 'Publicity material' +%] + +[% + badge = '<a href="http://www.fixmystreet.com/"> <img align="left" hspace="5" src="http://www.fixmystreet.com/i/fms-badge.jpeg" alt="FixMyStreet - report, view or discuss local problems" border="0"></a>' +%] + +<h1>Publicity Material</h1> + +<div style='float:left; width:50%'> + <p>Copy and paste the text below to add this badge to your site:</p> + [% badge %] + <textarea onclick="this.select()" cols=37 rows=5>[% badge | html %]</textarea> + <p><small>(thanks to Lincolnshire Council for the image)</small></p> +</div> + +<div style='float:right; width:47%'> + <p>Here are some posters and flyers you can use to publicise FixMyStreet:</p> + <img hspace="5" src="/posters/poster.png" alt='Example poster'> + <h2>Posters</h2> + <ul> + <li><a href='/posters/fixmystreet-poster-a4.pdf'>A4, colour</a> + <li><a href='/posters/fixmystreet-poster-a4-bw.pdf'>A4, black and white</a> + <li><a href='/posters/fixmystreet-poster-a4-bw-low-ink.pdf'>A4, black and white, low ink</a> + <li><a href='/posters/fixmystreet-poster-a4-bw-outlined.pdf'>A4, black and white, outlined</a> + </ul> + <h2>Posters with tags</h2> + <ul> + <li><a href='/posters/fixmystreet-poster-tags.pdf'>A4, colour</a> + <li><a href='/posters/fixmystreet-poster-tags-bw.pdf'>A4, black and white</a> + <li><a href='/posters/fixmystreet-poster-tags-bw-low-ink.pdf'>A4, black and white, low ink</a> + <li><a href='/posters/fixmystreet-poster-tags-only.pdf'>A4, tags only</a> + </ul> + <h2>Flyers</h2> + <ul> + <li><a href='/posters/fixmystreet-flyers-colour.pdf'>4 x A6, colour</a> + <li><a href='/posters/fixmystreet-flyers-bw-outlined.pdf'>4 x A6, black and white, outlined</a> + <li><a href='/posters/fixmystreet-flyers-bw-low-ink.pdf'>4 x A6, black and white, low ink</a> + </ul> +</div> + +[% INCLUDE footer.html %] diff --git a/templates/web/default/tokens/abuse.html b/templates/web/default/tokens/abuse.html new file mode 100644 index 000000000..d1b952621 --- /dev/null +++ b/templates/web/default/tokens/abuse.html @@ -0,0 +1,7 @@ +[% INCLUDE 'header.html', title => loc('Error') %] + +<h1>[% loc('Error') %]</h1> + +<p>[% loc('Sorry, there has been an error confirming your problem.') %]</p> + +[% INCLUDE 'footer.html' %] diff --git a/templates/web/default/tokens/confirm_alert.html b/templates/web/default/tokens/confirm_alert.html new file mode 100644 index 000000000..d23a658ec --- /dev/null +++ b/templates/web/default/tokens/confirm_alert.html @@ -0,0 +1,17 @@ +[% INCLUDE 'header.html', title => loc('Local RSS feeds and email alerts') %] + +<h1>[% loc('Local RSS feeds and email alerts') %]</h1> + +<p> +[% IF confirm_type == 'subscribe' %] + [% loc('You have successfully confirmed your alert.') %] +[% ELSIF confirm_type == 'unsubscribe' %] + [% loc('You have successfully deleted your alert.') %] +[% ELSIF confirm_type == 'created' %] + [% loc('You have successfully created your alert.') %] +[% END %] +</p> + +[% display_crosssell_advert( alert.user.email, alert.user.name ) %] + +[% INCLUDE 'footer.html' %] diff --git a/templates/web/default/tokens/confirm_problem.html b/templates/web/default/tokens/confirm_problem.html new file mode 100644 index 000000000..756958380 --- /dev/null +++ b/templates/web/default/tokens/confirm_problem.html @@ -0,0 +1,22 @@ +[% INCLUDE 'header.html', title => loc('Confirmation') %] + +<h1>[% loc('Confirmation') %]</h1> + +<p class="confirmed"> +[% + loc('You have successfully confirmed your problem'); + + IF problem.council; + loc(' and <strong>we will now send it to the council</strong>'); + END; + + tprintf( + loc( '. You can <a href="%s">view the problem on this site</a>.' ), + c.uri_for( '/report', problem.id ) + ); +%] +</p> + +[% display_crosssell_advert( problem.user.email, problem.name ) %] + +[% INCLUDE 'footer.html' %] diff --git a/templates/web/default/tokens/confirm_update.html b/templates/web/default/tokens/confirm_update.html new file mode 100644 index 000000000..56f04e12a --- /dev/null +++ b/templates/web/default/tokens/confirm_update.html @@ -0,0 +1,20 @@ +[% INCLUDE 'header.html', title => loc('Confirmation') %] + +<h1>[% loc('Confirmation') %]</h1> + +<p class="confirmed"> +[% IF creator_fixed %] +[% + tprintf(loc('Thank you — you can <a href="%s">view your updated problem</a> on the site.'), c.uri_for( '/report', problem_id ) ); +%] +[% ELSE %] +[% + tprintf( loc('You have successfully confirmed your update and you can now <a href="%s">view it on the site</a>.'), c.uri_for( '/report', + update.problem.id ) _ '#update_' _ update.id ); +%] +[% END %] +</p> + +[% display_crosssell_advert( update.user.email, update.name ) %] + +[% INCLUDE 'footer.html' %] diff --git a/templates/web/default/tokens/error.html b/templates/web/default/tokens/error.html new file mode 100644 index 000000000..e3fa6c170 --- /dev/null +++ b/templates/web/default/tokens/error.html @@ -0,0 +1,9 @@ +[% INCLUDE 'header.html', title => loc('Error') %] + +<h1>[% loc('Error') %]</h1> + +[% contact_url = c.uri_for('/contact'); %] + +<p>[% tprintf( loc('Thank you for trying to confirm your update or problem. We seem to have an error ourselves though, so <a href="%s">please let us know what went on</a> and we\'ll look into it.'), contact_url ) %]</p> + +[% INCLUDE 'footer.html' %] diff --git a/templates/web/default/tracking_code.html b/templates/web/default/tracking_code.html new file mode 100644 index 000000000..e5fc13793 --- /dev/null +++ b/templates/web/default/tracking_code.html @@ -0,0 +1,16 @@ +[% IF c.config.BASE_URL == "http://www.fixmystreet.com" %] +<!-- Piwik --> +<script type="text/javascript"> +var pkBaseURL = (("https:" == document.location.protocol) ? "https://piwik.mysociety.org/" : "http://piwik.mysociety.org/"); +document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E")); +</script><script type="text/javascript"> +try { +var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 8); +piwikTracker.trackPageView(); +piwikTracker.enableLinkTracking(); +} catch( err ) {} +</script><noscript><p><img src="http://piwik.mysociety.org/piwik.php?idsite=8" style="border:0" alt=""/></p></noscript> +<!-- End Piwik Tag --> +[% ELSE %] +<!-- Tracking code not inserted as "[% c.config.BASE_URL %]" not "http://www.fixmystreet.com" --> +[% END %] |