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' %]
170 [% IF patron_has_hold_fee %]
171 <div class="alert">You have been charged for collecting this item.</div>
178 <p>The userid <strong>[% patronid %]</strong> was not found in the database. Please try again.</p>
181 [% END # / IF patronid %]
183 [% IF ( validuser ) %]
184 <div id="newcheckout" class="sco_entry">
185 <form id="scan_form" name="scan_form" method="post" action="/cgi-bin/koha/sco/sco-main.pl" onsubmit="return checkout_confirm('[% patronid %]');">
187 <legend>Check out[% IF ( AllowSelfCheckReturns ) %], return[% END %] or renew an item: </legend>
188 <div class="input-append">
189 <label for="barcode">Scan a new item or enter its barcode:</label>
190 <input id="barcode" name="barcode" size="20" type="text" class="focus" autocomplete="off" />
191 <button type="submit" class="btn">Submit</button>
193 <input type="hidden" name="op" value="checkout" />
194 <input type="hidden" name="patronid" value="[% patronid %]" />
199 <form method="post" action="#" id="logout_form">
200 <button type="submit" class="btn"><i class="icon finish"></i> Finish</button>
203 </div> <!-- / #newcheckout -->
204 </div> <!-- / .span12/12 -->
205 [% IF ( display_patron_image ) %]
207 <img src="/cgi-bin/koha/sco/sco-patron-image.pl?borrowernumber=[% borrowernumber %]" alt="" />
210 </div> <!-- / .row-fluid -->
211 </div> <!-- / .container-fluid -->
213 <div class="container-fluid">
214 <div class="row-fluid">
216 <div id="borrowerdetails">
217 [% IF ( issues_count ) %]
218 <table id="loanTable" class="table table-bordered table-striped">
219 <caption>Checkouts for [% borrowername %] <span class="count">([% issues_count %] total)</span></caption>
220 <!-- ISSUES TABLE ROWS -->
223 <th class="noshow">Checked out on</th>
224 <th class="anti-the">Title</th>
226 <th class="title-string">Due</th>
227 <th class="nosort">Renew</th>
228 [% UNLESS ( nofines ) %]
234 [% FOREACH ISSUE IN ISSUES %]
236 <td>[% ISSUE.issuedate %]</td>
238 [% UNLESS ( noitemlinks ) %]
239 <a href="/cgi-bin/koha/opac-detail.pl?bib=[% ISSUE. biblionumber %]">[% ISSUE.title |html %]</a>
241 <strong>[% ISSUE.title |html %]</strong>
243 <span class="item-details">[% ISSUE.author %]</span>
244 ([% ISSUE.barcode %])
246 <td>[% ISSUE.itemcallnumber %]</td>
247 [% IF ( ISSUE.overdue ) %]
248 <td class="overdue"><span title="[% ISSUE.date_due %]">[% ISSUE.date_due | $KohaDates as_due_date => 1 %]</span></td>
250 <td><span title="[% ISSUE.date_due %]">[% ISSUE.date_due | $KohaDates as_due_date => 1 %]</span></td>
253 <form action="/cgi-bin/koha/sco/sco-main.pl" method="post">
254 <input type="hidden" name="patronid" value="[% patronid %]" />
255 <input type="hidden" name="barcode" value="[% ISSUE.barcode %]" />
256 [% IF ISSUE.can_be_renewed %]
257 <input type="hidden" name="op" value="checkout" />
258 <input type="hidden" name="confirmed" value="1" />
259 [% UNLESS ( ISSUE.renew ) %]
260 <input type="submit" value="Renew item" name="confirm " class="btn renew" />
262 <input type="submit" value="Renew item" class="btn renew" />
265 [% IF ISSUE.renew_error == 'auto_renew' OR ISSUE.renew_error == 'auto_too_soon' %]
266 <span>This item has been scheduled for automatic renewal and cannot be renewed</span>
267 [% ELSIF ISSUE.renew_error == 'onsite_checkout' %]
268 <span>This is a on-site checkout, it cannot be renewed.</span>
270 <span>No renewals allowed</span>
272 [% IF AllowSelfCheckReturns %]
273 <input type="submit" value="Check in item" name="confirm" class="btn return" />
274 <input type="hidden" name="op" value="returnbook" />
275 <input type="hidden" name="confirmed" value="" />
280 [% UNLESS ( nofines ) %]
282 [% IF ( ISSUE.charges ) %]Yes[% ELSE %]No[% END %]
286 [% END # / FOREACH ISSUE %]
290 <h3>You currently have nothing checked out.</h3>
291 [% END # / IF issues_count %]
292 </div> <!-- / #borrowerdetails -->
293 [% ELSE # IF validuser %]
294 <div class="sco_entry" >
295 <form id="mainform" action="/cgi-bin/koha/sco/sco-main.pl" name="mainform" method="post">
296 <fieldset class="checkout brief">
297 [% IF ( authbylogin ) %]
298 <legend>Log in to your account</legend>
299 <label for="patronlogin">Login:</label>
300 <input type="text" id="patronlogin" class="focus" size="20" name="patronlogin" />
301 <label for="patronpw">Password:</label>
302 <input type="password" id="patronpw" size="20" name="patronpw" />
303 <fieldset class="action">
304 <button type="submit" class="btn">Log in</button>
307 <div class="input-append">
308 <label for="patronid">Please enter your card number:</label>
309 <input type="text" id="patronid" class="focus" size="20" name="patronid" autocomplete="off" />
310 <button type="submit" class="btn">Submit</button>
312 [% END # / IF authbylogin %]
314 [% FOREACH INPUT IN INPUTS %]
315 <input type="hidden" name="[% INPUT.name |html %]" value="[% INPUT.value |html %]">
317 <input type="hidden" name="op" value="login" />
320 </div> <!-- / .sco_entry -->
321 [% END # / IF validuser %]
322 [% END # / UNLESS ( hide_main %]
324 </div> <!-- / .span12 -->
325 </div> <!-- / .row-fluid -->
326 </div> <!-- / .container-fluid -->
327 </div> <!-- / .main -->
328 <span id="audio-alert"></span>
331 [% INCLUDE 'opac-bottom.inc' %]
332 [% BLOCK jsinclude %]
333 [% INCLUDE 'datatables.inc' %]
334 <script type="text/javascript">
336 function mungeHistory() {
337 // prevent back button from allowing form resubmission
338 if (history && history.pushState) {
339 history.replaceState(null, document.title, window.location.href);
343 function sco_init() {
344 mainTimeout = setTimeout(function() {
345 location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
346 }, [% SelfCheckTimeout %]);
348 function dofocus() { // named function req'd for body onload event by some FF and IE7 security models
349 // alert("dofocus called");
350 $(".focus:last").select();
352 var slip_re = /slip/;
353 function printx_window(print_type) {
354 var handler = print_type.match(slip_re) ? "printslip" : "moremember";
358 function checkout_confirm(patronid) {
359 var barcode = $("#barcode").val();
360 // alert("checkout_confirm('" + patronid + "') called for barcode '" + barcode + "'");
361 if (! barcode) { dofocus(); return false; } // no barcode
362 if (barcode == "__KOHA_NEW_CIRC__") { // magic barcode
363 window.location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout';
368 [% IF Koha.Preference('AudioAlerts') %]
369 var AUDIO_ALERTS = JSON.parse( '[% AudioAlerts.AudioAlerts | replace( "'", "\\'" ) | replace( '"', '\\"' ) %]' );
370 $( document ).ready(function() {
371 if ( AUDIO_ALERTS ) {
372 for ( var k in AUDIO_ALERTS ) {
373 var alert = AUDIO_ALERTS[k];
374 if ( $( alert.selector ).length ) {
375 playSound( alert.sound );
381 function playSound( sound ) {
382 if ( ( sound.indexOf('http://') == 0 || sound.indexOf('https://') == 0 ) ) {
383 document.getElementById("audio-alert").innerHTML = '<audio src="' + sound + '" autoplay="autoplay" autobuffer="autobuffer"></audio>';
389 $(document).ready(function() {
391 [% IF ( patronid ) %]sco_init();[% END %]
392 $("#loanTable").dataTable($.extend(true, {}, dataTablesDefaults, {
395 { "aTargets": [ "nosort" ], "bSortable": false, "bSearchable": false },
396 { "aTargets": [ "noshow" ], "bVisible": false, "bSearchable": false },
397 { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
398 { "sType": "title-string", "aTargets" : [ "title-string" ] }
402 $("#logout_form").submit(function(){
403 clearTimeout(mainTimeout);
404 [% IF Koha.Preference('SelfCheckReceiptPrompt') %]
405 var confirmStart = Date.now();
406 if(confirm(_("Would you like to print a receipt?"))){
407 if ( (Date.now() - confirmStart) < [% SelfCheckTimeout %] ) {
408 window.open("/cgi-bin/koha/sco/printslip.pl?borrowernumber=[% borrowernumber %]&print=qslip");
410 alert(_("Timeout while waiting for print confirmation"));
421 [% IF ( SCOUserJS ) %]<script type="text/javascript">[% SCOUserJS %]</script>[% END %]