Bug 17300: Fix serials search
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / includes / av-build-dropbox.inc
1 [% USE AuthorisedValues %]
2 [%#
3     Parameters:
4     name: the name of the select element
5     category: the authorised value category
6     default: the default authorised value to select
7     class: the CSS class of the select element
8     size: the size to use for the input (generated if the authorised value category does not exist).
9     all: add a "All" entry
10 %]
11
12 [% SET avs = AuthorisedValues.GetAuthValueDropbox( category, default ) %]
13 [% DEFAULT
14     class = ''
15     size = 20
16 %]
17
18 [% IF avs %]
19   <select id="[% name %]" name="[% name %]" class="[% class %]" >
20   [% IF all %]<option value="">All</option>[% END %]
21   [% FOR av IN avs %]
22     [% IF av.default %]
23       <option value="[% av.value %]" selected="selected">[% av.label | html_entity %]</option>
24     [% ELSE %]
25       <option value="[% av.value %]">[% av.label | html_entity %]</option>
26     [% END %]
27   [% END %]
28   </select>
29 [% ELSE %]
30   <input type="text" id="[% name %]" name="[% name %]" size="[% size %]" value="[% default | html_entity %]" class="[% class %]" />
31 [% END %]