3 [% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha [% END %] › Self checkout </title>
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5 <meta name="generator" content="Koha [% Version %]" /> <!-- leave this for stats -->
6 <link rel="shortcut icon" href="[% IF ( OpacFavicon ) %][% OpacFavicon %][% ELSE %][% interface %]/[% theme %]/images/favicon.ico[% END %]" type="image/x-icon" />
7 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/lib/bootstrap/css/bootstrap.min.css" />
8 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/lib/jquery/jquery-ui.css" />
9 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/sco.css" />
10 [% IF ( OPACUserCSS ) %]<style type="text/css">[% OPACUserCSS %]</style>[% END %]
11 [% IF ( SCOUserCSS ) %]<style type="text/css">[% SCOUserCSS %]</style>[% END %]
13 <script src="[% interface %]/[% theme %]/lib/respond.min.js"></script>
15 <script type="text/javascript">
16 function _(s) { return s } // dummy function for gettext
18 <script type="text/javascript" src="[% interface %]/[% theme %]/lib/modernizr.min.js"></script>
20 <body onload="dofocus();" onunload="mungeHistory();">
21 [% INCLUDE 'masthead-sco.inc' %]
24 <div class="container-fluid">
25 <div class="row-fluid">
26 [% IF ( display_patron_image ) %]
32 <div id="masthead"><h1>[% LibraryName %] Self checkout system</h1></div>
34 [% IF ( impossible ) %]<!-- We tried to issue, but failed. -->
36 <h3>Item cannot be checked out.</h3>
37 <p>Sorry, this item cannot be checked out at this station.</p>
39 <p>Title: <em>[% title |html %]</em> </p>
43 [% IF ( circ_error_UNKNOWN_BARCODE ) %]
44 <em>MESSAGE 1:</em> The system does not recognize this barcode.
45 [% ELSIF ( circ_error_max_loans_allowed ) %]
46 <em>MESSAGE 2:</em> You have checked out too many items and can't check out any more.
47 [% ELSIF ( circ_error_ISSUED_TO_ANOTHER ) %]
48 <em>MESSAGE 3:</em> This item is checked out to someone else.
49 [% ELSIF ( circ_error_NO_MORE_RENEWALS ) %]
50 <em>MESSAGE 4:</em> You cannot renew this item again.
51 [% ELSIF ( circ_error_NOT_FOR_LOAN ) %]
52 <em>MESSAGE 5:</em> This item is not for loan.
53 [% ELSIF ( circ_error_DEBT ) %]
54 <em>MESSAGE 6:</em> You owe the library [% amount %] and cannot check out.
55 [% ELSIF ( circ_error_WTHDRAWN ) %]
56 <em>MESSAGE 7:</em> This item has been withdrawn from the collection.
57 [% ELSIF ( circ_error_RESTRICTED ) %]
59 [% ELSIF ( circ_error_RESERVED ) %]
60 <em>MESSAGE 9:</em> This item is on hold for another patron.
61 [% ELSIF ( circ_error_ITEMNOTSAMEBRANCH ) %]
63 [% ELSIF ( circ_error_EXPIRED ) %]
64 <em>MESSAGE 11:</em> Your account has expired.
65 [% ELSIF ( circ_error_DEBARRED ) %]
66 <em>MESSAGE 12:</em> Your account has been suspended.
67 [% ELSIF ( circ_error_CARD_LOST ) %]
68 <em>MESSAGE 13:</em> This card has been declared lost.
69 [% ELSIF ( circ_error_GNA ) %]
71 [% ELSIF ( circ_error_INVALID_DATE ) %]
73 [% END # / IF circ_error_UNKNOWN_BARCODE %]
74 Please see a member of the library staff.
77 [% IF ( returnitem && AllowSelfCheckReturns ) %]
78 <form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="post">
79 <input type="hidden" name="op" value="returnbook" />
80 <input type="hidden" name="patronid" value="[% patronid %]" />
81 <input type="hidden" name="barcode" value="[% barcode %]" />
82 <button type="submit" name="returnbook" class="btn"><i class="return"></i> Return this item</button>
86 <form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="post">
87 <input type="hidden" name="op" value="" />
88 <input type="hidden" name="patronid" value="[% patronid %]" />
89 <input type="hidden" name="barcode" value="[% barcode %]" />
90 <input type="submit" name= "confirm" value="Return to account summary" class="btn back focus" />
92 </div> <!-- / .alert -->
93 [% END # / IF ( impossible %]
95 [% IF ( confirm ) %]<!-- We need to confirm the issue.. -->
96 <div class="alert"><h3>Please confirm the checkout:</h3>
97 [% IF ( confirm_renew_issue ) %]
98 <p>This item is already checked out to you.</p>
101 [% IF ( renew && AllowSelfCheckReturns ) %]
102 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
103 <input type="hidden" name="op" value="returnbook" />
104 <input type="hidden" name="patronid" value="[% patronid %]" />
105 <input type="hidden" name="barcode" value="[% barcode %]" />
106 <input type="hidden" name="confirmed" value="" />
107 <button type="submit" name="returnbook" class="btn"><i class="icon return"></i> Return this item</button>
111 [% UNLESS ( renew ) %]
112 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
113 <input type="hidden" name="op" value="checkout" />
114 <input type="hidden" name="patronid" value="[% patronid %]" />
115 <input type="hidden" name="barcode" value="[% barcode %]" />
116 <input type="hidden" name="confirmed" value="1" />
117 <button type="submit" name="confirm" class="btn"><i class="icon renew"></i> Renew item</button>
120 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
121 <input type="hidden" name="op" value="checkout" />
122 <input type="hidden" name="patronid" value="[% patronid %]" />
123 <input type="hidden" name="barcode" value="[% barcode %]" />
124 <input type="hidden" name="confirmed" value="1" />
125 <button type="submit" class="btn"><i class="icon renew"></i> Renew item</button>
129 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
130 <input type="hidden" name="op" value="" />
131 <input type="hidden" name="patronid" value="[% patronid %]" />
132 <button type="submit" class="btn"><i class="icon cancel"></i> Cancel</button>
135 [% END # / IF confirm %]
137 [% IF ( nopermission ) %]
138 <!-- This is what is displayed if user doesnt have permission -->
140 <h3>Access denied</h3>
141 <p>Sorry, this self-checkout station has lost authentication. Please contact the administrator to resolve this problem.</p>
145 [% IF ( different_ip ) %]
146 <!-- This is what is displayed if user doesnt have permission -->
148 <h3>Session lost</h3>
149 <p>You are accessing self-checkout from a different IP address! please log in again.</p>
153 [% IF ( invalid_username_or_password ) %]
154 <!-- This is what is displayed if user doesnt have permission -->
156 <h3>Record not found</h3>
157 <p>Your userid was not found in the database. Please try again.</p>
162 [% UNLESS ( hide_main ) %]
164 [% IF ( patronid ) %]
165 [% IF ( validuser ) %]
166 <div class="alert alert-info">You are logged in as [% borrowername %].</div>
172 <p>The userid <strong>[% patronid %]</strong> was not found in the database. Please try again.</p>
175 [% END # / IF patronid %]
177 [% IF ( validuser ) %]
178 <div id="newcheckout" class="sco_entry">
179 <form id="scan_form" name="scan_form" method="post" action="/cgi-bin/koha/sco/sco-main.pl" onsubmit="return checkout_confirm('[% patronid %]');">
181 <legend>Check out[% IF ( AllowSelfCheckReturns ) %], return[% END %] or renew an item: </legend>
182 <div class="input-append">
183 <label for="barcode">Scan a new item or enter its barcode:</label>
184 <input id="barcode" name="barcode" size="20" type="text" class="focus" autocomplete="off" />
185 <button type="submit" class="btn">Submit</button>
187 <input type="hidden" name="op" value="checkout" />
188 <input type="hidden" name="patronid" value="[% patronid %]" />
193 <form method="post" action="#" id="logout_form">
194 <button type="submit" class="btn"><i class="icon finish"></i> Finish</button>
197 </div> <!-- / #newcheckout -->
198 </div> <!-- / .span12/12 -->
199 [% IF ( display_patron_image ) %]
201 <img src="/cgi-bin/koha/sco/sco-patron-image.pl?borrowernumber=[% borrowernumber %]" alt="" />
204 </div> <!-- / .row-fluid -->
205 </div> <!-- / .container-fluid -->
207 <div class="container-fluid">
208 <div class="row-fluid">
210 <div id="borrowerdetails">
211 [% IF ( issues_count ) %]
212 <table id="loanTable" class="table table-bordered table-striped">
213 <caption>Checkouts for [% borrowername %] <span class="count">([% issues_count %] total)</span></caption>
214 <!-- ISSUES TABLE ROWS -->
216 <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>
219 [% FOREACH ISSUE IN ISSUES %]
222 [% UNLESS ( noitemlinks ) %]
223 <a href="/cgi-bin/koha/opac-detail.pl?bib=[% ISSUE. biblionumber %]">[% ISSUE.title |html %]</a>
225 <strong>[% ISSUE.title |html %]</strong>
227 <span class="item-details">[% ISSUE.author %]</span>
228 ([% ISSUE.barcode %])
230 <td>[% ISSUE.itemcallnumber %]</td>
231 [% IF ( ISSUE.overdue ) %]
232 <td class="overdue"><span title="[% ISSUE.date_due %]">[% ISSUE.date_due | $KohaDates as_due_date => 1 %]</span></td>
234 <td><span title="[% ISSUE.date_due %]">[% ISSUE.date_due | $KohaDates as_due_date => 1 %]</span></td>
237 <form action="/cgi-bin/koha/sco/sco-main.pl" method="post">
238 <input type="hidden" name="patronid" value="[% patronid %]" />
239 <input type="hidden" name="barcode" value="[% ISSUE.barcode %]" />
240 [% IF ( ISSUE.norenew ) %]
241 [% IF ( AllowSelfCheckReturns ) %]
242 <input type="submit" value="Check in item" name="confirm" class="btn return" />
243 <input type="hidden" name="op" value="returnbook" />
244 <input type="hidden" name="confirmed" value="" />
246 <span>No renewals allowed</span>
249 <input type="hidden" name="op" value="checkout" />
250 <input type="hidden" name="confirmed" value="1" />
251 [% UNLESS ( ISSUE.renew ) %]
252 <input type="submit" value="Renew item" name="confirm " class="btn renew" />
254 <input type="submit" value="Renew item" class="btn renew" />
259 [% UNLESS ( nofines ) %]
261 [% IF ( ISSUE.charges ) %]Yes[% ELSE %]No[% END %]
265 [% END # / FOREACH ISSUE %]
269 <h3>You currently have nothing checked out.</h3>
270 [% END # / IF issues_count %]
271 </div> <!-- / #borrowerdetails -->
272 [% ELSE # IF validuser %]
273 <div class="sco_entry" >
274 <form id="mainform" action="/cgi-bin/koha/sco/sco-main.pl" name="mainform" method="post">
275 <fieldset class="checkout brief">
276 [% IF ( authbylogin ) %]
277 <legend>Log in to your account</legend>
278 <label for="patronlogin">Login:</label>
279 <input type="text" id="patronlogin" class="focus" size="20" name="patronlogin" />
280 <label for="patronpw">Password:</label>
281 <input type="password" id="patronpw" size="20" name="patronpw" />
282 <fieldset class="action">
283 <button type="submit" class="btn">Log in</button>
286 <div class="input-append">
287 <label for="patronid">Please enter your card number:</label>
288 <input type="text" id="patronid" class="focus" size="20" name="patronid" autocomplete="off" />
289 <button type="submit" class="btn">Submit</button>
291 [% END # / IF authbylogin %]
293 [% FOREACH INPUT IN INPUTS %]
294 <input type="hidden" name="[% INPUT.name |html %]" value="[% INPUT.value |html %]">
296 <input type="hidden" name="op" value="login" />
299 </div> <!-- / .sco_entry -->
300 [% END # / IF validuser %]
301 [% END # / UNLESS ( hide_main %]
303 </div> <!-- / .span12 -->
304 </div> <!-- / .row-fluid -->
305 </div> <!-- / .container-fluid -->
306 </div> <!-- / .main -->
308 [% INCLUDE 'opac-bottom.inc' %]
309 [% BLOCK jsinclude %]
310 [% INCLUDE 'datatables.inc' %]
311 <script type="text/javascript">
313 function mungeHistory() {
314 // prevent back button from allowing form resubmission
315 if (history && history.pushState) {
316 history.replaceState(null, document.title, window.location.href);
320 function sco_init() {
321 mainTimeout = setTimeout(function() {
322 location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
323 }, [% SelfCheckTimeout %]);
325 function dofocus() { // named function req'd for body onload event by some FF and IE7 security models
326 // alert("dofocus called");
327 $(".focus:last").select();
329 var slip_re = /slip/;
330 function printx_window(print_type) {
331 var handler = print_type.match(slip_re) ? "printslip" : "moremember";
335 function checkout_confirm(patronid) {
336 var barcode = $("#barcode").val();
337 // alert("checkout_confirm('" + patronid + "') called for barcode '" + barcode + "'");
338 if (! barcode) { dofocus(); return false; } // no barcode
339 if (barcode == "__KOHA_NEW_CIRC__") { // magic barcode
340 window.location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout';
346 $(document).ready(function() {
348 [% IF ( patronid ) %]sco_init();[% END %]
349 $("#loanTable").dataTable($.extend(true, {}, dataTablesDefaults, {
350 "aaSorting": [ [2, "desc"], [0, "asc"] ],
352 { "aTargets": [ "nosort" ],"bSortable": false,"bSearchable": false },
353 { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
354 { "sType": "title-string", "aTargets" : [ "title-string" ] }
358 $("#logout_form").submit(function(){
359 clearTimeout(mainTimeout);
360 [% IF Koha.Preference('SelfCheckReceiptPrompt') %]
361 if(confirm(_("Would you like to print a receipt?"))){
362 window.open("/cgi-bin/koha/sco/printslip.pl?borrowernumber=[% borrowernumber %]&print=qslip");
372 [% IF ( SCOUserJS ) %]<script type="text/javascript">[% SCOUserJS %]</script>[% END %]