LP#1615845 In House Uses on Item Status
authorKyle Huckins <khuckins@catalystdevworks.com>
Mon, 9 Jan 2017 21:15:54 +0000 (13:15 -0800)
committerDan Wells <dbw2@calvin.edu>
Fri, 3 Mar 2017 20:01:58 +0000 (15:01 -0500)
Display number of in-house uses in quick summary of item
status interface.

Signed-off-by: Kyle Huckins <khuckins@catalystdevworks.com>
Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Signed-off-by: Dan Wells <dbw2@calvin.edu>

Open-ILS/src/templates/staff/cat/item/t_summary_pane.tt2
Open-ILS/web/js/ui/default/staff/cat/item/app.js

index 1ab16a5..5935f87 100644 (file)
     <div class="flex-cell">[% l('Holdable') %]</div>
     <div class="flex-cell well">{{copy.opac_visible()}}</div>
 
-    <div class="flex-cell">[% l('Renewal Workstation') %]</div>
-    <div class="flex-cell well">{{circ_summary.last_renewal_workstation()}}</div>
+    <div class="flex-cell">[% l('In-House Uses') %]</div>
+    <div class="flex-cell well">{{copy._inHouseUseCount}}</div>
 
     <div class="flex-cell">[% l('Checkin Time') %]</div>
     <div class="flex-cell well">
     <div class="flex-cell">[% l('Circulate') %]</div>
     <div class="flex-cell well">{{copy.circulate()}}</div>
 
+    <div class="flex-cell">[% l('Renewal Workstation') %]</div>
+    <div class="flex-cell well">{{circ_summary.last_renewal_workstation()}}</div>
+
     <div class="flex-cell">[% l('Remaining Renewals') %]</div>
     <div class="flex-cell well">{{circ.renewal_remaining()}}</div>
 
index 5468daf..6e411ef 100644 (file)
@@ -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(