<option value="holds_for_patron">[% l('Holds for Patron') %]</option>
<option value="hold_pull_list">[% l('Hold Pull List') %]</option>
<option value="hold_shelf_list">[% l('Hold Shelf List') %]</option>
+ <option value="in_house_use_list">[% l('In-House Use List') %]</option>
<option value="patron_address">[% l('Patron Address') %]</option>
<option value="patron_note">[% l('Patron Note') %]</option>
<option value="transit_slip">[% l('Transit Slip') %]</option>
main-label="[% l('In-House Use') %]"
items-provider="gridDataProvider"
persist-key="circ.in_house_use">
+
+ <eg-grid-menu-item handler="print_list" label="[% l('Print List') %]"></eg-grid-menu-item>
+
<eg-grid-field label="[% l('# of Uses') %]" path='num_uses' visible></eg-grid-field>
<eg-grid-field label="[% l('Barcode') %]" path='copy.barcode' visible></eg-grid-field>
<eg-grid-field label="[% l('Call Number') %]" path="copy.call_number.label" visible></eg-grid-field>
--- /dev/null
+<!--
+Template for printing in-house uses. Data specific to this template
+includes:
+
+in_house_uses - list; each entry contains:
+
+ * num_uses - number of uses
+ * copy - data for a copy, including the following keys:
+
+ barcode : barcode
+ location.name : shelving location
+ call_number.label : call number
+
+ * title - copy title
+-->
+<div>
+ <div>[% l('You marked the following in-house items used:') %]</div>
+ <hr/>
+ <ol>
+ <li ng-repeat="ihu in in_house_uses">
+ <div>[% l('Barcode: [_1] Uses: [_2]',
+ '{{ihu.copy.barcode}}',
+ '{{ihu.num_uses}}') %]</div>
+ </li>
+ </ol>
+ <hr/>
+ <div>{{current_location.shortname}} {{today | date:'short'}}</div>
+<br/>
};
var seed_copy = {
- barcode : '33434322323'
+ barcode : '33434322323',
+ call_number : {
+ label : '636.8 JON'
+ },
+ location : {
+ name : 'General Collection'
+ }
}
var one_hold = {
},
],
+ in_house_uses : [
+ {
+ num_uses : 3,
+ copy : seed_copy,
+ title : seed_record.title
+ }
+ ],
+
previous_balance : 8.45,
payment_total : 2.00,
payment_applied : 2.00,
});
}
+ $scope.print_list = function() {
+ var print_data = { in_house_uses : [] };
+
+ if (checkouts.length == 0) return $q.when();
+
+ angular.forEach(checkouts, function(ihu) {
+ print_data.in_house_uses.push({
+ num_uses : ihu.num_uses,
+ copy : egCore.idl.toHash(ihu.copy),
+ title : ihu.title
+ })
+ });
+
+ return egCore.print.print({
+ template : 'in_house_use_list',
+ scope : print_data
+ });
+ }
+
}])