[% PROCESS "opac/parts/org_selector.tt2";
# We need to ignore some filters in our count
fignore = ['lasso','location_groups','site','core_limit','limit','badge_orgs','badges','estimation_strategy','depth'];
fcount = 0;
FOR f IN ctx.query_struct.filters;
IF fignore.grep('^' _ f.name _ '$').size;
NEXT;
END;
fcount = fcount + 1;
END;
# don't display a box for the search_format filter,
# as that's got its own widget
ignore_filters = ['search_format'];
trimmed_filters = [];
FOR filter IN ctx.query_struct.filters;
fname = filter.name;
IF ignore_filters.grep('^' _ fname _ '$').size;
NEXT;
END;
trimmed_filters.push(filter);
END;
ctx.query_struct.filters = trimmed_filters;
%]
[% UNLESS took_care_of_form -%]
[% END %]
[% IF fcount > 0 %]