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="[% themelang %]/css/sco.css" />
101 [% IF ( OPACUserCSS ) %]<style type="text/css">[% OPACUserCSS %]</style>[% END %]
104 <body onload="dofocus();">
106 <div id="doc" class="yui-t7">
108 <div id="masthead"><h1>[% LibraryName %] Self checkout system</h1></div>
111 [% IF ( impossible ) %]<!-- We tried to issue, but failed. -->
112 <div class="dialog alert"><h3>Item cannot be checked out.</h3><p>Sorry, This item cannot be checked out at this station. </p>
113 [% IF ( title ) %]<p>Title: <em>[% title |html %]</em> </p>[% END %]
115 [% IF ( circ_error_UNKNOWN_BARCODE ) %]
116 <em>MESSAGE 1:</em> The system does not recognize this barcode.
117 [% ELSIF ( circ_error_TOO_MANY ) %]
118 <em>MESSAGE 2:</em> You have borrowed too many items and can't check out any more.
119 [% ELSIF ( circ_error_ISSUED_TO_ANOTHER ) %]
120 <em>MESSAGE 3:</em> This item is checked out to someone else.
121 [% ELSIF ( circ_error_NO_MORE_RENEWALS ) %]
122 <em>MESSAGE 4:</em> You cannot renew this item again.
123 [% ELSIF ( circ_error_NOT_FOR_LOAN ) %]
124 <em>MESSAGE 5:</em> This item is not for loan.
125 [% ELSIF ( circ_error_DEBT ) %]
126 <em>MESSAGE 6:</em> You owe the library [% amount %] and cannot borrow.
127 [% ELSIF ( circ_error_WTHDRAWN ) %]
128 <em>MESSAGE 7:</em> This item has been withdrawn from the collection.
129 [% ELSIF ( circ_error_RESTRICTED ) %]
131 [% ELSIF ( circ_error_RESERVED ) %]
132 <em>MESSAGE 9:</em> This item is reserved for another patron.
133 [% ELSIF ( circ_error_ITEMNOTSAMEBRANCH ) %]
135 [% ELSIF ( circ_error_EXPIRED ) %]
136 <em>MESSAGE 11:</em> Your account has expired.
137 [% ELSIF ( circ_error_DEBARRED ) %]
138 <em>MESSAGE 12:</em> Your account has been suspended.
139 [% ELSIF ( circ_error_CARD_LOST ) %]
140 <em>MESSAGE 13:</em> This card has been declared lost.
141 [% ELSIF ( circ_error_GNA ) %]
143 [% ELSIF ( circ_error_INVALID_DATE ) %]
146 Please see a member of the library staff.
148 <form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" method="post">
149 <input type="hidden" name="op" value="login" />
150 <input type="hidden" name="patronid" value="[% patronid %]" />
151 [% IF ( returnitem ) %]
152 [% IF ( AllowSelfCheckReturns ) %]
153 <input type="hidden" name="barcode" value="[% barcode %]" />
154 <input type="button" name="returnbook" value="Return this item" class="return" onclick="this.form.op.value='returnbook';this.form.submit();" />
157 <input type="submit" name= "confirm" value="Return to Account Summary" class="back focus" />
160 [% IF ( confirm ) %]<!-- We need to confirm the issue.. -->
161 <div class="dialog alert"><h3>Please confirm the checkout:</h3>
162 <p>[% IF ( confirm_renew_issue ) %]This item is already checked out to you.[% END %]</p>
164 <form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" method="post">
165 <input type="hidden" name="op" value="checkout" />
166 <input type="hidden" name="patronid" value="[% patronid %]" />
167 <input type="hidden" name="barcode" value="[% barcode %]" />
168 <input type="hidden" name="confirmed" value="" />
170 [% IF ( AllowSelfCheckReturns ) %]
171 <input type="button" value="Return item" name="confirm" class="return" onclick="this.form.op.value='returnbook';this.form.submit();" />
174 [% UNLESS ( renew ) %]<input type="button" value="Renew item" name="confirm" class="renew" onclick="this.form.confirmed.value='1';this.form.submit();" />
175 [% ELSE %]<input type="button" value="Renew item" class="renew" onclick="this.form.confirmed.value='1';this.form.submit();" />[% END %]
176 <input type="button" value="Cancel" class="cancel" onclick="this.form.op.value='';this.form.submit();return true;" />
181 [% IF ( nopermission ) %]<!-- This is what is displayed if user doesnt have permission --><div class="dialog alert"><h3>Access denied</h3>
182 Sorry, this self-checkout station has lost authentication. Please contact the administrator to resolve this problem. </div>
184 [% IF ( timed_out ) %]<!-- This is what is displayed if login has timed out -->
185 <div class="dialog alert"><h3>Session timed out</h3>Sorry, your session has timed out, please log in again.</div>[% END %]
186 [% 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 %]
187 [% IF ( invalid_username_or_password ) %]
188 <!-- 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 %]
191 [% UNLESS ( hide_main ) %]
192 <div class="sco_head">
193 [% UNLESS ( validuser ) %]
194 <h3>Self checkout</h3>
197 <div id="checkouthelp">
198 <a href="/cgi-bin/koha/sco/help.pl">HELP</a> with the self checkout system
201 [% IF ( patronid ) %]
202 [% IF ( validuser ) %]
203 <h3 class="warning">You are logged in as [% borrowername %].</h3>
207 <div class="dialog alert"><h4>Sorry</h4><p>The userid <strong>[% patronid %]</strong> was not found in the database. Please try again.</p></div>
212 [% IF ( timedout ) %]
213 <div class="dialog message"><h4>Sorry</h4><p>Your session has timed out due to inactivity. Please sign in.</p></div>
216 [% IF ( validuser ) %]
217 [% IF ( display_patron_image ) %]<div class="yui-ge"><div class="yui-u first">[% END %]
218 <div id="newcheckout" class="sco_entry">
219 <form id="scan_form" name="scan_form" method="post" action="/cgi-bin/koha/sco/sco-main.pl" onsubmit="return checkout_confirm('[% patronid %]');">
220 <fieldset><legend> Check out[% IF ( AllowSelfCheckReturns ) %], return[% END %] or renew an item: </legend>
221 <label for="barcode">Scan a new item or enter its barcode:</label>
222 <input id="barcode" name="barcode" size="20" class="focus" />
223 <input type="hidden" name="op" value="checkout" />
224 <input type="hidden" name="patronid" value="[% patronid %]" />
225 <input type="hidden" name="valid_session" value="1" />
226 <input type="submit" value="Submit" class="submit" /></fieldset>
228 <div><form method="post" action="/cgi-bin/koha/sco/sco-main.pl?op=logout" ><input type="submit" value="Finish" class="finish" /></form></div>
229 </div> <!-- sco_entry --> <!-- newcheckout -->
230 [% IF ( display_patron_image ) %]</div> <!-- /yui-u first -->[% END %]
231 [% IF ( display_patron_image ) %]
233 <img src="/cgi-bin/koha/sco/sco-patron-image.pl?cardnumber=[% cardnumber %]" alt="" />
236 </div> <!-- /yui-ge -->
238 <div id="borrowerdetails">
239 [% IF ( issues_count ) %]
240 <table id="loanTable"><caption>Checkouts for [% borrowername %] <span class="count">([% issues_count %] total)</span></caption>
241 <!-- ISSUES TABLE ROWS -->
243 <tr><th>Title</th><th>Call no.</th><th>Due</th><th>Renew</th>[% UNLESS ( nofines ) %]<th>Fines</th>[% END %]</tr>
247 [% FOREACH ISSUE IN ISSUES %]
248 [% UNLESS ( loop.odd ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
249 <!-- FIXME: yet another jacket image breakpoint -->
250 <td>[% UNLESS ( 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">
251 [% ISSUE.author %]</span> ([% ISSUE.barcode %])</td>
252 <td>[% ISSUE.itemcallnumber %]</td>
253 [% IF ( ISSUE.overdue ) %]<td class="overdue">[% ISSUE.date_due | $KohaDates %]</td>[% ELSE %]<td>[% ISSUE.date_due | $KohaDates %]</td>[% END %]
255 <form action="/cgi-bin/koha/sco/sco-main.pl" method="post">
256 <input type="hidden" name="op" value="checkout" />
257 <input type="hidden" name="patronid" value="[% patronid %]" />
258 <input type="hidden" name="barcode" value="[% ISSUE.barcode %]" />
259 <input type="hidden" name="confirmed" value="" />
260 [% IF ( ISSUE.norenew ) %]
261 [% IF ( ISSUE.AllowSelfCheckReturns ) %]
262 <input type="button" value="Return Item" name="confirm" class="return" onclick="this.form.op.value='returnbook';this.form.submit();" />
264 <span>No renewals allowed</span>
267 [% UNLESS ( ISSUE.renew ) %]<input type="button" value="Renew Item" name="confirm" class="renew" onclick="this.form.confirmed.value='1';this.form.submit();" />
268 [% ELSE %]<input type="button" value="Renew Item" class="renew" onclick="this.form.confirmed.value='1';this.form.submit();" />[% END %]
272 [% UNLESS ( nofines ) %]<td>[% IF ( ISSUE.charges ) %]Yes[% ELSE %]No[% END %]</td>[% END %]</tr>
278 <h3>You currently have nothing checked out.</h3>
280 </div> <!-- /yui-g -->
281 [% ELSE %]<!-- not validuser -->
282 <div class="sco_entry" >
283 <form id="mainform" action="/cgi-bin/koha/sco/sco-main.pl" name="mainform" method="post">
284 [% IF ( authbylogin ) %]
285 <fieldset class="checkout">
286 <legend>Please login with your username and password</legend>
287 <label for="patronlogin">Username:</label>
288 <input type="text" id="patronlogin" class="focus" size="20" name="patronlogin" />
289 <label for="patronpw">Password:</label>
290 <input type="password" id="patronpw" size="20" name="patronpw" />
292 <fieldset class="checkout"><label for="patronid">Please enter your card number:</label>
293 <input type="text" id="patronid" class="focus" size="20" name="patronid" />
296 [% FOREACH INPUT IN INPUTS %]<input type="hidden" name="[% INPUT.name |html %]" value="[% INPUT.value |html %]">[% END %]
297 <input type="hidden" name="op" value="login" />
298 <input type="submit" value="Submit" class="submit" /></fieldset></form>
301 [% END %] <!-- ( / hide main) -->
305 [% INCLUDE 'opac-bottom.inc' %]