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 [% INCLUDE 'header.inc' %]
17 [% INCLUDE 'circ-search.inc' %]
20 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
23 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
26 <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
29 <a href="#" aria-current="page">
36 <div class="main container-fluid">
38 <div class="col-sm-10 col-sm-push-2">
41 [% FOR m IN messages %]
42 <div class="dialog [% m.type | html %]">
44 [% CASE 'letter_enqueued' %]
45 <span>The notice has been correctly enqueued.</span>
46 [% CASE 'no_email_address' %]
47 <span>The patron does not have an email address defined.</span>
48 [% CASE 'no_template_notice' %]
49 <span>There is no notice template with a code 'CANCEL_HOLD_ON_LOST' defined in your system.</span>
50 [% CASE 'hold_cancelled' %]
51 <span>The hold has been correctly cancelled.</span>
52 [% CASE 'hold_placed_at_biblio_level' %]
53 <span>The hold has been placed on biblio level. It is not possible to determine the item to mark as lost.</span>
60 <h2>Holds to pull placed between [% from | $KohaDates %] and [% to | $KohaDates %]</h2>
61 <h3>Reported on [% todaysdate | $KohaDates %]</h3>
62 <p>The following holds have not been filled. Please retrieve them and check them in.</p>
63 <div id="searchresults">
68 <th>Pull this many items</th>
69 <th>Items available</th>
70 <th>Patrons with holds</th>
72 <th class="anti-the">Title</th>
73 <th class="string-sort">Libraries</th>
74 <th>Available barcodes</th>
75 <th>Available call numbers</th>
76 <th>Available copy numbers</th>
77 <th>Available enumeration</th>
78 <th class="string-sort">Available item types</th>
79 <th class="string-sort">Available locations</th>
80 <th>Earliest hold date</th>
81 <th>Reserve notes</th>
82 <th class="string-sort">Pickup location</th>
87 [% FOREACH hold_info IN holds_info %]
89 [% SET patron = hold_info.patron %]
90 [% SET item = hold_info.item %]
91 [% SET hold = hold_info.hold %]
93 [% SET biblio = hold_info.biblio %]
94 <td><p><strong>[% hold_info.pull_count | html %]</strong></p></td>
95 <td>[% hold_info.items_count | html %]</td>
96 <td>[% hold_info.patrons_count | html %]</td>
97 <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% patron.firstname | html %] [% patron.surname | html %]</a></td>
100 [% INCLUDE 'biblio-title.inc' biblio=biblio link = 1 %]
102 [% IF ( biblio.author ) %]<p> by [% biblio.author | html %]</p>[% END %]
103 [% IF ( biblio.biblioitem.editionstatement ) %]<p>[% biblio.biblioitem.editionstatement | html %]</p>[% END %]
104 [% IF ( Koha.Preference('marcflavour') == 'MARC21' ) %]
105 [% IF ( biblio.copyrightdate ) %]<p>[% biblio.copyrightdate | html %]</p>[% END %]
107 [% IF ( biblio.biblioitem.publicationyear ) %]<p>[% biblio.biblioitem.publicationyear | html %]</p>[% END %]
118 [% IF ( hold_info.holdingbranches.size ) %]
120 [% FOREACH holdingbranch IN hold_info.holdingbranches %]
121 <li>[% Branches.GetName ( holdingbranch ) | html %]</li>
127 [% IF ( hold_info.barcodes.size ) %]
128 [% SET barcode = hold_info.barcodes.first %]
129 [% IF ( hold_info.itemnumber ) %]Only [% barcode | html %][% ELSE %][% barcode | html %] or any available.[% END %]
133 [% IF ( hold_info.callnumbers.size ) %]
135 [% FOREACH callnumber IN hold_info.callnumbers %]
137 [% callnumber | html %]
144 [% IF ( hold_info.copynumbers.size ) %]
146 [% FOREACH copyno IN hold_info.copynumbers %]
155 [% IF ( hold_info.enumchrons.size ) %]
157 [% FOREACH enumchron IN hold_info.enumchrons %]
159 [% enumchron | html %]
167 [% FOREACH type IN hold_info.itemtypes %]
168 <li>[% ItemTypes.GetDescription( type ) | html %]</li>
174 [% FOREACH loc IN hold_info.locations %]
175 <li>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => loc ) | html %]</li>
179 <td data-order="[% hold.reservedate | html %]">
180 [% hold.reservedate | $KohaDates %] in [% Branches.GetName ( hold.branchcode ) | html %]
182 <td>[% hold.reservenotes | html %]</td>
184 [% Branches.GetName ( hold.branchcode ) | html %]
187 <form name="cancelReserve" action="/cgi-bin/koha/circ/pendingreserves.pl" method="post">
188 <input type="hidden" name="op" value="cancel_reserve" />
189 <input type="hidden" name="reserve_id" value="[% hold.reserve_id | html %]" />
191 [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %]
192 [% IF hold_cancellation %]
193 <div class="form-group">
194 <label for="cancellation-reason">Cancellation reason:</label>
195 <select class="cancellation-reason" name="cancellation-reason" id="cancellation-reason">
196 <option value="">No reason given</option>
197 [% FOREACH reason IN hold_cancellation %]
198 <option value="[% reason.authorised_value | html %]">[% reason.lib | html %]</option>
204 [% IF item.holdingbranch != item.homebranch %]
205 <input class="btn btn-default" type="submit" value="Cancel hold and return to : [% Branches.GetName( item.homebranch ) | html %]" />
207 <input class="btn btn-default" type="submit" value="Cancel hold" />
211 [% IF Koha.Preference('CanMarkHoldsToPullAsLost') != 'do_not_allow' %]
212 [% IF hold.itemnumber %]
213 <form name="cancelReserve" action="/cgi-bin/koha/circ/pendingreserves.pl" method="post">
214 <input type="hidden" name="reserve_id" value="[% hold.reserve_id | html %]" />
215 [% IF Koha.Preference('CanMarkHoldsToPullAsLost') == 'allow' %]
216 <input type="hidden" name="op" value="mark_as_lost" />
217 <input type="submit" value="Mark item as lost" />
218 [% ELSIF Koha.Preference('CanMarkHoldsToPullAsLost') == 'allow_and_notify' %]
219 <input type="hidden" name="op" value="mark_as_lost_and_notify" />
220 <input type="submit" value="Mark lost and notify patron" />
224 <span>Biblio level hold.</span>
233 <td><input type="text" class="filter" data-column_num="0" placeholder="Pull this many items" style="width:95%"/></td>
234 <td><input type="text" class="filter" data-column_num="1" placeholder="Items available" style="width:95%"/></td>
235 <td><input type="text" class="filter" data-column_num="2" placeholder="Patron holds" style="width:95%"/></td>
236 <td><input type="text" class="filter" data-column_num="3" placeholder="Patron name" style="width:95%"/></td>
237 <td><input type="text" class="filter" data-column_num="4" placeholder="Title" style="width:95%"/></td>
238 <td id="homebranchfilter"></td>
240 <td><input type="text" class="filter" data-column_num="7" placeholder="Call number" style="width:95%"/></td>
241 <td><input type="text" class="filter" data-column_num="8" placeholder="Available copy" style="width:95%"/></td>
242 <td><input type="text" class="filter" data-column_num="9" placeholder="Available enumeration" style="width:95%"/></td>
243 <td id="itemtype-filter"></td>
244 <td id="locationfilter"></td>
247 <td id="pickup-location"></td>
253 <strong>No items found.</strong>
259 </div> <!-- /.col-sm-10.col-sm-push-2 -->
261 <div class="col-sm-2 col-sm-pull-10">
266 <form action="/cgi-bin/koha/circ/pendingreserves.pl" method="post" >
267 <fieldset class="brief">
268 <h4>Refine results</h4>
274 <input type="text" size="10" id="from" name="from" value="[% from | $KohaDates %]" class="datepickerfrom" />
279 <input type="text" size="10" id="to" name="to" value="[% to | $KohaDates %]" class="datepickerto" />
283 [% IF ( HoldsToPullEndDate ) %]
284 <p><em>(Inclusive, default is [% HoldsToPullStartDate | html %] days ago to [% HoldsToPullEndDate | html %] days ahead. Set other date ranges as needed.)</em></p>
286 <p><em>(Inclusive, default is [% HoldsToPullStartDate | html %] days ago to today. Set other date ranges as needed.)</em></p>
289 <fieldset class="action"><input type="submit" name="run_report" value="Submit" class="submit"/></fieldset>
295 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
296 </div> <!-- /.row -->
298 [% MACRO jsinclude BLOCK %]
299 [% INCLUDE 'calendar.inc' %]
300 [% INCLUDE 'datatables.inc' %]
301 [% INCLUDE 'columns_settings.inc' %]
303 $(document).ready(function() {
304 var columns_settings = [% TablesSettings.GetColumns('circ', 'holds', 'holds-to-pull', 'json') | $raw %];
305 var holdst = KohaTable("holdst", {
306 "sPaginationType": "full_numbers"
307 }, columns_settings);
308 holdst.fnAddFilters("filter");
309 [%# add separateData function to cleanse jQuery select lists by breaking apart strings glued with BR tags and then de-duplicating any repeated library codes %]
310 function separateData ( ColumnData ){
312 var new_array = new Array();
313 for ( j=0 ; j<cD.length ; j++ ) {
314 var split_array = cD[j].split(/\n/gi);
315 for ( k=0 ; k<split_array.length ; k++ ){
316 var str = $.trim(split_array[k].replace(/[\n\r]/g, ''));
317 if ($.inArray(str, new_array) == -1 && str.length > 0 ) {
325 [%# add SeparateData function into createSelect function, so that it does the createSelect on clean data %]
326 function createSelect( data ) {
327 data = separateData(data);
328 var r='<select style="width:99%"><option value="">' + _("None") + '</option>', i, len=data.length;
329 var regex = /(<([^>]+)>)/ig; // Remove html tags
330 for ( i=0 ; i<len ; i++ ) {
331 var cell_val = data[i].replace(regex, '');
332 if ( cell_val.length < 1 ) continue;
333 r += '<option value="'+cell_val+'">'+cell_val+'</option>';
335 return r+'</select>';
337 $("#homebranchfilter").each( function () {
338 $(this).html( createSelect( holdst.fnGetColumnData(5) ) );
339 $('select', this).change( function () {
340 holdst.fnFilter( $(this).val(), 5 );
343 $("#itemtype-filter").each( function () {
344 $(this).html( createSelect( holdst.fnGetColumnData(10) ) );
345 $('select', this).change( function () {
346 holdst.fnFilter( $(this).val(), 10 );
349 $("#locationfilter").each( function () {
350 $(this).html( createSelect( holdst.fnGetColumnData(11) ) );
351 $('select', this).change( function () {
352 holdst.fnFilter( $(this).val(), 11 );
355 $("#pickup-location").each( function () {
356 $(this).html( createSelect( holdst.fnGetColumnData(14) ) );
357 $('select', this).change( function () {
358 holdst.fnFilter( $(this).val(), 14 );
365 [% INCLUDE 'intranet-bottom.inc' %]