<!--
Template for printing hold request slips. Fields include:
-* call_number.label/prefix/suffix
+<<<<<<< HEAD
* hold.behind_desk
* copy.barcode
+* call_number.label
+* call_number.prefix
+* call_number.suffix
+=======
+* copy.barcode
+* copy.call_number.label
+* copy.call_number.prefix.name
+* copy.call_number.suffix.name
+>>>>>>> 57e65e1... Interim commit
* title
+
* patron.alias
* patron.family_name
* patron.first_given_name
* patron.second_given_name
* patron.card.barcode
+
+* hold.behind_desk
* hold.request_time
* hold.phone_notify
* hold.sms_notify
[% 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>
+ <div>[% l('Call Number: [_1] [_2] [_3]', '{{copy.call_number.prefix.name}}', '{{copy.call_number.label}}', '{{copy.call_number.suffix.name}}') %]</div>
<br/>
<br/>
owning_lib : {
name : 'Ankers Memorial Library',
shortname : 'Ankers'
+ },
+ prefix : {
+ name : 'DISPLAY'
+ },
+ suffix : {
+ name : 'REF'
}
},
circ_modifier : {
transits : [ seed_transit ],
title : seed_record.title,
author : seed_record.author,
+ call_number : {
+ label : '646.5',
+ prefix : 'DISPLAY',
+ suffix : 'REF'
+ },
patron : seed_user,
address : seed_addr,
dest_location : egCore.idl.toHash(egCore.org.get(egCore.auth.user().ws_ou())),
call_number : egCore.idl.toHash(evt.payload.volume)
};
+ // Define prefix and suffix in print_context
+
+ if (typeof print_context.call_number.prefix == 'object') {
+ print_context.call_number.prefix = "";
+ } else {
+ egCore.pcrud.retrieve('acnp', print_context.call_number.prefix)
+ .then(function(p) {
+ print_context.call_number.prefix =
+ egCore.idl.toHash(p).label;
+ })
+ }
+ if (typeof print_context.call_number.suffix == 'object') {
+ print_context.call_number.suffix = "";
+ } else {
+ egCore.pcrud.retrieve('acns', print_context.call_number.suffix)
+ .then(function(s) {
+ print_context.call_number.suffix =
+ egCore.idl.toHash(s).label;
+ })
+ }
+
var acn = print_context.call_number; // fix up pre/suffixes
if (acn.prefix == -1) acn.prefix = "";
if (acn.suffix == -1) acn.suffix = "";