aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/FixMyStreet/App/Controller/Reports.pm13
-rwxr-xr-xtemplates/web/default/reports/body.html7
-rwxr-xr-xtemplates/web/emptyhomes/reports/_ward-list.html0
-rwxr-xr-xtemplates/web/emptyhomes/reports/body.html73
-rwxr-xr-xtemplates/web/emptyhomes/reports/index.html9
5 files changed, 13 insertions, 89 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Reports.pm b/perllib/FixMyStreet/App/Controller/Reports.pm
index ec41dc17f..1fcbfbd72 100644
--- a/perllib/FixMyStreet/App/Controller/Reports.pm
+++ b/perllib/FixMyStreet/App/Controller/Reports.pm
@@ -120,14 +120,21 @@ sub ward : Path : Args(2) {
my $pins = $c->stash->{pins};
$c->stash->{page} = 'reports'; # So the map knows to make clickable pins
- FixMyStreet::Map::display_map(
- $c,
+ my %map_params = (
latitude => @$pins ? $pins->[0]{latitude} : 0,
longitude => @$pins ? $pins->[0]{longitude} : 0,
area => $c->stash->{ward} ? $c->stash->{ward}->{id} : $c->stash->{council}->{id},
- pins => $pins,
any_zoom => 1,
);
+ if ( $c->cobrand->moniker eq 'emptyhomes' ) {
+ FixMyStreet::Map::display_map(
+ $c, %map_params, latitude => 0, longitude => 0,
+ );
+ } else {
+ FixMyStreet::Map::display_map(
+ $c, %map_params, pins => $pins,
+ );
+ }
$c->cobrand->tweak_all_reports_map( $c );
diff --git a/templates/web/default/reports/body.html b/templates/web/default/reports/body.html
index 134c9d4fc..40f2fd1f8 100755
--- a/templates/web/default/reports/body.html
+++ b/templates/web/default/reports/body.html
@@ -1,9 +1,3 @@
-[% IF c.cobrand.moniker == 'fixmystreet' OR c.cobrand.moniker == 'bromley';
- style = 'new';
- ELSE;
- style = 'old';
- END;
-%]
[% IF ward %]
[% name = "$ward.name, $council.name"
thing = loc('ward')
@@ -24,7 +18,6 @@
PROCESS "maps/${map.type}.html";
INCLUDE 'header.html',
title = tprintf(loc('%s - Summary reports'), name)
- context = 'reports'
bodyclass = 'mappage'
rss = [ tprintf(loc('Problems within %s, FixMyStreet'), name), rss_url ]
%]
diff --git a/templates/web/emptyhomes/reports/_ward-list.html b/templates/web/emptyhomes/reports/_ward-list.html
new file mode 100755
index 000000000..e69de29bb
--- /dev/null
+++ b/templates/web/emptyhomes/reports/_ward-list.html
diff --git a/templates/web/emptyhomes/reports/body.html b/templates/web/emptyhomes/reports/body.html
deleted file mode 100755
index 8ba9bf1ca..000000000
--- a/templates/web/emptyhomes/reports/body.html
+++ /dev/null
@@ -1,73 +0,0 @@
-[% IF ward %]
- [% name = "$ward.name, $council.name"
- thing = loc('ward')
- %]
-[% ELSE %]
- [% name = council.name
- thing = loc('council')
- %]
-[% END %]
-
-[%
- INCLUDE 'header.html',
- title = tprintf(loc('%s - Summary reports'), name)
- context = 'reports'
-%]
-
-[% 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></li>
-[% END %]
-</ul>
-[% END %]
-
-<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>
-[% 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>
-
-</div>
-[% INCLUDE 'footer.html' %]
-
diff --git a/templates/web/emptyhomes/reports/index.html b/templates/web/emptyhomes/reports/index.html
index db506679e..8eaeeb618 100755
--- a/templates/web/emptyhomes/reports/index.html
+++ b/templates/web/emptyhomes/reports/index.html
@@ -10,8 +10,6 @@
<th>[% loc('Name') %]</th>
<th>[% loc('New problems') %]</th>
<th>[% loc('Older problems') %]</th>
-<th>[% loc('Recently fixed') %]</th>
-<th>[% loc('Older fixed') %]</th>
</tr>
[% FOREACH area IN areas_info_sorted %]
@@ -20,12 +18,11 @@
[%- ELSIF loop.count % 2 %] class="a"
[%- END -%]
>
-<td align="left">[% area.name %]</td>
+<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) + (open.${area.id}.unknown or 0) %]</td>
-<td>[% fixed.${area.id}.new or 0 %]</td>
-<td>[% fixed.${area.id}.old or 0 %]</td>
+<td>[% (open.${area.id}.older or 0) + (open.${area.id}.unknown or 0) + (fixed.${area.id}.new or 0) + (fixed.${area.id}.old or 0) %]</td>
</tr>
+
[% END %]
</table>