aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/base/reports
diff options
context:
space:
mode:
Diffstat (limited to 'templates/web/base/reports')
-rw-r--r--templates/web/base/reports/_body_name.html1
-rw-r--r--templates/web/base/reports/_list-filters.html4
-rwxr-xr-xtemplates/web/base/reports/body.html7
3 files changed, 5 insertions, 7 deletions
diff --git a/templates/web/base/reports/_body_name.html b/templates/web/base/reports/_body_name.html
new file mode 100644
index 000000000..42392e4cd
--- /dev/null
+++ b/templates/web/base/reports/_body_name.html
@@ -0,0 +1 @@
+[% body.name %]
diff --git a/templates/web/base/reports/_list-filters.html b/templates/web/base/reports/_list-filters.html
index f5d1faa65..9973a0c1f 100644
--- a/templates/web/base/reports/_list-filters.html
+++ b/templates/web/base/reports/_list-filters.html
@@ -1,8 +1,10 @@
[% select_status = PROCESS 'reports/_list-filter-status.html' %]
+[%# We want to only select things that match all filters, if filters are provided ~%]
[% BLOCK category_options %]
[% FOR cat IN categories %]
- <option value="[% cat.category %]"[% ' selected' IF filter_category.${cat.category} OR ( filter_group AND ( cat.get_extra_metadata('group').grep(filter_group).size OR cat.category == filter_group ) ) %]>
+ [% SET cat_safe = mark_safe(cat.category) %]
+ <option value="[% cat.category %]"[% ' selected' IF ( filter_category.size OR filter_group ) AND ( NOT filter_category.size OR filter_category.$cat_safe ) AND ( NOT filter_group OR filter_group == group.name ) %]>
[% cat.category_display %]
[%~ IF cat.get_extra_metadata('help_text') %] ([% cat.get_extra_metadata('help_text') %])[% END ~%]
</option>
diff --git a/templates/web/base/reports/body.html b/templates/web/base/reports/body.html
index d723a7992..d6f9558a3 100755
--- a/templates/web/base/reports/body.html
+++ b/templates/web/base/reports/body.html
@@ -1,9 +1,4 @@
-[% SET body_name = body.name %]
-[% IF c.cobrand.moniker == 'hounslow' %]
- [% SET body_name = 'Hounslow Highways' %]
-[% ELSIF c.cobrand.moniker == 'isleofwight' %]
- [% SET body_name = 'Island Roads' %]
-[% END %]
+[% body_name = PROCESS 'reports/_body_name.html' | trim %]
[% IF ward %]
[% name = "$ward.name, $body_name"