aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2018-05-11 13:10:37 +0100
committerDave Arter <davea@mysociety.org>2018-05-14 10:52:02 +0100
commitf87b9273fee851e0426ac6a86b8455d59c9e703c (patch)
tree8c53a067f398cafa5b757592af06de4bfcc9a105 /templates
parent17431f583e5362d205f4b6c75be5d11aa17dc97b (diff)
Add UI for selecting multiple wards from /reports/ body page
Fixes mysociety/fixmystreetforcouncils#231
Diffstat (limited to 'templates')
-rwxr-xr-xtemplates/web/base/reports/_ward-list.html19
-rw-r--r--templates/web/fixmystreet.com/reports/cobrand_stats.html2
2 files changed, 18 insertions, 3 deletions
diff --git a/templates/web/base/reports/_ward-list.html b/templates/web/base/reports/_ward-list.html
index 8160668d7..bc289a33c 100755
--- a/templates/web/base/reports/_ward-list.html
+++ b/templates/web/base/reports/_ward-list.html
@@ -1,16 +1,29 @@
[% IF children.size %]
-<section id="council_wards" class="hidden-js">
+[% SET show_wards_hidden_class = c.req.params.show_wards ? 'hidden' : 'js-ward-single' %]
+[% SET show_wards_shown_class = c.req.params.show_wards ? '' : 'js-ward-multi hidden' %]
+<section id="council_wards"[% UNLESS c.req.params.show_wards %] class="hidden-js"[% END %]>
<h2>[% ward_text %]</h2>
- <p>[% loc('Follow a ward link to view only reports within that ward.') %]</p>
+ <p class="[% show_wards_hidden_class %]">[% loc('Follow a ward link to view only reports within that ward.') %]</p>
+ <p class="[% show_wards_shown_class %]">[% loc('Select multiple wards to view only reports within those wards.') %]</p>
+ <p class="[% show_wards_hidden_class %]"><a href="?show_wards=1" class="js-ward-select-multiple">[% loc('Select multiple wards?') %]</a></p>
+ <form method="get" action="">
<section class="full-width">
<ul class="item-list item-list--wards">
[% FOR child IN children.values.sort('name') %]
<li class="item-list__item item-list--wards__item">
- <a href="[% child.url %]">[% child.name %]</a>
+ <label class="[% show_wards_shown_class %]">
+ <input type="checkbox" name="ward" value="[% child.name | html %]">
+ [% child.name %]
+ </label>
+ <a class="[% show_wards_hidden_class %]" href="[% child.url %]">[% child.name %]</a>
</li>
[% END %]
</ul>
</section>
+ <p>
+ <input class="btn [% show_wards_shown_class %]" type="submit" value="[% loc('View wards') %]" />
+ </p>
+ </form>
</section>
[% END %]
diff --git a/templates/web/fixmystreet.com/reports/cobrand_stats.html b/templates/web/fixmystreet.com/reports/cobrand_stats.html
index c5f03f617..8b9e57c05 100644
--- a/templates/web/fixmystreet.com/reports/cobrand_stats.html
+++ b/templates/web/fixmystreet.com/reports/cobrand_stats.html
@@ -1,4 +1,6 @@
+[% UNLESS c.req.params.show_wards %]
<div class="full-width area-reports-dashboard-cta">
<strong>New for council staff</strong>
<p>Don’t miss our stats dashboard, only available to council staff. Access detailed reports and statistics — for free. <a href="/about/council-dashboard/">Log in here.</a></p>
</div>
+[% END %]