ELSIF adv_chunk.adv_attr;
INCLUDE "opac/parts/coded_value_selector.tt2"
attr=adv_chunk.adv_attr multiple="multiple" size="4";
+ ELSIF adv_chunk.adv_filter;
+ INCLUDE "opac/parts/filter_group_selector.tt2"
+ filter_group=adv_chunk.adv_filter multiple="multiple" size="4";
END; %]
</td>
[%
# adv_label is the (translated) label for the limiter
# adv_attr is an array of possible limiters, the first one that has any
# values will be used
+# adv_filter is the same as adv_attr, but for search filter groups
# adv_break will end the current row. If specified with a label/attr it
# will do so *after* that limiter.
# adv_special will drop in a special entry:
search.default_qtypes = ['keyword','title','author'];
+##############################################################################
+# Basic Search Box definition
+# This allows selection of what, exactly, basic search uses for a selection
+# box. Previously it was hardcoded to use an attr box of mattype or item_type.
+#
+# type can be "attr" or "filter"
+# group is the attr or filter entries you want to check for
+# none_label is the label for the default nothing selected entry.
+
+search.basic_config = {
+ type => 'attr',
+ group => ['mattype','item_type'],
+ none_label => l("All Formats"),
+};
+
%]
class="adv_search_font">[% l('Advanced Search') %]</span></a>
</div>
<div class="searchbar">[%- l('Search ');
- INCLUDE "opac/parts/coded_value_selector.tt2"
- attr=["mattype", "item_type"] none_ok=1 none_label=l('All Formats');
+ IF search.basic_config.type == 'attr';
+ INCLUDE "opac/parts/coded_value_selector.tt2"
+ attr=search.basic_config.group none_ok=1 none_label=search.basic_config.none_label;
+ ELSIF search.basic_config.type == 'filter';
+ INCLUDE "opac/parts/filter_group_selector.tt2"
+ filter_group=search.basic_config.group none_ok=1 none_label=search.basic_config.none_label;
+ END;
l(' for ');
%]
<span class='search_box_wrapper'>