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="[% themelang %]/includes/favicon.ico" type="image/x-icon" />
6 <script type="text/javascript" src="[% themelang %]/lib/jquery/jquery.js"></script>
7 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
8 <script type="text/javascript">//<![CDATA[
9 function sco_init(valid_session) {
10 if (valid_session == 1) {
11 setTimeout("location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout';",[% SelfCheckTimeout %]);
14 function dofocus() { // named function req'd for body onload event by some FF and IE7 security models
15 // alert("dofocus called");
16 $(".focus:last").select();
19 function checkout_confirm(patronid) {
20 var barcode = $("#barcode").val();
21 // alert("checkout_confirm('" + patronid + "') called for barcode '" + barcode + "'");
22 if (! barcode) { dofocus(); return false; } // no barcode
23 if (barcode == "__KOHA_NEW_CIRC__") { // magic barcode
24 window.location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout';
27 if (this.valid_session == 0) {
28 // probably should force logout like above ? --atz 6/09
29 if (confirm('Session has expired. Click \'OK\' to continue processing this item. Click Cancel if you are not ' + patronid)){
30 this.op.value='logout';
31 this.patronid.value='';
37 $.tablesorter.addParser({
39 is: function(s) {return false; },
40 format: function(s) { return s.toLowerCase().replace(/^(the|an|a) /,''); },
44 $(document).ready(function() {
45 [% IF ( patronid ) %] sco_init(1);
46 [% ELSIF ( timedout ) %] sco_init(1);
48 $("#loanTable").tablesorter({
49 [% IF ( dateformat_metric ) %]
53 sortList: [[2, 1], [0, 0]],
55 0: { sorter: 'articles' },
57 [% UNLESS ( nofines ) %], 4: { sorter: false }[% END %]
64 [% IF ( opacuserjs ) %]<script type="text/javascript">[% opacuserjs %]</script>[% END %]
67 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/sco.css" />
68 [% IF ( OPACUserCSS ) %]<style type="text/css">[% OPACUserCSS %]</style>[% END %]
71 <body onload="dofocus();">
73 <div id="doc" class="yui-t7">
75 <div id="masthead"><h1>[% LibraryName %] Self checkout system</h1></div>
78 [% IF ( impossible ) %]<!-- We tried to issue, but failed. -->
79 <div class="dialog alert"><h3>Item cannot be checked out.</h3><p>Sorry, This item cannot be checked out at this station. </p>
80 [% IF ( title ) %]<p>Title: <em>[% title |html %]</em> </p>[% END %]
82 [% IF ( circ_error_UNKNOWN_BARCODE ) %]
83 <em>MESSAGE 1:</em> The system does not recognize this barcode.
84 [% ELSIF ( circ_error_TOO_MANY ) %]
85 <em>MESSAGE 2:</em> You have borrowed too many items and can't check out any more.
86 [% ELSIF ( circ_error_ISSUED_TO_ANOTHER ) %]
87 <em>MESSAGE 3:</em> This item is checked out to someone else.
88 [% ELSIF ( circ_error_NO_MORE_RENEWALS ) %]
89 <em>MESSAGE 4:</em> You cannot renew this item again.
90 [% ELSIF ( circ_error_NOT_FOR_LOAN ) %]
91 <em>MESSAGE 5:</em> This item is not for loan.
92 [% ELSIF ( circ_error_DEBT ) %]
93 <em>MESSAGE 6:</em> You owe the library [% amount %] and cannot borrow.
94 [% ELSIF ( circ_error_WTHDRAWN ) %]
95 <em>MESSAGE 7:</em> This item has been withdrawn from the collection.
96 [% ELSIF ( circ_error_RESTRICTED ) %]
98 [% ELSIF ( circ_error_RESERVED ) %]
99 <em>MESSAGE 9:</em> This item is reserved for another patron.
100 [% ELSIF ( circ_error_ITEMNOTSAMEBRANCH ) %]
102 [% ELSIF ( circ_error_EXPIRED ) %]
103 <em>MESSAGE 11:</em> Your account has expired.
104 [% ELSIF ( circ_error_DEBARRED ) %]
105 <em>MESSAGE 12:</em> Your account has been suspended.
106 [% ELSIF ( circ_error_CARD_LOST ) %]
107 <em>MESSAGE 13:</em> This card has been declared lost.
108 [% ELSIF ( circ_error_GNA ) %]
110 [% ELSIF ( circ_error_INVALID_DATE ) %]
113 Please see a member of the library staff.
115 <form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" method="post">
116 <input type="hidden" name="op" value="login" />
117 <input type="hidden" name="patronid" value="[% patronid %]" />
118 [% IF ( returnitem ) %]
119 [% IF ( AllowSelfCheckReturns ) %]
120 <input type="hidden" name="barcode" value="[% barcode %]" />
121 <input type="button" name="returnbook" value="Return this item" class="return" onclick="this.form.op.value='returnbook';this.form.submit();" />
124 <input type="submit" name= "confirm" value="Return to Account Summary" class="back focus" />
127 [% IF ( confirm ) %]<!-- We need to confirm the issue.. -->
128 <div class="dialog alert"><h3>Please confirm the checkout:</h3>
129 <p>[% IF ( confirm_renew_issue ) %]This item is already checked out to you.[% END %]</p>
131 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" method="post">
132 <input type="hidden" name="op" value="checkout" />
133 <input type="hidden" name="patronid" value="[% patronid %]" />
134 <input type="hidden" name="barcode" value="[% barcode %]" />
135 <input type="hidden" name="confirmed" value="" />
137 [% IF ( AllowSelfCheckReturns ) %]
138 <input type="button" value="Return item" name="confirm" class="return" onclick="this.form.op.value='returnbook';this.form.submit();" />
141 [% UNLESS ( renew ) %]<input type="button" value="Renew item" name="confirm" class="renew" onclick="this.form.confirmed.value='1';this.form.submit();" />
142 [% ELSE %]<input type="button" value="Renew item" class="renew" onclick="this.form.confirmed.value='1';this.form.submit();" />[% END %]
143 <input type="button" value="Cancel" class="cancel" onclick="this.form.op.value='';this.form.submit();return true;" />
148 [% IF ( nopermission ) %]<!-- This is what is displayed if user doesnt have permission --><div class="dialog alert"><h3>Access denied</h3>
149 Sorry, this self-checkout station has lost authentication. Please contact the administrator to resolve this problem. </div>
151 [% IF ( timed_out ) %]<!-- This is what is displayed if login has timed out -->
152 <div class="dialog alert"><h3>Session timed out</h3>Sorry, your session has timed out, please log in again.</div>[% END %]
153 [% IF ( different_ip ) %]<!-- This is what is displayed if user doesnt have permission --><div class="dialog alert"><h3>Session lost</h3>You are accessing self-checkout from a different IP address! please log in again.</div>[% END %]
154 [% IF ( invalid_username_or_password ) %]
155 <!-- This is what is displayed if user doesnt have permission --><div class="dialog alert"><h3>Record not found</h3><p>Your userid was not found in the database. Please try again.</p></div>[% END %]
158 [% UNLESS ( hide_main ) %]
159 <div class="sco_head">
160 [% UNLESS ( validuser ) %]
161 <h3>Self checkout</h3>
164 <div id="checkouthelp">
165 <a href="/cgi-bin/koha/sco/help.pl">HELP</a> with the self checkout system
168 [% IF ( patronid ) %]
169 [% IF ( validuser ) %]
170 <h3 class="warning">You are logged in as [% borrowername %].</h3>
174 <div class="dialog alert"><h4>Sorry</h4><p>The userid <strong>[% patronid %]</strong> was not found in the database. Please try again.</p></div>
179 [% IF ( timedout ) %]
180 <div class="dialog message"><h4>Sorry</h4><p>Your session has timed out due to inactivity. Please sign in.</p></div>
183 [% IF ( validuser ) %]
184 [% IF ( display_patron_image ) %]<div class="yui-ge"><div class="yui-u first">[% END %]
185 <div id="newcheckout" class="sco_entry">
186 <form id="scan_form" name="scan_form" method="post" action="/cgi-bin/koha/sco/sco-main.pl" onsubmit="return checkout_confirm('[% patronid %]');">
187 <fieldset><legend> Check out[% IF ( AllowSelfCheckReturns ) %], return[% END %] or renew an item: </legend>
188 <label for="barcode">Scan a new item or enter its barcode:</label>
189 <input id="barcode" name="barcode" size="20" class="focus" />
190 <input type="hidden" name="op" value="checkout" />
191 <input type="hidden" name="patronid" value="[% patronid %]" />
192 <input type="hidden" name="valid_session" value="1" />
193 <input type="submit" value="Submit" class="submit" /></fieldset>
195 <div><form method="post" action="/cgi-bin/koha/sco/sco-main.pl?op=logout" ><input type="submit" value="Finish" class="finish" /></form></div>
196 </div> <!-- sco_entry --> <!-- newcheckout -->
197 [% IF ( display_patron_image ) %]</div> <!-- /yui-u first -->[% END %]
198 [% IF ( display_patron_image ) %]
200 <img src="/cgi-bin/koha/sco/sco-patron-image.pl?cardnumber=[% cardnumber %]" alt="" />
203 </div> <!-- /yui-ge -->
205 <div id="borrowerdetails">
206 [% IF ( issues_count ) %]
207 <table id="loanTable"><caption>Checkouts for [% borrowername %] <span class="count">([% issues_count %] total)</span></caption>
208 <!-- ISSUES TABLE ROWS -->
210 <tr><th>Title</th><th>Call no.</th><th>Due</th><th>Renew</th>[% UNLESS ( nofines ) %]<th>Fines</th>[% END %]</tr>
214 [% FOREACH ISSUE IN ISSUES %]
215 [% UNLESS ( loop.odd ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
216 <!-- FIXME: yet another jacket image breakpoint -->
217 <td>[% UNLESS ( ISSUE.noitemlinks ) %]<a href="/cgi-bin/koha/opac-detail.pl?bib=[% ISSUE.biblionumber %]">[% ISSUE.title |html %]</a>[% ELSE %]<strong>[% ISSUE.title |html %]</strong>[% END %]<span class="item-details">
218 [% ISSUE.author %]</span> ([% ISSUE.barcode %])</td>
219 <td>[% ISSUE.itemcallnumber %]</td>
220 [% IF ( ISSUE.overdue ) %]<td class="overdue">[% ISSUE.date_due | $KohaDates %]</td>[% ELSE %]<td>[% ISSUE.date_due | $KohaDates %]</td>[% END %]
222 <form action="/cgi-bin/koha/sco/sco-main.pl" method="post">
223 <input type="hidden" name="op" value="checkout" />
224 <input type="hidden" name="patronid" value="[% patronid %]" />
225 <input type="hidden" name="barcode" value="[% ISSUE.barcode %]" />
226 <input type="hidden" name="confirmed" value="" />
227 [% IF ( ISSUE.norenew ) %]
228 [% IF ( ISSUE.AllowSelfCheckReturns ) %]
229 <input type="button" value="Return Item" name="confirm" class="return" onclick="this.form.op.value='returnbook';this.form.submit();" />
231 <span>No renewals allowed</span>
234 [% UNLESS ( ISSUE.renew ) %]<input type="button" value="Renew Item" name="confirm" class="renew" onclick="this.form.confirmed.value='1';this.form.submit();" />
235 [% ELSE %]<input type="button" value="Renew Item" class="renew" onclick="this.form.confirmed.value='1';this.form.submit();" />[% END %]
239 [% UNLESS ( nofines ) %]<td>[% IF ( ISSUE.charges ) %]Yes[% ELSE %]No[% END %]</td>[% END %]</tr>
245 <h3>You currently have nothing checked out.</h3>
247 </div> <!-- /yui-g -->
248 [% ELSE %]<!-- not validuser -->
249 <div class="sco_entry" >
250 <form id="mainform" action="/cgi-bin/koha/sco/sco-main.pl" name="mainform" method="post">
251 [% IF ( authbylogin ) %]
252 <fieldset class="checkout">
253 <legend>Please login with your username and password</legend>
254 <label for="patronlogin">Username:</label>
255 <input type="text" id="patronlogin" class="focus" size="20" name="patronlogin" />
256 <label for="patronpw">Password:</label>
257 <input type="password" id="patronpw" size="20" name="patronpw" />
259 <fieldset class="checkout"><label for="patronid">Please enter your card number:</label>
260 <input type="text" id="patronid" class="focus" size="20" name="patronid" />
263 [% FOREACH INPUT IN INPUTS %]<input type="hidden" name="[% INPUT.name |html %]" value="[% INPUT.value |html %]">[% END %]
264 <input type="hidden" name="op" value="login" />
265 <input type="submit" value="Submit" class="submit" /></fieldset></form>
268 [% END %] <!-- ( / hide main) -->
272 [% INCLUDE 'opac-bottom.inc' %]