8 [% INCLUDE 'doc-head-open.inc' %]
9 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha [% END %] › Self checkout </title>
10 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
11 <meta name="generator" content="Koha [% Version | html %]" /> <!-- leave this for stats -->
12 [% IF ( Koha.Preference('OpacFavicon') ) %]
13 <link rel="shortcut icon" href="[% Koha.Preference('OpacFavicon') | url %]" type="image/x-icon" />
15 <link rel="shortcut icon" href="[% interface | html %]/[% theme | html %]/images/favicon.ico" type="image/x-icon" />
17 [% Asset.css("lib/bootstrap/css/bootstrap.min.css") | $raw %]
18 [% Asset.css("lib/jquery/jquery-ui.css") | $raw %]
19 [% Asset.css("lib/font-awesome/css/font-awesome.min.css") | $raw %]
20 [% Asset.css("css/sco.css") | $raw %]
21 [% IF ( Koha.Preference('OPACUserCSS') ) %]<style>[% Koha.Preference('OPACUserCSS') | $raw %]</style>[% END %]
22 [% IF ( Koha.Preference('SCOUserCSS') ) %]<style>[% Koha.Preference('SCOUserCSS') | $raw %]</style>[% END %]
24 <script src="[% interface | html %]/[% theme | html %]/lib/respond.min.js"></script>
27 function _(s) { return s } // dummy function for gettext
29 [% Asset.js("lib/modernizr.min.js") | $raw %]
31 <body id="sco_main" class="sco" onload="dofocus();" onunload="mungeHistory();">
32 [% INCLUDE 'masthead-sco.inc' %]
35 <div class="container-fluid">
36 <div class="row-fluid">
37 [% IF ( display_patron_image ) %]
43 <div id="masthead"><h1>[% LibraryName | html %] Self checkout system</h1></div>
45 [% IF ( impossible ) %]<!-- We tried to issue, but failed. -->
47 <span class="sco-alert-warning noissue"></span>
48 <h3>Item cannot be checked out.</h3>
49 <p>Sorry, this item cannot be checked out at this station.</p>
51 <p>Title: <em>[% title | html %]</em> </p>
55 [% IF ( circ_error_UNKNOWN_BARCODE ) %]
56 The system does not recognize this barcode.
57 [% ELSIF ( circ_error_max_loans_allowed ) %]
58 You have checked out too many items and can't check out any more.
59 [% ELSIF ( circ_error_ISSUED_TO_ANOTHER ) %]
60 This item is checked out to someone else.
61 [% ELSIF ( circ_error_NO_MORE_RENEWALS ) %]
62 You cannot renew this item again.
63 [% ELSIF ( circ_error_NOT_FOR_LOAN ) %]
64 This item is not for loan.
65 [% ELSIF ( circ_error_DEBT ) %]
66 You owe the library [% DEBT | $Price %] and cannot check out.
67 [% ELSIF ( circ_error_WTHDRAWN ) %]
68 This item has been withdrawn from the collection.
69 [% ELSIF ( circ_error_RESTRICTED ) %]
70 This item is restricted.
71 [% ELSIF ( circ_error_RESERVED ) %]
72 This item is on hold for another patron.
73 [% ELSIF ( circ_error_ITEMNOTSAMEBRANCH ) %]
74 This item belongs to another branch.
75 [% ELSIF ( circ_error_EXPIRED ) %]
76 Your account has expired.
77 [% ELSIF ( circ_error_DEBARRED ) %]
78 Your account has been suspended.
79 [% ELSIF ( circ_error_CARD_LOST ) %]
80 This card has been declared lost.
81 [% ELSIF ( circ_error_GNA ) %]
82 Your contact information seems to be incomplete.
83 [% ELSIF ( circ_error_INVALID_DATE ) %]
84 Due date is not valid.
86 Please see a member of the library staff.
89 [% IF ( returnitem && Koha.Preference('AllowSelfCheckReturns') ) %]
90 <form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="post">
91 <input type="hidden" name="op" value="returnbook" />
92 <input type="hidden" name="patronid" value="[% patronid | html %]" />
93 <input type="hidden" name="barcode" value="[% barcode | html %]" />
94 <input type="hidden" name="newissues" value="[% newissues | html %]" />
95 <button type="submit" name="returnbook" class="btn"><i class="fa fa-undo"></i> Return this item</button>
99 <form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="post">
100 <input type="hidden" name="op" value="" />
101 <input type="hidden" name="patronid" value="[% patronid | html %]" />
102 <input type="hidden" name="barcode" value="[% barcode | html %]" />
103 <input type="hidden" name="newissues" value="[% newissues | html %]" />
104 <input type="submit" name= "confirm" value="Return to account summary" class="btn back focus" />
106 </div> <!-- / .alert -->
107 [% END # / IF ( impossible %]
109 [% IF ( confirm ) %]<!-- We need to confirm the issue.. -->
110 <div class="alert"><h3>Please confirm the checkout:</h3>
111 <span class="sco-alert-warning confirm"></span>
112 [% IF ( confirm_renew_issue ) %]
113 <p>This item is already checked out to you.</p>
116 [% IF ( renew && Koha.Preference('AllowSelfCheckReturns') ) %]
117 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
118 <input type="hidden" name="op" value="returnbook" />
119 <input type="hidden" name="patronid" value="[% patronid | html %]" />
120 <input type="hidden" name="barcode" value="[% barcode | html %]" />
121 <input type="hidden" name="confirmed" value="" />
122 <input type="hidden" name="newissues" value="[% newissues | html %]" />
123 <button type="submit" name="returnbook" class="btn"><i class="fa fa-undo"></i> Return this item</button>
127 [% UNLESS ( renew ) %]
128 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
129 <input type="hidden" name="op" value="renew" />
130 <input type="hidden" name="patronid" value="[% patronid | html %]" />
131 <input type="hidden" name="barcode" value="[% barcode | html %]" />
132 <input type="hidden" name="confirmed" value="1" />
133 <input type="hidden" name="newissues" value="[% newissues | html %]" />
134 <button type="submit" name="confirm" class="btn"><i class="fa fa-refresh"></i> Renew item</button>
137 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
138 <input type="hidden" name="op" value="renew" />
139 <input type="hidden" name="patronid" value="[% patronid | html %]" />
140 <input type="hidden" name="barcode" value="[% barcode | html %]" />
141 <input type="hidden" name="confirmed" value="1" />
142 <input type="hidden" name="newissues" value="[% newissues | html %]" />
143 <button type="submit" class="btn"><i class="fa fa-refresh"></i> Renew item</button>
147 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
148 <input type="hidden" name="op" value="" />
149 <input type="hidden" name="patronid" value="[% patronid | html %]" />
150 <input type="hidden" name="newissues" value="[% newissues | html %]" />
151 <button type="submit" class="btn"><i class="fa fa-cancel"></i> Cancel</button>
154 [% END # / IF confirm %]
156 [% IF ( nopermission ) %]
157 <!-- This is what is displayed if user doesn't have permission -->
159 <span class="sco-alert-warning nopermission"></span>
160 <h3>Access denied</h3>
161 <p>Sorry, this self-checkout station has lost authentication. Please contact the administrator to resolve this problem.</p>
165 [% IF ( different_ip ) %]
166 <!-- This is what is displayed if user doesn't have permission -->
168 <span class="sco-alert-warning sessionlost"></span>
169 <h3>Session lost</h3>
170 <p>You are accessing self-checkout from a different IP address! please log in again.</p>
174 [% IF ( invalid_username_or_password ) %]
175 <!-- This is what is displayed if user doesn't have permission -->
177 <span class="sco-alert-warning notfound"></span>
178 <h3>Record not found</h3>
179 <p>Your userid was not found in the database. Please try again.</p>
184 <span class="sco-alert-success issue"></span>
185 <div class="alert alert-info">
186 <p>Item checked out</p>
188 [% ELSIF ( renewed ) %]
189 <span class="sco-alert-success renew"></span>
190 <div class="alert alert-info">
193 [% ELSIF ( returned == 0 ) %]
194 <span class="sco-alert-warning return"></span>
195 <div class="alert alert-info">
196 <p>Item not checked in: please see circulation staff for assistance</p>
198 [% ELSIF ( returned == 1 ) %]
199 <span class="sco-alert-success return"></span>
200 <div class="alert alert-info">
201 <p>Item checked in</p>
206 [% UNLESS ( hide_main ) %]
208 [% IF ( patronid ) %]
209 [% IF ( validuser ) %]
210 <div class="alert alert-info">You are logged in as [% borrowername | html %].</div>
211 [% INCLUDE 'opac-note.inc' %]
212 [% IF patron_has_hold_fee %]
213 <div class="alert">A hold fee was charged to your account for collecting this item.</div>
220 <p>The userid <strong>[% patronid | html %]</strong> was not found in the database. Please try again.</p>
223 [% END # / IF patronid %]
225 [% IF ( validuser ) %]
226 <div id="newcheckout" class="sco_entry">
227 <form id="scan_form" name="scan_form" method="post" action="/cgi-bin/koha/sco/sco-main.pl" onsubmit="return checkout_confirm('[% patronid | html %]');">
229 <legend>Check out[% IF ( Koha.Preference('AllowSelfCheckReturns') ) %], return[% END %] or renew an item: </legend>
230 <div class="input-append">
231 <label for="barcode">Scan a new item or enter its barcode:</label>
232 <input id="barcode" name="barcode" size="20" type="text" class="focus" autocomplete="off" />
233 <button type="submit" class="btn">Submit</button>
235 <input type="hidden" name="op" value="checkout" />
236 <input type="hidden" name="patronid" value="[% patronid | html %]" />
237 <input type="hidden" name="newissues" value="[% newissues | html %]" />
242 <form method="post" action="#" id="logout_form">
243 <button type="submit" class="btn"><i class="fa fa-check"></i> Finish</button>
246 </div> <!-- / #newcheckout -->
247 </div> <!-- / .span12/12 -->
248 [% IF ( display_patron_image ) %]
250 <img src="/cgi-bin/koha/sco/sco-patron-image.pl?borrowernumber=[% borrowernumber | uri %]&csrf_token=[% csrf_token | uri %]" alt="" />
253 </div> <!-- / .row-fluid -->
254 </div> <!-- / .container-fluid -->
256 <div class="container-fluid">
257 <div class="row-fluid">
259 <div class="tabbable">
260 <ul class="nav nav-tabs">
261 <li class="active"><a href="#checkouts-tab" data-toggle="tab">Checkouts ([% issues_count | html %])</a></li>
263 <a href="#holds-tab" data-toggle="tab">
264 [% IF waiting_holds_count %]
265 <i class="fa fa-exclamation"></i>
267 Holds ([% HOLDS.count | html %])
270 <li><a href="#account-tab" data-toggle="tab">Fines and charges ([% total | $Price %])</a></li>
272 <div class="tab-content">
273 <div id="checkouts-tab" class="tab-pane active">
274 <div id="borrowerdetails">
275 [% IF ( issues_count ) %]
276 <table id="loanTable" class="table table-bordered table-striped">
277 <caption>Checkouts for [% borrowername | html %] <span class="count">([% issues_count | html %] total)</span></caption>
278 <!-- ISSUES TABLE ROWS -->
281 <th class="noshow">Checked out on</th>
282 <th class="anti-the">Title</th>
284 <th class="title-string">Due</th>
285 <th class="nosort">Renew</th>
286 [% UNLESS ( nofines ) %]
292 [% FOREACH ISSUE IN ISSUES %]
294 <td>[% ISSUE.issuedate | html %]</td>
296 [% UNLESS ( noitemlinks ) %]
297 <a href="/cgi-bin/koha/opac-detail.pl?bib=[% ISSUE. biblionumber | uri %]">[% ISSUE.title | html %]</a>
299 <strong>[% ISSUE.title | html %]</strong>
301 [% IF ( newissues.match(ISSUE.barcode)) %]
302 <span class="label label-info">NEW</span>
304 <span class="item-details">[% ISSUE.author | html %]</span>
305 ([% ISSUE.barcode | html %])
307 <td>[% ISSUE.itemcallnumber | html %]</td>
308 [% IF ( ISSUE.overdue ) %]
309 <td class="overdue"><span title="[% ISSUE.date_due | html %]">[% ISSUE.date_due | $KohaDates as_due_date => 1 %]</span></td>
311 <td><span title="[% ISSUE.date_due | html %]">[% ISSUE.date_due | $KohaDates as_due_date => 1 %]</span></td>
314 <form action="/cgi-bin/koha/sco/sco-main.pl" method="post">
315 <input type="hidden" name="patronid" value="[% patronid | html %]" />
316 <input type="hidden" name="barcode" value="[% ISSUE.barcode | html %]" />
317 <input type="hidden" name="newissues" value="[% newissues | html %]" />
318 [% IF ISSUE.can_be_renewed %]
319 <input type="hidden" name="op" value="checkout" />
320 <input type="hidden" name="confirmed" value="1" />
321 [% UNLESS ( ISSUE.renew ) %]
322 <input type="submit" value="Renew item" name="confirm " class="btn renew" />
324 <input type="submit" value="Renew item" class="btn renew" />
327 [% IF ISSUE.renew_error == 'auto_renew' OR ISSUE.renew_error == 'auto_too_soon' %]
328 <span>This item has been scheduled for automatic renewal and cannot be renewed</span>
329 [% ELSIF ISSUE.renew_error == 'onsite_checkout' %]
330 <span>This is a on-site checkout, it cannot be renewed.</span>
332 <span>No renewals allowed</span>
334 [% IF Koha.Preference('AllowSelfCheckReturns') %]
335 <input type="submit" value="Check in item" name="confirm" class="btn return" />
336 <input type="hidden" name="op" value="returnbook" />
337 <input type="hidden" name="confirmed" value="" />
342 [% UNLESS ( nofines ) %]
344 [% IF ( ISSUE.charges ) %]Yes[% ELSE %]No[% END %]
348 [% END # / FOREACH ISSUE %]
352 <h3>You currently have nothing checked out.</h3>
353 [% END # / IF issues_count %]
354 </div> <!-- / #borrowerdetails -->
356 <div id="holds-tab" class="tab-pane">
357 [% IF HOLDS.count > 0 %]
358 [% PROCESS 'holds-table.inc' HOLDS = HOLDS, SuspendHoldsOpac = SuspendHoldsOpac, showpriority = showpriority, AutoResumeSuspendedHolds = AutoResumeSuspendedHolds, onlyinfo = 'true' %]
360 <h3>You currently have no pending holds.</h3>
363 <div id="account-tab" class="tab-pane">
364 [% PROCESS 'account-table.inc' %]
368 [% ELSE # IF validuser %]
369 <div class="sco_entry" >
370 <form id="mainform" action="/cgi-bin/koha/sco/sco-main.pl" name="mainform" method="post">
371 <fieldset class="checkout brief">
372 [% IF ( Koha.Preference('SelfCheckoutByLogin') ) %]
373 <legend>Log in to your account</legend>
374 <label for="patronlogin">Login:</label>
375 <input type="text" id="patronlogin" class="focus" size="20" name="patronlogin" />
376 <label for="patronpw">Password:</label>
377 <input type="password" id="patronpw" size="20" name="patronpw" />
378 <fieldset class="action">
379 <button type="submit" class="btn">Log in</button>
382 <div class="input-append">
383 <label for="patronid">Please enter your card number:</label>
384 <input type="text" id="patronid" class="focus" size="20" name="patronid" autocomplete="off" />
385 <button type="submit" class="btn">Submit</button>
389 [% FOREACH INPUT IN INPUTS %]
390 <input type="hidden" name="[% INPUT.name | html %]" value="[% INPUT.value | html %]">
392 <input type="hidden" name="op" value="login" />
395 </div> <!-- / .sco_entry -->
396 [% END # / IF validuser %]
397 [% END # / UNLESS ( hide_main %]
398 [% IF ( Koha.Preference('SCOMainUserBlock' ) ) %]<div id="scomainuserblock">[% Koha.Preference('SCOMainUserBlock' ) | $raw %]</div>[% END %]
399 </div> <!-- / .span12 -->
400 </div> <!-- / .row-fluid -->
401 </div> <!-- / .container-fluid -->
402 </div> <!-- / .main -->
403 <span id="audio-alert"></span>
405 [% INCLUDE 'opac-bottom.inc' %]
406 [% BLOCK jsinclude %]
407 [% INCLUDE 'datatables.inc' %]
410 function mungeHistory() {
411 // prevent back button from allowing form resubmission
412 if (history && history.pushState) {
413 history.replaceState(null, document.title, window.location.href);
417 function sco_init() {
418 mainTimeout = setTimeout(function() {
419 location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
420 }, [% SelfCheckTimeout | html %]);
422 function dofocus() { // named function req'd for body onload event by some FF and IE7 security models
423 // alert("dofocus called");
424 $(".focus:last").select();
426 var slip_re = /slip/;
427 function printx_window(print_type) {
428 var handler = print_type.match(slip_re) ? "printslip" : "moremember";
432 function checkout_confirm(patronid) {
433 var barcode = $("#barcode").val();
434 // alert("checkout_confirm('" + patronid + "') called for barcode '" + barcode + "'");
435 if (! barcode) { dofocus(); return false; } // no barcode
436 if (barcode == "__KOHA_NEW_CIRC__") { // magic barcode
437 window.location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout';
442 [% IF Koha.Preference('AudioAlerts') %]
443 var AUDIO_ALERTS = JSON.parse( "[% To.json(AudioAlerts.AudioAlerts) | $raw %]" );
444 $( document ).ready(function() {
445 if ( AUDIO_ALERTS ) {
446 for ( var k in AUDIO_ALERTS ) {
447 var alert = AUDIO_ALERTS[k];
448 if ( $( alert.selector ).length ) {
449 playSound( alert.sound );
455 function playSound( sound ) {
456 if ( ( sound.indexOf('http://') == 0 || sound.indexOf('https://') == 0 ) ) {
457 document.getElementById("audio-alert").innerHTML = '<audio src="' + sound + '" autoplay="autoplay" autobuffer="autobuffer"></audio>';
463 $(document).ready(function() {
465 [% IF ( patronid ) %]sco_init();[% END %]
466 $("#loanTable").dataTable($.extend(true, {}, dataTablesDefaults, {
469 { "targets": [ "nosort" ], "sortable": false, "searchable": false },
470 { "targets": [ "noshow" ], "visible": false, "searchable": false },
471 { "type": "anti-the", "targets" : [ "anti-the" ] },
472 { "type": "title-string", "targets" : [ "title-string" ] }
476 $("#logout_form").submit(function(){
477 clearTimeout(mainTimeout);
478 [% IF Koha.Preference('SelfCheckReceiptPrompt') %]
479 var confirmStart = Date.now();
480 if(confirm(_("Would you like to print a receipt?"))){
481 if ( (Date.now() - confirmStart) < [% SelfCheckTimeout | html %] ) {
482 window.open("/cgi-bin/koha/sco/printslip.pl?borrowernumber=[% borrowernumber | html %]&print=qslip");
484 alert(_("Timeout while waiting for print confirmation"));
495 [% IF ( Koha.Preference('SCOUserJS') ) %]<script>[% Koha.Preference('SCOUserJS') | $raw %]</script>[% END %]