Bug 22424: (follow-up) Show blank value for empty status
authorOwen Leonard <oleonard@myacpl.org>
Mon, 29 Apr 2019 15:10:17 +0000 (15:10 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Tue, 30 Apr 2019 13:39:44 +0000 (13:39 +0000)
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>

koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.csv.inc
koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.json.inc
koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/catalogue/itemsearch.tt
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt

index 965a497..a1101c6 100644 (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 %]"
index 98d0d20..ed39685 100644 (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>
index 4e61e6e..e19e6c2 100644 (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 -%]
index 1ad7838..c01eab4 100644 (file)
                 + '      <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>'