diff options
Diffstat (limited to 'templates/web/base/reports')
-rwxr-xr-x | templates/web/base/reports/_list-entry.html | 6 | ||||
-rw-r--r-- | templates/web/base/reports/_rss.html | 2 | ||||
-rwxr-xr-x | templates/web/base/reports/_ward-list.html | 9 | ||||
-rwxr-xr-x | templates/web/base/reports/body.html | 111 | ||||
-rwxr-xr-x | templates/web/base/reports/index.html | 42 | ||||
-rwxr-xr-x | templates/web/base/reports/ward.html | 1 |
6 files changed, 171 insertions, 0 deletions
diff --git a/templates/web/base/reports/_list-entry.html b/templates/web/base/reports/_list-entry.html new file mode 100755 index 000000000..445a5315f --- /dev/null +++ b/templates/web/base/reports/_list-entry.html @@ -0,0 +1,6 @@ +<li><a href="[% c.uri_for('/report/' _ problem.id) %]">[% problem.title | html %]</a> + [% IF problem.bodies_str_ids.size > 1 %] <small>[% loc('(sent to both)') %]</small> [% END %] + [% IF c.cobrand.moniker != 'emptyhomes' %] + [% IF problem.bodies_str_ids.size == 0 %] <small>[% loc('(not sent to council)') %]</small> [% END %] + [% END %] +</li> diff --git a/templates/web/base/reports/_rss.html b/templates/web/base/reports/_rss.html new file mode 100644 index 000000000..9756f131d --- /dev/null +++ b/templates/web/base/reports/_rss.html @@ -0,0 +1,2 @@ +<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> + diff --git a/templates/web/base/reports/_ward-list.html b/templates/web/base/reports/_ward-list.html new file mode 100755 index 000000000..e78ac7d90 --- /dev/null +++ b/templates/web/base/reports/_ward-list.html @@ -0,0 +1,9 @@ +[% IF location == 'before' AND children.size %] +<h2 style="clear:right">[% ward_text %]</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></li> +[% END %] +</ul> +[% END %] diff --git a/templates/web/base/reports/body.html b/templates/web/base/reports/body.html new file mode 100755 index 000000000..1b6a3a157 --- /dev/null +++ b/templates/web/base/reports/body.html @@ -0,0 +1,111 @@ +[% IF ward %] + [% name = "$ward.name, $body.name" + thing = loc('ward') + %] +[% ELSE %] + [% name = body.name + thing = loc('council') + %] +[% END %] + +[% IF c.cobrand.moniker == 'oxfordshire' %] + [% ward_text = 'View reports by division' %] +[% ELSIF c.cobrand.is_council %] + [% ward_text = loc( 'View reports by ward' ) %] +[% ELSE %] + [% ward_text = loc( 'Wards of this council' ) %] +[% END %] + +[% + PROCESS "maps/${map.type}.html"; + INCLUDE 'header.html', + title = tprintf(loc('%s - Summary reports'), name) + bodyclass = 'mappage' + rss = [ tprintf(loc('Problems within %s, FixMyStreet'), name), rss_url ] +%] + +[% map_html %] + +[% INCLUDE 'reports/_ward-list.html', location = 'before' %] + +</div> +<div id="side"> + +<h1 id="reports_heading"> + [% IF ward %] + [% ward.name %]<span>, </span><a href="[% body_url %]">[% body.name %]</a> + [% ELSE %] + [% body.name %] + [% END %] +</h1> + +[% IF c.cobrand.moniker == 'hart' %] + [% INCLUDE '_hart_hants_note.html' %] +[% END %] + +[% IF NOT body.areas.size AND c.cobrand.country == 'GB' %] + <p id="unknown" class="alert">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 %] + [% INCLUDE 'reports/_rss.html' %] +[% END %] + +[% TRY %][% INCLUDE 'reports/cobrand_stats.html' %][% CATCH file %][% END %] + +[% INCLUDE 'reports/_ward-list.html', location = 'after' %] + +[% IF c.cobrand.moniker == 'fixmystreet' %] +<p class="promo"> + FixMyStreet is now available for local council websites. + <a href="https://www.mysociety.org/services/fixmystreet-for-councils/">Find out more</a>. +</p> +[% END %] + +[% INCLUDE 'pagination.html', param = 'p' %] + +<section class="full-width"> + [% INCLUDE column + problems = problems.${body.id} + %] +</section> + +[% INCLUDE 'pagination.html', param = 'p' %] + +</div> +[% INCLUDE 'footer.html' %] + +[% BLOCK column %] +[% IF problems %] + +<ul class="issue-list-a"> +[% FOREACH problem IN problems %] + [% INCLUDE 'reports/_list-entry.html' %] +[% END %] +</ul> + +[% END %] +[% END %] + diff --git a/templates/web/base/reports/index.html b/templates/web/base/reports/index.html new file mode 100755 index 000000000..1e4130a37 --- /dev/null +++ b/templates/web/base/reports/index.html @@ -0,0 +1,42 @@ +[% INCLUDE 'header.html', title = loc('Summary reports'), bodyclass => 'fullwidthpage' %] + +<h1>[% loc('All Reports') %]</h1> + +<div class="intro"> +<p> +[% loc('This is a summary of all reports on this site; select a particular council to see the reports sent there.') %] +[% loc('Greyed-out lines are councils that no longer exist.') %] +</p> +</div> + +<table cellpadding="3" cellspacing="1" border="0" class="nicetable"> +<thead> +<tr> +<th class="title">[% loc('Name') %]</th> +<th class="data">[% loc('New <br>problems') %]</th> +<th class="data">[% loc('Older <br>problems') %]</th> +<th class="data">[% loc('Old / unknown <br>problems') %]</th> +<th class="data">[% loc('Recently <br>fixed') %]</th> +<th class="data">[% loc('Older <br>fixed') %]</th> +</tr> +</thead> + +<tbody> +[% FOREACH body IN bodies %] +<tr align="center" +[%- IF NOT body.areas.size %] class="gone" +[%- ELSIF ! (loop.count % 2) %] class="a" +[%- END %]> +<td class="title"><a href="[% body.url(c) %]">[% body.name %]</a></td> +<td class="data">[% IF open.${body.id}.new %]<a href="[% body.url(c, { t => 'new' }) %]">[% open.${body.id}.new %]</a>[% ELSE %]0[% END %]</td> +<td class="data">[% IF open.${body.id}.older %]<a href="[% body.url(c, { t => 'older' }) %]">[% open.${body.id}.older %]</a>[% ELSE %]0[% END %]</td> +<td class="data">[% IF open.${body.id}.unknown %]<a href="[% body.url(c, { t => 'unknown' }) %]">[% open.${body.id}.unknown %]</a>[% ELSE %]0[% END %]</td> +<td class="data">[% IF fixed.${body.id}.new %]<a href="[% body.url(c, { t => 'fixed' }) %]">[% fixed.${body.id}.new %]</a>[% ELSE %]0[% END %]</td> +<td class="data">[% IF fixed.${body.id}.old %]<a href="[% body.url(c, { t => 'older_fixed' }) %]">[% fixed.${body.id}.old %]</a>[% ELSE %]0[% END %]</td> +</tr> +[% TRY %][% PROCESS "reports/_extras.html" %][% CATCH file %][% END %] +[% END %] +</tbody> +</table> + +[% INCLUDE 'footer.html', pagefooter = 'yes' %] diff --git a/templates/web/base/reports/ward.html b/templates/web/base/reports/ward.html new file mode 100755 index 000000000..4b2ea29a5 --- /dev/null +++ b/templates/web/base/reports/ward.html @@ -0,0 +1 @@ +[% INCLUDE reports/body.html %] |