<table cellpadding='10' cellspacing='0' border='0'><tr>
<td valign='top'>
<strong>[% l("Item Type") %]</strong><br />
- [% INCLUDE "default/opac/parts/format_selector.tt2"
- multiple="multiple" size="4"
+ [% INCLUDE "default/opac/parts/coded_value_selector.tt2"
+ attr="mattype" multiple="multiple" size="4"
id="adv_global_item_type_basic" %]
</td>
<td valign='top'>
<strong>[% l("Language") %]</strong><br />
- [% INCLUDE "default/opac/parts/language_selector.tt2"
- multiple="multiple" size="4" %]
+ [% INCLUDE "default/opac/parts/coded_value_selector.tt2"
+ attr="item_lang" multiple="multiple" size="4" %]
</td>
<td valign='top'>
<strong>[% l("Audience") %]</strong><br />
- [% INCLUDE "default/opac/parts/audience_selector.tt2"
- id="adv_global_audience_basic"
+ [% INCLUDE "default/opac/parts/coded_value_selector.tt2"
+ attr="audience" id="adv_global_audience_basic"
multiple="multiple" size="4" %]
</select>
<!--<a id='adv_global_audience_link_adv' class='classic_link adv_adv_link'
+++ /dev/null
-[% name = name || "fi:audience";
- id = id || "audience_selector";
- values = values || CGI.param(name) %]
-<select id='[% id %]' name='[% name %]'[%
- multiple ? ' multiple="multiple"' : '';
- size ? (' size="' _ size _ '"') : ''; %]>
-[%
-FOR opt IN [
- {'code' => 'a,b,c,j', 'label' => l("Juvenile")},
- {'code' => 'd', 'label' => l("General")},
- {'code' => 'e', 'label' => l("Adult")}
-];
- |l(opt.code, opt.label) %]
-<option value='[_1]'[% values.grep('^' _ opt.code _ '$').size ? ' selected="selected"' : '' %]>[_2]</option>
-[% END; END %]
-</select>
--- /dev/null
+[%- name = name || "fi:" _ attr;
+ id = id || attr _ "_selector";
+ values = values || CGI.param(name); -%]
+<select id='[% id %]' name='[% name %]'[%
+ multiple ? ' multiple="multiple"' : '';
+ size ? (' size="' _ size _ '"') : ''; %]>
+[% all_values = ctx.search_ccvm('ctype', attr);
+IF none_ok %]
+ <option>[% l('-- Any --') %]</option>
+[% END;
+FOR o IN all_values;
+ |l(o.value) %]
+ <option value='[% o.code %]'[% values.grep('^' _ o.code _ '$').size ? ' selected="selected"' : '' %]>[_1]</option>
+[% END; END -%]
+</select>
+++ /dev/null
-[%
- # Start w/ mattype, fall back to item_type
- format_spec = '';
- formats = [];
- FOR format_spec IN ['mattype', 'item_type'];
- formats = ctx.search_ccvm('ctype', format_spec);
- IF formats.size; BREAK; END;
- END;
- name = name || "fi:" _ format_spec;
- id = id || "format_selector";
- values = values || CGI.param(name)
--%]
-
-<select id='[% id %]' name='[% name %]'[%
- multiple ? ' multiple="multiple"' : '';
- size ? (' size="' _ size _ '"') : ''; %]>
- <option value=''>[% l("All Formats") %]</option>
-
-[% FOR o IN formats %]
- <option value='[% o.code %]'[% values.grep('^' _ o.code _ '$').size ? ' selected="selected"' : ''%]>[% o.value %]</option>
-[%- END %]
-<!--
- <option value='at'>[% l("Books") %]</option>
- <option value='at-d'>[% l("Large Print Books") %]</option>
- <option value='i'>[% l("Audiobooks") %]</option>
- <option value='g'>[% l("Video Recordings") %]</option>
- <option value='j'>[% l("Music") %]</option>
- <option value='m'>[% l("Electronic Resources") %]</option>
--->
-</select>
+++ /dev/null
-[%- name = name || "fi:language";
- id = id || "language_selector";
- values = values || CGI.param(name); -%]
-<select id='[% id %]' name='[% name %]'[%
- multiple ? ' multiple="multiple"' : '';
- size ? (' size="' _ size _ '"') : ''; %]>
-[%-
-# Language otions for languages that exist in the catalog.
-# This file should be updated on occasion.
-#
-# develooper=# select code,value from config.language_map m
-# join metabib.rec_descriptor r on (r.item_lang = m.code) group by 1,2;
-
-# XXX I haven't internationalized these labels because this stuff shouldn't
-# be hardcoded like this forever.
-FOR lang IN [
- {'code' => 'eng', 'label' => 'English'},
- {'code' => 'spa', 'label' => 'Spanish'},
- {'code' => 'fre', 'label' => 'French'},
- {'code' => 'ger', 'label' => 'German'},
- {'code' => 'ita', 'label' => 'Italian'},
- {'code' => 'chi', 'label' => 'Chinese'},
- {'code' => 'jpn', 'label' => 'Japanese'},
- {'code' => 'kor', 'label' => 'Korean'},
- {'code' => 'dut', 'label' => 'Dutch'},
- {'code' => 'gre', 'label' => 'Greek, Modern (1453- )'},
- {'code' => 'lat', 'label' => 'Latin'},
- {'code' => 'vie', 'label' => 'Vietnamese'},
- {'code' => 'rus', 'label' => 'Russian'},
- {'code' => 'nor', 'label' => 'Norwegian'},
- {'code' => 'wel', 'label' => 'Welsh'},
- {'code' => 'pau', 'label' => 'Palauan'},
- {'code' => 'swe', 'label' => 'Swedish'},
- {'code' => 'nav', 'label' => 'Navajo'},
- {'code' => 'und', 'label' => 'Undetermined'}
-];
- |l(lang.code, lang.label) %]
-<option value='[_1]'[% values.grep('^' _ lang.code _ '$').size ? ' selected="selected"' : '' %]>[_2]</option>
-[% END; END -%]
-</select>
[% UNLESS is_advanced %]
<tr>
<td>
- [% INCLUDE "default/opac/parts/format_selector.tt2" value=CGI.param("format") %]
+ [% INCLUDE "default/opac/parts/coded_value_selector.tt2" attr="mattype" none_ok=1 %]
</td>
<td>
<span id='depth_selector_span'>