From 38b5b8e034759f6e1b3c9827ef5456fd13fead69 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Mon, 26 Mar 2018 13:20:53 +0200 Subject: [PATCH] Bug 20469: Add item status to staff article request form The template checks if an item is checked out, on hold (waiting or transit), not for loan. (Note: This can be extended in the future in a general include as we have at opac side.) Test plan: [1] Place an article request on an item on loan. Verify status on form. [2] Place an article request on a waiting item. Check status again. Signed-off-by: Marcel de Rooy Signed-off-by: Owen Leonard [EDIT] Simplified on 2020-07-27 Removed Koha::Item->is_waiting_or_transit. Use Koha::Item->itemtype to check notforloan on itemtype level. Adjusted commit message accordingly. Additional test: [3] Place an article request on a not for loan item. Check status. NOTE: Not for loan is informational too. It does not say that this item is not available for an article request. Depends on local situation. Signed-off-by: Marcel de Rooy Signed-off-by: Katrin Fischer --- .../intranet-tmpl/prog/en/modules/circ/article-requests.tt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt index 10e69f48a4..d72c728cf4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/article-requests.tt @@ -42,6 +42,13 @@ [% END %] +[% BLOCK item_status %] + [% IF myitem.onloan %]Checked out + [% ELSIF myitem.holds({ found => ['W', 'T'] }).count > 0 %]On hold + [% ELSIF myitem.notforloan > 0 OR myitem.itemtype.notforloan %]Not for loan + [% ELSIF myitem.notforloan < 0 %]On order + [% END %] +[% END %] [% INCLUDE 'header.inc' %] @@ -107,6 +114,7 @@ Collection Item type Call number + Status Copy number Enumeration Barcode @@ -176,6 +184,7 @@ [% ar.item.itemcallnumber | html %] + [% PROCESS 'item_status' myitem = ar.item IF ar.item %] [% ar.item.copynumber | html %] [% ar.item.enumchron | html %] [% ar.item.barcode | html %] @@ -212,6 +221,7 @@ Collection Item type Call number + Status Copy number Enumeration Barcode @@ -281,6 +291,7 @@ [% ar.item.itemcallnumber | html %] + [% PROCESS 'item_status' myitem = ar.item IF ar.item %] [% ar.item.copynumber | html %] [% ar.item.enumchron | html %] [% ar.item.barcode | html %] -- 2.11.0