@@ -, +, @@ - Try different item searches - Verify that the itemtype now shows in the result list - Export to CSV - Verify that the itemtype shows there correctly as well --- catalogue/itemsearch.pl | 2 +- .../prog/en/includes/catalogue/itemsearch_item.csv.inc | 3 ++- .../prog/en/includes/catalogue/itemsearch_item.json.inc | 2 ++ .../prog/en/includes/csv_headers/catalogue/itemsearch.tt | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt | 7 +++++++ 5 files changed, 13 insertions(+), 3 deletions(-) --- a/catalogue/itemsearch.pl +++ a/catalogue/itemsearch.pl @@ -63,7 +63,7 @@ if (defined $format and $format eq 'json') { push @f, $columns[$i]; push @c, 'and'; - if ( grep /^$columns[$i]$/, qw( ccode homebranch holdingbranch location notforloan ) ) { + if ( grep /^$columns[$i]$/, qw( ccode homebranch holdingbranch location itype notforloan ) ) { push @q, "$word"; push @op, '='; } else { --- a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.csv.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.csv.inc @@ -1,5 +1,6 @@ [%- USE Branches -%] [%- USE Koha -%] +[%- USE ItemTypes -%] [%- SET biblio = item.biblio -%] [%- SET biblioitem = item.biblioitem -%] -"[% biblio.title | html %] [% IF ( Koha.Preference( 'marcflavour' ) == 'UNIMARC' && biblio.author ) %]by [% END %][% biblio.author | html %]", "[% (biblioitem.publicationyear || biblio.copyrightdate) | html %]", "[% biblioitem.publishercode | html %]", "[% biblioitem.collectiontitle | html %]", "[% item.barcode | html %]", "[% item.itemcallnumber | html %]", "[% Branches.GetName(item.homebranch) | html %]", "[% Branches.GetName(item.holdingbranch) | html %]", "[% item.location | html %]", "[% item.stocknumber | html %]", "[% item.status | html %]", "[% (item.issues || 0) | html %]" +"[% biblio.title | html %] [% IF ( Koha.Preference( 'marcflavour' ) == 'UNIMARC' && biblio.author ) %]by [% END %][% biblio.author | html %]", "[% (biblioitem.publicationyear || biblio.copyrightdate) | html %]", "[% biblioitem.publishercode | html %]", "[% biblioitem.collectiontitle | html %]", "[% item.barcode | html %]", "[% item.itemcallnumber | html %]", "[% Branches.GetName(item.homebranch) | html %]", "[% Branches.GetName(item.holdingbranch) | html %]", "[% item.location | html %]", "[% ItemTypes.GetDescription(item.itype) | html %]", "[% item.stocknumber | html %]", "[% item.status | html %]", "[% (item.issues || 0) | html %]" --- a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.json.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.json.inc @@ -1,5 +1,6 @@ [%- USE Branches -%] [%- USE Koha -%] +[%- USE ItemTypes -%] [% USE AuthorisedValues %] [%- biblio = item.biblio -%] [%- biblioitem = item.biblioitem -%] @@ -17,6 +18,7 @@ "[% Branches.GetName(item.homebranch) | html %]", "[% Branches.GetName(item.holdingbranch) | html %]", "[% item.location | html %]", + "[% ItemTypes.GetDescription(item.itype) | html %]", "[% item.stocknumber | html %]", "[% item.status | html %]", "[% (item.issues || 0) | html %]", --- a/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/catalogue/itemsearch.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/catalogue/itemsearch.tt @@ -1, +1, @@ -[%- BLOCK -%]Title, Publication date, Publisher, Collection, Barcode, Call number, Home library, Current location, Shelving location, Inventory number, Status, Checkouts[%- END -%] +[%- BLOCK -%]Title, Publication date, Publisher, Collection, Barcode, Call number, Home library, Current location, Shelving location, Itemtype, Inventory number, Status, Checkouts[%- END -%] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt @@ -269,6 +269,7 @@ + ' ' + _("Home library") + '' + ' ' + _("Current location") + '' + ' ' + _("Shelving location") + '' + + ' ' + _("Itemtype") + '' + ' ' + _("Inventory number") + '' + ' ' + _("Status") + '' + ' ' + _("Checkouts") + '' @@ -372,6 +373,7 @@ { 'sName': 'homebranch' }, { 'sName': 'holdingbranch' }, { 'sName': 'location' }, + { 'sName': 'itype'}, { 'sName': 'stocknumber' }, { 'sName': 'notforloan' }, { 'sName': 'issues' }, @@ -398,6 +400,11 @@ [% 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 %] }, --