Bug 29504: (follow-up) Account for other blockers
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / circulation.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE Context %]
4 [% USE Koha %]
5 [% USE Branches %]
6 [% USE KohaDates %]
7 [% USE Categories %]
8 [% USE TablesSettings %]
9 [% USE ItemTypes %]
10 [% USE Price %]
11 [% USE AuthorisedValues %]
12 [% SET footerjs = 1 %]
13 [% INCLUDE 'doc-head-open.inc' %]
14 [% Asset.css("lib/jquery/plugins/rowGroup/stylesheets/rowGroup.dataTables.min.css") | $raw %]
15 [% SET destination = "circ" %]
16 <title>
17     [% IF patron %]
18         Checking out to [% INCLUDE 'patron-title.inc' invert_name = 1 no_html = 1 %] &rsaquo; [% END %]
19
20     Circulation &rsaquo; Koha
21 </title>
22 [% INCLUDE 'doc-head-close.inc' %]
23 </head>
24
25 <body id="circ_circulation" class="circ">
26
27     [% INCLUDE 'header.inc' %]
28     [% INCLUDE 'circ-search.inc' %]
29
30     <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
31         <ol>
32             <li>
33                 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
34             </li>
35             <li>
36                 <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
37             </li>
38
39             [% IF patron %]
40                 <li>
41                     <a href="/cgi-bin/koha/circ/circulation.pl">Checkouts</a>
42                 </li>
43                 <li>
44                     <a href="#" aria-current="page">
45                         [% INCLUDE 'patron-title.inc' %]
46                     </a>
47                 </li>
48             [% ELSE %]
49                 <li>
50                     <a href="#" aria-current="page">
51                         Checkouts
52                     </a>
53                 </li>
54             [% END %]
55         </ol>
56     </nav>
57
58     <div class="main container-fluid">
59         <main>
60             <div class="row">
61                 <div class="col-sm-10 col-sm-push-2">
62
63                     [% IF patron %]
64                         [% INCLUDE 'members-toolbar.inc' %]
65                     [% END %]
66
67                     <h1>Checkouts</h1>
68
69                     <!--  INITIAL BLOC : PARAMETERS & BORROWER INFO -->
70                     [% IF ( was_renewed ) %]
71                         <div class="dialog message">Patron's account has been renewed until [% expiry | $KohaDates %]</div>
72                     [% END %]
73
74                     [% IF autoswitched %]
75                         <div id="autoswitched" class="dialog message">Patron was automatically switched by reading the patron card during checking out. Ensure you are working with the right patron.</div>
76                     [% END %]
77
78                     [% IF ADDITIONAL_MATERIALS && !NEEDSCONFIRMATION %]
79                         <div id="materials" class="dialog message">Note about the accompanying materials: [% ADDITIONAL_MATERIALS | html %]
80                         </div>
81                     [% END %]
82
83                     [% IF ( alert.ITEM_LOST ) %]
84                         <div class="dialog message">This item has been lost with a status of "[% alert.ITEM_LOST | html %]".</div>
85                     [% END %]
86
87                     [% IF ( alert.OTHER_CHARGES ) %]
88                         <div class="dialog message">The patron has unpaid charges for holds, rentals etc of [% alert.OTHER_CHARGES | $Price %]</div>
89                     [% END %]
90
91                     [% IF alert.HIGHHOLDS %]
92                         <div class="dialog message">High demand item. <strong>Loan period was not shortened due to override.</strong> Shortened due date would have been [% alert.HIGHHOLDS.returndate | $KohaDates %] ([% alert.HIGHHOLDS.duration  | html %] days).</div>
93                     [% END %]
94
95                     [% IF alert.RETURNED_FROM_ANOTHER %]
96                         <div class="dialog alert">Item was checked out to [% INCLUDE 'patron-title.inc' patron = alert.RETURNED_FROM_ANOTHER.patron %] and was returned automatically.</div>
97                     [% END %]
98
99                     [% IF ( nopermission ) %]
100                         <div class="dialog alert">Staff members are not allowed to discharge borrowers, nor borrowers to request a discharge.</div>
101                     [% END %]
102
103                     [% IF ( NEEDSCONFIRMATION ) %]
104                         <div id="circ_needsconfirmation" class="dialog alert audio-alert-action focus" tabindex="-1">
105                             [% IF CAN_user_circulate_force_checkout or ADDITIONAL_MATERIALS %]
106                                 <h3>Please confirm checkout</h3>
107                             [% ELSE %]
108                               <h3>Cannot check out</h3>
109                             [% END %]
110
111                             <ul>
112                                 [%IF ( AGE_RESTRICTION ) %]
113                                     <li>
114                                         Age restriction [% AGE_RESTRICTION | html %].
115                                         [% IF CAN_user_circulate_force_checkout %]
116                                             Check out anyway?
117                                         [% END %]
118                                     </li>
119                                 [% END %]
120
121
122                                 [% IF ( DEBT ) %]
123                                     <li>The patron has a debt of [% DEBT | $Price %].</li>
124                                 [% END %]
125
126                                 [% IF ( DEBT_GUARANTEES ) %]
127                                     <li>The patron's guarantees collectively have a debt of [% DEBT_GUARANTEES | $Price %].</li>
128                                 [% END %]
129
130                                 [% IF ( DEBT_GUARANTORS ) %]
131                                     <li>The patron's guarantors and their other guarantees collectively have a debt of [% DEBT_GUARANTORS | $Price %].</li>
132                                 [% END %]
133
134                                 [% IF ( RENTALCHARGE && RENTALCHARGE > 0 ) %]
135                                     <li>Rental charge for this item: [% RENTALCHARGE | $Price %]</li>
136                                 [% END %]
137
138                                 [% IF ( RENEW_ISSUE ) %]
139                                     <li>Item <em>[% getTitleMessageIteminfo | html %]</em> ([% getBarcodeMessageIteminfo | html %]) is currently checked out to this patron.  Renew?</li>
140                                 [% END %]
141
142                                 [% IF ( RESERVE_WAITING ) %]
143                                     <li>Item <em>[% getTitleMessageIteminfo | html %]</em> ([% getBarcodeMessageIteminfo | html %]) has been waiting for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% resborrowernumber | uri %]">[% resfirstname | html %] [% ressurname | html %]</a> ([% rescardnumber | html %]) at [% Branches.GetName( resbranchcode ) | html %] since [% reswaitingdate | $KohaDates %]</li>
144                                 [% END %]
145
146                                 [% IF ( TRANSFERRED ) %]
147                                     <li>Item <em>[% getTitleMessageIteminfo | html %]</em> ([% getBarcodeMessageIteminfo | html %]) is on hold for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% resborrowernumber | uri %]">[% resfirstname | html %] [% ressurname | html %]</a> ([% rescardnumber | html %]) and being transferred to [% Branches.GetName( resbranchcode ) | html %]</li>
148                                 [% END %]
149
150                                 [% IF ( PROCESSING ) %]
151                                     <li>Item <em>[% getTitleMessageIteminfo | html %]</em> ([% getBarcodeMessageIteminfo | html %]) is being processed for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% resborrowernumber | uri %]">[% resfirstname | html %] [% ressurname | html %]</a> ([% rescardnumber | html %]) at [% Branches.GetName( resbranchcode ) | html %]</li>
152                                 [% END %]
153
154                                 [% IF ( RESERVED ) %]
155                                     <li>Item <em>[% getTitleMessageIteminfo | html %]</em> ([% getBarcodeMessageIteminfo | html %]) has been on hold for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% resborrowernumber | uri %]">[% resfirstname | html %] [% ressurname | html %]</a> ([% rescardnumber | html %]) at [% Branches.GetName( resbranchcode ) | html %] since [% resreservedate | $KohaDates %]</li>
156                                 [% END %]
157
158                                 [% IF ( ISSUED_TO_ANOTHER ) %]
159                                     <li>Item <em>[% getTitleMessageIteminfo | html %]</em> ([% getBarcodeMessageIteminfo | html %]) is checked out to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% issued_borrowernumber | uri %]">[% issued_firstname | html %] [% issued_surname | html %]</a> ([% issued_cardnumber | html %]).
160                                         [% IF CAN_user_circulate_force_checkout %]
161                                             Check in and check out?
162                                         [% END %]
163                                     </li>
164                                 [% END %]
165
166                                 [% IF TOO_MANY and TOO_MANY == 'TOO_MANY_CHECKOUTS' %]
167                                     <li>Too many checked out. [% current_loan_count | html %] checked out, only [% max_loans_allowed | html %] are allowed.</li>
168                                 [% END %]
169
170                                 [% IF TOO_MANY and TOO_MANY == 'TOO_MANY_ONSITE_CHECKOUTS' %]
171                                     <li>Too many on-site checked out. [% current_loan_count | html %] on-site checked out, only [% max_loans_allowed | html %] are allowed.</li>
172                                 [% END %]
173
174                                 [% IF ( BORRNOTSAMEBRANCH ) %]
175                                     <li>This patron is from a different library ([% Branches.GetName( BORRNOTSAMEBRANCH ) | html %])</li>
176                                 [% END %]
177
178                                 [% IF ( PATRON_CANT ) %]
179                                     <li>This patron can't check out this item per library circulation policy.</li>
180                                 [% END %]
181
182                                 [% IF ( TOO_MANY and TOO_MANY == 'NO_RULE_DEFINED' ) %]
183                                     <li>No circulation rule is defined for this patron and itemtype combination.</li>
184                                 [% END %]
185
186                                 [% IF ( NOT_FOR_LOAN_FORCING ) %]
187                                     <li>
188                                     [% IF ( itemtype_notforloan ) %]
189                                         <span>Item type is normally not for loan.</span>
190                                     [% ELSIF ( item_notforloan ) %]
191                                         [% item_notforloan_lib = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => item.notforloan ) %]
192                                         <span>Item is normally not for loan</span>[% IF (item_notforloan_lib) %] ([% item_notforloan_lib | html %])[% END %].
193                                     [% END %]
194                                         [% IF CAN_user_circulate_force_checkout %]
195                                             <span>Check out anyway?</span>
196                                         [% END %]
197                                     </li>
198                                 [% END %]
199
200                                 [% IF ( USERBLOCKEDOVERDUE ) %]
201                                     <li>Patron has [% USERBLOCKEDOVERDUE %] overdue item(s).
202                                         [% IF CAN_user_circulate_force_checkout %]
203                                             Check out anyway?
204                                         [% END %]
205                                     </li>
206                                 [% END %]
207
208                                 [% IF ( ITEM_LOST ) %]
209                                     <li>This item has been lost with a status of "[% ITEM_LOST | html %]".
210                                         [% IF CAN_user_circulate_force_checkout %]
211                                             Check out anyway?
212                                         [% END %]
213                                     </li>
214                                 [% END %]
215
216                                 [% IF HIGHHOLDS %]
217                                     <li>High demand item. Loan period shortened to [% HIGHHOLDS.duration | html %] days (due [% HIGHHOLDS.returndate | $KohaDates %]). Check out anyway?</li>
218                                 [% END %]
219
220                                 [% IF PREVISSUE %]
221                                     <li>Patron has previously checked out this title: <strong>[% biblio.title | html %] [% IF biblio.author %] by [% biblio.author | html %][% END %]</strong>. Check out anyway?</li>
222                                 [% END %]
223
224                                 [% IF BIBLIO_ALREADY_ISSUED %]
225                                     <li>
226                                         Patron has already checked out another item from this record.
227                                         [% IF CAN_user_circulate_force_checkout %]
228                                             Check out anyway?
229                                         [% END %]
230                                     </li>
231                                 [% END %]
232
233                                 [% IF ADDITIONAL_MATERIALS %]
234                                     <li>
235                                         Please confirm that the accompanying materials are present: [% ADDITIONAL_MATERIALS | html %]
236                                     </li>
237                                 [% END %]
238
239                                 [% IF RECALLED %]
240                                     [% IF RECALLED.waiting %]
241                                         <li>Item <i>[% RECALLED.biblio.title | html %]</i> ([% RECALLED.item.barcode | html %]) has been waiting for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% RECALLED.patron_id | uri %]">[% RECALLED.patron.firstname | html %] [% RECALLED.patron.surname | html %]</a> ([% RECALLED.patron.cardnumber | html %]) at [% Branches.GetName( RECALLED.pickup_library_id ) | html %] since [% RECALLED.waiting_date | $KohaDates %]</li>
242                                     [% ELSIF RECALLED.requested or RECALLED.overdue %]
243                                         <li>Item <i>[% RECALLED.biblio.title | html %]</i> [% IF RECALLED.item %]([% RECALLED.item.barcode | html %])[% END %] has been recalled by <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% RECALLED.patron_id | uri %]">[% RECALLED.patron.firstname | html %] [% RECALLED.patron.surname | html %]</a> ([% RECALLED.patron.cardnumber | html %]) at [% Branches.GetName( RECALLED.pickup_library_id ) | html %] since [% RECALLED.created_date | $KohaDates %]</li>
244                                     [% END %]
245                                 [% END %]
246
247                             </ul>
248
249                             [% IF CAN_user_circulate_force_checkout or HIGHHOLDS %]
250                                 <form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off">
251                                     <input type="hidden" name="restoreduedatespec" />
252
253                                     [% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
254
255                                     [% IF HIGHHOLDS %]
256                                         <p class="circ-override-high-holds">
257                                             <input type="checkbox" name="override_high_holds_tmp" id="override_high_holds_tmp" value="1" />
258                                             <label for="override_high_holds_tmp">Don't decrease loan length based on holds</label>
259                                         </p>
260                                     [% END %]
261
262                                     [% IF ( RESERVED ) %]
263                                         <p>
264                                             <input type="checkbox" id="cancelreserve" name="cancelreserve" value="cancel" />
265                                             <label for="cancelreserve">Cancel hold</label>
266                                         </p>
267                                     [% END %]
268
269                                     [% IF ( RESERVE_WAITING ) %]
270                                         <p>
271                                             <label for="cancelreserve">Cancel hold</label>
272                                             <input type="radio" value="cancel" name="cancelreserve" id="cancelreserve" /><br />
273                                             <label for="revertreserve">Revert waiting status</label>
274                                             <input type="radio" value="revert" name="cancelreserve" id="revertreserve" checked="checked"/>
275                                         </p>
276                                     [% END %]
277
278                                     [% IF ( TRANSFERRED ) %]
279                                         <p>
280                                             <label for="cancelreserve">Cancel hold</label>
281                                             <input type="radio" value="cancel" name="cancelreserve" id="cancelreserve" /><br />
282                                             <label for="revertreserve">Revert hold transfer status</label>
283                                             <input type="radio" value="revert" name="cancelreserve" id="revertreserve" checked="checked"/>
284                                         </p>
285                                     [% END %]
286
287                                     [% IF ( PROCESSING ) %]
288                                         <p>
289                                             <label for="cancelreserve">Cancel hold</label>
290                                             <input type="radio" value="cancel" name="cancelreserve" id="cancelreserve" /><br />
291                                             <label for="revertreserve">Revert In Processing status</label>
292                                             <input type="radio" value="revert" name="cancelreserve" id="revertreserve" checked="checked"/>
293                                         </p>
294                                     [% END %]
295
296                                     [% IF ( RECALLED ) %]
297                                         <p>
298                                             <label for="cancelrecall">Cancel recall</label>
299                                             <input type="radio" value="cancel" name="cancel_recall" id="cancelrecall" />
300                                             <input type="hidden" value="[% RECALLED.id | html %]" name="recall_id" />
301                                         </p>
302                                         [% IF RECALLED.waiting %]
303                                             <p>
304                                                 <label for="revertrecall">Revert waiting status</label>
305                                                 <input type="radio" value="revert" name="cancel_recall" id="revertrecall" checked="checked"/>
306                                                 <input type="hidden" value="[% RECALLED.id | html %]" name="recall_id" />
307                                             </p>
308                                         [% END %]
309                                     [% END %]
310
311                                     <input type="hidden" name="barcode" value="[% barcode | html %]" />
312                                     <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
313                                     <input type="hidden" name="issueconfirmed" value="1" />
314                                     <input type="hidden" name="override_high_holds" value="[% override_high_holds | html %]"/>
315
316                                     [% IF ( DEBT ) %]<input type="hidden" name="debt_confirmed" value="1" />[% END %]
317
318                                     [% IF ( INVALID_DATE ) %]
319                                         <p>
320                                           <input type="text" size="20" id="duedatespec" name="duedatespec" value="[% duedatespec | $KohaDates with_hours => 1 %]" />
321                                             <label for="duedatespec">Due date</label>
322                                         </p>
323                                     [% ELSE %]
324                                         <input type="hidden" name="duedatespec" value="[% duedatespec | html %]" />
325                                     [% END %]
326
327                                     <input type="hidden" name="stickyduedate" value="[% stickyduedate | html %]" />
328                                     <input type="hidden" name="branch" value="[% branch | html %]" />
329
330                                     [% IF ( RENEW_ISSUE ) %]
331                                         <button type="submit" class="approve" accesskey="y"><i class="fa fa-check"></i> Yes, renew (Y)</button>
332                                     [% ELSE %]
333                                         <button type="submit" class="approve" accesskey="y"><i class="fa fa-check"></i> Yes, check out (Y)</button>
334                                     [% END %]
335
336                                     <input type="hidden" name="onsite_checkout" value="[% onsite_checkout | html %]" />
337                                     <input type="hidden" name="auto_renew" value="[% auto_renew | html %]" />
338                                 </form>
339                             [% END # /IF CAN_user_circulate_force_checkout or HIGHHOLDS %]
340
341                             [% IF ADDITIONAL_MATERIALS && !CAN_user_circulate_force_checkout %]
342                                 <form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off">
343                                     <input type="hidden" name="restoreduedatespec" />
344
345                                     [% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
346
347                                     <input type="hidden" name="barcode" value="[% barcode | html %]" />
348                                     <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
349                                     <input type="hidden" name="issueconfirmed" value="1" />
350                                     <input type="hidden" name="override_high_holds" value="[% override_high_holds | html %]"/>
351                                     <input type="hidden" name="stickyduedate" value="[% stickyduedate | html %]" />
352                                     <input type="hidden" name="branch" value="[% branch | html %]" />
353
354                                     [% IF ( RENEW_ISSUE ) %]
355                                         <button type="submit" class="approve" accesskey="y"><i class="fa fa-check"></i> Yes, renew (Y)</button>
356                                     [% ELSE %]
357                                         <button type="submit" class="approve" accesskey="y"><i class="fa fa-check"></i> Yes, check out (Y)</button>
358                                     [% END %]
359
360                                     <input type="hidden" name="onsite_checkout" value="[% onsite_checkout | html %]" />
361                                     <input type="hidden" name="auto_renew" value="[% auto_renew | html %]" />
362                                 </form>
363                             [% END # /IF ADDITIONAL_MATERIALS %]
364
365                             [% IF ( RESERVED or RESERVE_WAITING or TRANSFERRED or PROCESSING ) %]
366                                 <form method="get" action="/cgi-bin/koha/circ/circulation.pl">
367                                     <input type="hidden" name="restoreduedatespec" />
368                                     <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
369                                     <input type="hidden" name="duedatespec" value="[% duedatespec | html %]" />
370                                     <input type="hidden" name="stickyduedate" value="[% stickyduedate | html %]" />
371                                     <button class="print" type="submit" onclick="Dopop('hold-transfer-slip.pl?reserve_id=[% reserve_id | uri %]');this.form.submit();"><i class="fa fa-print"></i> Don't check out and print slip (P)</button>
372                                 </form>
373                             [% END %]
374
375                             [% IF ( RECALLED ) %]
376                                 <form method="get" action="/cgi-bin/koha/circ/circulation.pl">
377                                     <button class="print" type="submit" onclick="Dopop('/cgi-bin/koha/recalls/recall_pickup_slip.pl?recall_id=[% RECALLED.id | html %]');this.form.submit();"><i class="fa fa-print"></i> Don't check out and print slip (P)</button>
378                                 </form>
379                             [% END %]
380
381                             <form method="get" action="/cgi-bin/koha/circ/circulation.pl">
382                                 [% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
383                                 <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
384                                 <input type="hidden" name="duedatespec" value="[% duedatespec | html %]" />
385                                 <input type="hidden" name="restoreduedatespec" />
386                                 <input type="hidden" name="stickyduedate" value="[% stickyduedate | html %]" />
387                                 [% IF CAN_user_circulate_force_checkout or HIGHHOLDS or ADDITIONAL_MATERIALS %]
388                                     [% IF ( RENEW_ISSUE ) %]
389                                         <button type="submit" class="deny" accesskey="n"><i class="fa fa-times"></i> No, don't renew (N)</button>
390                                     [% ELSE %]
391                                         <button type="submit" class="deny" accesskey="n"><i class="fa fa-times"></i> No, don't check out (N)</button>
392                                     [% END %]
393                                 [% ELSE %]
394                                     <button type="submit" class="deny"><i class="fa fa-times"></i> Continue</button>
395                                 [% END %]
396                             </form>
397
398                             [% IF ( RESERVED || ISSUED_TO_ANOTHER || RECALLED ) && (CAN_user_reserveforothers_place_holds ) %]
399                                 [% UNLESS noissues %]
400                                     <button type="submit" onclick="window.location.href='/cgi-bin/koha/reserve/request.pl?biblionumber=[% itembiblionumber | html %]&borrowernumber=[% patron.borrowernumber | html %]'"><i class="fa fa-sticky-note-o"></i> Cancel checkout and place a hold for [% INCLUDE 'patron-title.inc' %]</button>
401                                 [% END %]
402                             [% END %]
403                         </div> <!-- /#circ_needsconfirmation -->
404                     [% END # /NEEDSCONFIRMATION %]
405
406                     [% IF ( IMPOSSIBLE ) %]
407                         <div id="circ_impossible" class="dialog alert audio-alert-warning focus" tabindex="-1">
408                             [% IF ( UNKNOWN_BARCODE ) %]
409                                 <h3>Barcode not found</h3>
410                             [% END %]
411
412                             <!-- RESULT OF ISSUING REQUEST -->
413                             <ul>
414                                 [% IF ( DEBT_GUARANTORS ) %]
415                                     <li>The patron's guarantors and their other guarantees collectively have a debt of [% DEBT_GUARANTORS | $Price %].</li>
416                                 [% END %]
417
418                                 [% IF ( STATS ) %]
419                                     <li>Local use recorded</li>
420                                 [% END %]
421
422                                 [% IF ( INVALID_DATE ) %]
423                                     <li>The due date &quot;[% INVALID_DATE | html %]&quot; is invalid</li>
424                                 [% END %]
425
426                                 [% IF ( UNKNOWN_BARCODE ) %]
427                                     <li>The barcode was not found: <span class="ex">[% barcode | html %]</span>
428                                         <div>
429                                             [% IF ( FALLBACK ) %]
430                                                 [% IF options %]
431                                                     <button type="button" class="approve" data-toggle="modal" data-target="#itemSearchFallback"><i class="fa fa-search"></i> Show matching titles</button>
432                                                 [% ELSE %]
433                                                     <div>No items were found by searching.</div>
434                                                 [% END %]
435                                             [% END %]
436
437                                             [% IF ( fast_cataloging ) %]
438                                                 [% IF ( CAN_user_editcatalogue_fast_cataloging ) %]
439                                                     <a class="approve" href="/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=FA&amp;barcode=[% barcode |uri %]&amp;circborrowernumber=[% patron.borrowernumber | html %]&amp;branch=[% branch | html %]&amp;duedatespec=[% duedatespec | html %]&amp;stickyduedate=[% stickyduedate | html %]"><i class="fa fa-plus"></i> Add record using fast cataloging</a>
440                                                 [% END %]
441                                             [% END %]
442                                         </div>
443                                     </li>
444                                 [% END %]
445
446                                 [% IF ( NOT_FOR_LOAN ) %]
447                                     <li>
448                                     [% IF ( itemtype_notforloan ) %]
449                                         Item type not for loan.
450                                     [% ELSIF ( item_notforloan ) %]
451                                         [% item_notforloan_lib = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => item.notforloan ) %]
452                                         Item not for loan[% IF (item_notforloan_lib) %] ([% item_notforloan_lib | html %])[% END %].
453                                     [% END %]
454                                     </li>
455                                 [% END %]
456
457                                 [% IF ( WTHDRAWN ) %]
458                                     <li>
459                                         <span>Item has been withdrawn</span>
460                                         [% item_withdrawn_lib = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => item.withdrawn ) %]
461                                         [% IF (item_withdrawn_lib) %]<span class="co-withdrawn">([% item_withdrawn_lib | html %])</span>[% END %]
462                                     </li>
463                                 [% END %]
464
465                                 [% IF ( RESTRICTED ) %]
466                                     <li>Item is restricted</li>
467                                 [% END %]
468
469                                 [% IF ( GNA ) %]
470                                     <li>Patron's address is in doubt</li>
471                                 [% END %]
472
473                                 [% IF ( CARD_LOST ) %]
474                                     <li>Patron's card is lost</li>
475                                 [% END %]
476
477                                 [% IF ( DEBARRED ) %]
478                                     <li>Patron is restricted</li>
479                                 [% END %]
480
481                                 [% IF ( NO_MORE_RENEWALS ) %]
482                                     <li>No more renewals possible</li>
483                                 [% END %]
484
485                                 [% IF NO_RENEWAL_FOR_ONSITE_CHECKOUTS %]
486                                     <li>This item can not be renewed, it's an on-site checkout</li>
487                                 [% END %]
488
489                                 [%IF ( AGE_RESTRICTION ) %]
490                                     <li>Age restriction [% AGE_RESTRICTION | html %].</li>
491                                 [% END %]
492
493                                 [% IF ( EXPIRED ) %]
494                                     <li>Patron's card is expired</li>
495                                 [% END %]
496
497                                 [% IF ( TOO_MANY ) %]
498                                     <li>Too many checked out. [% current_loan_count | html %] checked out, only [% max_loans_allowed | html %] are allowed.</li>
499                                 [% END %]
500
501                                 [% IF ( ITEMNOTSAMEBRANCH ) %]
502                                     <li>This item belongs to [% Branches.GetName( itemhomebranch ) | html %] and cannot be checked out from this location.</li>
503                                 [% END %]
504
505                                 [% IF RETURN_IMPOSSIBLE %]
506                                     <li>This item must be returned to [% Branches.GetName( branch_to_return ) | html %].</li>
507                                 [% END %]
508
509                                 [% IF ( USERBLOCKEDWITHENDDATE ) %]
510                                     <li>Patron has a restriction until [% USERBLOCKEDWITHENDDATE | $KohaDates %].</li>
511                                 [% END %]
512
513                                 [% IF ( USERBLOCKEDNOENDDATE ) %]
514                                     <li>Patron has an indefinite restriction.</li>
515                                 [% END %]
516
517                                 [% IF ( USERBLOCKEDOVERDUE ) %]
518                                     <li>Checkouts are BLOCKED because patron has overdue items.</li>
519                                 [% END %]
520
521                                 [% IF ( RECALLED_INTRANSIT ) %]
522                                     <li>Item has been recalled and is in transit for pickup at [% Branches.GetName( RECALLED_INTRANSIT ) | html %].</li>
523                                 [% END %]
524                                 </ul>
525
526                                 [% IF (forceallow) %]
527                                     <li>Restriction overridden temporarily.</li>
528                                 [% END %]
529                             </ul>
530                         </div> <!-- /#circ_impossible -->
531
532                         [% IF ( FALLBACK ) %]
533                             [% IF options %]
534                                 <!-- Modal -->
535                                 <div class="modal" id="itemSearchFallback" tabindex="-1" role="dialog" aria-labelledby="itemSearchFallbackLabel">
536                                     <div class="modal-dialog modal-wide" role="document">
537                                         <div class="modal-content">
538                                             <div class="modal-header">
539                                                 <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
540                                                 <h3 id="itemSearchFallbackLabel"><h3>Barcode not found. The following items were found by searching:</h3>
541                                             </div>
542                                             <div class="modal-body">
543                                                 <table class="table_borrowers">
544                                                     <thead>
545                                                         <tr>
546                                                             <th>Title</th>
547                                                             <th>Barcode</th>
548                                                             <th>Call number</th>
549                                                             <th>Copy number</th>
550                                                             <th>Inventory number</th>
551                                                             <th>Serial enumeration</th>
552                                                             <th>Collection</th>
553                                                             [% IF ( item_level_itypes ) %]<th>Item type</th>[% END %]
554                                                             <th>&nbsp;</th>
555                                                         </tr>
556                                                     </thead>
557                                                     <tbody>
558                                                     [% FOREACH item IN options %]
559                                                         <tr>
560                                                             <td>
561                                                                 <a target="_blank" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.biblionumber | html %]">[% item.biblio.title | html %] <i class="fa fa-window-restore"></i></a>
562                                                             </td>
563                                                             <td>
564                                                                 [% item.barcode | html %]
565                                                             </td>
566                                                             <td>[% item.itemcallnumber | html %]</th>
567                                                             <td>[% item.copynumber | html %]</th>
568                                                             <td>[% item.stocknumber| html %]</th>
569                                                             <td>[% item.enumchron| html %]</th>
570                                                             <td>
571                                                                 [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => item.ccode ) | html %]
572                                                             </td>
573                                                             [% IF ( item_level_itypes ) %]
574                                                                 <td>
575                                                                     [% ItemTypes.GetDescription( item.itype ) | html %]
576                                                                 </td>
577                                                             [% END %]
578                                                             <td>
579                                                                 <form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off">
580                                                                     [% IF (forceallow) %]
581                                                                         <input type="hidden" name="forceallow" value="1">
582                                                                     [% END %]
583                                                                     <input type="hidden" name="restoreduedatespec" />
584                                                                     <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
585                                                                     <input type="hidden" name="duedatespec" value="[% duedatespec | html %]" />
586                                                                     <input type="hidden" name="stickyduedate" value="[% stickyduedate | html %]" />
587                                                                     <input type="hidden" name="branch" value="[% branch | html %]" />
588                                                                     <input type="hidden" name="barcode" value="[% item.barcode | html %]" />
589                                                                     <input type="hidden" name="onsite_checkout" value="[% onsite_checkout | html %]" />
590                                                                     <input type="hidden" name="auto_renew" value="[% auto_renew | html %]" />
591                                                                     <button class="btn btn-default btn-xs" type="submit" name="x"><i class="fa fa-check"></i> Check out</button>
592                                                                 </form>
593                                                             </td>
594                                                         </tr>
595                                                     [% END %]
596                                                     </tbody>
597                                                 </table>
598                                             </div> <!-- /.modal-body -->
599                                             <div class="modal-footer">
600                                                 <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
601                                             </div>
602                                         </div> <!-- /.modal-content -->
603                                     </div> <!-- /.modal-dialog.modal-wide -->
604                                 </div> <!-- /#itemSearchFallback -->
605                             [% END # /IF options %]
606                         [% END # /IF FALLBACK %]
607
608                     [% ELSE # IF IMPOSSIBLE %]
609                         [% IF (forceallow) %]
610                             <div id="overridden_debarment" class="dialog alert">Restriction overridden temporarily</div>
611                         [% END %]
612                     [% END # /IF IMPOSSIBLE %]
613
614                     <span class="audio-alert-success"></span>
615
616                     [% IF ( issued ) %]
617                         <p>Item checked out</p>
618                     [% END %]
619
620                     [% IF ( message ) %]
621                         [% INCLUDE 'patron-toolbar.inc' %]
622                         <h4>No patron matched <span class="ex">[% message | html %]</span></h4>
623                     [% END %]
624
625                     <!-- BARCODE ENTRY -->
626
627                     [% IF patron %]
628
629                         [% IF patron.privacy == 2 AND NOT Koha.Preference('AnonymousPatron') %]
630                             <div class="dialog alert">
631                                 <strong>Error:</strong> This patron has requested their circulation history be anonymized on check-in, but the AnonymousPatron system preference is empty or incorrect.
632                             </div>
633                         [% END %]
634
635                         <div class="row">
636                             [% IF ( !noissues ) || ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') )%]
637                                 <div class="col-sm-6">
638                                     <form method="post" action="/cgi-bin/koha/circ/circulation.pl" id="mainform" name="mainform" autocomplete="off">
639                                         <input type="hidden" name="restoreduedatespec" />
640                                         [% IF ( issue ) %]
641                                             <fieldset id="circ_circulation_issue" class="lastchecked">
642                                         [% ELSE %]
643                                             <fieldset id="circ_circulation_issue">
644                                         [% END %]
645
646                                         [% IF ( DisplayClearScreenButton ) %]
647                                             <span id="clearscreen"><a href="/cgi-bin/koha/circ/circulation.pl" title="Clear screen">x</a></span>
648                                             <span id="printclearscreen"><a href="#" title="Print slip and clear screen"><i class="fa fa-print"></i></a></span>
649                                         [% END %]
650
651                                         [% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
652
653                                         <label class="circ_barcode" for="barcode">Checking out to [% INCLUDE 'patron-title.inc' %]</label>
654
655                                         [% IF Koha.Preference('itemBarcodeFallbackSearch') %]
656                                             <div class="hint">Enter item barcode or keyword:</div>
657                                         [% ELSE %]
658                                             <div class="hint">Enter item barcode:</div>
659                                         [% END %]
660
661                                         [% IF NEEDSCONFIRMATION %]
662                                             <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" disabled="disabled" />
663                                         [% ELSE %]
664                                             <input type="text" name="barcode" id="barcode" class="barcode focus" size="14" />
665                                         [% END %]
666
667                                         <button type="submit" class="btn btn-default">Check out</button>
668
669                                         <div id="show-circ-settings">
670                                             <a href="#"><i class="fa fa-caret-right circ-settings-icon"></i> Checkout settings</a>
671                                         </div>
672
673                                         <div class="circ-settings">
674
675                                                 [% UNLESS ( noissues && Koha.Preference('OnSiteCheckoutsForce') ) %]
676                                                     [% IF ( SpecifyDueDate ) %]
677                                                         <div id="specify-due-date" class="circ-setting">
678                                                             <div class="hint">Specify due date [% INCLUDE 'date-format.inc' %]: </div>
679                                                             [% IF ( duedatespec ) %]
680                                                                 <input type="text" size="20" id="duedatespec" name="duedatespec" value="[% duedatespec | $KohaDates with_hours => 1 %]" />
681                                                             [% ELSE %]
682                                                                 <input type="text" size="20" id="duedatespec" name="duedatespec" value="" />
683                                                             [% END %]
684                                                             <label for="stickyduedate"> Remember for session:</label>
685                                                             [% IF ( stickyduedate ) %]
686                                                                 <input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" checked="checked" />
687                                                             [% ELSE %]
688                                                                 <input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" />
689                                                             [% END %]
690                                                         </div>
691                                                     [% END %]
692                                                 [% END %]
693
694                                                 [% UNLESS ( noissues ) %]
695                                                     [% IF Koha.Preference('AllowSetAutomaticRenewal') %]
696                                                         <div id="set-automatic-renewal" class="circ-setting">
697                                                             [% IF NEEDSCONFIRMATION %]
698                                                                 [% IF auto_renew %]
699                                                                     [% IF patron.autorenew_checkouts %]
700                                                                         <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled"
701                                                                         title="Patron has opted out of auto-renewal"/>
702                                                                     [% ELSE %]
703                                                                         <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled" checked="checked" />
704                                                                     [% END %]
705                                                                 [% ELSE %]
706                                                                     <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled" />
707                                                                 [% END %]
708                                                             [% ELSE %]
709                                                                 [% IF ( auto_renew && patron.autorenew_checkouts ) %]
710                                                                     <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" class="circ_setting" checked="checked" />
711                                                                 [% ELSIF patron.autorenew_checkouts %]
712                                                                     <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" class="circ_setting" />
713                                                                 [% ELSE %]
714                                                                     <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled"
715                                                                     title="Patron has opted out of auto-renewal"/>
716                                                                 [% END %]
717                                                             [% END %]
718
719                                                             <label for="auto_renew">Automatic renewal</label>
720                                                         </div>
721                                                     [% END %]
722                                                     [% IF Koha.Preference('decreaseLoanHighHolds') %]
723                                                         <div id="set_high_holds_overrride" class="circ-setting">
724                                                             [% IF NEEDSCONFIRMATION %]
725                                                                 [% IF override_high_holds %]
726                                                                     <input type="checkbox" name="override_high_holds" id="override_high_holds" value="1" disabled="disabled" checked="checked"/>
727                                                                 [% ELSE %]
728                                                                     <input type="checkbox" name="override_high_holds" id="override_high_holds" value="1" disabled="disabled"/>
729                                                                 [% END %]
730                                                             [% ELSE %]
731                                                                 [% IF override_high_holds %]
732                                                                     <input type="checkbox" name="override_high_holds" id="override_high_holds" value="1" class="circ_setting" checked="checked" />
733                                                                 [% ELSE %]
734                                                                     <input type="checkbox" name="override_high_holds" id="override_high_holds" value="1" class="circ_setting" />
735                                                                 [% END %]
736                                                             [% END %]
737                                                             <label for="override_high_holds">Don't decrease checkout length based on holds</label>
738                                                         </div>
739                                                     [% END %]
740                                                 [% END %]
741
742                                                 [% IF Koha.Preference('OnSiteCheckouts') %]
743                                                     <div id="onsite_checkout-select" class="circ-setting">
744                                                         [% IF noissues %]
745                                                             <div class="onsite-checkout-only">
746                                                                 <input type="checkbox" id="onsite_checkout" name="onsite_checkout_forced" checked="checked" disabled="disabled" /> <label for="onsite_checkout">On-site checkouts only. Automatic due date: </label>
747                                                                 <input type="text" name="duedatespec" id="duedatespec" />
748                                                                 <input type="hidden" name="onsite_checkout" checked="checked" value="1" />
749                                                             </div>
750                                                         [% ELSE %]
751                                                             [% IF Koha.Preference('OnSiteCheckoutAutoCheck') && onsite_checkout == "on" %]
752                                                             <input type="checkbox" id="onsite_checkout" name="onsite_checkout" class="circ_setting" checked="checked" /> <label for="onsite_checkout">On-site checkout</label>
753                                                             [% ELSE %]
754                                                             <input type="checkbox" id="onsite_checkout" name="onsite_checkout" class="circ_setting" /> <label for="onsite_checkout">On-site checkout</label>
755                                                             [% END %]
756                                                         [% END %]
757                                                     </div>
758                                                 [% END %]
759
760                                             </div> <!-- /.circ-settings -->
761
762                                             <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.borrowernumber | html %]" />
763                                             <input type="hidden" name="branch" value="[% branch | html %]" />
764                                             <input type="hidden" name="debt_confirmed" value="[% debt_confirmed | html %]" />
765                                             [% IF ( CHARGES ) %]
766                                                     <input type="hidden" name="charges" value="yes" />
767                                             [% END %]
768                                         </fieldset> <!-- /#circ_circulation_issue -->
769
770                                         [% IF ( issue ) %]
771                                             <div class="lastchecked">
772                                                 <p><strong>Checked out: </strong>[% issue.item.biblio.title | html %] ([% issue.item.barcode | html %]). Due on [% issue.date_due | $KohaDates as_due_date => 1 %]</p>
773                                             </div>
774                                         [% END %]
775                                     </form> <!-- /#mainform -->
776                                 </div> <!-- /.col-sm-6 -->
777
778                             [% END #/IF !noissues %]
779
780                             [% IF ( noissues ) %]
781                                 [% IF ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') ) %]
782                                     <div class="col-sm-6">
783                                 [% ELSE %]
784                                     <div>
785                                 [% END %]
786                             [% ELSE %]
787                                 <div class="col-sm-6">
788                             [% END %]
789
790                             [% IF ( noissues ) %]
791                                 [% IF ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') ) %]
792                                     <div id="circmessages" class="circmessage attention">
793                                 [% ELSE %]
794                                     <h4>Checking out to [% INCLUDE 'patron-title.inc' %]</h4>
795                                     <div id="circmessages" class="circmessage warning">
796                                 [% END %]
797                                 <h3>
798                                     Cannot check out!
799                                     [% IF ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') ) %]
800                                         <span class="circ-hlt">Only on-site checkouts are allowed</span>
801                                     [% END %]
802                                 </h3>
803                             [% ELSE %]
804                                 <div id="circmessages" class="circmessage attention">
805                             [% END %]
806
807                             [% INCLUDE 'patron_messages.inc' %]
808
809                         </div> <!-- /#circmessages -->
810                     </div> <!-- /div or div.col-sm-6 -->
811                 </div> <!-- /.row -->
812
813                 <div id="patronlists" class="toptabs">
814                     <ul>
815                         <li>
816                             <a href="#checkouts">Checkouts ([% issuecount || 0 | html %])</a>
817                         </li>
818
819                         [% IF relatives_issues_count %]
820                             <li>
821                                 <a id="relatives-issues-tab" href="#relatives-issues">Relatives' checkouts ([% relatives_issues_count | html %])</a>
822                             </li>
823                         [% END %]
824
825                         <li>
826                             <a href="#reserves" id="holds-tab">Holds ([% holds_count || 0 | html %])</a>
827                         </li>
828
829                         [% IF Koha.Preference('UseRecalls') %]
830                             <li>
831                                 <a href="#recalls" id="recalls-tab">Recalls ([% recalls.count || 0 | html %])</a>
832                             </li>
833                         [% END %]
834
835                         [% IF Koha.Preference('ArticleRequests') %]
836                             [% SET current_article_requests = Context.Scalar( Context.Scalar( patron, 'article_requests' ), 'filter_by_current' ) %]
837                             <li>
838                                 <a href="#article-requests" id="article-requests-tab">Article requests ([% current_article_requests.count || 0 | html %])</a>
839                             </li>
840                         [% END %]
841
842                         [% IF Koha.Preference('ClaimReturnedLostValue') %]
843                             <li>
844                                 [% IF ( patron.return_claims.count ) %]
845                                     <a href="#return-claims" id="return-claims-tab">
846                                         Claims
847                                         ([% IF patron.return_claims.resolved.count == 0 %]
848                                             <span title="Resolved claims" class="label label-default" id="return-claims-count-resolved">[% patron.return_claims.resolved.count | html %]</span>
849                                         [% ELSE %]
850                                             <span title="Resolved claims" class="label label-success" id="return-claims-count-resolved">[% patron.return_claims.resolved.count | html %]</span>
851                                         [% END %]
852                                         [% IF patron.return_claims.unresolved.count == 0 %]
853                                             <span title="Unresolved claims" class="label label-default" id="return-claims-count-unresolved">[% patron.return_claims.unresolved.count | html %]</span>
854                                         [% ELSE %]
855                                             <span title="Unresolved claims" class="label label-warning" id="return-claims-count-unresolved">[% patron.return_claims.unresolved.count | html %]</span>
856                                         [% END %])
857                                     </a>
858                                 [% ELSE %]
859                                     <a href="#return-claims" id="return-claims-tab">
860                                         Claims
861                                         (<span title="Resolved claims" class="label label-default" id="return-claims-count-resolved">0</span>
862                                         <span title="Unresolved claims" class="label label-default" id="return-claims-count-unresolved">0</span>)
863                                     </a>
864                                 [% END %]
865                             </li>
866                         [% END %]
867
868                         <li>
869                             <a id="debarments-tab-link" href="#reldebarments">Restrictions ([% debarments.count || 0 | html %])</a>
870                         </li>
871
872                         [% SET enrollments = patron.get_club_enrollments %]
873                         [% SET enrollable  = patron.get_enrollable_clubs(0) %] <!-- 0 => not OPAC -->
874                         [% IF CAN_user_clubs && ( enrollable.count || enrollments.count ) %]
875                             <li>
876                                 <a id="clubs-tab-link" href="#clubs-tab">
877                                     Clubs ([% enrollments.count | html %]/[% enrollable.count | html %])
878                                 </a>
879                             </li>
880                         [% END %]
881                     </ul>
882
883                     <!-- SUMMARY : TODAY & PREVIOUS ISSUES -->
884
885                     [% INCLUDE "checkouts-table.inc" %]
886
887                     [% INCLUDE "relatives-issues-table.inc" %]
888
889                     [% IF CAN_user_clubs && ( enrollable.count || enrollments.count ) %]
890                         <div id="clubs-tab">
891                             Loading...
892                         </div> <!-- /#clubs-tab -->
893                     [% END %]
894
895                     [% INCLUDE borrower_debarments.inc %]
896
897                     <div id="reserves">
898                         [% IF ( holds_count ) %]
899                             <form action="/cgi-bin/koha/reserve/modrequest.pl" method="post">
900                                 <input type="hidden" name="from" value="circ" />
901                                 <table id="holds-table" style="width: 100% !Important;">
902                                     <thead>
903                                         <tr>
904                                             <th>Hold date</th>
905                                             <th>Title</th>
906                                             <th>Call number</th>
907                                             <th>Item type</th>
908                                             <th>Barcode</th>
909                                             <th>Pickup at</th>
910                                             <th>Expiration</th>
911                                             <th>Priority</th>
912                                             <th>Cancel?</th>
913                                             <th>Suspend?</th>
914                                             <th>Status</th>
915                                         </tr>
916                                     </thead>
917                                 </table>
918
919                                 <fieldset class="action">
920                                     <input type="submit" class="cancel" name="submit" value="Cancel marked holds" />
921
922                                     [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %]
923                                     [% IF hold_cancellation.count %]
924                                         <select name="cancellation-reason">
925                                             <option value="">No reason given</option>
926                                             [% FOREACH reason IN hold_cancellation %]
927                                                 <option value="[% reason.authorised_value | html %]">[% reason.lib | html %]</option>
928                                             [% END %]
929                                         </select>
930                                     [% END %]
931                                 </fieldset>
932                             </form>
933
934                             [% IF Koha.Preference('SuspendHoldsIntranet') %]
935                                 <fieldset class="action">
936                                     <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
937                                         <input type="hidden" name="from" value="circ" />
938                                         <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
939                                         <input type="submit" value="Suspend all holds" />
940
941                                         [% IF Koha.Preference('AutoResumeSuspendedHolds') %]
942                                         <label for="suspend_until">until</label>
943                                         <input type="text" size="10" id="suspend_until" name="suspend_until" class="flatpickr" data-flatpickr-futuredate="true" />
944                                         <span class="hint">Specify date on which to resume [% INCLUDE 'date-format.inc' %]: </span>
945                                          [% END %]
946                                     </form>
947                                 </fieldset>
948
949                                 <fieldset class="action">
950                                     <form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
951                                         <input type="hidden" name="from" value="circ" />
952                                         <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
953                                         <input type="hidden" name="suspend" value="0" />
954                                         <input type="submit" value="Resume all suspended holds" />
955                                     </form>
956                                 </fieldset>
957                             [% END # /IF SuspendHoldsIntranet %]
958
959                         [% ELSE # IF holds_count %]
960                             <p>Patron has nothing on hold.</p>
961                         [% END # /IF holds_count %]
962                     </div> <!-- /#reserves -->
963
964                     [% IF Koha.Preference('UseRecalls') %]
965                         <div id="recalls">
966                             [% INCLUDE 'recalls.inc' %]
967                         </div>
968                     [% END %]
969
970                     [% IF Koha.Preference('ClaimReturnedLostValue') %]
971                         [% INCLUDE 'patron-return-claims.inc' %]
972                     [% END %]
973
974                     [% IF Koha.Preference('ArticleRequests') %]
975                         [% INCLUDE 'patron-article-requests.inc' %]
976                     [% END %]
977
978                 </div> <!-- /#patronlists -->
979                 [% ELSIF borrowernumber # IF patron %]
980                     <div class="dialog message">Patron not found. <a href="/cgi-bin/koha/members/members-home.pl">Return to search</a></div>
981                 [% END # /IF patron %]
982
983                 </div> <!-- /.col-sm-10.col-sm-push-2 -->
984
985                 [% IF Koha.Preference('CircSidebar') %]
986                     [% IF not( borrowernumber and patron ) %]
987                         <div class="col-sm-2 col-sm-pull-10">
988                             <aside>
989                                 [% INCLUDE 'circ-nav.inc' %]
990                             </aside>
991                         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
992                     [% END %]
993                 [% END %]
994
995                 [% IF borrowernumber and patron %]
996                         <div class="col-sm-2 col-sm-pull-10">
997                             <aside>
998                         [% INCLUDE 'circ-menu.inc' %]
999                             </aside>
1000                         </div> <!-- /.col-sm-2 col-sm-pull-10 -->
1001                 [% END %]
1002
1003             </div> <!-- /.row -->
1004         </main>
1005
1006         [% IF Koha.Preference('ClaimReturnedLostValue') %]
1007             [% INCLUDE 'modals/resolve_return_claim.inc' %]
1008         [% END %]
1009
1010 <!-- Modal -->
1011 <div id="barcodeSubmittedModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="barcodeSubmittedModalLabel" aria-hidden="true">
1012     <div class="modal-dialog">
1013         <div class="modal-content">
1014             <div class="modal-header">
1015                 <h3 id="barcodeSubmittedModalLabel">Barcode submitted</h3>
1016             </div>
1017             <div class="modal-body">
1018                 <p>You have already submitted a barcode, please wait for the checkout to process...</p>
1019             </div>
1020         </div> <!-- /.modal-content -->
1021     </div> <!-- /.modal-dialog -->
1022 </div> <!-- /#barcodeSubmittedModal -->
1023
1024 [% MACRO jsinclude BLOCK %]
1025     [% INCLUDE 'datatables.inc' %]
1026     [% INCLUDE 'columns_settings.inc' %]
1027     [% INCLUDE 'select2.inc' %]
1028     [% Asset.js("lib/jquery/plugins/rowGroup/dataTables.rowGroup.min.js") | $raw %]
1029     [% INCLUDE 'js-date-format.inc' %]
1030     <script>
1031         /* Set some variable needed in circulation.js */
1032         var logged_in_user_borrowernumber = "[% logged_in_user.borrowernumber | html %]";
1033         var ClaimReturnedLostValue = "[% Koha.Preference('ClaimReturnedLostValue') | html %]";
1034         var ClaimReturnedChargeFee = "[% Koha.Preference('ClaimReturnedChargeFee') | html %]";
1035         var UnseenRenewals = "[% Koha.Preference('UnseenRenewals') | html %]";
1036         var ClaimReturnedWarningThreshold = "[% Koha.Preference('ClaimReturnedWarningThreshold') | html %]";
1037         var interface = "[% interface | html %]";
1038         var theme = "[% theme | html %]";
1039         var borrowernumber = "[% patron.borrowernumber | html %]";
1040         var branchcode = "[% branch | html %]";
1041         var exports_enabled = "[% Koha.Preference('ExportCircHistory') | html %]";
1042         var AllowRenewalLimitOverride = [% (CAN_user_circulate_override_renewals && Koha.Preference('AllowRenewalLimitOverride') )? 1: 0 | html %];
1043         var AllowRenewalOnHoldOverride = [% (CAN_user_circulate_override_renewals && Koha.Preference('AllowRenewalOnHoldOverride') )? 1: 0 | html %];
1044         var AllowCirculate = [% (CAN_user_circulate_circulate_remaining_permissions)? 1 : 0 | html %];
1045         var script = "circulation";
1046         var relatives_borrowernumbers = new Array();
1047         [% FOREACH b IN relatives_borrowernumbers %]
1048             relatives_borrowernumbers.push("[% b | html %]");
1049         [% END %]
1050         var SuspendHoldsIntranet = [% ( Koha.Preference('SuspendHoldsIntranet') ) ? 1 : 0 | html %];
1051     </script>
1052     [% Asset.js("js/pages/circulation.js") | $raw %]
1053     [% Asset.js("js/checkouts.js") | $raw %]
1054     [% IF Koha.Preference('ClaimReturnedLostValue') %]
1055         [% Asset.js("js/resolve_claim_modal.js") | $raw %]
1056     [% END %]
1057     [% Asset.js("js/holds.js") | $raw %]
1058     [% INCLUDE 'calendar.inc' %]
1059     <script>
1060         table_settings_issues_table = [% TablesSettings.GetTableSettings( 'circ', 'circulation', 'issues-table', 'json' ) | $raw %]
1061         table_settings_borrowers_table = [% TablesSettings.GetTableSettings( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %]
1062
1063         [% IF borrowernumber and patron %]
1064             if( Cookies.get("holdfor") != [% patron.borrowernumber | html %]){
1065                 Cookies.remove("holdfor", { path: '/' });
1066             }
1067         [% ELSE %]
1068             Cookies.remove("holdfor", { path: '/' });
1069         [% END %]
1070
1071         [% UNLESS ( patron.borrowernumber ) %]window.onload=function(){ $('#findborrower').focus(); };[% END %]
1072
1073         // On-site checkout
1074         function toggle_onsite_checkout(){
1075             if ( $("#onsite_checkout").prop('checked') ) {
1076                 $("#duedatespec").val("[% todaysdate | $KohaDates  with_hours => 1 %]")
1077             }
1078         }
1079
1080         function Dopop(link) {
1081             var newin = window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top');
1082         }
1083         $(document).ready(function() {
1084             $('#mainform').on('submit',function() {
1085                 if ($("#barcode") && $("#barcode").val()) {
1086                     $('#barcode').on('keypress',function(event) {
1087                         $('#barcodeSubmittedModal').modal();
1088                         event.preventDefault(); }
1089                     );
1090                 }
1091             });
1092
1093             if ( $('#clubs-tab').length ) {
1094                 $('#clubs-tab-link').on('click', function() {
1095                     $('#clubs-tab').text(_("Loading..."));
1096                     $('#clubs-tab').load('/cgi-bin/koha/clubs/patron-clubs-tab.pl?borrowernumber=[% patron.borrowernumber | html %]');
1097                 });
1098             }
1099
1100             // listen submit to trigger qslip on empty checkout
1101             $('#mainform').bind('submit',function() {
1102                 if ($('#barcode').val() == '') {
1103                     [% IF ( CircAutoPrintQuickSlip == 'clear' ) %]
1104                         window.location='/cgi-bin/koha/circ/circulation.pl';
1105                         return false;
1106                     [% ELSE %]
1107                         return printx_window( '[% CircAutoPrintQuickSlip | html %]' );
1108                     [% END %]
1109                 }
1110             });
1111             toggle_onsite_checkout();
1112             $("#onsite_checkout").click(function(){
1113                 toggle_onsite_checkout();
1114             });
1115
1116             [% IF HIGHHOLDS %]
1117                 [% IF !override_high_holds %]
1118                     $("input[name=duedatespec]:hidden").val('[% HIGHHOLDS.returndate | html %]');
1119                     if ('[% duedatespec | html %]' === '') {
1120                         $("input[name=restoreduedatespec]:hidden").val('highholds_empty');
1121                     } else {
1122                         $("input[name=restoreduedatespec]:hidden").val('[% duedatespec | html %]');
1123                     }
1124                 [% END %]
1125
1126                 $("#override_high_holds_tmp").on( 'change', function() {
1127                     if ( this.checked ) {
1128                         $("input[name=duedatespec]:hidden").val('');
1129                     }
1130                 });
1131             [% END %]
1132         });
1133     </script>
1134     [% INCLUDE 'str/members-menu.inc' %]
1135     [% Asset.js("js/members-menu.js") | $raw %]
1136     [% Asset.js("js/recalls.js") | $raw %]
1137 [% END %]
1138
1139 [% INCLUDE 'intranet-bottom.inc' %]