1 <div class="facet_box_wrapper filter_box_wrapper">
4 # don't display a box for the search_format filter,
5 # as that's got its own widget
6 ignore_filters = ['search_format'];
8 FOR filter IN ctx.query_struct.filters;
10 IF ignore_filters.grep('^' _ fname _ '$').size;
14 fvalues = filter.args;
15 crad = ctx.get_crad(fname);
17 IF crad; # will be some special ones, like locations
18 remove_filter = 'fi:' _ fname;
20 <div class="facet_box_temp filter_box_temp">
23 title="[% l('Remove [_1] filter', (crad.description || crad.label)) %]"
24 href="[% mkurl('', {}, [remove_filter]) %]" rel="nofollow" vocab="">
27 <h4 class="title">[% IF filter.negate; l('Not'); END %] [% (crad.description || crad.label) | html %]</h4>
29 <div class="box_wrapper">
33 thing = ctx.search_ccvm('ctype',fname,'code',fval).0;
34 display_value = thing.search_label || thing.value;
35 IF display_value.defined;
36 temp.push(display_value);
39 FOR display_value IN temp.sort;
41 <div class="facet_template filter_template">
42 <div class="facet filter">
43 [% display_value | html%]
48 </div> <!-- box_wrapper -->
49 </div> <!-- facet_box_temp -->
52 [% IF filter.name == 'locations'; locs = ctx.search_acpl('id',filter.args) %]
53 <div class="facet_box_temp filter_box_temp">
56 title="[% l('Remove location filter') %]"
57 href="[% mkurl('', {}, ['fi:locations']) %]" rel="nofollow" vocab="">
60 <h4 class="title">[% IF filter.negate; l('Not'); END %] [% l('Locations') %]</h4>
62 <div class="box_wrapper">
68 FOR display_name IN temp.sort; %]
69 <div class="facet_template filter_template">
70 <div class="facet filter">
71 [% display_name | html%]
76 </div> <!-- box_wrapper -->
77 </div> <!-- facet_box_temp -->
78 [% END; # IF locations %]
80 </div> <!-- facet_box_wrapper -->