LP#1710731 - fix webstaff hold slip and other templates missing call number
authorCesar Velez <cesar.velez@equinoxinitiative.org>
Fri, 6 Oct 2017 21:57:45 +0000 (17:57 -0400)
committerMike Rylander <mrylander@gmail.com>
Tue, 17 Oct 2017 17:33:59 +0000 (13:33 -0400)
Added call number to various dialogs and printtemplates
that lacked them.

Signed-off by: Cesar Velez <cesar.velez@equinoxinitiative.org>

Signed-off-by: Mike Rylander <mrylander@gmail.com>

Open-ILS/src/templates/staff/circ/share/t_hold_shelf_dialog.tt2
Open-ILS/src/templates/staff/circ/share/t_transit_dialog.tt2
Open-ILS/src/templates/staff/share/print_templates/t_hold_shelf_slip.tt2
Open-ILS/web/js/ui/default/staff/circ/services/circ.js

index 7fe8a99..8fa2d4b 100644 (file)
       <span>[% l('Author:') %]</span>
       <span>{{author}}</span>
     </div>
+    <div>
+      <span>[% l('Call Number:') %]</span>
+      <span>{{call_number.prefix}}&nbsp;{{call_number.label}}&nbsp;{{call_number.suffix}}</span>
+    </div>
     <br/>
     <div>
     
index c04a606..771bb17 100644 (file)
         <span>[% l('Author:') %]</span>
         <span>{{author}}</span>
       </div>
+      <div>
+        <span>[% l('Call Number:') %]</span>
+        <span>{{call_number.prefix}}&nbsp;{{call_number.label}}&nbsp;{{call_number.suffix}}</span>
+      </div>
       <div ng-if="patron">
         <br/>
         <div>[% |l %]
index c7ff7c8..2d1a9f7 100644 (file)
@@ -1,6 +1,7 @@
 <!--
 Template for printing hold request slips. Fields include:
 
+* call_number.label/prefix/suffix
 * hold.behind_desk
 * copy.barcode
 * title
@@ -29,6 +30,8 @@ Template for printing hold request slips. Fields include:
 
   [% l('Barcode: [_1]', '{{copy.barcode}}') %]</div>
   [% l('Title: [_1]', '{{title}}') %]</div>
+  <br/>
+  <div>[% l('Call Number: [_1] [_2] [_3]', '{{call_number.prefix}}', '{{call_number.label}}', '{{call_number.suffix}}') %]</div>
 
   <br/>
   <br/>
index b8f0d60..3c16f42 100644 (file)
@@ -1474,8 +1474,13 @@ function($uibModal , $q , egCore , egAlertDialog , egConfirmDialog,
             var print_context = {
                 copy : egCore.idl.toHash(evt.payload.copy),
                 title : evt.title,
-                author : evt.author
-            }
+                author : evt.author,
+                call_number : egCore.idl.toHash(evt.payload.volume)
+            };
+
+            var acn = print_context.call_number; // fix up pre/suffixes
+            if (acn.prefix == -1) acn.prefix = "";
+            if (acn.suffix == -1) acn.suffix = "";
 
             if (data.transit) {
                 // route_dialog includes the "route to holds shelf"