From dd352428bb4fe9c5656bdf4921f913440db259a2 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 29 Apr 2019 15:10:17 +0000 Subject: [PATCH] Bug 22424: (follow-up) Show blank value for empty status This patch updates the screen and CSV output of item searches so that if the item does not have a lost status a blank table cell is shown instead of "0." This patch also amends the table headers so that "Not for loan" statuses are explicitly labeled as such, and the "Lost" column has the header "Lost status." To test, apply the patch and perform an item search in the staff client which will return results with notforloan and lost items. Verify that the values display correctly in both onscreen and CSV output. Verify that the column headers look correct. Signed-off-by: Katrin Fischer Signed-off-by: Nick Clemens --- .../prog/en/includes/catalogue/itemsearch_item.csv.inc | 2 +- .../prog/en/includes/catalogue/itemsearch_item.json.inc | 2 +- .../prog/en/includes/csv_headers/catalogue/itemsearch.tt | 2 +- .../intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.csv.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.csv.inc index 965a497aa7..a1101c6eed 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.csv.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.csv.inc @@ -4,4 +4,4 @@ [% USE AuthorisedValues %] [%- 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 %]", "[% AuthorisedValues.GetByCode( 'CCODE', item.ccode ) | 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 %]","[% AuthorisedValues.GetByCode( 'LOST', item.itemlost ) | 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 %]", "[% AuthorisedValues.GetByCode( 'CCODE', item.ccode ) | 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 %]","[% AuthorisedValues.GetByCode( 'LOST', item.itemlost ) || "" | html %]", "[% (item.issues || 0) | html %]" diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.json.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.json.inc index 98d0d20de7..ed39685e3a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.json.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.json.inc @@ -21,7 +21,7 @@ "[% ItemTypes.GetDescription(item.itype) | html %]", "[% item.stocknumber | html %]", "[% item.status | html %]", - "[% AuthorisedValues.GetByCode( 'LOST', item.itemlost ) | html %]", + "[% AuthorisedValues.GetByCode( 'LOST', item.itemlost ) || "" | html %]", "[% (item.issues || 0) | html %]", "[% FILTER escape_quotes ~%] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/catalogue/itemsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/catalogue/itemsearch.tt index 4e61e6eca0..e19e6c23f3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/catalogue/itemsearch.tt +++ b/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, Itemtype, Inventory number, Status, Lost, Checkouts[%- END -%] +[%- BLOCK -%]Title, Publication date, Publisher, Collection, Barcode, Call number, Home library, Current location, Shelving location, Itemtype, Inventory number, Not for loan status, Lost status, Checkouts[%- END -%] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt index 1ad7838e95..c01eab4e3b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt @@ -273,8 +273,8 @@ + ' ' + _("Shelving location") + '' + ' ' + _("Itemtype") + '' + ' ' + _("Inventory number") + '' - + ' ' + _("Status") + '' - + ' ' + _("Lost") + '' + + ' ' + _("Not for loan status") + '' + + ' ' + _("Lost status") + '' + ' ' + _("Checkouts") + '' + ' ' + ' ' -- 2.39.5