<option value="hold_shelf_slip">[% l('Hold Shelf Slip') %]</option>
<option value="holds_for_bibs">[% l('Holds for Bib Record') %]</option>
<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="patron_address">[% l('Patron Address') %]</option>
<option value="patron_note">[% l('Patron Note') %]</option>
<option value="transit_slip">[% l('Transit Slip') %]</option>
+<div ng-if="print_list_progress !== null" class="strong-text-2">
+ [% l('Loading... [_1]', '{{print_list_progress}}') %]
+</div>
<eg-grid
id-field="id"
<eg-grid-menu-item handler="clear_holds" disabled="disable_clear"
label="[% l('Clear These Holds') %]"></eg-grid-menu-item>
+ <eg-grid-menu-item handler="print_shelf_list"
+ label="[% l('Print Full List') %]"></eg-grid-menu-item>
+
<eg-grid-action handler="grid_actions.show_recent_circs"
label="[% l('Show Last Few Circulations') %]"></eg-grid-action>
<eg-grid-action handler="grid_actions.show_patrons"
--- /dev/null
+<table id='pull-list-template-table'>
+ <style>
+ #pull-list-template-table td,
+ #pull-list-template-table th {
+ padding: 5px;
+ border: 1px solid #000;
+ }
+ </style>
+ <thead>
+ <tr>
+ <th>[% l('Type') %]</th>
+ <th>[% l('Title') %]</th>
+ <th>[% l('Author') %]</th>
+ <th>[% l('Shelf Location') %]</th>
+ <th>[% l('Call Number') %]</th>
+ <th>[% l('Barcode/Part') %]</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr ng-repeat="hold_data in holds">
+ <td>{{hold_data.hold.hold_type}}</td>
+ <td>{{hold_data.title}}</td>
+ <td>{{hold_data.author}}</td>
+ <td>{{hold_data.copy.location.name}}</td>
+ <td>{{hold_data.volume.label}}</td>
+ <td>{{hold_data.copy.barcode}} {{hold_data.part.label}}</td>
+ </tr>
+ </tbody>
+</table>
);
}
+ $scope.print_list_progress = null;
+ $scope.print_shelf_list = function() {
+ var print_holds = [];
+ $scope.print_list_loading = true;
+ $scope.print_list_progress = 0;
+
+ // collect the full list of holds
+ egCore.net.request(
+ 'open-ils.circ',
+ 'open-ils.circ.captured_holds.id_list.on_shelf.retrieve.authoritative.atomic',
+ egCore.auth.token(), $scope.pickup_ou.id()
+ ).then( function(idlist) {
+
+ egHolds.fetch_holds(idlist).then(
+ function () {
+ console.debug('printing ' + print_holds.length + ' holds');
+ // holds fetched, send to print
+ egCore.print.print({
+ context : 'default',
+ template : 'hold_shelf_list',
+ scope : {holds : print_holds}
+ })
+ },
+ null,
+ function(hold_data) {
+ $scope.print_list_progress++;
+ egHolds.local_flesh(hold_data);
+ print_holds.push(hold_data);
+ hold_data.title = hold_data.mvr.title();
+ hold_data.author = hold_data.mvr.author();
+ hold_data.hold = egCore.idl.toHash(hold_data.hold);
+ hold_data.copy = egCore.idl.toHash(hold_data.copy);
+ hold_data.volume = egCore.idl.toHash(hold_data.volume);
+ hold_data.part = egCore.idl.toHash(hold_data.part);
+ }
+ )
+ }).finally(function() {
+ $scope.print_list_loading = false;
+ $scope.print_list_progress = null;
+ });
+ }
+
refresh_page();
}])