From 6d11be693ae8a56da95b802d21ba426477067d2e Mon Sep 17 00:00:00 2001 From: Kyle Huckins Date: Mon, 9 Jan 2017 13:15:54 -0800 Subject: [PATCH 1/1] LP#1615845 In House Uses on Item Status Display number of in-house uses in quick summary of item status interface. Signed-off-by: Kyle Huckins Signed-off-by: Terran McCanna Signed-off-by: Dan Wells --- Open-ILS/src/templates/staff/cat/item/t_summary_pane.tt2 | 7 +++++-- Open-ILS/web/js/ui/default/staff/cat/item/app.js | 7 +++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/templates/staff/cat/item/t_summary_pane.tt2 b/Open-ILS/src/templates/staff/cat/item/t_summary_pane.tt2 index 1ab16a571b..5935f870a8 100644 --- a/Open-ILS/src/templates/staff/cat/item/t_summary_pane.tt2 +++ b/Open-ILS/src/templates/staff/cat/item/t_summary_pane.tt2 @@ -127,8 +127,8 @@
[% l('Holdable') %]
{{copy.opac_visible()}}
-
[% l('Renewal Workstation') %]
-
{{circ_summary.last_renewal_workstation()}}
+
[% l('In-House Uses') %]
+
{{copy._inHouseUseCount}}
[% l('Checkin Time') %]
@@ -144,6 +144,9 @@
[% l('Circulate') %]
{{copy.circulate()}}
+
[% l('Renewal Workstation') %]
+
{{circ_summary.last_renewal_workstation()}}
+
[% l('Remaining Renewals') %]
{{circ.renewal_remaining()}}
diff --git a/Open-ILS/web/js/ui/default/staff/cat/item/app.js b/Open-ILS/web/js/ui/default/staff/cat/item/app.js index 5468daf8c3..6e411ef595 100644 --- a/Open-ILS/web/js/ui/default/staff/cat/item/app.js +++ b/Open-ILS/web/js/ui/default/staff/cat/item/app.js @@ -90,6 +90,13 @@ function(egCore) { function(copy) { var flatCopy; + + egCore.pcrud.search('aihu', + {item : copy.id()}, {}, {idlist : true, atomic : true}) + .then(function(uses) { + copy._inHouseUseCount = uses.length; + }); + if (noListDupes) { // use the existing copy if possible flatCopy = service.copies.filter( -- 2.43.2