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" />
7 <script type="text/javascript" src="[% yuipath %]/utilities/utilities.js"></script>
8 <script type="text/javascript" src="[% yuipath %]/container/container-min.js"></script>
9 <script type="text/javascript" src="[% yuipath %]/menu/menu-min.js"></script>
10 <script type="text/javascript" src="[% themelang %]/lib/jquery/jquery.js"></script>
11 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
12 <script type="text/javascript">//<![CDATA[
13 function sco_init(valid_session) {
14 if (valid_session == 1) {
15 setTimeout("location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout';",[% SelfCheckTimeout %]);
18 function dofocus() { // named function req'd for body onload event by some FF and IE7 security models
19 // alert("dofocus called");
20 $(".focus:last").select();
23 function checkout_confirm(patronid) {
24 var barcode = $("#barcode").val();
25 // alert("checkout_confirm('" + patronid + "') called for barcode '" + barcode + "'");
26 if (! barcode) { dofocus(); return false; } // no barcode
27 if (barcode == "__KOHA_NEW_CIRC__") { // magic barcode
28 window.location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout';
31 if (this.valid_session == 0) {
32 // probably should force logout like above ? --atz 6/09
33 if (confirm('Session has expired. Click \'OK\' to continue processing this item. Click Cancel if you are not ' + patronid)){
34 this.op.value='logout';
35 this.patronid.value='';
41 // build Change Language menus
42 YAHOO.util.Event.onContentReady("changelanguage", function () {
43 $(".sublangs").each(function(){
44 var menuid = $(this).attr("id");
45 var menuid = menuid.replace("show","");
47 var oMenu = new YAHOO.widget.Menu("sub"+menuid, { zindex: 2 });
48 function positionoMenu() {
49 oMenu.align("bl", "tl");
51 oMenu.subscribe("beforeShow", function () {
52 if (this.getRoot() == this) {
57 oMenu.cfg.setProperty("context", ["show"+menuid, "bl", "tl"]);
58 function onYahooClick(p_oEvent) {
59 // Position and display the menu
62 // Stop propagation and prevent the default "click" behavior
63 YAHOO.util.Event.stopEvent(p_oEvent);
65 YAHOO.util.Event.addListener("show"+menuid, "click", onYahooClick);
66 YAHOO.widget.Overlay.windowResizeEvent.subscribe(positionoMenu);
70 $.tablesorter.addParser({
72 is: function(s) {return false; },
73 format: function(s) { return s.toLowerCase().replace(/^(the|an|a) /,''); },
77 $(document).ready(function() {
78 [% IF ( patronid ) %] sco_init(1);
79 [% ELSIF ( timedout ) %] sco_init(1);
81 $("#loanTable").tablesorter({
82 [% IF ( dateformat_metric ) %]
86 sortList: [[2, 1], [0, 0]],
88 0: { sorter: 'articles' },
90 [% UNLESS ( nofines ) %], 4: { sorter: false }[% END %]
97 [% IF ( opacuserjs ) %]<script type="text/javascript">[% opacuserjs %]</script>[% END %]
100 <link rel="stylesheet" type="text/css" href="[% yuipath %]/reset-fonts-grids.css" />
101 <link rel="stylesheet" type="text/css" href="[% yuipath %]/skin.css" />
102 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/sco.css" />
103 [% IF ( OPACUserCSS ) %]<style type="text/css">[% OPACUserCSS %]</style>[% END %]
106 <body onload="dofocus();">
108 <div id="doc" class="yui-t7">
110 <div id="masthead"><h1>[% LibraryName %] Self checkout system</h1></div>
113 [% IF ( impossible ) %]<!-- We tried to issue, but failed. -->
114 <div class="dialog alert"><h3>Item cannot be checked out.</h3><p>Sorry, This item cannot be checked out at this station. </p>
115 [% IF ( title ) %]<p>Title: <em>[% title |html %]</em> </p>[% END %]
117 [% IF ( circ_error_UNKNOWN_BARCODE ) %]
118 <em>MESSAGE 1:</em> The system does not recognize this barcode.
119 [% ELSIF ( circ_error_TOO_MANY ) %]
120 <em>MESSAGE 2:</em> You have borrowed too many items and can't check out any more.
121 [% ELSIF ( circ_error_ISSUED_TO_ANOTHER ) %]
122 <em>MESSAGE 3:</em> This item is checked out to someone else.
123 [% ELSIF ( circ_error_NO_MORE_RENEWALS ) %]
124 <em>MESSAGE 4:</em> You cannot renew this item again.
125 [% ELSIF ( circ_error_NOT_FOR_LOAN ) %]
126 <em>MESSAGE 5:</em> This item is not for loan.
127 [% ELSIF ( circ_error_DEBT ) %]
128 <em>MESSAGE 6:</em> You owe the library [% amount %] and cannot borrow.
129 [% ELSIF ( circ_error_WTHDRAWN ) %]
130 <em>MESSAGE 7:</em> This item has been withdrawn from the collection.
131 [% ELSIF ( circ_error_RESTRICTED ) %]
133 [% ELSIF ( circ_error_RESERVED ) %]
134 <em>MESSAGE 9:</em> This item is reserved for another patron.
135 [% ELSIF ( circ_error_ITEMNOTSAMEBRANCH ) %]
137 [% ELSIF ( circ_error_EXPIRED ) %]
138 <em>MESSAGE 11:</em> Your account has expired.
139 [% ELSIF ( circ_error_DEBARRED ) %]
140 <em>MESSAGE 12:</em> Your account has been suspended.
141 [% ELSIF ( circ_error_CARD_LOST ) %]
142 <em>MESSAGE 13:</em> This card has been declared lost.
143 [% ELSIF ( circ_error_GNA ) %]
145 [% ELSIF ( circ_error_INVALID_DATE ) %]
148 Please see a member of the library staff.
150 <form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" method="post">
151 <input type="hidden" name="op" value="login" />
152 <input type="hidden" name="patronid" value="[% patronid %]" />
153 [% IF ( returnitem ) %]
154 [% IF ( AllowSelfCheckReturns ) %]
155 <input type="hidden" name="barcode" value="[% barcode %]" />
156 <input type="button" name="returnbook" value="Return this item" class="return" onclick="this.form.op.value='returnbook';this.form.submit();" />
159 <input type="submit" name= "confirm" value="Return to Account Summary" class="back focus" />
162 [% IF ( confirm ) %]<!-- We need to confirm the issue.. -->
163 <div class="dialog alert"><h3>Please confirm the checkout:</h3>
164 <p>[% IF ( confirm_renew_issue ) %]This item is already checked out to you.[% END %]</p>
166 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" method="post">
167 <input type="hidden" name="op" value="checkout" />
168 <input type="hidden" name="patronid" value="[% patronid %]" />
169 <input type="hidden" name="barcode" value="[% barcode %]" />
170 <input type="hidden" name="confirmed" value="" />
172 [% IF ( AllowSelfCheckReturns ) %]
173 <input type="button" value="Return item" name="confirm" class="return" onclick="this.form.op.value='returnbook';this.form.submit();" />
176 [% UNLESS ( renew ) %]<input type="button" value="Renew item" name="confirm" class="renew" onclick="this.form.confirmed.value='1';this.form.submit();" />
177 [% ELSE %]<input type="button" value="Renew item" class="renew" onclick="this.form.confirmed.value='1';this.form.submit();" />[% END %]
178 <input type="button" value="Cancel" class="cancel" onclick="this.form.op.value='';this.form.submit();return true;" />
183 [% IF ( nopermission ) %]<!-- This is what is displayed if user doesnt have permission --><div class="dialog alert"><h3>Access denied</h3>
184 Sorry, this self-checkout station has lost authentication. Please contact the administrator to resolve this problem. </div>
186 [% IF ( timed_out ) %]<!-- This is what is displayed if login has timed out -->
187 <div class="dialog alert"><h3>Session timed out</h3>Sorry, your session has timed out, please log in again.</div>[% END %]
188 [% 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 %]
189 [% IF ( invalid_username_or_password ) %]
190 <!-- 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 %]
193 [% UNLESS ( hide_main ) %]
194 <div class="sco_head">
195 [% UNLESS ( validuser ) %]
196 <h3>Self checkout</h3>
199 <div id="checkouthelp">
200 <a href="/cgi-bin/koha/sco/help.pl">HELP</a> with the self checkout system
203 [% IF ( patronid ) %]
204 [% IF ( validuser ) %]
205 <h3 class="warning">You are logged in as [% borrowername %].</h3>
209 <div class="dialog alert"><h4>Sorry</h4><p>The userid <strong>[% patronid %]</strong> was not found in the database. Please try again.</p></div>
214 [% IF ( timedout ) %]
215 <div class="dialog message"><h4>Sorry</h4><p>Your session has timed out due to inactivity. Please sign in.</p></div>
218 [% IF ( validuser ) %]
219 [% IF ( display_patron_image ) %]<div class="yui-ge"><div class="yui-u first">[% END %]
220 <div id="newcheckout" class="sco_entry">
221 <form id="scan_form" name="scan_form" method="post" action="/cgi-bin/koha/sco/sco-main.pl" onsubmit="return checkout_confirm('[% patronid %]');">
222 <fieldset><legend> Check out[% IF ( AllowSelfCheckReturns ) %], return[% END %] or renew an item: </legend>
223 <label for="barcode">Scan a new item or enter its barcode:</label>
224 <input id="barcode" name="barcode" size="20" class="focus" />
225 <input type="hidden" name="op" value="checkout" />
226 <input type="hidden" name="patronid" value="[% patronid %]" />
227 <input type="hidden" name="valid_session" value="1" />
228 <input type="submit" value="Submit" class="submit" /></fieldset>
230 <div><form method="post" action="/cgi-bin/koha/sco/sco-main.pl?op=logout" ><input type="submit" value="Finish" class="finish" /></form></div>
231 </div> <!-- sco_entry --> <!-- newcheckout -->
232 [% IF ( display_patron_image ) %]</div> <!-- /yui-u first -->[% END %]
233 [% IF ( display_patron_image ) %]
235 <img src="/cgi-bin/koha/sco/sco-patron-image.pl?cardnumber=[% cardnumber %]" alt="" />
238 </div> <!-- /yui-ge -->
240 <div id="borrowerdetails">
241 [% IF ( issues_count ) %]
242 <table id="loanTable"><caption>Checkouts for [% borrowername %] <span class="count">([% issues_count %] total)</span></caption>
243 <!-- ISSUES TABLE ROWS -->
245 <tr><th>Title</th><th>Call no.</th><th>Due</th><th>Renew</th>[% UNLESS ( nofines ) %]<th>Fines</th>[% END %]</tr>
249 [% FOREACH ISSUE IN ISSUES %]
250 [% UNLESS ( loop.odd ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
251 <!-- FIXME: yet another jacket image breakpoint -->
252 <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">
253 [% ISSUE.author %]</span> ([% ISSUE.barcode %])</td>
254 <td>[% ISSUE.itemcallnumber %]</td>
255 [% IF ( ISSUE.overdue ) %]<td class="overdue">[% ISSUE.date_due | $KohaDates %]</td>[% ELSE %]<td>[% ISSUE.date_due | $KohaDates %]</td>[% END %]
257 <form action="/cgi-bin/koha/sco/sco-main.pl" method="post">
258 <input type="hidden" name="op" value="checkout" />
259 <input type="hidden" name="patronid" value="[% patronid %]" />
260 <input type="hidden" name="barcode" value="[% ISSUE.barcode %]" />
261 <input type="hidden" name="confirmed" value="" />
262 [% IF ( ISSUE.norenew ) %]
263 [% IF ( ISSUE.AllowSelfCheckReturns ) %]
264 <input type="button" value="Return Item" name="confirm" class="return" onclick="this.form.op.value='returnbook';this.form.submit();" />
266 <span>No renewals allowed</span>
269 [% UNLESS ( ISSUE.renew ) %]<input type="button" value="Renew Item" name="confirm" class="renew" onclick="this.form.confirmed.value='1';this.form.submit();" />
270 [% ELSE %]<input type="button" value="Renew Item" class="renew" onclick="this.form.confirmed.value='1';this.form.submit();" />[% END %]
274 [% UNLESS ( nofines ) %]<td>[% IF ( ISSUE.charges ) %]Yes[% ELSE %]No[% END %]</td>[% END %]</tr>
280 <h3>You currently have nothing checked out.</h3>
282 </div> <!-- /yui-g -->
283 [% ELSE %]<!-- not validuser -->
284 <div class="sco_entry" >
285 <form id="mainform" action="/cgi-bin/koha/sco/sco-main.pl" name="mainform" method="post">
286 [% IF ( authbylogin ) %]
287 <fieldset class="checkout">
288 <legend>Please login with your username and password</legend>
289 <label for="patronlogin">Username:</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" />
294 <fieldset class="checkout"><label for="patronid">Please enter your card number:</label>
295 <input type="text" id="patronid" class="focus" size="20" name="patronid" />
298 [% FOREACH INPUT IN INPUTS %]<input type="hidden" name="[% INPUT.name |html %]" value="[% INPUT.value |html %]">[% END %]
299 <input type="hidden" name="op" value="login" />
300 <input type="submit" value="Submit" class="submit" /></fieldset></form>
303 [% END %] <!-- ( / hide main) -->
307 [% INCLUDE 'opac-bottom.inc' %]