5 [% USE TablesSettings %]
6 [% USE AuthorisedValues %]
10 [% INCLUDE 'doc-head-open.inc' %]
11 <title>Holds to pull › Circulation › Koha</title>
12 [% INCLUDE 'doc-head-close.inc' %]
15 <body id="circ_pendingreserves" class="circ">
16 [% WRAPPER 'header.inc' %]
17 [% INCLUDE 'circ-search.inc' %]
21 [% WRAPPER 'sub-header.inc' %]
22 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
25 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
28 <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
31 <a href="#" aria-current="page">
39 <div class="main container-fluid">
41 <div class="col-sm-10 col-sm-push-2">
44 [% FOR m IN messages %]
45 <div class="dialog [% m.type | html %]">
47 [% CASE 'letter_enqueued' %]
48 <span>The notice has been correctly enqueued.</span>
49 [% CASE 'no_email_address' %]
50 <span>The patron does not have an email address defined.</span>
51 [% CASE 'no_template_notice' %]
52 <span>There is no notice template with a code 'CANCEL_HOLD_ON_LOST' defined in your system.</span>
53 [% CASE 'hold_cancelled' %]
54 <span>The hold has been correctly cancelled.</span>
55 [% CASE 'hold_placed_at_biblio_level' %]
56 <span>The hold has been placed on biblio level. It is not possible to determine the item to mark as lost.</span>
63 <h1>Holds to pull placed between [% from | $KohaDates %] and [% to | $KohaDates %]</h1>
64 <h3>Reported on [% todaysdate | $KohaDates %]</h3>
65 <p>The following holds have not been filled. Please retrieve them and check them in.</p>
66 <div id="searchresults">
71 <th>Pull this many items</th>
72 <th>Items available</th>
73 <th>Patrons with holds</th>
75 <th class="anti-the">Title</th>
76 <th class="string-sort">Libraries</th>
77 <th>Available barcodes</th>
78 <th>Available call numbers</th>
79 <th>Available copy numbers</th>
80 <th>Available enumeration</th>
81 <th class="string-sort">Available item types</th>
82 <th class="string-sort">Available locations</th>
83 <th>Earliest hold date</th>
85 <th class="string-sort">Pickup location</th>
90 [% FOREACH hold_info IN holds_info %]
92 [% SET patron = hold_info.patron %]
93 [% SET item = hold_info.item %]
94 [% SET hold = hold_info.hold %]
96 [% SET biblio = hold_info.biblio %]
97 <td><p><strong>[% hold_info.pull_count | html %]</strong></p></td>
98 <td>[% hold_info.items_count | html %]</td>
99 <td>[% hold_info.patrons_count | html %]</td>
100 <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %]</a></td>
103 [% INCLUDE 'biblio-title.inc' biblio=biblio link = 1 %]
105 [% IF ( biblio.author ) %]<p> by [% biblio.author | html %]</p>[% END %]
106 [% IF ( biblio.biblioitem.editionstatement ) %]<p>[% biblio.biblioitem.editionstatement | html %]</p>[% END %]
107 [% IF ( Koha.Preference('marcflavour') == 'MARC21' ) %]
108 [% IF ( biblio.copyrightdate ) %]<p>[% biblio.copyrightdate | html %]</p>[% END %]
110 [% IF ( biblio.biblioitem.publicationyear ) %]<p>[% biblio.biblioitem.publicationyear | html %]</p>[% END %]
121 [% IF ( hold_info.holdingbranches.size ) %]
123 [% FOREACH holdingbranch IN hold_info.holdingbranches %]
124 <li>[% Branches.GetName ( holdingbranch ) | html %]</li>
130 [% IF ( hold_info.barcodes.size ) %]
131 [% SET barcode = hold_info.barcodes.first %]
132 [% IF ( hold_info.item ) %]<span>Only [% barcode | html %]</span>[% ELSE %]<span>[% barcode | html %] or any available.</span>[% END %]
136 [% IF ( hold_info.callnumbers.size ) %]
138 [% FOREACH callnumber IN hold_info.callnumbers %]
140 [% callnumber | html %]
147 [% IF ( hold_info.copynumbers.size ) %]
149 [% FOREACH copyno IN hold_info.copynumbers %]
158 [% IF ( hold_info.enumchrons.size ) %]
160 [% FOREACH enumchron IN hold_info.enumchrons %]
162 [% enumchron | html %]
170 [% FOREACH type IN hold_info.itemtypes %]
171 <li>[% ItemTypes.GetDescription( type ) | html %]</li>
177 [% FOREACH loc IN hold_info.locations %]
178 <li>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => loc ) | html %]</li>
182 <td data-order="[% hold.reservedate | html %]">
183 [% hold.reservedate | $KohaDates %] in [% Branches.GetName ( hold.branchcode ) | html %]
185 <td>[% hold.reservenotes | html %]</td>
187 [% Branches.GetName ( hold.branchcode ) | html %]
190 <form name="cancelReserve" action="/cgi-bin/koha/circ/pendingreserves.pl" method="post">
191 <input type="hidden" name="op" value="cancel_reserve" />
192 <input type="hidden" name="reserve_id" value="[% hold.reserve_id | html %]" />
194 [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %]
195 [% IF hold_cancellation.count %]
196 <div class="form-group">
197 <label for="cancellation-reason">Cancellation reason:</label>
198 <select class="cancellation-reason" name="cancellation-reason" id="cancellation-reason">
199 <option value="">No reason given</option>
200 [% FOREACH reason IN hold_cancellation %]
201 <option value="[% reason.authorised_value | html %]">[% reason.lib | html %]</option>
207 [% IF item.holdingbranch != item.homebranch %]
208 <input class="btn btn-default" type="submit" value="Cancel hold and return to : [% Branches.GetName( item.homebranch ) | html %]" />
210 <input class="btn btn-default" type="submit" value="Cancel hold" />
214 [% IF Koha.Preference('CanMarkHoldsToPullAsLost') != 'do_not_allow' %]
215 [% IF hold.itemnumber %]
216 <form name="cancelReserve" action="/cgi-bin/koha/circ/pendingreserves.pl" method="post">
217 <input type="hidden" name="reserve_id" value="[% hold.reserve_id | html %]" />
218 [% IF Koha.Preference('CanMarkHoldsToPullAsLost') == 'allow' %]
219 <input type="hidden" name="op" value="mark_as_lost" />
220 <input type="submit" value="Mark item as lost" />
221 [% ELSIF Koha.Preference('CanMarkHoldsToPullAsLost') == 'allow_and_notify' %]
222 <input type="hidden" name="op" value="mark_as_lost_and_notify" />
223 <input type="submit" value="Mark lost and notify patron" />
227 <span>Biblio level hold.</span>
236 <td><input type="text" class="filter" data-column_num="0" placeholder="Pull this many items" style="width:95%"/></td>
237 <td><input type="text" class="filter" data-column_num="1" placeholder="Items available" style="width:95%"/></td>
238 <td><input type="text" class="filter" data-column_num="2" placeholder="Patron holds" style="width:95%"/></td>
239 <td><input type="text" class="filter" data-column_num="3" placeholder="Patron name" style="width:95%"/></td>
240 <td><input type="text" class="filter" data-column_num="4" placeholder="Title" style="width:95%"/></td>
241 <td id="homebranchfilter"></td>
243 <td><input type="text" class="filter" data-column_num="7" placeholder="Call number" style="width:95%"/></td>
244 <td><input type="text" class="filter" data-column_num="8" placeholder="Available copy" style="width:95%"/></td>
245 <td><input type="text" class="filter" data-column_num="9" placeholder="Available enumeration" style="width:95%"/></td>
246 <td id="itemtype-filter"></td>
247 <td id="locationfilter"></td>
250 <td id="pickup-location"></td>
256 <strong>No items found.</strong>
262 </div> <!-- /.col-sm-10.col-sm-push-2 -->
264 <div class="col-sm-2 col-sm-pull-10">
269 <form action="/cgi-bin/koha/circ/pendingreserves.pl" method="post" >
270 <fieldset class="brief">
271 <h4>Refine results</h4>
277 <input type="text" size="10" id="from" name="from" value="[% from | html %]" class="flatpickr" data-date_to="to" />
282 <input type="text" size="10" id="to" name="to" value="[% to | html %]" class="flatpickr" />
286 [% IF ( HoldsToPullEndDate ) %]
287 <p><em>(Inclusive, default is [% HoldsToPullStartDate | html %] days ago to [% HoldsToPullEndDate | html %] days ahead. Set other date ranges as needed.)</em></p>
289 <p><em>(Inclusive, default is [% HoldsToPullStartDate | html %] days ago to today. Set other date ranges as needed.)</em></p>
292 <fieldset class="action"><input type="submit" name="run_report" value="Submit" class="submit"/></fieldset>
298 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
299 </div> <!-- /.row -->
301 [% MACRO jsinclude BLOCK %]
302 [% INCLUDE 'calendar.inc' %]
303 [% INCLUDE 'datatables.inc' %]
304 [% INCLUDE 'columns_settings.inc' %]
306 $(document).ready(function() {
307 var table_settings = [% TablesSettings.GetTableSettings('circ', 'holds', 'holds-to-pull', 'json') | $raw %];
308 var holdst = KohaTable("holdst", {
309 "sPaginationType": "full_numbers"
311 holdst.fnAddFilters("filter");
312 [%# add separateData function to cleanse jQuery select lists by breaking apart strings glued with BR tags and then de-duplicating any repeated library codes %]
313 function separateData ( ColumnData ){
315 var new_array = new Array();
316 for ( j=0 ; j<cD.length ; j++ ) {
317 var split_array = cD[j].split(/\n/gi);
318 for ( k=0 ; k<split_array.length ; k++ ){
319 var str = $.trim(split_array[k].replace(/[\n\r]/g, ''));
320 if ($.inArray(str, new_array) == -1 && str.length > 0 ) {
328 [%# add SeparateData function into createSelect function, so that it does the createSelect on clean data %]
329 function createSelect( data ) {
330 data = separateData(data);
331 var r='<select style="width:99%"><option value="">' + _("None") + '</option>', i, len=data.length;
332 var regex = /(<([^>]+)>)/ig; // Remove html tags
333 for ( i=0 ; i<len ; i++ ) {
334 var cell_val = data[i].replace(regex, '');
335 if ( cell_val.length < 1 ) continue;
336 r += '<option value="'+cell_val+'">'+cell_val+'</option>';
338 return r+'</select>';
340 $("#homebranchfilter").each( function () {
341 $(this).html( createSelect( holdst.fnGetColumnData(5) ) );
342 $('select', this).change( function () {
343 holdst.fnFilter( $(this).val(), 5 );
346 $("#itemtype-filter").each( function () {
347 $(this).html( createSelect( holdst.fnGetColumnData(10) ) );
348 $('select', this).change( function () {
349 holdst.fnFilter( $(this).val(), 10 );
352 $("#locationfilter").each( function () {
353 $(this).html( createSelect( holdst.fnGetColumnData(11) ) );
354 $('select', this).change( function () {
355 holdst.fnFilter( $(this).val(), 11 );
358 $("#pickup-location").each( function () {
359 $(this).html( createSelect( holdst.fnGetColumnData(14) ) );
360 $('select', this).change( function () {
361 holdst.fnFilter( $(this).val(), 14 );
368 [% INCLUDE 'intranet-bottom.inc' %]