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 <em>MESSAGE 1:</em> The system does not recognize this barcode.
47 [% ELSIF ( circ_error_max_loans_allowed ) %]
48 <em>MESSAGE 2:</em> You have checked out too many items and can't check out any more.
49 [% ELSIF ( circ_error_ISSUED_TO_ANOTHER ) %]
50 <em>MESSAGE 3:</em> This item is checked out to someone else.
51 [% ELSIF ( circ_error_NO_MORE_RENEWALS ) %]
52 <em>MESSAGE 4:</em> You cannot renew this item again.
53 [% ELSIF ( circ_error_NOT_FOR_LOAN ) %]
54 <em>MESSAGE 5:</em> This item is not for loan.
55 [% ELSIF ( circ_error_DEBT ) %]
56 <em>MESSAGE 6:</em> You owe the library [% amount %] and cannot check out.
57 [% ELSIF ( circ_error_WTHDRAWN ) %]
58 <em>MESSAGE 7:</em> This item has been withdrawn from the collection.
59 [% ELSIF ( circ_error_RESTRICTED ) %]
61 [% ELSIF ( circ_error_RESERVED ) %]
62 <em>MESSAGE 9:</em> This item is on hold for another patron.
63 [% ELSIF ( circ_error_ITEMNOTSAMEBRANCH ) %]
65 [% ELSIF ( circ_error_EXPIRED ) %]
66 <em>MESSAGE 11:</em> Your account has expired.
67 [% ELSIF ( circ_error_DEBARRED ) %]
68 <em>MESSAGE 12:</em> Your account has been suspended.
69 [% ELSIF ( circ_error_CARD_LOST ) %]
70 <em>MESSAGE 13:</em> This card has been declared lost.
71 [% ELSIF ( circ_error_GNA ) %]
73 [% ELSIF ( circ_error_INVALID_DATE ) %]
75 [% END # / IF circ_error_UNKNOWN_BARCODE %]
76 Please see a member of the library staff.
79 [% IF ( returnitem && AllowSelfCheckReturns ) %]
80 <form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="post">
81 <input type="hidden" name="op" value="returnbook" />
82 <input type="hidden" name="patronid" value="[% patronid %]" />
83 <input type="hidden" name="barcode" value="[% barcode %]" />
84 <button type="submit" name="returnbook" class="btn"><i class="return"></i> Return this item</button>
88 <form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="post">
89 <input type="hidden" name="op" value="" />
90 <input type="hidden" name="patronid" value="[% patronid %]" />
91 <input type="hidden" name="barcode" value="[% barcode %]" />
92 <input type="submit" name= "confirm" value="Return to account summary" class="btn back focus" />
94 </div> <!-- / .alert -->
95 [% END # / IF ( impossible %]
97 [% IF ( confirm ) %]<!-- We need to confirm the issue.. -->
98 <div class="alert"><h3>Please confirm the checkout:</h3>
99 [% IF ( confirm_renew_issue ) %]
100 <p>This item is already checked out to you.</p>
103 [% IF ( renew && AllowSelfCheckReturns ) %]
104 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
105 <input type="hidden" name="op" value="returnbook" />
106 <input type="hidden" name="patronid" value="[% patronid %]" />
107 <input type="hidden" name="barcode" value="[% barcode %]" />
108 <input type="hidden" name="confirmed" value="" />
109 <button type="submit" name="returnbook" class="btn"><i class="icon return"></i> Return this item</button>
113 [% UNLESS ( renew ) %]
114 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
115 <input type="hidden" name="op" value="checkout" />
116 <input type="hidden" name="patronid" value="[% patronid %]" />
117 <input type="hidden" name="barcode" value="[% barcode %]" />
118 <input type="hidden" name="confirmed" value="1" />
119 <button type="submit" name="confirm" class="btn"><i class="icon renew"></i> Renew item</button>
122 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
123 <input type="hidden" name="op" value="checkout" />
124 <input type="hidden" name="patronid" value="[% patronid %]" />
125 <input type="hidden" name="barcode" value="[% barcode %]" />
126 <input type="hidden" name="confirmed" value="1" />
127 <button type="submit" class="btn"><i class="icon renew"></i> Renew item</button>
131 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
132 <input type="hidden" name="op" value="" />
133 <input type="hidden" name="patronid" value="[% patronid %]" />
134 <button type="submit" class="btn"><i class="icon cancel"></i> Cancel</button>
137 [% END # / IF confirm %]
139 [% IF ( nopermission ) %]
140 <!-- This is what is displayed if user doesnt have permission -->
142 <h3>Access denied</h3>
143 <p>Sorry, this self-checkout station has lost authentication. Please contact the administrator to resolve this problem.</p>
147 [% IF ( different_ip ) %]
148 <!-- This is what is displayed if user doesnt have permission -->
150 <h3>Session lost</h3>
151 <p>You are accessing self-checkout from a different IP address! please log in again.</p>
155 [% IF ( invalid_username_or_password ) %]
156 <!-- This is what is displayed if user doesnt have permission -->
158 <h3>Record not found</h3>
159 <p>Your userid was not found in the database. Please try again.</p>
164 [% UNLESS ( hide_main ) %]
166 [% IF ( patronid ) %]
167 [% IF ( validuser ) %]
168 <div class="alert alert-info">You are logged in as [% borrowername %].</div>
169 [% INCLUDE 'opac-note.inc' %]
175 <p>The userid <strong>[% patronid %]</strong> was not found in the database. Please try again.</p>
178 [% END # / IF patronid %]
180 [% IF ( validuser ) %]
181 <div id="newcheckout" class="sco_entry">
182 <form id="scan_form" name="scan_form" method="post" action="/cgi-bin/koha/sco/sco-main.pl" onsubmit="return checkout_confirm('[% patronid %]');">
184 <legend>Check out[% IF ( AllowSelfCheckReturns ) %], return[% END %] or renew an item: </legend>
185 <div class="input-append">
186 <label for="barcode">Scan a new item or enter its barcode:</label>
187 <input id="barcode" name="barcode" size="20" type="text" class="focus" autocomplete="off" />
188 <button type="submit" class="btn">Submit</button>
190 <input type="hidden" name="op" value="checkout" />
191 <input type="hidden" name="patronid" value="[% patronid %]" />
196 <form method="post" action="#" id="logout_form">
197 <button type="submit" class="btn"><i class="icon finish"></i> Finish</button>
200 </div> <!-- / #newcheckout -->
201 </div> <!-- / .span12/12 -->
202 [% IF ( display_patron_image ) %]
204 <img src="/cgi-bin/koha/sco/sco-patron-image.pl?borrowernumber=[% borrowernumber %]" alt="" />
207 </div> <!-- / .row-fluid -->
208 </div> <!-- / .container-fluid -->
210 <div class="container-fluid">
211 <div class="row-fluid">
213 <div id="borrowerdetails">
214 [% IF ( issues_count ) %]
215 <table id="loanTable" class="table table-bordered table-striped">
216 <caption>Checkouts for [% borrowername %] <span class="count">([% issues_count %] total)</span></caption>
217 <!-- ISSUES TABLE ROWS -->
220 <th class="noshow">Checked out on</th>
221 <th class="anti-the">Title</th>
223 <th class="title-string">Due</th>
224 <th class="nosort">Renew</th>
225 [% UNLESS ( nofines ) %]
231 [% FOREACH ISSUE IN ISSUES %]
233 <td>[% ISSUE.issuedate %]</td>
235 [% UNLESS ( noitemlinks ) %]
236 <a href="/cgi-bin/koha/opac-detail.pl?bib=[% ISSUE. biblionumber %]">[% ISSUE.title |html %]</a>
238 <strong>[% ISSUE.title |html %]</strong>
240 <span class="item-details">[% ISSUE.author %]</span>
241 ([% ISSUE.barcode %])
243 <td>[% ISSUE.itemcallnumber %]</td>
244 [% IF ( ISSUE.overdue ) %]
245 <td class="overdue"><span title="[% ISSUE.date_due %]">[% ISSUE.date_due | $KohaDates as_due_date => 1 %]</span></td>
247 <td><span title="[% ISSUE.date_due %]">[% ISSUE.date_due | $KohaDates as_due_date => 1 %]</span></td>
250 <form action="/cgi-bin/koha/sco/sco-main.pl" method="post">
251 <input type="hidden" name="patronid" value="[% patronid %]" />
252 <input type="hidden" name="barcode" value="[% ISSUE.barcode %]" />
253 [% IF ( ISSUE.norenew ) %]
254 [% IF ( AllowSelfCheckReturns ) %]
255 <input type="submit" value="Check in item" name="confirm" class="btn return" />
256 <input type="hidden" name="op" value="returnbook" />
257 <input type="hidden" name="confirmed" value="" />
259 <span>No renewals allowed</span>
262 <input type="hidden" name="op" value="checkout" />
263 <input type="hidden" name="confirmed" value="1" />
264 [% UNLESS ( ISSUE.renew ) %]
265 <input type="submit" value="Renew item" name="confirm " class="btn renew" />
267 <input type="submit" value="Renew item" class="btn renew" />
272 [% UNLESS ( nofines ) %]
274 [% IF ( ISSUE.charges ) %]Yes[% ELSE %]No[% END %]
278 [% END # / FOREACH ISSUE %]
282 <h3>You currently have nothing checked out.</h3>
283 [% END # / IF issues_count %]
284 </div> <!-- / #borrowerdetails -->
285 [% ELSE # IF validuser %]
286 <div class="sco_entry" >
287 <form id="mainform" action="/cgi-bin/koha/sco/sco-main.pl" name="mainform" method="post">
288 <fieldset class="checkout brief">
289 [% IF ( authbylogin ) %]
290 <legend>Log in to your account</legend>
291 <label for="patronlogin">Login:</label>
292 <input type="text" id="patronlogin" class="focus" size="20" name="patronlogin" />
293 <label for="patronpw">Password:</label>
294 <input type="password" id="patronpw" size="20" name="patronpw" />
295 <fieldset class="action">
296 <button type="submit" class="btn">Log in</button>
299 <div class="input-append">
300 <label for="patronid">Please enter your card number:</label>
301 <input type="text" id="patronid" class="focus" size="20" name="patronid" autocomplete="off" />
302 <button type="submit" class="btn">Submit</button>
304 [% END # / IF authbylogin %]
306 [% FOREACH INPUT IN INPUTS %]
307 <input type="hidden" name="[% INPUT.name |html %]" value="[% INPUT.value |html %]">
309 <input type="hidden" name="op" value="login" />
312 </div> <!-- / .sco_entry -->
313 [% END # / IF validuser %]
314 [% END # / UNLESS ( hide_main %]
316 </div> <!-- / .span12 -->
317 </div> <!-- / .row-fluid -->
318 </div> <!-- / .container-fluid -->
319 </div> <!-- / .main -->
320 <span id="audio-alert"></span>
323 [% INCLUDE 'opac-bottom.inc' %]
324 [% BLOCK jsinclude %]
325 [% INCLUDE 'datatables.inc' %]
326 <script type="text/javascript">
328 function mungeHistory() {
329 // prevent back button from allowing form resubmission
330 if (history && history.pushState) {
331 history.replaceState(null, document.title, window.location.href);
335 function sco_init() {
336 mainTimeout = setTimeout(function() {
337 location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
338 }, [% SelfCheckTimeout %]);
340 function dofocus() { // named function req'd for body onload event by some FF and IE7 security models
341 // alert("dofocus called");
342 $(".focus:last").select();
344 var slip_re = /slip/;
345 function printx_window(print_type) {
346 var handler = print_type.match(slip_re) ? "printslip" : "moremember";
350 function checkout_confirm(patronid) {
351 var barcode = $("#barcode").val();
352 // alert("checkout_confirm('" + patronid + "') called for barcode '" + barcode + "'");
353 if (! barcode) { dofocus(); return false; } // no barcode
354 if (barcode == "__KOHA_NEW_CIRC__") { // magic barcode
355 window.location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout';
360 [% IF Koha.Preference('AudioAlerts') %]
361 var AUDIO_ALERTS = JSON.parse( '[% AudioAlerts.AudioAlerts | replace( "'", "\\'" ) | replace( '"', '\\"' ) %]' );
362 $( document ).ready(function() {
363 if ( AUDIO_ALERTS ) {
364 for ( var k in AUDIO_ALERTS ) {
365 var alert = AUDIO_ALERTS[k];
366 if ( $( alert.selector ).length ) {
367 playSound( alert.sound );
373 function playSound( sound ) {
374 if ( ( sound.indexOf('http://') == 0 || sound.indexOf('https://') == 0 ) ) {
375 document.getElementById("audio-alert").innerHTML = '<audio src="' + sound + '" autoplay="autoplay" autobuffer="autobuffer"></audio>';
381 $(document).ready(function() {
383 [% IF ( patronid ) %]sco_init();[% END %]
384 $("#loanTable").dataTable($.extend(true, {}, dataTablesDefaults, {
387 { "aTargets": [ "nosort" ], "bSortable": false, "bSearchable": false },
388 { "aTargets": [ "noshow" ], "bVisible": false, "bSearchable": false },
389 { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
390 { "sType": "title-string", "aTargets" : [ "title-string" ] }
394 $("#logout_form").submit(function(){
395 clearTimeout(mainTimeout);
396 [% IF Koha.Preference('SelfCheckReceiptPrompt') %]
397 var confirmStart = Date.now();
398 if(confirm(_("Would you like to print a receipt?"))){
399 if ( (Date.now() - confirmStart) < [% SelfCheckTimeout %] ) {
400 window.open("/cgi-bin/koha/sco/printslip.pl?borrowernumber=[% borrowernumber %]&print=qslip");
402 alert(_("Timeout while waiting for print confirmation"));
413 [% IF ( SCOUserJS ) %]<script type="text/javascript">[% SCOUserJS %]</script>[% END %]