From 199ee3238b4728c47377749bf587ca258bb2c3a9 Mon Sep 17 00:00:00 2001 From: Kyle Huckins Date: Mon, 9 Jan 2017 13:15:54 -0800 Subject: [PATCH] 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 Changes to be committed: modified: Open-ILS/src/templates/staff/cat/item/t_list.tt2 modified: Open-ILS/src/templates/staff/cat/item/t_summary_pane.tt2 modified: Open-ILS/web/js/ui/default/staff/cat/item/app.js --- Open-ILS/src/templates/staff/cat/item/t_summary_pane.tt2 | 7 +++++-- Open-ILS/web/js/ui/default/staff/cat/item/app.js | 5 +++++ 2 files changed, 10 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 7a266357ed..fe1d42dfb7 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,11 @@ function(egCore) { function(copy) { var flatCopy; + + copy._inHouseUseCount = 0; + egCore.pcrud.search('aihu', {item : copy.id()}) + .then(null, null, function() { copy._inHouseUseCount++}); + if (noListDupes) { // use the existing copy if possible flatCopy = service.copies.filter( -- 2.11.0