3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha [% END %] › Self checkout </title>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6 <meta name="generator" content="Koha [% Version %]" /> <!-- leave this for stats -->
7 <link rel="shortcut icon" href="[% IF ( OpacFavicon ) %][% OpacFavicon %][% ELSE %][% interface %]/[% theme %]/images/favicon.ico[% END %]" type="image/x-icon" />
8 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/lib/bootstrap/css/bootstrap.min.css" />
9 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/lib/jquery/jquery-ui.css" />
10 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/sco.css" />
11 [% IF ( OPACUserCSS ) %]<style type="text/css">[% OPACUserCSS %]</style>[% END %]
12 [% IF ( SCOUserCSS ) %]<style type="text/css">[% SCOUserCSS %]</style>[% END %]
14 <script src="[% interface %]/[% theme %]/lib/respond.min.js"></script>
16 <script type="text/javascript">
17 function _(s) { return s } // dummy function for gettext
19 <script type="text/javascript" src="[% interface %]/[% theme %]/lib/modernizr.min.js"></script>
21 <body id="sco_main" class="sco" onload="dofocus();" onunload="mungeHistory();">
22 [% INCLUDE 'masthead-sco.inc' %]
25 <div class="container-fluid">
26 <div class="row-fluid">
27 [% IF ( display_patron_image ) %]
33 <div id="masthead"><h1>[% LibraryName %] Self checkout system</h1></div>
35 [% IF ( impossible ) %]<!-- We tried to issue, but failed. -->
37 <h3>Item cannot be checked out.</h3>
38 <p>Sorry, this item cannot be checked out at this station.</p>
40 <p>Title: <em>[% title |html %]</em> </p>
44 [% IF ( circ_error_UNKNOWN_BARCODE ) %]
45 <em>MESSAGE 1:</em> The system does not recognize this barcode.
46 [% ELSIF ( circ_error_max_loans_allowed ) %]
47 <em>MESSAGE 2:</em> You have checked out too many items and can't check out any more.
48 [% ELSIF ( circ_error_ISSUED_TO_ANOTHER ) %]
49 <em>MESSAGE 3:</em> This item is checked out to someone else.
50 [% ELSIF ( circ_error_NO_MORE_RENEWALS ) %]
51 <em>MESSAGE 4:</em> You cannot renew this item again.
52 [% ELSIF ( circ_error_NOT_FOR_LOAN ) %]
53 <em>MESSAGE 5:</em> This item is not for loan.
54 [% ELSIF ( circ_error_DEBT ) %]
55 <em>MESSAGE 6:</em> You owe the library [% amount %] and cannot check out.
56 [% ELSIF ( circ_error_WTHDRAWN ) %]
57 <em>MESSAGE 7:</em> This item has been withdrawn from the collection.
58 [% ELSIF ( circ_error_RESTRICTED ) %]
60 [% ELSIF ( circ_error_RESERVED ) %]
61 <em>MESSAGE 9:</em> This item is on hold for another patron.
62 [% ELSIF ( circ_error_ITEMNOTSAMEBRANCH ) %]
64 [% ELSIF ( circ_error_EXPIRED ) %]
65 <em>MESSAGE 11:</em> Your account has expired.
66 [% ELSIF ( circ_error_DEBARRED ) %]
67 <em>MESSAGE 12:</em> Your account has been suspended.
68 [% ELSIF ( circ_error_CARD_LOST ) %]
69 <em>MESSAGE 13:</em> This card has been declared lost.
70 [% ELSIF ( circ_error_GNA ) %]
72 [% ELSIF ( circ_error_INVALID_DATE ) %]
74 [% END # / IF circ_error_UNKNOWN_BARCODE %]
75 Please see a member of the library staff.
78 [% IF ( returnitem && AllowSelfCheckReturns ) %]
79 <form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="post">
80 <input type="hidden" name="op" value="returnbook" />
81 <input type="hidden" name="patronid" value="[% patronid %]" />
82 <input type="hidden" name="barcode" value="[% barcode %]" />
83 <button type="submit" name="returnbook" class="btn"><i class="return"></i> Return this item</button>
87 <form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" class="inline" method="post">
88 <input type="hidden" name="op" value="" />
89 <input type="hidden" name="patronid" value="[% patronid %]" />
90 <input type="hidden" name="barcode" value="[% barcode %]" />
91 <input type="submit" name= "confirm" value="Return to account summary" class="btn back focus" />
93 </div> <!-- / .alert -->
94 [% END # / IF ( impossible %]
96 [% IF ( confirm ) %]<!-- We need to confirm the issue.. -->
97 <div class="alert"><h3>Please confirm the checkout:</h3>
98 [% IF ( confirm_renew_issue ) %]
99 <p>This item is already checked out to you.</p>
102 [% IF ( renew && AllowSelfCheckReturns ) %]
103 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
104 <input type="hidden" name="op" value="returnbook" />
105 <input type="hidden" name="patronid" value="[% patronid %]" />
106 <input type="hidden" name="barcode" value="[% barcode %]" />
107 <input type="hidden" name="confirmed" value="" />
108 <button type="submit" name="returnbook" class="btn"><i class="icon return"></i> Return this item</button>
112 [% UNLESS ( renew ) %]
113 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
114 <input type="hidden" name="op" value="checkout" />
115 <input type="hidden" name="patronid" value="[% patronid %]" />
116 <input type="hidden" name="barcode" value="[% barcode %]" />
117 <input type="hidden" name="confirmed" value="1" />
118 <button type="submit" name="confirm" class="btn"><i class="icon renew"></i> Renew item</button>
121 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
122 <input type="hidden" name="op" value="checkout" />
123 <input type="hidden" name="patronid" value="[% patronid %]" />
124 <input type="hidden" name="barcode" value="[% barcode %]" />
125 <input type="hidden" name="confirmed" value="1" />
126 <button type="submit" class="btn"><i class="icon renew"></i> Renew item</button>
130 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" class="inline" method="post">
131 <input type="hidden" name="op" value="" />
132 <input type="hidden" name="patronid" value="[% patronid %]" />
133 <button type="submit" class="btn"><i class="icon cancel"></i> Cancel</button>
136 [% END # / IF confirm %]
138 [% IF ( nopermission ) %]
139 <!-- This is what is displayed if user doesnt have permission -->
141 <h3>Access denied</h3>
142 <p>Sorry, this self-checkout station has lost authentication. Please contact the administrator to resolve this problem.</p>
146 [% IF ( different_ip ) %]
147 <!-- This is what is displayed if user doesnt have permission -->
149 <h3>Session lost</h3>
150 <p>You are accessing self-checkout from a different IP address! please log in again.</p>
154 [% IF ( invalid_username_or_password ) %]
155 <!-- This is what is displayed if user doesnt have permission -->
157 <h3>Record not found</h3>
158 <p>Your userid was not found in the database. Please try again.</p>
163 [% UNLESS ( hide_main ) %]
165 [% IF ( patronid ) %]
166 [% IF ( validuser ) %]
167 <div class="alert alert-info">You are logged in as [% borrowername %].</div>
173 <p>The userid <strong>[% patronid %]</strong> was not found in the database. Please try again.</p>
176 [% END # / IF patronid %]
178 [% IF ( validuser ) %]
179 <div id="newcheckout" class="sco_entry">
180 <form id="scan_form" name="scan_form" method="post" action="/cgi-bin/koha/sco/sco-main.pl" onsubmit="return checkout_confirm('[% patronid %]');">
182 <legend>Check out[% IF ( AllowSelfCheckReturns ) %], return[% END %] or renew an item: </legend>
183 <div class="input-append">
184 <label for="barcode">Scan a new item or enter its barcode:</label>
185 <input id="barcode" name="barcode" size="20" type="text" class="focus" autocomplete="off" />
186 <button type="submit" class="btn">Submit</button>
188 <input type="hidden" name="op" value="checkout" />
189 <input type="hidden" name="patronid" value="[% patronid %]" />
194 <form method="post" action="#" id="logout_form">
195 <button type="submit" class="btn"><i class="icon finish"></i> Finish</button>
198 </div> <!-- / #newcheckout -->
199 </div> <!-- / .span12/12 -->
200 [% IF ( display_patron_image ) %]
202 <img src="/cgi-bin/koha/sco/sco-patron-image.pl?borrowernumber=[% borrowernumber %]" alt="" />
205 </div> <!-- / .row-fluid -->
206 </div> <!-- / .container-fluid -->
208 <div class="container-fluid">
209 <div class="row-fluid">
211 <div id="borrowerdetails">
212 [% IF ( issues_count ) %]
213 <table id="loanTable" class="table table-bordered table-striped">
214 <caption>Checkouts for [% borrowername %] <span class="count">([% issues_count %] total)</span></caption>
215 <!-- ISSUES TABLE ROWS -->
218 <th class="no-show">Checked out on</th>
219 <th class="anti-the">Title</th>
221 <th class="title-string">Due</th>
222 <th class="nosort">Renew</th>
223 [% UNLESS ( nofines ) %]
229 [% FOREACH ISSUE IN ISSUES %]
231 <td>[% ISSUE.issuedate %]</td>
233 [% UNLESS ( noitemlinks ) %]
234 <a href="/cgi-bin/koha/opac-detail.pl?bib=[% ISSUE. biblionumber %]">[% ISSUE.title |html %]</a>
236 <strong>[% ISSUE.title |html %]</strong>
238 <span class="item-details">[% ISSUE.author %]</span>
239 ([% ISSUE.barcode %])
241 <td>[% ISSUE.itemcallnumber %]</td>
242 [% IF ( ISSUE.overdue ) %]
243 <td class="overdue"><span title="[% ISSUE.date_due %]">[% ISSUE.date_due | $KohaDates as_due_date => 1 %]</span></td>
245 <td><span title="[% ISSUE.date_due %]">[% ISSUE.date_due | $KohaDates as_due_date => 1 %]</span></td>
248 <form action="/cgi-bin/koha/sco/sco-main.pl" method="post">
249 <input type="hidden" name="patronid" value="[% patronid %]" />
250 <input type="hidden" name="barcode" value="[% ISSUE.barcode %]" />
251 [% IF ( ISSUE.norenew ) %]
252 [% IF ( AllowSelfCheckReturns ) %]
253 <input type="submit" value="Check in item" name="confirm" class="btn return" />
254 <input type="hidden" name="op" value="returnbook" />
255 <input type="hidden" name="confirmed" value="" />
257 <span>No renewals allowed</span>
260 <input type="hidden" name="op" value="checkout" />
261 <input type="hidden" name="confirmed" value="1" />
262 [% UNLESS ( ISSUE.renew ) %]
263 <input type="submit" value="Renew item" name="confirm " class="btn renew" />
265 <input type="submit" value="Renew item" class="btn renew" />
270 [% UNLESS ( nofines ) %]
272 [% IF ( ISSUE.charges ) %]Yes[% ELSE %]No[% END %]
276 [% END # / FOREACH ISSUE %]
280 <h3>You currently have nothing checked out.</h3>
281 [% END # / IF issues_count %]
282 </div> <!-- / #borrowerdetails -->
283 [% ELSE # IF validuser %]
284 <div class="sco_entry" >
285 <form id="mainform" action="/cgi-bin/koha/sco/sco-main.pl" name="mainform" method="post">
286 <fieldset class="checkout brief">
287 [% IF ( authbylogin ) %]
288 <legend>Log in to your account</legend>
289 <label for="patronlogin">Login:</label>
290 <input type="text" id="patronlogin" class="focus" size="20" name="patronlogin" />
291 <label for="patronpw">Password:</label>
292 <input type="password" id="patronpw" size="20" name="patronpw" />
293 <fieldset class="action">
294 <button type="submit" class="btn">Log in</button>
297 <div class="input-append">
298 <label for="patronid">Please enter your card number:</label>
299 <input type="text" id="patronid" class="focus" size="20" name="patronid" autocomplete="off" />
300 <button type="submit" class="btn">Submit</button>
302 [% END # / IF authbylogin %]
304 [% FOREACH INPUT IN INPUTS %]
305 <input type="hidden" name="[% INPUT.name |html %]" value="[% INPUT.value |html %]">
307 <input type="hidden" name="op" value="login" />
310 </div> <!-- / .sco_entry -->
311 [% END # / IF validuser %]
312 [% END # / UNLESS ( hide_main %]
314 </div> <!-- / .span12 -->
315 </div> <!-- / .row-fluid -->
316 </div> <!-- / .container-fluid -->
317 </div> <!-- / .main -->
319 [% INCLUDE 'opac-bottom.inc' %]
320 [% BLOCK jsinclude %]
321 [% INCLUDE 'datatables.inc' %]
322 <script type="text/javascript">
324 function mungeHistory() {
325 // prevent back button from allowing form resubmission
326 if (history && history.pushState) {
327 history.replaceState(null, document.title, window.location.href);
331 function sco_init() {
332 mainTimeout = setTimeout(function() {
333 location.href = '/cgi-bin/koha/sco/sco-main.pl?op=logout';
334 }, [% SelfCheckTimeout %]);
336 function dofocus() { // named function req'd for body onload event by some FF and IE7 security models
337 // alert("dofocus called");
338 $(".focus:last").select();
340 var slip_re = /slip/;
341 function printx_window(print_type) {
342 var handler = print_type.match(slip_re) ? "printslip" : "moremember";
346 function checkout_confirm(patronid) {
347 var barcode = $("#barcode").val();
348 // alert("checkout_confirm('" + patronid + "') called for barcode '" + barcode + "'");
349 if (! barcode) { dofocus(); return false; } // no barcode
350 if (barcode == "__KOHA_NEW_CIRC__") { // magic barcode
351 window.location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout';
357 $(document).ready(function() {
359 [% IF ( patronid ) %]sco_init();[% END %]
360 $("#loanTable").dataTable($.extend(true, {}, dataTablesDefaults, {
363 { "aTargets": [ "nosort" ], "bSortable": false, "bSearchable": false },
364 { "aTargets": [ "no-show" ], "bVisible": false, "bSearchable": false },
365 { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
366 { "sType": "title-string", "aTargets" : [ "title-string" ] }
370 $("#logout_form").submit(function(){
371 clearTimeout(mainTimeout);
372 [% IF Koha.Preference('SelfCheckReceiptPrompt') %]
373 if(confirm(_("Would you like to print a receipt?"))){
374 window.open("/cgi-bin/koha/sco/printslip.pl?borrowernumber=[% borrowernumber %]&print=qslip");
384 [% IF ( SCOUserJS ) %]<script type="text/javascript">[% SCOUserJS %]</script>[% END %]