5 [% USE ColumnsSettings %]
6 [% USE AuthorisedValues %]
10 [% INCLUDE 'doc-head-open.inc' %]
11 <title>Koha › Circulation › Holds to pull</title>
12 [% INCLUDE 'doc-head-close.inc' %]
13 [% Asset.css("css/datatables.css") | $raw %]
16 <body id="circ_pendingreserves" class="circ">
17 [% INCLUDE 'header.inc' %]
18 [% INCLUDE 'circ-search.inc' %]
21 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> › Holds to pull</div>
23 <div id="doc3" class="yui-t2">
28 [% FOR m IN messages %]
29 <div class="dialog [% m.type | html %]">
31 [% CASE 'letter_enqueued' %]
32 <span>The notice has been correctly enqueued.</span>
33 [% CASE 'no_email_address' %]
34 <span>The patron does not have an email address defined.</span>
35 [% CASE 'no_template_notice' %]
36 <span>There is no notice template with a code 'CANCEL_HOLD_ON_LOST' defined in your system.</span>
37 [% CASE 'hold_cancelled' %]
38 <span>The hold has been correctly cancelled.</span>
39 [% CASE 'hold_placed_at_biblio_level' %]
40 <span>The hold has been placed on biblio level. It is not possible to determine the item to mark as lost.</span>
47 <h2>Holds to pull placed between [% from | $KohaDates %] and [% to | $KohaDates %]</h2>
48 <h3>Reported on [% todaysdate | $KohaDates %]</h3>
49 <p>The following holds have not been filled. Please retrieve them and check them in.</p>
50 <div class="searchresults">
51 [% IF ( reserveloop ) %]
55 <th>Pull this many items</th>
56 <th>Items available</th>
57 <th>Patrons with holds</th>
59 <th class="anti-the">Title</th>
60 <th class="string-sort">Libraries</th>
61 <th>Available call numbers</th>
62 <th>Available copy numbers</th>
63 <th>Available enumeration</th>
64 <th class="string-sort">Available item types</th>
65 <th class="string-sort">Available locations</th>
66 <th class="title-string">Earliest hold date</th>
71 [% FOREACH reserveloo IN reserveloop %]
73 [% IF ( reserveloo.borrowernumber ) %]
74 <td><p><b>[% reserveloo.pullcount | html %]</b></p></td>
75 <td>[% reserveloo.count | html %]</td>
76 <td>[% reserveloo.rcount | html %]</td>
77 <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% reserveloo.borrowernumber | html %]">[% reserveloo.firstname | html %] [% reserveloo.surname | html %]</a></td>
80 [% INCLUDE 'biblio-default-view.inc' biblionumber = reserveloo.biblionumber %]
81 [% reserveloo.title | html %] [% FOREACH s IN reserveloo.subtitle %] [% s | html %][% END %]</a></p>
82 [% IF ( reserveloo.author ) %]<p> by [% reserveloo.author | html %]</p>[% END %]
92 [% FOREACH holdingbranch IN reserveloo.holdingbranches %]
93 [% Branches.GetName ( holdingbranch ) | html %]
96 <td><p>[% reserveloo.itemcallnumber | html %]</p></td>
97 <td><p>[% reserveloo.copyno | html %]</p></td>
98 <td><p>[% reserveloo.enumchron | html %]</p></td>
100 [% FOREACH itemType IN reserveloo.itemTypes %]
101 [% ItemTypes.GetDescription( itemType ) | html %]
105 [% FOREACH loc IN reserveloo.locations %]
106 [% AuthorisedValues.GetByCode('LOC', loc) | html %]
110 <span title="[% reserveloo.reservedate | html %]">[% reserveloo.reservedate | $KohaDates %] in [% Branches.GetName ( reserveloo.branch ) | html %]</span>
113 <form name="cancelReserve" action="/cgi-bin/koha/circ/pendingreserves.pl" method="post">
114 <input type="hidden" name="op" value="cancel_reserve" />
115 <input type="hidden" name="reserve_id" value="[% reserveloo.reserve_id | html %]" />
116 [% IF reserveloo.holdingbranch != reserveloo.homebranch %]
117 <input type="submit" value="Cancel hold and return to : [% Branches.GetName( reserveloo.homebranch ) | html %]" />
119 <input type="submit" value="Cancel hold" />
123 [% IF Koha.Preference('CanMarkHoldsToPullAsLost') != 'do_not_allow' %]
124 [% IF reserveloo.itemnumber %]
125 <form name="cancelReserve" action="/cgi-bin/koha/circ/pendingreserves.pl" method="post">
126 <input type="hidden" name="reserve_id" value="[% reserveloo.reserve_id | html %]" />
127 [% IF Koha.Preference('CanMarkHoldsToPullAsLost') == 'allow' %]
128 <input type="hidden" name="op" value="mark_as_lost" />
129 <input type="submit" value="Mark item as lost" />
130 [% ELSIF Koha.Preference('CanMarkHoldsToPullAsLost') == 'allow_and_notify' %]
131 <input type="hidden" name="op" value="mark_as_lost_and_notify" />
132 <input type="submit" value="Mark lost and notify patron" />
136 <span>Biblio level hold.</span>
144 <td><input type="text" class="filter" data-column_num="0" placeholder="Pull this many items" style="width:95%"/></td>
145 <td><input type="text" class="filter" data-column_num="1" placeholder="Items available" style="width:95%"/></td>
146 <td><input type="text" class="filter" data-column_num="2" placeholder="Patron holds" style="width:95%"/></td>
147 <td><input type="text" class="filter" data-column_num="3" placeholder="Patron name" style="width:95%"/></td>
148 <td><input type="text" class="filter" data-column_num="4" placeholder="Title" style="width:95%"/></td>
149 <td id="homebranchfilter"></td>
150 <td><input type="text" class="filter" data-column_num="6" placeholder="Call number" style="width:95%"/></td>
151 <td><input type="text" class="filter" data-column_num="7" placeholder="Available copy" style="width:95%"/></td>
152 <td><input type="text" class="filter" data-column_num="8" placeholder="Available enumeration" style="width:95%"/></td>
153 <td id="itemtype-filter"></td>
154 <td id="locationfilter"></td>
161 <b>No items found.</b>
170 <form action="/cgi-bin/koha/circ/pendingreserves.pl" method="post" >
171 <fieldset class="brief">
172 <h4>Refine results</h4>
178 <input type="text" size="10" id="from" name="from" value="[% from | $KohaDates %]" class="datepickerfrom" />
183 <input type="text" size="10" id="to" name="to" value="[% to | $KohaDates %]" class="datepickerto" />
187 [% IF ( HoldsToPullEndDate ) %]
188 <p><i>(Inclusive, default is [% HoldsToPullStartDate | html %] days ago to [% HoldsToPullEndDate | html %] days ahead. Set other date ranges as needed.)</i></p>
190 <p><i>(Inclusive, default is [% HoldsToPullStartDate | html %] days ago to today. Set other date ranges as needed.)</i></p>
193 <fieldset class="action"><input type="submit" name="run_report" value="Submit" class="submit"/></fieldset>
201 [% MACRO jsinclude BLOCK %]
202 [% INCLUDE 'calendar.inc' %]
203 [% INCLUDE 'datatables.inc' %]
204 [% INCLUDE 'columns_settings.inc' %]
205 <script type="text/javascript">
206 $(document).ready(function() {
207 var columns_settings = [% ColumnsSettings.GetColumns('circ', 'holds', 'holds-to-pull', 'json') | $raw %];
208 var holdst = KohaTable("holdst", {
210 { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
211 { "sType": "title-string", "aTargets" : [ "title-string" ] },
212 { "sType": "string", "aTargets": [ "string-sort" ] }
214 "sPaginationType": "full_numbers"
215 }, columns_settings);
216 holdst.fnAddFilters("filter");
217 [%# add separateData function to cleanse jQuery select lists by breaking apart strings glued with BR tags and then de-duplicating any repeated library codes %]
218 function separateData ( ColumnData ){
220 var new_array = new Array();
221 for ( j=0 ; j<cD.length ; j++ ) {
222 var split_array = cD[j].split(/\n/gi);
223 for ( k=0 ; k<split_array.length ; k++ ){
224 var str = $.trim(split_array[k].replace(/[\n\r]/g, ''));
225 if ($.inArray(str, new_array) == -1 && str.length > 0 ) {
233 [%# add SeparateData function into createSelect function, so that it does the createSelect on clean data %]
234 function createSelect( data ) {
235 data = separateData(data);
236 var r='<select style="width:99%"><option value="">' + _("None") + '</option>', i, len=data.length;
237 for ( i=0 ; i<len ; i++ ) {
238 r += '<option value="'+data[i]+'">'+data[i]+'</option>';
240 return r+'</select>';
242 $("#homebranchfilter").each( function () {
243 $(this).html( createSelect( holdst.fnGetColumnData(5) ) );
244 $('select', this).change( function () {
245 var filter_value = $(this).val();
246 holdst.fnFilter( filter_value, 5, true );
249 $("#itemtype-filter").each( function () {
250 $(this).html( createSelect( holdst.fnGetColumnData(9) ) );
251 $('select', this).change( function () {
252 holdst.fnFilter( $(this).val(), 9 );
255 $("#locationfilter").each( function () {
256 $(this).html( createSelect( holdst.fnGetColumnData(10) ) );
257 $('select', this).change( function () {
258 holdst.fnFilter( $(this).val(), 10 );
265 [% INCLUDE 'intranet-bottom.inc' %]