aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2013-02-04 10:23:30 +0000
committerMatthew Somerville <matthew@mysociety.org>2013-02-04 10:23:30 +0000
commit03325658ab5c2135bc4e0f9b8af0ffe9761ec0e6 (patch)
treebd33d4dfb6f260c62b69eaa40d9b373d39659d45
parentd606ee6a023a858bf494f0dfba80eb1807c2e7df (diff)
Empty hashref tests as true, don't forget.
-rwxr-xr-xtemplates/web/default/reports/body.html2
-rwxr-xr-xtemplates/web/default/reports/index.html2
-rwxr-xr-xtemplates/web/emptyhomes/reports/index.html2
3 files changed, 3 insertions, 3 deletions
diff --git a/templates/web/default/reports/body.html b/templates/web/default/reports/body.html
index da184c6e9..cc0ba1a49 100755
--- a/templates/web/default/reports/body.html
+++ b/templates/web/default/reports/body.html
@@ -37,7 +37,7 @@
[% END %]
</h1>
-[% IF NOT body.areas AND c.cobrand.country == 'GB' %]
+[% 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>.
diff --git a/templates/web/default/reports/index.html b/templates/web/default/reports/index.html
index 780438634..e4b4c3033 100755
--- a/templates/web/default/reports/index.html
+++ b/templates/web/default/reports/index.html
@@ -24,7 +24,7 @@
<tbody>
[% FOREACH body IN bodies %]
<tr align="center"
-[%- IF NOT body.areas %] class="gone"
+[%- 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>
diff --git a/templates/web/emptyhomes/reports/index.html b/templates/web/emptyhomes/reports/index.html
index 3029bcd1c..6d80fa0d6 100755
--- a/templates/web/emptyhomes/reports/index.html
+++ b/templates/web/emptyhomes/reports/index.html
@@ -14,7 +14,7 @@
[% FOREACH body IN bodies %]
<tr align="center"
-[%- IF NOT body.areas %] class="gone"
+[%- IF NOT body.areas.size %] class="gone"
[%- ELSIF loop.count % 2 %] class="a"
[%- END -%]
>