aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2018-01-24 17:12:13 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-05-09 12:57:58 +0100
commit9da59471cd094567b214db643f2ffc471f823dca (patch)
treedd133b4a89affaa41fbd10f195a9aa8b68925f92 /templates
parent2012321cda35654d33708e60404d33742b48ead1 (diff)
Cobrand hook for showing all states in filter.
Diffstat (limited to 'templates')
-rw-r--r--templates/web/base/reports/_list-filters.html5
1 files changed, 3 insertions, 2 deletions
diff --git a/templates/web/base/reports/_list-filters.html b/templates/web/base/reports/_list-filters.html
index 5260aa773..928d54452 100644
--- a/templates/web/base/reports/_list-filters.html
+++ b/templates/web/base/reports/_list-filters.html
@@ -1,7 +1,8 @@
+[% SET show_all_states = c.cobrand.filter_show_all_states OR (c.user_exists AND (c.user.is_superuser OR c.user.belongs_to_body(body.id))) %]
[% select_status = BLOCK %]
<select class="form-control js-multiple" name="status" id="statuses" multiple
data-all="[% loc('All') %]"
- [% IF c.user_exists AND c.user.is_superuser OR c.user.belongs_to_body(body.id) %]
+ [% IF show_all_states %]
[% options = []; FOR group IN filter_states; FOR state IN group.1; NEXT IF state == 'hidden'; options.push(state); END; END %]
data-all-options='["[% options.join('", "') %]"]'
[%~ ELSE ~%]
@@ -17,7 +18,7 @@
<option value="shortlisted"[% ' selected' IF filter_status.shortlisted %]>[% loc('Shortlisted') %]</option>
<option value="unshortlisted"[% ' selected' IF filter_status.unshortlisted %]>[% loc('Unshortlisted') %]</option>
[% END %]
- [% IF c.user_exists AND c.user.is_superuser OR c.user.belongs_to_body(body.id) %]
+ [% IF show_all_states %]
[% FOR group IN filter_states %]
[% FOR state IN group.1 %]
[% NEXT IF state == 'hidden' %]