diff options
Diffstat (limited to 'templates')
-rwxr-xr-x | templates/web/base/reports/index.html | 39 | ||||
-rw-r--r-- | templates/web/fixmystreet.com/about/council-dashboard.html | 60 |
2 files changed, 94 insertions, 5 deletions
diff --git a/templates/web/base/reports/index.html b/templates/web/base/reports/index.html index a653a2686..70f4b3929 100755 --- a/templates/web/base/reports/index.html +++ b/templates/web/base/reports/index.html @@ -15,7 +15,9 @@ [% INCLUDE 'header.html', title = loc('Dashboard'), bodyclass => 'dashboard fullwidthpage' %] <div class="dashboard-header"> - <h1>[% loc('Dashboard') %]</h1> + <h1>[% loc('Dashboard') %] + [% IF body %] – [% body.name %] [% END %] + </h1> </div> <div class="dashboard-row"> @@ -58,19 +60,31 @@ </div> </div> <div class="dashboard-item dashboard-item--6"> - <form class="dashboard-search" action="/reports"> + <form class="dashboard-search"> <h2>[% loc('Show reports in your area') %]</h2> + [% IF body %] + <label for="ward">[% loc('Pick your ward') %]</label> + <div class="dashboard-search__input"> + <select id="ward" name="ward" class="js-autocomplete"> + <option value="">[% loc('Pick your ward') %]</option> + [% FOR child IN children.values.sort('name') %] + <option>[% child.name | html ~%]</option> + [% END %] + </select> + </div> + [% ELSE %] <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 ~%] - [% IF NOT body.get_column("area_count") %] [% loc('(no longer exists)') %][% END ~%] + [% FOR b IN bodies # Not body as 'body' may be on stash %] + <option value="[% b.id %]">[% b.name | html ~%] + [% IF NOT b.get_column("area_count") %] [% loc('(no longer exists)') %][% END ~%] </option> [% END %] </select> </div> + [% END %] <div class="dashboard-search__submit"> <input type="submit" value="[% loc('Go') %]"> </div> @@ -80,6 +94,20 @@ <div class="dashboard-row"> <div class="dashboard-item dashboard-item--6"> + [% IF body %] + <h2 class="dashboard-subheading">[% loc('Top 5 wards') %]</h2> + <p>[% loc('Number of problems reported in each ward, in the last 7 days.') %]</p> + <table class="dashboard-ranking-table"> + <tbody> + [% FOR line IN wards %] + <tr><td>[% line.name %]</td><td>[% tprintf(nget("%s report", "%s reports", line.reports), line.reports) %]</td></tr> + [% END %] + </tbody> + <tfoot> + <tr><td>[% loc('Other wards') %]</td><td>[% tprintf(nget("%s report", "%s reports", other_wards), other_wards) %]</td></tr> + </tfoot> + </table> + [% ELSE %] <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"> @@ -92,6 +120,7 @@ <tr><td>[% loc('Overall average') %]</td><td>[% tprintf(nget("%s day", "%s days", average), average) %]</td></tr> </tfoot> </table> + [% END %] </div> <div class="dashboard-item dashboard-item--6"> <h2 class="dashboard-subheading">[% loc('Top 5 most used categories') %]</h2> diff --git a/templates/web/fixmystreet.com/about/council-dashboard.html b/templates/web/fixmystreet.com/about/council-dashboard.html new file mode 100644 index 000000000..7acaee207 --- /dev/null +++ b/templates/web/fixmystreet.com/about/council-dashboard.html @@ -0,0 +1,60 @@ +[% extra_css = BLOCK %] + <link rel="stylesheet" href="[% version('/cobrands/fixmystreet.com/fmsforcouncils.css') %]"> + <link href="https://fonts.googleapis.com/css?family=Rubik:400,500" rel="stylesheet"> +[% END %] + +[% IF no_body_found %] + +[% INCLUDE header.html + title = 'FixMyStreet Professional', bodyclass = 'fullwidthpage' +%] + +<div class="confirmation-header confirmation-header--inbox"> + <h1>Thanks!</h1> + <p>We will be in touch with a confirmation link soon.</p> +</div> + +[% ELSE %] + +[% INCLUDE header.html + title = 'FixMyStreet Professional', bodyclass = 'fms-for-councils fullwidthpage' +%] + +<div class="fixed-container"> + <div class="council-header"> + <h1 class="councils-logo">FixMyStreet Professional</h1> + </div> + <div class="councils-hero"> + <div class="councils-hero__demo-access"> + <p>To access a council-specific version of our main dashboard page, + please provide your name and email below and we'll send you a link.</p> + <form method="post" class="councils-hero__demo-access__form"> + <div class="form-group"> + <label for="demo-name">Name</label> + <span class="required">required</span> + <input type="text" name="name" id="demo-name" required value="[% form_name | html %]"> + </div> + <div class="form-group"> + <label for="demo-email">Contact email</label> + <span class="required">required</span> + <input type="email" name="username" id="demo-email" required value="[% email | html %]"> + <p class="form-note">Ending in .gov.uk, or other official council domain</p> + </div> + <div class="form-group submit-group"> + <input type="hidden" name="r" value="about/council-dashboard"> + <input type="hidden" name="extra.referer" value="[% c.req.headers.referer | html %]"> + <input type="hidden" name="subject" value="Council dashboard request"> + <input type="hidden" name="message" value="Filled in the council dashboard form"> + <input type="hidden" name="recipient" value="bettercities"> + <input type="hidden" name="dest" value="from_council"> + <input type="submit" value="Let me in" class="btn"> + </div> + </form> + </div> + </div> + +</div> + +[% END %] + +[% INCLUDE footer.html %] |