aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/web/base/alert/index.html2
-rw-r--r--templates/web/base/around/postcode_form.html2
-rw-r--r--templates/web/base/contact/blurb.html6
-rw-r--r--templates/web/base/contact/index.html8
-rw-r--r--templates/web/fixmystreet.com/about/council.html5
-rw-r--r--templates/web/fixmystreet.com/contact/blurb.html18
-rwxr-xr-xtemplates/web/fixmystreet.com/reports/_extras.html31
-rwxr-xr-xtemplates/web/fixmystreet.com/reports/index.html111
8 files changed, 142 insertions, 41 deletions
diff --git a/templates/web/base/alert/index.html b/templates/web/base/alert/index.html
index 5c61e93d9..acef89a78 100644
--- a/templates/web/base/alert/index.html
+++ b/templates/web/base/alert/index.html
@@ -27,7 +27,7 @@ within a certain distance of a particular location.', "%s is the site name"), si
[% loc('To find out what local alerts we have for you, please enter your postcode or street name and area' ) %]
[% END %]
</p>
-<form method="get" action="/alert/list" class="form-box">
+<form method="get" action="/alert/list" class="form-box js-geolocate">
<fieldset>
<div class="form-txt-submit-box">
<input class="form-control" type="text" name="pc" value="[% pc | html %]" placeholder="[% tprintf(loc('e.g. ‘%s’ or ‘%s’'), c.cobrand.example_places) %]">
diff --git a/templates/web/base/around/postcode_form.html b/templates/web/base/around/postcode_form.html
index 135a70294..69c95d311 100644
--- a/templates/web/base/around/postcode_form.html
+++ b/templates/web/base/around/postcode_form.html
@@ -6,7 +6,7 @@
question = c.cobrand.enter_postcode_text || loc('Enter a nearby street name and area');
%]
- <form action="[% c.uri_for('/around') %]" method="get" name="postcodeForm" id="postcodeForm">
+ <form action="[% c.uri_for('/around') %]" method="get" name="postcodeForm" id="postcodeForm" class="js-geolocate">
<label for="pc">[% question %]:</label>
<div>
<input type="text" name="pc" value="[% pc | html %]" id="pc" size="10" maxlength="200" placeholder="[% tprintf(loc('e.g. ‘%s’ or ‘%s’'), c.cobrand.example_places) %]">
diff --git a/templates/web/base/contact/blurb.html b/templates/web/base/contact/blurb.html
index 3f9e88ed0..1142dc874 100644
--- a/templates/web/base/contact/blurb.html
+++ b/templates/web/base/contact/blurb.html
@@ -1,9 +1,3 @@
-[% IF c.cobrand.moniker == 'fixmystreet' %]
-<h3>Send a message to FixMyStreet's technical support team</h3>
-
-<h4>If you have questions about FixMyStreet</h4>
-[% END %]
-
<p>
[% tprintf( loc("It's often quickest to <a href=\"%s\">check our FAQs</a> and see if the answer is there."), c.uri_for('/faq') ) %]
</p>
diff --git a/templates/web/base/contact/index.html b/templates/web/base/contact/index.html
index f24f8afea..dfd3ef6b2 100644
--- a/templates/web/base/contact/index.html
+++ b/templates/web/base/contact/index.html
@@ -77,13 +77,17 @@
[% END %]
<input type="text" class="form-control required" name="name" id="form_name" value="[% form_name | html %]" size="30">
-
<label for="form_email">[% loc('Your email') %]</label>
[% IF field_errors.em %]
<div class="form-error">[% field_errors.em %]</div>
[% END %]
<input type="text" class="form-control required email" name="em" id="form_email" value="[% em | html %]" size="30">
+ <div class="form-group">
+ <label for="form_phone">[% loc('Your phone number') %]</label>
+ <span class="required-text required-text--optional">optional</span>
+ <input type="text" class="form-control extra.phone" name="extra.phone" id="form_phone" value="" size="30">
+ </div>
<label for="form_subject">[% loc('Subject') %]</label>
[% IF field_errors.subject %]
@@ -100,7 +104,7 @@
<textarea class="form-control required" name="message" id="form_message" rows="7" cols="50">[% message | html %]</textarea>
- <input class="final-submit green-btn" type="submit" value="[% loc('Post') %]">
+ <input class="final-submit green-btn" type="submit" value="[% loc('Send') %]">
</fieldset>
</form>
diff --git a/templates/web/fixmystreet.com/about/council.html b/templates/web/fixmystreet.com/about/council.html
index d36421fef..062a66a21 100644
--- a/templates/web/fixmystreet.com/about/council.html
+++ b/templates/web/fixmystreet.com/about/council.html
@@ -659,6 +659,11 @@
<p class="form-note">Ending in .gov.uk</p>
</div>
<div class="form-group">
+ <label for="extra.phone">Contact phone number</label>
+ <span class="required required--optional">optional</span>
+ <input type="text" name="extra.phone" id="extra.phone">
+ </div>
+ <div class="form-group">
<label for="email-newsletter" class="checkbox-label"> <input type="checkbox" name="extra.newsletter" value="Sign me up to the Better Cities newsletter" id="email-newsletter" class="checkbox-input"> Sign up for the Better Cities newsletter for news and insights on smarter technology for councils.</label>
</div>
<div class="form-group submit-group">
diff --git a/templates/web/fixmystreet.com/contact/blurb.html b/templates/web/fixmystreet.com/contact/blurb.html
new file mode 100644
index 000000000..1f25aa795
--- /dev/null
+++ b/templates/web/fixmystreet.com/contact/blurb.html
@@ -0,0 +1,18 @@
+<h4>If you have questions about FixMyStreet</h4>
+
+<p>
+[% tprintf( loc("It's often quickest to <a href=\"%s\">check our FAQs</a> and see if the answer is there."), c.uri_for('/faq') ) %]
+</p>
+
+<p>
+[% loc('Please do <strong>not</strong> report problems through this form; messages go to
+the team behind this site, not a council. To report a problem,
+please <a href="/">go to the front page</a> and follow the instructions.') %]
+</p>
+
+<h4>From a UK Local Council and interested in finding out about FixMyStreet Pro?</h4>
+<p>
+ Please get in touch <a href="/about/council#order">via our sales enquiry form</a>
+</p>
+
+<h3>Send a message to FixMyStreet's technical support team</h3>
diff --git a/templates/web/fixmystreet.com/reports/_extras.html b/templates/web/fixmystreet.com/reports/_extras.html
deleted file mode 100755
index ff9db567f..000000000
--- a/templates/web/fixmystreet.com/reports/_extras.html
+++ /dev/null
@@ -1,31 +0,0 @@
-[%
- fms_councils = {
- 'Angus Council' = 'fix.angus.gov.uk'
- 'Bromley Council' = 'fix.bromley.gov.uk'
- 'Bristol City Council' = 'fixmystreet.bristol.gov.uk'
- 'East Hertfordshire District Council' = 'fixmystreet.eastherts.gov.uk'
- 'Hart District Council' = 'hart.fixmystreet.com'
- 'Oxfordshire County Council' = 'fixmystreet.oxfordshire.gov.uk'
- 'Stevenage Borough Council' = 'stevenage.fixmystreet.com',
- 'Royal Borough of Greenwich' = 'fix.royalgreenwich.gov.uk'
- 'Warwickshire County Council' = 'warwickshire.fixmystreet.com'
- }
- secure = {
- 'fixmystreet.bristol.gov.uk' = 's'
- 'fix.bromley.gov.uk' = 's'
- 'fix.angus.gov.uk' = 's'
- 'fixmystreet.eastherts.gov.uk' = 's'
- }
- site = fms_councils.${body.name}
-%]
-[% IF site %]
-<tr align="center"
-[%- IF ! (loop.count % 2) %] class="a"
-[%- END %]>
-<td class="title" colspan="6" style="padding-top:0">
- <small title="This council's online reporting is powered by FixMyStreet">(includes reports from
- <a href="http[% secure.$site %]://[% site %]">[% site %]</a> using
- <a href="/about/council">FixMyStreet Professional</a>)</small>
-</td>
-</tr>
-[% END %]
diff --git a/templates/web/fixmystreet.com/reports/index.html b/templates/web/fixmystreet.com/reports/index.html
new file mode 100755
index 000000000..2e0ba4596
--- /dev/null
+++ b/templates/web/fixmystreet.com/reports/index.html
@@ -0,0 +1,111 @@
+[% USE Number.Format -%]
+[% extra_js = [
+ version('/vendor/chart.min.js'),
+ version('/vendor/accessible-autocomplete.min.js'),
+ version('/cobrands/fixmystreet.com/dashboard.js')
+] -%]
+[%
+ problems_reported = problems_reported_by_period.last | format_number;
+ problems_fixed = problems_fixed_by_period.last | format_number;
+ last_seven_reported = last_seven_days.problems_total | format_number;
+ last_seven_updated = last_seven_days.updated_total | format_number;
+ last_seven_fixed = last_seven_days.fixed_total | format_number;
+ other_categories_formatted = other_categories | format_number;
+-%]
+[% INCLUDE 'header.html', title = loc('Dashboard'), bodyclass => 'dashboard fullwidthpage' %]
+
+<div class="dashboard-header">
+ <h1>[% loc('Dashboard') %]</h1>
+</div>
+
+<div class="dashboard-row">
+ <div class="dashboard-item dashboard-item--12">
+ <h2>UK: [% loc('All time') %]</h2>
+ <div class="labelled-line-chart">
+ <canvas id="chart-all-reports" width="600" height="300"
+ data-labels="[[% problem_periods.join(',') %]]"
+ data-values-reports="[[% problems_reported_by_period.join(',') %]]"
+ data-values-fixed="[[% problems_fixed_by_period.join(',') %]]"
+ ></canvas>
+ <span class="label" data-datasetindex="0"><strong style="color: #F4A140">[% tprintf(nget("%s problem reported", "%s problems reported", problems_reported_by_period.last), decode(problems_reported) _ '</strong>') %]</span>
+ <span class="label" data-datasetindex="1"><strong style="color: #62B356">[% tprintf(nget("%s report marked as fixed", "%s reports marked as fixed", problems_fixed_by_period.last), decode(problems_fixed) _ '</strong>') %]</span>
+ </div>
+ </div>
+</div>
+
+<div class="dashboard-row">
+ <div class="dashboard-item dashboard-item--6">
+ <h2 class="dashboard-subheading">UK: [% loc('Last 7 days') %]</h2>
+ <div class="dashboard-sparklines">
+ <div>
+ <div class="labelled-sparkline">
+ <canvas width="200" height="50" data-color="#F4A140" data-values="[% last_seven_days.problems.join(' ') %]"></canvas>
+ <span class="label" data-datasetindex="0"><strong style="color: #F4A140;">[% tprintf(nget("%s problem reported", "%s problems reported", last_seven_days.problems_total), decode(last_seven_reported) _ '</strong>') %]</span>
+ </div>
+ </div>
+ <div>
+ <div class="labelled-sparkline">
+ <canvas width="200" height="50" data-color="#4FADED" data-values="[% last_seven_days.updated.join(' ') %]"></canvas>
+ <span class="label" data-datasetindex="0"><strong style="color: #4FADED;">[% tprintf(nget("%s update on problems", "%s updates on problems", last_seven_days.updated_total), decode(last_seven_updated) _ '</strong>') %]</span>
+ </div>
+ </div>
+ <div>
+ <div class="labelled-sparkline">
+ <canvas width="200" height="50" data-color="#62B356" data-values="[% last_seven_days.fixed.join(' ') %]"></canvas>
+ <span class="label" data-datasetindex="0"><strong style="color: #62B356;">[% tprintf(nget("%s problem marked as fixed", "%s problems marked as fixed", last_seven_days.fixed_total), decode(last_seven_fixed) _ '</strong>') %]</span>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="dashboard-item dashboard-item--6">
+ <form class="dashboard-search" action="/reports">
+ <h2>[% loc('Show reports in your area') %]</h2>
+ <label for="body">[% loc('Pick your council') %]</label>
+ <div class="dashboard-search__input">
+ <select id="body" name="body" class="js-autocomplete">
+ <option value="">[% loc('Pick your council') %]</option>
+ [% FOR body IN bodies %]
+ <option value="[% body.id %]">[% body.name | html %]</option>
+ [% END %]
+ </select>
+ </div>
+ <div class="dashboard-search__submit">
+ <input type="submit" value="[% loc('Go') %]">
+ </div>
+ </form>
+ </div>
+</div>
+
+<div class="dashboard-row">
+ <div class="dashboard-item dashboard-item--6">
+ <h2 class="dashboard-subheading">[% loc('Top 5 responsive councils') %]</h2>
+ <p>[% loc('Average time between a problem being reported and being fixed, last 100 reports.') %]</p>
+ <table class="dashboard-ranking-table">
+ <tbody>
+ [% FOR line IN top_five_bodies %]
+ <tr><td>[% line.name %]</td><td>[% tprintf(nget("%s day", "%s days", line.days), line.days) %]</td></tr>
+ [% END %]
+ </tbody>
+ <tfoot>
+ <tr><td>[% loc('UK average') %]</td><td>[% tprintf(nget("%s day", "%s days", average), average) %]</td></tr>
+ </tfoot>
+ </table>
+ </div>
+ <div class="dashboard-item dashboard-item--6">
+ <h2 class="dashboard-subheading">[% loc('Top 5 most used categories') %]</h2>
+ <p>[% loc('Number of problems reported in each category, in the last 7 days.') %]</p>
+ <table class="dashboard-ranking-table">
+ <tbody>
+ [% FOR line IN top_five_categories %]
+ [% line_count = line.count | format_number ~%]
+ <tr><td>[% line.category %]</td><td>[% tprintf(nget("%s report", "%s reports", line.count), decode(line_count)) %]</td></tr>
+ [% END %]
+ </tbody>
+ <tfoot>
+ <tr><td>[% loc('Other categories') %]</td><td>[% tprintf(nget("%s report", "%s reports", other_categories), decode(other_categories_formatted)) %]</td></tr>
+ </tfoot>
+ </table>
+ </div>
+</div>
+
+[% INCLUDE 'footer.html' pagefooter = 'yes' %]