[% CASE 'All statuses' %]<span>All statuses</span>
[% CASE 'damaged' %]<span>Damaged</span>
[% CASE 'itemlost' %]<span>Lost</span>
+ [% CASE 'withdrawn' %]<span>Withdrawn</span>
[% END %]
[% END %]
<optgroup label="Custom search fields">
[% FOREACH field IN items_search_fields %]
[% marcfield = field.tagfield %]
- [% IF field.tagsubfield %]
+ [% IF field.tagsubfield.defined AND field.tagsubfield != "" %]
[% marcfield = marcfield _ '$' _ field.tagsubfield %]
[% END %]
<option value="marc:[% marcfield | html %]" data-authorised-values-category="[% field.authorised_values_category | html %]">[% field.label | html %] ([% marcfield | html %])</option>
[% IF notforloans.size %]
[% INCLUDE form_field_select name="notforloan" options = notforloans empty_option = "All statuses" %]
[% END %]
+ [% IF itemlosts.size %]
+ [% INCLUDE form_field_select name="itemlost" options = itemlosts empty_option = "All statuses" %]
+ [% END %]
+ [% IF withdrawns.size %]
+ [% INCLUDE form_field_select name="withdrawn" options = withdrawns empty_option = "All statuses" %]
+ [% END %]
</fieldset>
<fieldset>
[% INCLUDE form_field_select_text %]
<span class="hint">(inclusive)</span>
</div>
[% INCLUDE form_field_radio_yes_no name="damaged" %]
- [% INCLUDE form_field_radio_yes_no name="itemlost" %]
<div class="form-field">
<label class="form-field-label" for="issues_op">Checkout count:</label>
<select id="issues_op" name="issues_op">
[% INCLUDE 'datatables.inc' %]
[% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") | $raw %]
[% Asset.js("lib/hc-sticky.js") | $raw %]
- <script type="text/javascript">
+ <script>
var authorised_values = [% authorised_values_json | $raw %];
function loadAuthorisedValuesSelect(select) {
+ ' <th id="items_homebranch">' + _("Home library") + '</th>'
+ ' <th id="items_holdingbranch">' + _("Current location") + '</th>'
+ ' <th id="items_location">' + _("Shelving location") + '</th>'
+ + ' <th id="items_itype">' + _("Itemtype") + '</th>'
+ ' <th id="item_inventoryno">' + _("Inventory number") + '</th>'
- + ' <th id="items_status">' + _("Status") + '</th>'
+ + ' <th id="items_status">' + _("Not for loan status") + '</th>'
+ + ' <th id="items_itemlost">' + _("Lost status") + '</th>'
+ + ' <th id="items_widthdrawn">' + _("Withdrawn status") + '</th>'
+ ' <th id="items_checkouts">' + _("Checkouts") + '</th>'
+ ' <th id=""></th>'
+ ' </tr>'
{ 'sName': 'title' },
{ 'sName': 'publicationyear' },
{ 'sName': 'publishercode' },
- { 'sName': 'ccode' },
+ { 'sName': 'ccode' },
{ 'sName': 'barcode' },
{ 'sName': 'itemcallnumber' },
{ 'sName': 'homebranch' },
{ 'sName': 'holdingbranch' },
{ 'sName': 'location' },
+ { 'sName': 'itype'},
{ 'sName': 'stocknumber' },
{ 'sName': 'notforloan' },
+ { 'sName': 'itemlost' },
+ { 'sName': 'withdrawn' },
{ 'sName': 'issues' },
{ 'sName': 'checkbox', 'bSortable': false }
],
[% ELSE %]
null,
[% END %]
+ [% IF itemtypes.size %]
+ { 'type': 'select', 'values': [% INCLUDE escape_html_value_label elts => itemtypes %] },
+ [% ELSE %]
+ null,
+ [% END %]
{ 'type': 'text' },
[% IF notforloans.size %]
{ 'type': 'select', 'values': [% INCLUDE escape_html_value_label elts => notforloans %] },
[% ELSE %]
null,
[% END %]
+ [% IF itemlosts.size %]
+ { 'type': 'select', 'values': [% INCLUDE escape_html_value_label elts => itemlosts %] },
+ [% ELSE %]
+ null,
+ [% END %]
+ [% IF withdrawns.size %]
+ { 'type': 'select', 'values': [% INCLUDE escape_html_value_label elts => withdrawns %] },
+ [% ELSE %]
+ null,
+ [% END %]
{ 'type': 'text' },
null
]
form_field.append(button_field_new);
// If a field is linked to an authorised values list, display the list.
- $('div.form-field-select-text select').change(function() {
+ $('div.form-field-select-text select[name="f"]').change(function() {
loadAuthorisedValuesSelect($(this));
}).change();
}
}
});
- $('#itemsearchform').submit(function() {
- var searchform = $(this);
- var format = searchform.find('input[name="format"]:checked').val();
- if (format == 'html') {
+ });
+
+ $('#itemsearchform').submit(function() {
+ var searchform = $(this);
+ var format = searchform.find('input[name="format"]:checked').val();
+ if (format == 'html') {
submitForm(searchform);
$("#item-search-block").hide();
return false;
- }
- });
+ }
});
});
</script>