#ac_content { clear: both; width: 100%; margin-top: 10px; }
select#qtype,
+select#item_format_selector,
select#location_selector {
width:auto;
}
--- /dev/null
+
+[%
+# These are displayed in the order shown
+item_formats = [
+ { 'code' => 'at', 'value' => 'Books' },
+ { 'code' => 'at-d', 'value' => 'Large Print Books' },
+ { 'code' => 'at-s', 'value' => 'E-Books' },
+ { 'code' => 'i', 'value' => 'Audiobooks' },
+ { 'code' => 'g', 'value' => 'Video Recordings' },
+ { 'code' => 'j', 'value' => 'Music' },
+ { 'code' => 'm', 'value' => 'Electronic Resources' },
+];
+%]
+
+[%-
+ name = "fi:format";
+ id = "item_format_selector";
+ values = values || CGI.param(name);
+-%]
+
+<select id='[% id %]' name='[% name %]'[%
+ multiple ? ' multiple="multiple"' : '';
+ size ? (' size="' _ size _ '"') : ''; %]>
+[% IF none_ok %]
+ <option value=''>[% none_label ? none_label : l('-- Any --') %]</option>
+[% END;
+FOR o IN item_formats; %]
+ <option value='[% o.code | uri %]'[% values.grep('^' _ o.code _ '$').size ? ' selected="selected"' : '' %]>[% o.value | html %]</option>
+[% END -%]
+</select>
+
</div>
<div class="searchbar">
[%- INCLUDE "opac/parts/qtype_selector.tt2" id="qtype"; %]
- [%- INCLUDE "opac/parts/coded_value_selector.tt2" attr=["mattype", "item_type"] none_ok=1 none_label=l('All Formats'); %]
+ [%- INCLUDE "opac/parts/item_format_selector.tt2" none_ok=1 none_label=l('All Formats'); %]
[%- INCLUDE build_org_selector show_loc_groups=1 id='location_selector' %]
</div>
[% IF ctx.bookbag %]