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 <link rel="shortcut icon" href="[% IF ( Koha.Preference('OpacFavicon') ) %][% Koha.Preference('OpacFavicon') | url %][% ELSE %][% interface | html %]/[% theme | html %]/images/favicon.ico[% END %]" type="image/x-icon" />
13 [% Asset.css("lib/bootstrap/css/bootstrap.min.css") | $raw %]
14 [% Asset.css("lib/jquery/jquery-ui.css") | $raw %]
15 [% Asset.css("css/sco.css") | $raw %]
16 [% IF ( Koha.Preference('OPACUserCSS') ) %]<style>[% Koha.Preference('OPACUserCSS') | $raw %]</style>[% END %]
17 [% IF ( Koha.Preference('SCOUserCSS') ) %]<style>[% Koha.Preference('SCOUserCSS') | $raw %]</style>[% END %]
19 <script src="[% interface | html %]/[% theme | html %]/lib/respond.min.js"></script>
22 function _(s) { return s } // dummy function for gettext
24 [% Asset.js("lib/modernizr.min.js") | $raw %]
26 <body id="sco_main" class="sco" onload="dofocus();" onunload="mungeHistory();">
27 [% INCLUDE 'masthead-sco.inc' %]
30 <div class="container-fluid">
31 <div class="row-fluid">
32 [% IF ( display_patron_image ) %]
38 <div id="masthead"><h1>[% LibraryName | html %] Self checkout system</h1></div>
40 [% IF ( impossible ) %]<!-- We tried to issue, but failed. -->
42 <span class="sco-alert-warning noissue"></span>
43 <h3>Item cannot be checked out.</h3>
44 <p>Sorry, this item cannot be checked out at this station.</p>
46 <p>Title: <em>[% title | html %]</em> </p>
50 [% IF ( circ_error_UNKNOWN_BARCODE ) %]
51 The system does not recognize this barcode.
52 [% ELSIF ( circ_error_max_loans_allowed ) %]
53 You have checked out too many items and can't check out any more.
54 [% ELSIF ( circ_error_ISSUED_TO_ANOTHER ) %]
55 This item is checked out to someone else.
56 [% ELSIF ( circ_error_NO_MORE_RENEWALS ) %]
57 You cannot renew this item again.
58 [% ELSIF ( circ_error_NOT_FOR_LOAN ) %]
59 This item is not for loan.
60 [% ELSIF ( circ_error_DEBT ) %]
61 You owe the library [% DEBT | $Price %] and cannot check out.
62 [% ELSIF ( circ_error_WTHDRAWN ) %]
63 This item has been withdrawn from the collection.
64 [% ELSIF ( circ_error_RESTRICTED ) %]
65 This item is restricted.
66 [% ELSIF ( circ_error_RESERVED ) %]
67 This item is on hold for another patron.
68 [% ELSIF ( circ_error_ITEMNOTSAMEBRANCH ) %]
69 This item belongs to another branch.
70 [% ELSIF ( circ_error_EXPIRED ) %]
71 Your account has expired.
72 [% ELSIF ( circ_error_DEBARRED ) %]
73 Your account has been suspended.
74 [% ELSIF ( circ_error_CARD_LOST ) %]
75 This card has been declared lost.
76 [% ELSIF ( circ_error_GNA ) %]
77 Your contact information seems to be incomplete.
78 [% ELSIF ( circ_error_INVALID_DATE ) %]
79 Due date is not valid.
81 Please see a member of the library staff.
84 [% IF ( returnitem && Koha.Preference('AllowSelfCheckReturns') ) %]
85 <form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="post">
86 <input type="hidden" name="op" value="returnbook" />
87 <input type="hidden" name="patronid" value="[% patronid | html %]" />
88 <input type="hidden" name="barcode" value="[% barcode | html %]" />
89 <input type="hidden" name="newissues" value="[% newissues | html %]" />
90 <button type="submit" name="returnbook" class="btn"><i class="return"></i> Return this item</button>
94 <form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="post">
95 <input type="hidden" name="op" value="" />
96 <input type="hidden" name="patronid" value="[% patronid | html %]" />
97 <input type="hidden" name="barcode" value="[% barcode | html %]" />
98 <input type="hidden" name="newissues" value="[% newissues | html %]" />
99 <input type="submit" name= "confirm" value="Return to account summary" class="btn back focus" />
101 </div> <!-- / .alert -->
102 [% END # / IF ( impossible %]
104 [% IF ( confirm ) %]<!-- We need to confirm the issue.. -->
105 <div class="alert"><h3>Please confirm the checkout:</h3>
106 <span class="sco-alert-warning confirm"></span>
107 [% IF ( confirm_renew_issue ) %]
108 <p>This item is already checked out to you.</p>
111 [% IF ( renew && Koha.Preference('AllowSelfCheckReturns') ) %]
112 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
113 <input type="hidden" name="op" value="returnbook" />
114 <input type="hidden" name="patronid" value="[% patronid | html %]" />
115 <input type="hidden" name="barcode" value="[% barcode | html %]" />
116 <input type="hidden" name="confirmed" value="" />
117 <input type="hidden" name="newissues" value="[% newissues | html %]" />
118 <button type="submit" name="returnbook" class="btn"><i class="icon return"></i> Return this item</button>
122 [% UNLESS ( renew ) %]
123 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
124 <input type="hidden" name="op" value="renew" />
125 <input type="hidden" name="patronid" value="[% patronid | html %]" />
126 <input type="hidden" name="barcode" value="[% barcode | html %]" />
127 <input type="hidden" name="confirmed" value="1" />
128 <input type="hidden" name="newissues" value="[% newissues | html %]" />
129 <button type="submit" name="confirm" class="btn"><i class="icon renew"></i> Renew item</button>
132 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
133 <input type="hidden" name="op" value="renew" />
134 <input type="hidden" name="patronid" value="[% patronid | html %]" />
135 <input type="hidden" name="barcode" value="[% barcode | html %]" />
136 <input type="hidden" name="confirmed" value="1" />
137 <input type="hidden" name="newissues" value="[% newissues | html %]" />
138 <button type="submit" class="btn"><i class="icon renew"></i> Renew item</button>
142 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
143 <input type="hidden" name="op" value="" />
144 <input type="hidden" name="patronid" value="[% patronid | html %]" />
145 <input type="hidden" name="newissues" value="[% newissues | html %]" />
146 <button type="submit" class="btn"><i class="icon cancel"></i> Cancel</button>
149 [% END # / IF confirm %]
151 [% IF ( nopermission ) %]
152 <!-- This is what is displayed if user doesn't have permission -->
154 <span class="sco-alert-warning nopermission"></span>
155 <h3>Access denied</h3>
156 <p>Sorry, this self-checkout station has lost authentication. Please contact the administrator to resolve this problem.</p>
160 [% IF ( different_ip ) %]
161 <!-- This is what is displayed if user doesn't have permission -->
163 <span class="sco-alert-warning sessionlost"></span>
164 <h3>Session lost</h3>
165 <p>You are accessing self-checkout from a different IP address! please log in again.</p>
169 [% IF ( invalid_username_or_password ) %]
170 <!-- This is what is displayed if user doesn't have permission -->
172 <span class="sco-alert-warning notfound"></span>
173 <h3>Record not found</h3>
174 <p>Your userid was not found in the database. Please try again.</p>
179 <span class="sco-alert-success issue"></span>
180 <div class="alert alert-info">
181 <p>Item checked out</p>
183 [% ELSIF ( renewed ) %]
184 <span class="sco-alert-success renew"></span>
185 <div class="alert alert-info">
188 [% ELSIF ( returned == 0 ) %]
189 <span class="sco-alert-warning return"></span>
190 <div class="alert alert-info">
191 <p>Item not checked in: please see circulation staff for assistance</p>
193 [% ELSIF ( returned == 1 ) %]
194 <span class="sco-alert-success return"></span>
195 <div class="alert alert-info">
196 <p>Item checked in</p>
201 [% UNLESS ( hide_main ) %]
203 [% IF ( patronid ) %]
204 [% IF ( validuser ) %]
205 <div class="alert alert-info">You are logged in as [% borrowername | html %].</div>
206 [% INCLUDE 'opac-note.inc' %]
207 [% IF patron_has_hold_fee %]
208 <div class="alert">A hold fee was charged to your account for collecting this item.</div>
215 <p>The userid <strong>[% patronid | html %]</strong> was not found in the database. Please try again.</p>
218 [% END # / IF patronid %]
220 [% IF ( validuser ) %]
221 <div id="newcheckout" class="sco_entry">
222 <form id="scan_form" name="scan_form" method="post" action="/cgi-bin/koha/sco/sco-main.pl" onsubmit="return checkout_confirm('[% patronid | html %]');">
224 <legend>Check out[% IF ( Koha.Preference('AllowSelfCheckReturns') ) %], return[% END %] or renew an item: </legend>
225 <div class="input-append">
226 <label for="barcode">Scan a new item or enter its barcode:</label>
227 <input id="barcode" name="barcode" size="20" type="text" class="focus" autocomplete="off" />
228 <button type="submit" class="btn">Submit</button>
230 <input type="hidden" name="op" value="checkout" />
231 <input type="hidden" name="patronid" value="[% patronid | html %]" />
232 <input type="hidden" name="newissues" value="[% newissues | html %]" />
237 <form method="post" action="#" id="logout_form">
238 <button type="submit" class="btn"><i class="icon finish"></i> Finish</button>
241 </div> <!-- / #newcheckout -->
242 </div> <!-- / .span12/12 -->
243 [% IF ( display_patron_image ) %]
245 <img src="/cgi-bin/koha/sco/sco-patron-image.pl?borrowernumber=[% borrowernumber | html %]&csrf_token=[% csrf_token | html %]" alt="" />
248 </div> <!-- / .row-fluid -->
249 </div> <!-- / .container-fluid -->
251 <div class="container-fluid">
252 <div class="row-fluid">
254 <div class="tabbable">
255 <ul class="nav nav-tabs">
256 <li class="active"><a href="#checkouts-tab" data-toggle="tab">Checkouts ([% issues_count | html %])</a></li>
257 <li><a href="#holds-tab" data-toggle="tab">Holds ([% HOLDS.count | html %])</a></li>
258 <li><a href="#account-tab" data-toggle="tab">Fines and charges ([% total | $Price %])</a></li>
260 <div class="tab-content">
261 <div id="checkouts-tab" class="tab-pane active">
262 <div id="borrowerdetails">
263 [% IF ( issues_count ) %]
264 <table id="loanTable" class="table table-bordered table-striped">
265 <caption>Checkouts for [% borrowername | html %] <span class="count">([% issues_count | html %] total)</span></caption>
266 <!-- ISSUES TABLE ROWS -->
269 <th class="noshow">Checked out on</th>
270 <th class="anti-the">Title</th>
272 <th class="title-string">Due</th>
273 <th class="nosort">Renew</th>
274 [% UNLESS ( nofines ) %]
280 [% FOREACH ISSUE IN ISSUES %]
282 <td>[% ISSUE.issuedate | html %]</td>
284 [% UNLESS ( noitemlinks ) %]
285 <a href="/cgi-bin/koha/opac-detail.pl?bib=[% ISSUE. biblionumber | uri %]">[% ISSUE.title | html %]</a>
287 <strong>[% ISSUE.title | html %]</strong>
289 [% IF ( newissues.match(ISSUE.barcode)) %]
290 <span class="label label-info">NEW</span>
292 <span class="item-details">[% ISSUE.author | html %]</span>
293 ([% ISSUE.barcode | html %])
295 <td>[% ISSUE.itemcallnumber | html %]</td>
296 [% IF ( ISSUE.overdue ) %]
297 <td class="overdue"><span title="[% ISSUE.date_due | html %]">[% ISSUE.date_due | $KohaDates as_due_date => 1 %]</span></td>
299 <td><span title="[% ISSUE.date_due | html %]">[% ISSUE.date_due | $KohaDates as_due_date => 1 %]</span></td>
302 <form action="/cgi-bin/koha/sco/sco-main.pl" method="post">
303 <input type="hidden" name="patronid" value="[% patronid | html %]" />
304 <input type="hidden" name="barcode" value="[% ISSUE.barcode | html %]" />
305 <input type="hidden" name="newissues" value="[% newissues | html %]" />
306 [% IF ISSUE.can_be_renewed %]
307 <input type="hidden" name="op" value="checkout" />
308 <input type="hidden" name="confirmed" value="1" />
309 [% UNLESS ( ISSUE.renew ) %]
310 <input type="submit" value="Renew item" name="confirm " class="btn renew" />
312 <input type="submit" value="Renew item" class="btn renew" />
315 [% IF ISSUE.renew_error == 'auto_renew' OR ISSUE.renew_error == 'auto_too_soon' %]
316 <span>This item has been scheduled for automatic renewal and cannot be renewed</span>
317 [% ELSIF ISSUE.renew_error == 'onsite_checkout' %]
318 <span>This is a on-site checkout, it cannot be renewed.</span>
320 <span>No renewals allowed</span>
322 [% IF Koha.Preference('AllowSelfCheckReturns') %]
323 <input type="submit" value="Check in item" name="confirm" class="btn return" />
324 <input type="hidden" name="op" value="returnbook" />
325 <input type="hidden" name="confirmed" value="" />
330 [% UNLESS ( nofines ) %]
332 [% IF ( ISSUE.charges ) %]Yes[% ELSE %]No[% END %]
336 [% END # / FOREACH ISSUE %]
340 <h3>You currently have nothing checked out.</h3>
341 [% END # / IF issues_count %]
342 </div> <!-- / #borrowerdetails -->
344 <div id="holds-tab" class="tab-pane">
345 [% IF HOLDS.count > 0 %]
346 [% PROCESS 'holds-table.inc' HOLDS = HOLDS, SuspendHoldsOpac = SuspendHoldsOpac, showpriority = showpriority, AutoResumeSuspendedHolds = AutoResumeSuspendedHolds, onlyinfo = 'true' %]
348 <h3>You currently have no pending holds.</h3>
351 <div id="account-tab" class="tab-pane">
352 [% PROCESS 'account-table.inc' %]
356 [% ELSE # IF validuser %]
357 <div class="sco_entry" >
358 <form id="mainform" action="/cgi-bin/koha/sco/sco-main.pl" name="mainform" method="post">
359 <fieldset class="checkout brief">
360 [% IF ( Koha.Preference('SelfCheckoutByLogin') ) %]
361 <legend>Log in to your account</legend>
362 <label for="patronlogin">Login:</label>
363 <input type="text" id="patronlogin" class="focus" size="20" name="patronlogin" />
364 <label for="patronpw">Password:</label>
365 <input type="password" id="patronpw" size="20" name="patronpw" />
366 <fieldset class="action">
367 <button type="submit" class="btn">Log in</button>
370 <div class="input-append">
371 <label for="patronid">Please enter your card number:</label>
372 <input type="text" id="patronid" class="focus" size="20" name="patronid" autocomplete="off" />
373 <button type="submit" class="btn">Submit</button>
377 [% FOREACH INPUT IN INPUTS %]
378 <input type="hidden" name="[% INPUT.name | html %]" value="[% INPUT.value | html %]">
380 <input type="hidden" name="op" value="login" />
383 </div> <!-- / .sco_entry -->
384 [% END # / IF validuser %]
385 [% END # / UNLESS ( hide_main %]
386 [% IF ( Koha.Preference('SCOMainUserBlock' ) ) %]<div id="scomainuserblock">[% Koha.Preference('SCOMainUserBlock' ) | $raw %]</div>[% END %]
387 </div> <!-- / .span12 -->
388 </div> <!-- / .row-fluid -->
389 </div> <!-- / .container-fluid -->
390 </div> <!-- / .main -->
391 <span id="audio-alert"></span>
393 [% INCLUDE 'opac-bottom.inc' %]
394 [% BLOCK jsinclude %]
395 [% INCLUDE 'datatables.inc' %]
398 function mungeHistory() {
399 // prevent back button from allowing form resubmission
400 if (history && history.pushState) {
401 history.replaceState(null, document.title, window.location.href);
405 function sco_init() {
406 mainTimeout = setTimeout(function() {
407 location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
408 }, [% SelfCheckTimeout | html %]);
410 function dofocus() { // named function req'd for body onload event by some FF and IE7 security models
411 // alert("dofocus called");
412 $(".focus:last").select();
414 var slip_re = /slip/;
415 function printx_window(print_type) {
416 var handler = print_type.match(slip_re) ? "printslip" : "moremember";
420 function checkout_confirm(patronid) {
421 var barcode = $("#barcode").val();
422 // alert("checkout_confirm('" + patronid + "') called for barcode '" + barcode + "'");
423 if (! barcode) { dofocus(); return false; } // no barcode
424 if (barcode == "__KOHA_NEW_CIRC__") { // magic barcode
425 window.location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout';
430 [% IF Koha.Preference('AudioAlerts') %]
431 var AUDIO_ALERTS = JSON.parse( "[% To.json(AudioAlerts.AudioAlerts) | $raw %]" );
432 $( document ).ready(function() {
433 if ( AUDIO_ALERTS ) {
434 for ( var k in AUDIO_ALERTS ) {
435 var alert = AUDIO_ALERTS[k];
436 if ( $( alert.selector ).length ) {
437 playSound( alert.sound );
443 function playSound( sound ) {
444 if ( ( sound.indexOf('http://') == 0 || sound.indexOf('https://') == 0 ) ) {
445 document.getElementById("audio-alert").innerHTML = '<audio src="' + sound + '" autoplay="autoplay" autobuffer="autobuffer"></audio>';
451 $(document).ready(function() {
453 [% IF ( patronid ) %]sco_init();[% END %]
454 $("#loanTable").dataTable($.extend(true, {}, dataTablesDefaults, {
457 { "targets": [ "nosort" ], "sortable": false, "searchable": false },
458 { "targets": [ "noshow" ], "visible": false, "searchable": false },
459 { "type": "anti-the", "targets" : [ "anti-the" ] },
460 { "type": "title-string", "targets" : [ "title-string" ] }
464 $("#logout_form").submit(function(){
465 clearTimeout(mainTimeout);
466 [% IF Koha.Preference('SelfCheckReceiptPrompt') %]
467 var confirmStart = Date.now();
468 if(confirm(_("Would you like to print a receipt?"))){
469 if ( (Date.now() - confirmStart) < [% SelfCheckTimeout | html %] ) {
470 window.open("/cgi-bin/koha/sco/printslip.pl?borrowernumber=[% borrowernumber | html %]&print=qslip");
472 alert(_("Timeout while waiting for print confirmation"));
483 [% IF ( Koha.Preference('SCOUserJS') ) %]<script>[% Koha.Preference('SCOUserJS') | $raw %]</script>[% END %]