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 <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Owen Leonard 2019-04-29 15:10:17 +00:00 committed by Nick Clemens
parent 1ad52b371d
commit dd352428bb
4 changed files with 5 additions and 5 deletions

View File

@ -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 %]"

View File

@ -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 ~%]
<div class="btn-group dropup"><button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="fa fa-pencil"></i> Edit <span class="caret"></span> </button> <ul class="dropdown-menu"> <li><a href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% item.biblionumber | uri %]&itemnumber=[% item.itemnumber | uri %]">Edit item</a></li> <li><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% item.biblionumber | html %]">Edit record</a></li> </ul> </div>

View File

@ -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 -%]

View File

@ -273,8 +273,8 @@
+ ' <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_itemlost">' + _("Lost") + '</th>'
+ ' <th id="items_status">' + _("Not for loan status") + '</th>'
+ ' <th id="items_itemlost">' + _("Lost status") + '</th>'
+ ' <th id="items_checkouts">' + _("Checkouts") + '</th>'
+ ' <th id=""></th>'
+ ' </tr>'