2 [% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha [% END %] › Self checkout </title>
3 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
4 <meta name="generator" content="Koha [% Version %]" /> <!-- leave this for stats -->
5 <link rel="shortcut icon" href="[% IF ( OpacFavicon ) %][% OpacFavicon %][% ELSE %][% interface %]/[% theme %]/images/favicon.ico[% END %]" type="image/x-icon" />
6 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/lib/bootstrap/css/bootstrap.min.css" />
7 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/lib/jquery/jquery-ui.css" />
8 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/sco.css" />
9 [% IF ( OPACUserCSS ) %]<style type="text/css">[% OPACUserCSS %]</style>[% END %]
10 [% IF ( SCOUserCSS ) %]<style type="text/css">[% SCOUserCSS %]</style>[% END %]
12 <script src="[% interface %]/[% theme %]/lib/respond.min.js"></script>
14 <script type="text/javascript">
15 function _(s) { return s } // dummy function for gettext
17 <script type="text/javascript" src="[% interface %]/[% theme %]/lib/modernizr.min.js"></script>
19 <body onload="dofocus();" onunload="mungeHistory();">
20 [% INCLUDE 'masthead-sco.inc' %]
23 <div class="container-fluid">
24 <div class="row-fluid">
25 [% IF ( display_patron_image ) %]
31 <div id="masthead"><h1>[% LibraryName %] Self checkout system</h1></div>
33 [% IF ( impossible ) %]<!-- We tried to issue, but failed. -->
35 <h3>Item cannot be checked out.</h3>
36 <p>Sorry, this item cannot be checked out at this station.</p>
38 <p>Title: <em>[% title |html %]</em> </p>
42 [% IF ( circ_error_UNKNOWN_BARCODE ) %]
43 <em>MESSAGE 1:</em> The system does not recognize this barcode.
44 [% ELSIF ( circ_error_max_loans_allowed ) %]
45 <em>MESSAGE 2:</em> You have checked out too many items and can't check out any more.
46 [% ELSIF ( circ_error_ISSUED_TO_ANOTHER ) %]
47 <em>MESSAGE 3:</em> This item is checked out to someone else.
48 [% ELSIF ( circ_error_NO_MORE_RENEWALS ) %]
49 <em>MESSAGE 4:</em> You cannot renew this item again.
50 [% ELSIF ( circ_error_NOT_FOR_LOAN ) %]
51 <em>MESSAGE 5:</em> This item is not for loan.
52 [% ELSIF ( circ_error_DEBT ) %]
53 <em>MESSAGE 6:</em> You owe the library [% amount %] and cannot check out.
54 [% ELSIF ( circ_error_WTHDRAWN ) %]
55 <em>MESSAGE 7:</em> This item has been withdrawn from the collection.
56 [% ELSIF ( circ_error_RESTRICTED ) %]
58 [% ELSIF ( circ_error_RESERVED ) %]
59 <em>MESSAGE 9:</em> This item is on hold for another patron.
60 [% ELSIF ( circ_error_ITEMNOTSAMEBRANCH ) %]
62 [% ELSIF ( circ_error_EXPIRED ) %]
63 <em>MESSAGE 11:</em> Your account has expired.
64 [% ELSIF ( circ_error_DEBARRED ) %]
65 <em>MESSAGE 12:</em> Your account has been suspended.
66 [% ELSIF ( circ_error_CARD_LOST ) %]
67 <em>MESSAGE 13:</em> This card has been declared lost.
68 [% ELSIF ( circ_error_GNA ) %]
70 [% ELSIF ( circ_error_INVALID_DATE ) %]
72 [% END # / IF circ_error_UNKNOWN_BARCODE %]
73 Please see a member of the library staff.
76 [% IF ( returnitem && AllowSelfCheckReturns ) %]
77 <form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="post">
78 <input type="hidden" name="op" value="returnbook" />
79 <input type="hidden" name="patronid" value="[% patronid %]" />
80 <input type="hidden" name="barcode" value="[% barcode %]" />
81 <button type="submit" name="returnbook" class="btn"><i class="return"></i> Return this item</button>
85 <form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="post">
86 <input type="hidden" name="op" value="" />
87 <input type="hidden" name="patronid" value="[% patronid %]" />
88 <input type="hidden" name="barcode" value="[% barcode %]" />
89 <input type="submit" name= "confirm" value="Return to account summary" class="btn back focus" />
91 </div> <!-- / .alert -->
92 [% END # / IF ( impossible %]
94 [% IF ( confirm ) %]<!-- We need to confirm the issue.. -->
95 <div class="alert"><h3>Please confirm the checkout:</h3>
96 [% IF ( confirm_renew_issue ) %]
97 <p>This item is already checked out to you.</p>
100 [% IF ( renew && AllowSelfCheckReturns ) %]
101 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
102 <input type="hidden" name="op" value="returnbook" />
103 <input type="hidden" name="patronid" value="[% patronid %]" />
104 <input type="hidden" name="barcode" value="[% barcode %]" />
105 <input type="hidden" name="confirmed" value="" />
106 <button type="submit" name="returnbook" class="btn"><i class="icon return"></i> Return this item</button>
110 [% UNLESS ( renew ) %]
111 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
112 <input type="hidden" name="op" value="checkout" />
113 <input type="hidden" name="patronid" value="[% patronid %]" />
114 <input type="hidden" name="barcode" value="[% barcode %]" />
115 <input type="hidden" name="confirmed" value="1" />
116 <button type="submit" name="confirm" class="btn"><i class="icon renew"></i> Renew item</button>
119 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
120 <input type="hidden" name="op" value="checkout" />
121 <input type="hidden" name="patronid" value="[% patronid %]" />
122 <input type="hidden" name="barcode" value="[% barcode %]" />
123 <input type="hidden" name="confirmed" value="1" />
124 <button type="submit" class="btn"><i class="icon renew"></i> Renew item</button>
128 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
129 <input type="hidden" name="op" value="" />
130 <input type="hidden" name="patronid" value="[% patronid %]" />
131 <button type="submit" class="btn"><i class="icon cancel"></i> Cancel</button>
134 [% END # / IF confirm %]
136 [% IF ( nopermission ) %]
137 <!-- This is what is displayed if user doesnt have permission -->
139 <h3>Access denied</h3>
140 <p>Sorry, this self-checkout station has lost authentication. Please contact the administrator to resolve this problem.</p>
144 [% IF ( different_ip ) %]
145 <!-- This is what is displayed if user doesnt have permission -->
147 <h3>Session lost</h3>
148 <p>You are accessing self-checkout from a different IP address! please log in again.</p>
152 [% IF ( invalid_username_or_password ) %]
153 <!-- This is what is displayed if user doesnt have permission -->
155 <h3>Record not found</h3>
156 <p>Your userid was not found in the database. Please try again.</p>
161 [% UNLESS ( hide_main ) %]
163 [% IF ( patronid ) %]
164 [% IF ( validuser ) %]
165 <div class="alert alert-info">You are logged in as [% borrowername %].</div>
171 <p>The userid <strong>[% patronid %]</strong> was not found in the database. Please try again.</p>
174 [% END # / IF patronid %]
176 [% IF ( validuser ) %]
177 <div id="newcheckout" class="sco_entry">
178 <form id="scan_form" name="scan_form" method="post" action="/cgi-bin/koha/sco/sco-main.pl" onsubmit="return checkout_confirm('[% patronid %]');">
180 <legend>Check out[% IF ( AllowSelfCheckReturns ) %], return[% END %] or renew an item: </legend>
181 <div class="input-append">
182 <label for="barcode">Scan a new item or enter its barcode:</label>
183 <input id="barcode" name="barcode" size="20" type="text" class="focus" autocomplete="off" />
184 <button type="submit" class="btn">Submit</button>
186 <input type="hidden" name="op" value="checkout" />
187 <input type="hidden" name="patronid" value="[% patronid %]" />
192 <form method="post" action="#" id="logout_form">
193 <button type="submit" class="btn"><i class="icon finish"></i> Finish</button>
196 </div> <!-- / #newcheckout -->
197 </div> <!-- / .span12/12 -->
198 [% IF ( display_patron_image ) %]
200 <img src="/cgi-bin/koha/sco/sco-patron-image.pl?cardnumber=[% cardnumber %]" alt="" />
203 </div> <!-- / .row-fluid -->
204 </div> <!-- / .container-fluid -->
206 <div class="container-fluid">
207 <div class="row-fluid">
209 <div id="borrowerdetails">
210 [% IF ( issues_count ) %]
211 <table id="loanTable" class="table table-bordered table-striped">
212 <caption>Checkouts for [% borrowername %] <span class="count">([% issues_count %] total)</span></caption>
213 <!-- ISSUES TABLE ROWS -->
215 <tr><th class="anti-the">Title</th><th>Call no.</th><th class="title-string">Due</th><th class="nosort">Renew</th>[% UNLESS ( nofines ) %]<th>Fines</th>[% END %]</tr>
218 [% FOREACH ISSUE IN ISSUES %]
221 [% UNLESS ( noitemlinks ) %]
222 <a href="/cgi-bin/koha/opac-detail.pl?bib=[% ISSUE. biblionumber %]">[% ISSUE.title |html %]</a>
224 <strong>[% ISSUE.title |html %]</strong>
226 <span class="item-details">[% ISSUE.author %]</span>
227 ([% ISSUE.barcode %])
229 <td>[% ISSUE.itemcallnumber %]</td>
230 [% IF ( ISSUE.overdue ) %]
231 <td class="overdue"><span title="[% ISSUE.date_due %]">[% ISSUE.date_due | $KohaDates %]</span></td>
233 <td><span title="[% ISSUE.date_due %]">[% ISSUE.date_due | $KohaDates %]</span></td>
236 <form action="/cgi-bin/koha/sco/sco-main.pl" method="post">
237 <input type="hidden" name="patronid" value="[% patronid %]" />
238 <input type="hidden" name="barcode" value="[% ISSUE.barcode %]" />
239 [% IF ( ISSUE.norenew ) %]
240 [% IF ( AllowSelfCheckReturns ) %]
241 <input type="submit" value="Check in item" name="confirm" class="btn return" />
242 <input type="hidden" name="op" value="returnbook" />
243 <input type="hidden" name="confirmed" value="" />
245 <span>No renewals allowed</span>
248 <input type="hidden" name="op" value="checkout" />
249 <input type="hidden" name="confirmed" value="1" />
250 [% UNLESS ( ISSUE.renew ) %]
251 <input type="submit" value="Renew item" name="confirm " class="btn renew" />
253 <input type="submit" value="Renew item" class="btn renew" />
258 [% UNLESS ( nofines ) %]
260 [% IF ( ISSUE.charges ) %]Yes[% ELSE %]No[% END %]
264 [% END # / FOREACH ISSUE %]
268 <h3>You currently have nothing checked out.</h3>
269 [% END # / IF issues_count %]
270 </div> <!-- / #borrowerdetails -->
271 [% ELSE # IF validuser %]
272 <div class="sco_entry" >
273 <form id="mainform" action="/cgi-bin/koha/sco/sco-main.pl" name="mainform" method="post">
274 <fieldset class="checkout brief">
275 [% IF ( authbylogin ) %]
276 <legend>Log in to your account</legend>
277 <label for="patronlogin">Login:</label>
278 <input type="text" id="patronlogin" class="focus" size="20" name="patronlogin" />
279 <label for="patronpw">Password:</label>
280 <input type="password" id="patronpw" size="20" name="patronpw" />
281 <fieldset class="action">
282 <button type="submit" class="btn">Log in</button>
285 <div class="input-append">
286 <label for="patronid">Please enter your card number:</label>
287 <input type="text" id="patronid" class="focus" size="20" name="patronid" autocomplete="off" />
288 <button type="submit" class="btn">Submit</button>
290 [% END # / IF authbylogin %]
292 [% FOREACH INPUT IN INPUTS %]
293 <input type="hidden" name="[% INPUT.name |html %]" value="[% INPUT.value |html %]">
295 <input type="hidden" name="op" value="login" />
298 </div> <!-- / .sco_entry -->
299 [% END # / IF validuser %]
300 [% END # / UNLESS ( hide_main %]
302 </div> <!-- / .span12 -->
303 </div> <!-- / .row-fluid -->
304 </div> <!-- / .container-fluid -->
305 </div> <!-- / .main -->
307 [% INCLUDE 'opac-bottom.inc' %]
308 [% BLOCK jsinclude %]
309 [% INCLUDE 'datatables.inc' %]
310 <script type="text/javascript">
312 function mungeHistory() {
313 // prevent back button from allowing form resubmission
314 if (history && history.pushState) {
315 history.replaceState(null, document.title, window.location.href);
319 function sco_init() {
320 mainTimeout = setTimeout(function() {
321 location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
322 }, [% SelfCheckTimeout %]);
324 function dofocus() { // named function req'd for body onload event by some FF and IE7 security models
325 // alert("dofocus called");
326 $(".focus:last").select();
328 var slip_re = /slip/;
329 function printx_window(print_type) {
330 var handler = print_type.match(slip_re) ? "printslip" : "moremember";
334 function checkout_confirm(patronid) {
335 var barcode = $("#barcode").val();
336 // alert("checkout_confirm('" + patronid + "') called for barcode '" + barcode + "'");
337 if (! barcode) { dofocus(); return false; } // no barcode
338 if (barcode == "__KOHA_NEW_CIRC__") { // magic barcode
339 window.location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout';
345 $(document).ready(function() {
347 [% IF ( patronid ) %]sco_init();[% END %]
348 $("#loanTable").dataTable($.extend(true, {}, dataTablesDefaults, {
349 "aaSorting": [ [2, "desc"], [0, "asc"] ],
351 { "aTargets": [ "nosort" ],"bSortable": false,"bSearchable": false },
352 { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
353 { "sType": "title-string", "aTargets" : [ "title-string" ] }
357 $("#logout_form").submit(function(){
358 clearTimeout(mainTimeout);
359 if(confirm("Would you like to print a receipt?")){
360 window.open("/cgi-bin/koha/sco/printslip.pl?borrowernumber=[% borrowernumber %]&print=qslip");
368 [% IF ( opacuserjs ) %]<script type="text/javascript">[% opacuserjs %]</script>[% END %]
369 [% IF ( SCOUserJS ) %]<script type="text/javascript">[% SCOUserJS %]</script>[% END %]