4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha [% END %] › Self checkout </title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <meta name="generator" content="Koha [% Version %]" /> <!-- leave this for stats -->
8 <link rel="shortcut icon" href="[% IF ( OpacFavicon ) %][% OpacFavicon %][% ELSE %][% interface %]/[% theme %]/images/favicon.ico[% END %]" type="image/x-icon" />
9 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/lib/bootstrap/css/bootstrap.min.css" />
10 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/lib/jquery/jquery-ui.css" />
11 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/sco.css" />
12 [% IF ( OPACUserCSS ) %]<style type="text/css">[% OPACUserCSS %]</style>[% END %]
13 [% IF ( SCOUserCSS ) %]<style type="text/css">[% SCOUserCSS %]</style>[% END %]
15 <script src="[% interface %]/[% theme %]/lib/respond.min.js"></script>
17 <script type="text/javascript">
18 function _(s) { return s } // dummy function for gettext
20 <script type="text/javascript" src="[% interface %]/[% theme %]/lib/modernizr.min.js"></script>
22 <body id="sco_main" class="sco" onload="dofocus();" onunload="mungeHistory();">
23 [% INCLUDE 'masthead-sco.inc' %]
26 <div class="container-fluid">
27 <div class="row-fluid">
28 [% IF ( display_patron_image ) %]
34 <div id="masthead"><h1>[% LibraryName %] Self checkout system</h1></div>
36 [% IF ( impossible ) %]<!-- We tried to issue, but failed. -->
38 <h3>Item cannot be checked out.</h3>
39 <p>Sorry, this item cannot be checked out at this station.</p>
41 <p>Title: <em>[% title |html %]</em> </p>
45 [% IF ( circ_error_UNKNOWN_BARCODE ) %]
46 The system does not recognize this barcode.
47 [% ELSIF ( circ_error_max_loans_allowed ) %]
48 You have checked out too many items and can't check out any more.
49 [% ELSIF ( circ_error_ISSUED_TO_ANOTHER ) %]
50 This item is checked out to someone else.
51 [% ELSIF ( circ_error_NO_MORE_RENEWALS ) %]
52 You cannot renew this item again.
53 [% ELSIF ( circ_error_NOT_FOR_LOAN ) %]
54 This item is not for loan.
55 [% ELSIF ( circ_error_DEBT ) %]
56 You owe the library [% amount %] and cannot check out.
57 [% ELSIF ( circ_error_WTHDRAWN ) %]
58 This item has been withdrawn from the collection.
59 [% ELSIF ( circ_error_RESTRICTED ) %]
60 [% ELSIF ( circ_error_RESERVED ) %]
61 This item is on hold for another patron.
62 [% ELSIF ( circ_error_ITEMNOTSAMEBRANCH ) %]
63 [% ELSIF ( circ_error_EXPIRED ) %]
64 Your account has expired.
65 [% ELSIF ( circ_error_DEBARRED ) %]
66 Your account has been suspended.
67 [% ELSIF ( circ_error_CARD_LOST ) %]
68 This card has been declared lost.
69 [% ELSIF ( circ_error_GNA ) %]
70 [% ELSIF ( circ_error_INVALID_DATE ) %]
72 Please see a member of the library staff.
75 [% IF ( returnitem && AllowSelfCheckReturns ) %]
76 <form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="post">
77 <input type="hidden" name="op" value="returnbook" />
78 <input type="hidden" name="patronid" value="[% patronid %]" />
79 <input type="hidden" name="barcode" value="[% barcode %]" />
80 <button type="submit" name="returnbook" class="btn"><i class="return"></i> Return this item</button>
84 <form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="post">
85 <input type="hidden" name="op" value="" />
86 <input type="hidden" name="patronid" value="[% patronid %]" />
87 <input type="hidden" name="barcode" value="[% barcode %]" />
88 <input type="submit" name= "confirm" value="Return to account summary" class="btn back focus" />
90 </div> <!-- / .alert -->
91 [% END # / IF ( impossible %]
93 [% IF ( confirm ) %]<!-- We need to confirm the issue.. -->
94 <div class="alert"><h3>Please confirm the checkout:</h3>
95 [% IF ( confirm_renew_issue ) %]
96 <p>This item is already checked out to you.</p>
99 [% IF ( renew && AllowSelfCheckReturns ) %]
100 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
101 <input type="hidden" name="op" value="returnbook" />
102 <input type="hidden" name="patronid" value="[% patronid %]" />
103 <input type="hidden" name="barcode" value="[% barcode %]" />
104 <input type="hidden" name="confirmed" value="" />
105 <button type="submit" name="returnbook" class="btn"><i class="icon return"></i> Return this item</button>
109 [% UNLESS ( renew ) %]
110 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
111 <input type="hidden" name="op" value="checkout" />
112 <input type="hidden" name="patronid" value="[% patronid %]" />
113 <input type="hidden" name="barcode" value="[% barcode %]" />
114 <input type="hidden" name="confirmed" value="1" />
115 <button type="submit" name="confirm" class="btn"><i class="icon renew"></i> Renew item</button>
118 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
119 <input type="hidden" name="op" value="checkout" />
120 <input type="hidden" name="patronid" value="[% patronid %]" />
121 <input type="hidden" name="barcode" value="[% barcode %]" />
122 <input type="hidden" name="confirmed" value="1" />
123 <button type="submit" class="btn"><i class="icon renew"></i> Renew item</button>
127 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
128 <input type="hidden" name="op" value="" />
129 <input type="hidden" name="patronid" value="[% patronid %]" />
130 <button type="submit" class="btn"><i class="icon cancel"></i> Cancel</button>
133 [% END # / IF confirm %]
135 [% IF ( nopermission ) %]
136 <!-- This is what is displayed if user doesnt have permission -->
138 <h3>Access denied</h3>
139 <p>Sorry, this self-checkout station has lost authentication. Please contact the administrator to resolve this problem.</p>
143 [% IF ( different_ip ) %]
144 <!-- This is what is displayed if user doesnt have permission -->
146 <h3>Session lost</h3>
147 <p>You are accessing self-checkout from a different IP address! please log in again.</p>
151 [% IF ( invalid_username_or_password ) %]
152 <!-- This is what is displayed if user doesnt have permission -->
154 <h3>Record not found</h3>
155 <p>Your userid was not found in the database. Please try again.</p>
160 [% UNLESS ( hide_main ) %]
162 [% IF ( patronid ) %]
163 [% IF ( validuser ) %]
164 <div class="alert alert-info">You are logged in as [% borrowername %].</div>
165 [% INCLUDE 'opac-note.inc' %]
166 [% IF patron_has_hold_fee %]
167 <div class="alert">A hold fee was charged to your account for collecting this item.</div>
174 <p>The userid <strong>[% patronid %]</strong> was not found in the database. Please try again.</p>
177 [% END # / IF patronid %]
179 [% IF ( validuser ) %]
180 <div id="newcheckout" class="sco_entry">
181 <form id="scan_form" name="scan_form" method="post" action="/cgi-bin/koha/sco/sco-main.pl" onsubmit="return checkout_confirm('[% patronid %]');">
183 <legend>Check out[% IF ( AllowSelfCheckReturns ) %], return[% END %] or renew an item: </legend>
184 <div class="input-append">
185 <label for="barcode">Scan a new item or enter its barcode:</label>
186 <input id="barcode" name="barcode" size="20" type="text" class="focus" autocomplete="off" />
187 <button type="submit" class="btn">Submit</button>
189 <input type="hidden" name="op" value="checkout" />
190 <input type="hidden" name="patronid" value="[% patronid %]" />
195 <form method="post" action="#" id="logout_form">
196 <button type="submit" class="btn"><i class="icon finish"></i> Finish</button>
199 </div> <!-- / #newcheckout -->
200 </div> <!-- / .span12/12 -->
201 [% IF ( display_patron_image ) %]
203 <img src="/cgi-bin/koha/sco/sco-patron-image.pl?borrowernumber=[% borrowernumber %]" alt="" />
206 </div> <!-- / .row-fluid -->
207 </div> <!-- / .container-fluid -->
209 <div class="container-fluid">
210 <div class="row-fluid">
212 <div id="borrowerdetails">
213 [% IF ( issues_count ) %]
214 <table id="loanTable" class="table table-bordered table-striped">
215 <caption>Checkouts for [% borrowername %] <span class="count">([% issues_count %] total)</span></caption>
216 <!-- ISSUES TABLE ROWS -->
219 <th class="noshow">Checked out on</th>
220 <th class="anti-the">Title</th>
222 <th class="title-string">Due</th>
223 <th class="nosort">Renew</th>
224 [% UNLESS ( nofines ) %]
230 [% FOREACH ISSUE IN ISSUES %]
232 <td>[% ISSUE.issuedate %]</td>
234 [% UNLESS ( noitemlinks ) %]
235 <a href="/cgi-bin/koha/opac-detail.pl?bib=[% ISSUE. biblionumber %]">[% ISSUE.title |html %]</a>
237 <strong>[% ISSUE.title |html %]</strong>
239 <span class="item-details">[% ISSUE.author %]</span>
240 ([% ISSUE.barcode %])
242 <td>[% ISSUE.itemcallnumber %]</td>
243 [% IF ( ISSUE.overdue ) %]
244 <td class="overdue"><span title="[% ISSUE.date_due %]">[% ISSUE.date_due | $KohaDates as_due_date => 1 %]</span></td>
246 <td><span title="[% ISSUE.date_due %]">[% ISSUE.date_due | $KohaDates as_due_date => 1 %]</span></td>
249 <form action="/cgi-bin/koha/sco/sco-main.pl" method="post">
250 <input type="hidden" name="patronid" value="[% patronid %]" />
251 <input type="hidden" name="barcode" value="[% ISSUE.barcode %]" />
252 [% IF ISSUE.can_be_renewed %]
253 <input type="hidden" name="op" value="checkout" />
254 <input type="hidden" name="confirmed" value="1" />
255 [% UNLESS ( ISSUE.renew ) %]
256 <input type="submit" value="Renew item" name="confirm " class="btn renew" />
258 <input type="submit" value="Renew item" class="btn renew" />
261 [% IF ISSUE.renew_error == 'auto_renew' OR ISSUE.renew_error == 'auto_too_soon' %]
262 <span>This item has been scheduled for automatic renewal and cannot be renewed</span>
263 [% ELSIF ISSUE.renew_error == 'onsite_checkout' %]
264 <span>This is a on-site checkout, it cannot be renewed.</span>
266 <span>No renewals allowed</span>
268 [% IF AllowSelfCheckReturns %]
269 <input type="submit" value="Check in item" name="confirm" class="btn return" />
270 <input type="hidden" name="op" value="returnbook" />
271 <input type="hidden" name="confirmed" value="" />
276 [% UNLESS ( nofines ) %]
278 [% IF ( ISSUE.charges ) %]Yes[% ELSE %]No[% END %]
282 [% END # / FOREACH ISSUE %]
286 <h3>You currently have nothing checked out.</h3>
287 [% END # / IF issues_count %]
288 </div> <!-- / #borrowerdetails -->
289 [% ELSE # IF validuser %]
290 <div class="sco_entry" >
291 <form id="mainform" action="/cgi-bin/koha/sco/sco-main.pl" name="mainform" method="post">
292 <fieldset class="checkout brief">
293 [% IF ( authbylogin ) %]
294 <legend>Log in to your account</legend>
295 <label for="patronlogin">Login:</label>
296 <input type="text" id="patronlogin" class="focus" size="20" name="patronlogin" />
297 <label for="patronpw">Password:</label>
298 <input type="password" id="patronpw" size="20" name="patronpw" />
299 <fieldset class="action">
300 <button type="submit" class="btn">Log in</button>
303 <div class="input-append">
304 <label for="patronid">Please enter your card number:</label>
305 <input type="text" id="patronid" class="focus" size="20" name="patronid" autocomplete="off" />
306 <button type="submit" class="btn">Submit</button>
308 [% END # / IF authbylogin %]
310 [% FOREACH INPUT IN INPUTS %]
311 <input type="hidden" name="[% INPUT.name |html %]" value="[% INPUT.value |html %]">
313 <input type="hidden" name="op" value="login" />
316 </div> <!-- / .sco_entry -->
317 [% END # / IF validuser %]
318 [% END # / UNLESS ( hide_main %]
320 </div> <!-- / .span12 -->
321 </div> <!-- / .row-fluid -->
322 </div> <!-- / .container-fluid -->
323 </div> <!-- / .main -->
324 <span id="audio-alert"></span>
327 [% INCLUDE 'opac-bottom.inc' %]
328 [% BLOCK jsinclude %]
329 [% INCLUDE 'datatables.inc' %]
330 <script type="text/javascript">
332 function mungeHistory() {
333 // prevent back button from allowing form resubmission
334 if (history && history.pushState) {
335 history.replaceState(null, document.title, window.location.href);
339 function sco_init() {
340 mainTimeout = setTimeout(function() {
341 location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
342 }, [% SelfCheckTimeout %]);
344 function dofocus() { // named function req'd for body onload event by some FF and IE7 security models
345 // alert("dofocus called");
346 $(".focus:last").select();
348 var slip_re = /slip/;
349 function printx_window(print_type) {
350 var handler = print_type.match(slip_re) ? "printslip" : "moremember";
354 function checkout_confirm(patronid) {
355 var barcode = $("#barcode").val();
356 // alert("checkout_confirm('" + patronid + "') called for barcode '" + barcode + "'");
357 if (! barcode) { dofocus(); return false; } // no barcode
358 if (barcode == "__KOHA_NEW_CIRC__") { // magic barcode
359 window.location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout';
364 [% IF Koha.Preference('AudioAlerts') %]
365 var AUDIO_ALERTS = JSON.parse( '[% AudioAlerts.AudioAlerts | replace( "'", "\\'" ) | replace( '"', '\\"' ) %]' );
366 $( document ).ready(function() {
367 if ( AUDIO_ALERTS ) {
368 for ( var k in AUDIO_ALERTS ) {
369 var alert = AUDIO_ALERTS[k];
370 if ( $( alert.selector ).length ) {
371 playSound( alert.sound );
377 function playSound( sound ) {
378 if ( ( sound.indexOf('http://') == 0 || sound.indexOf('https://') == 0 ) ) {
379 document.getElementById("audio-alert").innerHTML = '<audio src="' + sound + '" autoplay="autoplay" autobuffer="autobuffer"></audio>';
385 $(document).ready(function() {
387 [% IF ( patronid ) %]sco_init();[% END %]
388 $("#loanTable").dataTable($.extend(true, {}, dataTablesDefaults, {
391 { "aTargets": [ "nosort" ], "bSortable": false, "bSearchable": false },
392 { "aTargets": [ "noshow" ], "bVisible": false, "bSearchable": false },
393 { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
394 { "sType": "title-string", "aTargets" : [ "title-string" ] }
398 $("#logout_form").submit(function(){
399 clearTimeout(mainTimeout);
400 [% IF Koha.Preference('SelfCheckReceiptPrompt') %]
401 var confirmStart = Date.now();
402 if(confirm(_("Would you like to print a receipt?"))){
403 if ( (Date.now() - confirmStart) < [% SelfCheckTimeout %] ) {
404 window.open("/cgi-bin/koha/sco/printslip.pl?borrowernumber=[% borrowernumber %]&print=qslip");
406 alert(_("Timeout while waiting for print confirmation"));
417 [% IF ( SCOUserJS ) %]<script type="text/javascript">[% SCOUserJS %]</script>[% END %]