Lines 1-4
Link Here
|
1 |
[% USE CGI %] |
|
|
2 |
[% USE JSON.Escape %] |
1 |
[% USE JSON.Escape %] |
3 |
|
2 |
|
4 |
[% BLOCK form_label %] |
3 |
[% BLOCK form_label %] |
Lines 34-90
Link Here
|
34 |
<label class="form-field-label" for="[% name %]">[% INCLUDE form_label label=name %]</label> |
33 |
<label class="form-field-label" for="[% name %]">[% INCLUDE form_label label=name %]</label> |
35 |
<select id="[% name %]_op" name="[% name %]_op"> |
34 |
<select id="[% name %]_op" name="[% name %]_op"> |
36 |
<option value="=">is</option> |
35 |
<option value="=">is</option> |
37 |
[% IF CGI.param(name _ '_op') == '!=' %] |
36 |
<option value="!=" >is not</option> |
38 |
<option value="!=" selected="selected">is not</option> |
|
|
39 |
[% ELSE %] |
40 |
<option value="!=" >is not</option> |
41 |
[% END %] |
42 |
</select> |
37 |
</select> |
43 |
[% SET values = CGI.param(name) %] |
|
|
44 |
<select id="[% name %]" name="[% name %]" multiple="multiple" size="[% options.size < 4 ? options.size + 1 : 4 %]"> |
38 |
<select id="[% name %]" name="[% name %]" multiple="multiple" size="[% options.size < 4 ? options.size + 1 : 4 %]"> |
45 |
[% IF (values == '') %] |
39 |
<option value="" selected="selected"> |
46 |
<option value="" selected="selected"> |
|
|
47 |
[% ELSE %] |
48 |
<option value=""> |
49 |
[% END %] |
50 |
[% IF (empty_option) %][% INCLUDE form_label label=empty_option %][% ELSE %]<span>All</span>[% END %] |
40 |
[% IF (empty_option) %][% INCLUDE form_label label=empty_option %][% ELSE %]<span>All</span>[% END %] |
51 |
</option> |
41 |
</option> |
52 |
[% FOREACH option IN options %] |
42 |
[% FOREACH option IN options %] |
53 |
[% IF values != '' && values.grep(option.value).size %] |
43 |
<option value="[% option.value %]">[% option.label %]</option> |
54 |
<option value="[% option.value %]" selected="selected">[% option.label %]</option> |
|
|
55 |
[% ELSE %] |
56 |
<option value="[% option.value %]">[% option.label %]</option> |
57 |
[% END %] |
58 |
[% END %] |
44 |
[% END %] |
59 |
</select> |
45 |
</select> |
60 |
</div> |
46 |
</div> |
61 |
[% END %] |
47 |
[% END %] |
62 |
|
48 |
|
63 |
[% BLOCK form_field_select_option %] |
49 |
[% BLOCK form_field_select_option %] |
64 |
[% IF params.f == value %] |
50 |
<option value="[% value %]">[% INCLUDE form_label label=value %]</option> |
65 |
<option value="[% value %]" selected="selected">[% INCLUDE form_label label=value %]</option> |
|
|
66 |
[% ELSE %] |
67 |
<option value="[% value %]">[% INCLUDE form_label label=value %]</option> |
68 |
[% END %] |
69 |
[% END %] |
51 |
[% END %] |
70 |
|
52 |
|
71 |
[% BLOCK form_field_select_text %] |
53 |
[% BLOCK form_field_select_text %] |
72 |
<div class="form-field form-field-select-text"> |
54 |
<div class="form-field form-field-select-text"> |
73 |
[% IF params.exists('c') %] |
55 |
<select name="c" class="form-field-conjunction" disabled="disabled"> |
74 |
<select name="c" class="form-field-conjunction"> |
56 |
<option value="and">AND</option> |
75 |
<option value="and">AND</option> |
57 |
<option value="or">OR</option> |
76 |
[% IF params.c == 'or' %] |
58 |
</select> |
77 |
<option value="or" selected="selected">OR</option> |
|
|
78 |
[% ELSE %] |
79 |
<option value="or">OR</option> |
80 |
[% END %] |
81 |
</select> |
82 |
[% ELSE %] |
83 |
<select name="c" class="form-field-conjunction" disabled="disabled"> |
84 |
<option value="and">AND</option> |
85 |
<option value="or">OR</option> |
86 |
</select> |
87 |
[% END %] |
88 |
<select name="f" class="form-field-column"> |
59 |
<select name="f" class="form-field-column"> |
89 |
[% INCLUDE form_field_select_option value='barcode' %] |
60 |
[% INCLUDE form_field_select_option value='barcode' %] |
90 |
[% INCLUDE form_field_select_option value='itemcallnumber' %] |
61 |
[% INCLUDE form_field_select_option value='itemcallnumber' %] |
Lines 103-148
Link Here
|
103 |
[% IF field.tagsubfield %] |
74 |
[% IF field.tagsubfield %] |
104 |
[% marcfield = marcfield _ '$' _ field.tagsubfield %] |
75 |
[% marcfield = marcfield _ '$' _ field.tagsubfield %] |
105 |
[% END %] |
76 |
[% END %] |
106 |
[% IF params.f == "marc:$marcfield" %] |
77 |
<option value="marc:[% marcfield %]" data-authorised-values-category="[% field.authorised_values_category %]">[% field.label %] ([% marcfield %])</option> |
107 |
<option value="marc:[% marcfield %]" data-authorised-values-category="[% field.authorised_values_category %]" selected="selected">[% field.label %] ([% marcfield %])</option> |
|
|
108 |
[% ELSE %] |
109 |
<option value="marc:[% marcfield %]" data-authorised-values-category="[% field.authorised_values_category %]">[% field.label %] ([% marcfield %])</option> |
110 |
[% END %] |
111 |
[% END %] |
78 |
[% END %] |
112 |
</optgroup> |
79 |
</optgroup> |
113 |
[% END %] |
80 |
[% END %] |
114 |
</select> |
81 |
</select> |
115 |
<input type="text" name="q" class="form-field-value" value="[% params.q %]" /> |
82 |
<input type="text" name="q" class="form-field-value" value="" /> |
116 |
<input type="hidden" name="op" value="like" /> |
83 |
<input type="hidden" name="op" value="like" /> |
117 |
</div> |
84 |
</div> |
118 |
[% END %] |
85 |
[% END %] |
119 |
|
86 |
|
120 |
[% BLOCK form_field_select_text_block %] |
|
|
121 |
[% c = CGI.param('c').list %] |
122 |
[% f = CGI.param('f').list %] |
123 |
[% q = CGI.param('q').list %] |
124 |
[% op = CGI.param('op').list %] |
125 |
[% IF q.size %] |
126 |
[% size = q.size - 1 %] |
127 |
[% FOREACH i IN [0 .. size] %] |
128 |
[% |
129 |
params = { |
130 |
f => f.$i |
131 |
q = q.$i |
132 |
op = op.$i |
133 |
} |
134 |
%] |
135 |
[% IF i > 0 %] |
136 |
[% j = i - 1 %] |
137 |
[% params.c = c.$j %] |
138 |
[% END %] |
139 |
[% INCLUDE form_field_select_text params=params %] |
140 |
[% END %] |
141 |
[% ELSE %] |
142 |
[% INCLUDE form_field_select_text %] |
143 |
[% END %] |
144 |
[% END %] |
145 |
|
146 |
[% BLOCK form_field_radio_yes_no %] |
87 |
[% BLOCK form_field_radio_yes_no %] |
147 |
<div class="form-field"> |
88 |
<div class="form-field"> |
148 |
<label class="form-field-label">[% INCLUDE form_label label=name %]:</label> |
89 |
<label class="form-field-label">[% INCLUDE form_label label=name %]:</label> |
Lines 455-461
Link Here
|
455 |
[% END %] |
396 |
[% END %] |
456 |
</fieldset> |
397 |
</fieldset> |
457 |
<fieldset> |
398 |
<fieldset> |
458 |
[% INCLUDE form_field_select_text_block %] |
399 |
[% INCLUDE form_field_select_text %] |
459 |
<p class="hint">You can use the following wildcard characters: % _</p> |
400 |
<p class="hint">You can use the following wildcard characters: % _</p> |
460 |
<p class="hint">% matches any number of characters</p> |
401 |
<p class="hint">% matches any number of characters</p> |
461 |
<p class="hint">_ matches only a single character</p> |
402 |
<p class="hint">_ matches only a single character</p> |
Lines 463-476
Link Here
|
463 |
<fieldset> |
404 |
<fieldset> |
464 |
<div class="form-field"> |
405 |
<div class="form-field"> |
465 |
<label class="form-field-label" for="itemcallnumber_from">From call number:</label> |
406 |
<label class="form-field-label" for="itemcallnumber_from">From call number:</label> |
466 |
[% value = CGI.param('itemcallnumber_from') %] |
407 |
<input type="text" id="itemcallnumber_from" name="itemcallnumber_from" value="" /> |
467 |
<input type="text" id="itemcallnumber_from" name="itemcallnumber_from" value="[% value %]" /> |
|
|
468 |
<span class="hint">(inclusive)</span> |
408 |
<span class="hint">(inclusive)</span> |
469 |
</div> |
409 |
</div> |
470 |
<div class="form-field"> |
410 |
<div class="form-field"> |
471 |
[% value = CGI.param('itemcallnumber_to') %] |
|
|
472 |
<label class="form-field-label" for="itemcallnumber_to">To call number:</label> |
411 |
<label class="form-field-label" for="itemcallnumber_to">To call number:</label> |
473 |
<input type="text" id="itemcallnumber_to" name="itemcallnumber_to" value="[% value %]" /> |
412 |
<input type="text" id="itemcallnumber_to" name="itemcallnumber_to" value="" /> |
474 |
<span class="hint">(inclusive)</span> |
413 |
<span class="hint">(inclusive)</span> |
475 |
</div> |
414 |
</div> |
476 |
[% INCLUDE form_field_radio_yes_no name="damaged" %] |
415 |
[% INCLUDE form_field_radio_yes_no name="damaged" %] |
477 |
- |
|
|