aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2018-09-25 18:53:21 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-09-25 18:53:21 +0100
commit2e8ea6b187eb4219021bff009d8f1c6a87f75564 (patch)
tree9eb950378ad673326fa17d0b373141dcaf553e52 /templates
parentda2026df7210cd772d40a7f619ec6ff8563800d7 (diff)
parentcdd94a3de1445d0aea4dfc8c18cbae9e315bdda9 (diff)
Merge branch 'body-list-speedup'
Diffstat (limited to 'templates')
-rw-r--r--templates/web/base/admin/bodies.html4
-rw-r--r--templates/web/base/admin/defecttypes/index.html3
-rw-r--r--templates/web/base/dashboard/index.html2
-rwxr-xr-xtemplates/web/base/reports/index.html2
4 files changed, 5 insertions, 6 deletions
diff --git a/templates/web/base/admin/bodies.html b/templates/web/base/admin/bodies.html
index 9f4b81340..33ae5b25a 100644
--- a/templates/web/base/admin/bodies.html
+++ b/templates/web/base/admin/bodies.html
@@ -32,12 +32,12 @@
</tr>
[%- FOREACH body IN bodies %]
[%- SET id = body.id %]
- [% NEXT IF c.cobrand.moniker == 'zurich' AND admin_type == 'dm' AND (body.parent OR body.bodies) %]
+ [% NEXT IF c.cobrand.moniker == 'zurich' AND admin_type == 'dm' AND (body.parent OR body.children_count) %]
<tr[% IF body.deleted %] class="adminhidden"[% END %]
[% IF NOT counts.$id OR counts.$id.deleted == counts.$id.c %] class="is-deleted"[% END %]>
<td>
[% IF c.cobrand.moniker == 'zurich' %]
- [% FILTER repeat(4*body.api_key) %]&nbsp;[% END %]
+ [% FILTER repeat(4*body.indent_level) %]&nbsp;[% END %]
[% IF admin_type == 'super' %]
<a href="[% c.uri_for( 'body', id ) %]">[% body.name | html %]</a>
[% ELSE %]
diff --git a/templates/web/base/admin/defecttypes/index.html b/templates/web/base/admin/defecttypes/index.html
index c45a09e6e..9e753edb6 100644
--- a/templates/web/base/admin/defecttypes/index.html
+++ b/templates/web/base/admin/defecttypes/index.html
@@ -4,8 +4,7 @@
[% FOR body IN bodies %]
<li>
<a href="[% c.uri_for('', body.id) %]">[% body.name %]</a>
- [% defect_types_count = body.defect_types.count %]
- [% IF defect_types_count %]([% defect_types_count %])[% END %]
+ [% IF body.defect_type_count %]([% body.defect_type_count %])[% END %]
</li>
[% END %]
</ul>
diff --git a/templates/web/base/dashboard/index.html b/templates/web/base/dashboard/index.html
index cb6ca154f..5377fa938 100644
--- a/templates/web/base/dashboard/index.html
+++ b/templates/web/base/dashboard/index.html
@@ -50,7 +50,7 @@
<label for="ward">[% loc('Council:') %]</label>
<select class="form-control" name="body" id="body"><option value=''>[% loc('All') %]</option>
[% FOR b IN bodies %]
- [% NEXT IF NOT b.get_column("area_count") %]
+ [% NEXT IF NOT b.area_count %]
<option value="[% b.id %]">[% b.name %]</option>
[% END %]
</select>
diff --git a/templates/web/base/reports/index.html b/templates/web/base/reports/index.html
index 9fcf0b4c5..dfb99f089 100755
--- a/templates/web/base/reports/index.html
+++ b/templates/web/base/reports/index.html
@@ -79,7 +79,7 @@
<option value="">[% loc('Pick your council') %]</option>
[% 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 ~%]
+ [% IF NOT b.area_count %] [% loc('(no longer exists)') %][% END ~%]
</option>
[% END %]
</select>