Koha/koha-tmpl/opac-tmpl/prog/en/modules/sco/sco-main.tmpl
Galen Charlton 49eb7b7a68 followup - update SCO to recognize ITEMNOTSAMEBRANCH
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-05-03 09:18:58 -04:00

243 lines
13 KiB
Cheetah

<!-- TMPL_INCLUDE NAME="doc-head-open.inc" --><!-- TMPL_VAR NAME="LibraryName" --> &rsaquo; Self Checkout </title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Koha <!-- TMPL_VAR NAME="Version" -->" /> <!-- leave this for stats -->
<link rel="shortcut icon" href="<!-- TMPL_VAR NAME="themelang" -->/includes/favicon.ico" type="image/x-icon" />
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/jquery.js"></script>
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
<script type="text/javascript">//<![CDATA[
function sco_init(valid_session) {
if (valid_session == 1) {
setTimeout("location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout';",120000); // TODO: syspref for timeout
}
}
function dofocus() { // named function req'd for body onload event by some FF and IE7 security models
// alert("dofocus called");
$(".focus:last").select();
}
function checkout_confirm(patronid) {
var barcode = $("#barcode").val();
// alert("checkout_confirm('" + patronid + "') called for barcode '" + barcode + "'");
if (! barcode) { dofocus(); return false; } // no barcode
if (barcode == "__KOHA_NEW_CIRC__") { // magic barcode
window.location.href='/cgi-bin/koha/sco/sco-main.pl?op=logout';
return false;
}
if (this.valid_session == 0) {
// probably should force logout like above ? --atz 6/09
if (confirm('Session has expired. Click \'OK\' to continue processing this item. Click Cancel if you are not ' + patronid)){
this.op.value='logout';
this.patronid.value='';
}
}
return true;
}
$.tablesorter.addParser({
id: 'articles',
is: function(s) {return false; },
format: function(s) { return s.toLowerCase().replace(/^(the|an|a) /,''); },
type: 'text'
});
$(document).ready(function() {
<!-- TMPL_IF NAME="patronid" --> sco_init(1);
<!-- TMPL_ELSIF NAME="timedout" --> sco_init(1);
<!-- /TMPL_IF -->
$("#loanTable").tablesorter({
<!-- TMPL_IF NAME="dateformat_metric" -->
dateFormat: 'uk',
<!-- /TMPL_IF -->
widgets: ['zebra'],
sortList: [[2, 1], [0, 0]],
headers: {
0: { sorter: 'articles' },
3: { sorter: false }
<!-- TMPL_UNLESS NAME="nofines" -->, 4: { sorter: false }<!-- /TMPL_UNLESS -->
}
});
});
//]]>
</script>
<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/css/sco.css" />
</head>
<body onload="dofocus();">
<div id="doc" class="yui-t7">
<div id="masthead"><h1><!-- TMPL_VAR NAME="LibraryName" --> Self Checkout System</h1></div>
<div id="bd">
<div class="yui-g">
<!-- TMPL_IF NAME="impossible" --><!-- We tried to issue, but failed. -->
<div class="dialog alert"><h3>Item cannot be checked out.</h3><p>Sorry, This item cannot be checked out at this station. </p>
<!-- TMPL_IF NAME="title" --><p>Title: <em><!-- TMPL_VAR NAME="title" escape="html" --></em> </p><!-- /TMPL_IF -->
<p>
<!-- TMPL_IF NAME="circ_error_UNKNOWN_BARCODE" -->
<em>MESSAGE 1:</em> The system does not recognize this barcode.
<!-- TMPL_ELSIF NAME="circ_error_TOO_MANY" -->
<em>MESSAGE 2:</em> You have borrowed too many items and can't check out any more.
<!-- TMPL_ELSIF NAME="circ_error_ISSUED_TO_ANOTHER" -->
<em>MESSAGE 3:</em> This item is checked out to someone else.
<!-- TMPL_ELSIF NAME="circ_error_NO_MORE_RENEWALS" -->
<em>MESSAGE 4:</em> You cannot renew this item again.
<!-- TMPL_ELSIF NAME="circ_error_NOT_FOR_LOAN" -->
<em>MESSAGE 5:</em> This item is not for loan.
<!-- TMPL_ELSIF NAME="circ_error_DEBT" -->
<em>MESSAGE 6:</em> You owe the library <!-- TMPL_VAR NAME="amount" --> and cannot borrow.
<!-- TMPL_ELSIF NAME="circ_error_WTHDRAWN" -->
<em>MESSAGE 7:</em> This item has been withdrawn from the collection.
<!-- TMPL_ELSIF NAME="circ_error_RESTRICTED" -->
<em>MESSAGE 8:</em>
<!-- TMPL_ELSIF NAME="circ_error_RESERVED" -->
<em>MESSAGE 9:</em> This item is reserved for another patron.
<!-- TMPL_ELSIF NAME="circ_error_ITEMNOTSAMEBRANCH" -->
<em>MESSAGE 10:</em>
<!-- TMPL_ELSIF NAME="circ_error_EXPIRED" -->
<em>MESSAGE 11:</em> Your account has expired.
<!-- TMPL_ELSIF NAME="circ_error_DEBARRED" -->
<em>MESSAGE 12:</em> Your account has been suspended.
<!-- TMPL_ELSIF NAME="circ_error_CARD_LOST" -->
<em>MESSAGE 13:</em> This card has been declared lost.
<!-- TMPL_ELSIF NAME="circ_error_GNA" -->
<em>MESSAGE 14:</em>
<!-- TMPL_ELSIF NAME="circ_error_INVALID_DATE" -->
<em>MESSAGE 15:</em>
<!-- /TMPL_IF -->
Please see a member of the library staff.
</p>
<form action="/cgi-bin/koha/sco/sco-main.pl" name="errorForm" method="post">
<input type="hidden" name="op" value="login" />
<input type="hidden" name="patronid" value="<!-- TMPL_VAR NAME="patronid" -->" />
<!-- TMPL_IF NAME="returnitem" -->
<input type="hidden" name="barcode" value="<!-- TMPL_VAR NAME="barcode" -->" />
<input type="button" name="returnbook" value="Return this item" class="return" onclick="this.form.op.value='returnbook';this.form.submit();" />
<!-- /TMPL_IF -->
<input type="submit" name= "confirm" value="Return to Account Summary" class="back focus" />
</form>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="confirm" --><!-- We need to confirm the issue.. -->
<div class="dialog alert"><h3>Please confirm the checkout:</h3>
<p><!-- TMPL_IF NAME="confirm_renew_issue" -->This item is already checked out to you. Return it?<!-- /TMPL_IF --></p>
<form action="/cgi-bin/koha/sco/sco-main.pl" name="confirmForm" method="post">
<input type="hidden" name="op" value="checkout" />
<input type="hidden" name="patronid" value="<!-- TMPL_VAR NAME="patronid" -->" />
<input type="hidden" name="barcode" value="<!-- TMPL_VAR NAME="barcode" -->" />
<input type="hidden" name="confirmed" value="" />
<!-- TMPL_IF NAME="renew" -->
<input type="button" value="Return Item" name="confirm" class="return" onclick="this.form.op.value='returnbook';this.form.submit();" />
<!-- /TMPL_IF -->
<input type="button" value="Renew Item" <!-- TMPL_UNLESS NAME="renew" --> name="confirm"<!-- /TMPL_UNLESS --> class="renew" onclick="this.form.confirmed.value='1';this.form.submit();" />
<input type="button" value="Cancel" class="cancel" onclick="this.form.op.value='';this.form.submit();return true;" />
</form>
</div>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="nopermission" --><!-- This is what is displayed if user doesnt have permission --><div class="dialog alert"><h3>Access Denied</h3>
Sorry, This Self-Checkout Station has lost authentication. Please contact the administrator to resolve this problem. </div>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="timed_out" --><!-- This is what is displayed if login has timed out -->
<div class="dialog alert"><h3>Session timed out</h3>Sorry, your session has timed out, please log in again.</div><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="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><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="invalid_username_or_password" -->
<!-- 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><!-- /TMPL_IF -->
<!-- TMPL_UNLESS NAME="hide_main" -->
<div class="sco_head">
<!-- TMPL_UNLESS NAME="validuser" -->
<h3>Self Checkout</h3>
<!-- /TMPL_UNLESS -->
<div id="checkouthelp">
<a href="/cgi-bin/koha/sco/help.pl">HELP</a> with the self checkout system
</div>
<!-- TMPL_IF NAME="patronid" -->
<!-- TMPL_IF NAME="validuser" -->
<h3 class="warning">You are logged in as <!-- TMPL_VAR NAME="borrowername" -->.</h3>
<!-- TMPL_IF NAME="display_patron_image" -->
<img src="/cgi-bin/koha/sco/sco-patron-image.pl?cardnumber=<!-- TMPL_VAR NAME="cardnumber" -->" alt="" />
<!-- /TMPL_IF -->
<!-- /TMPL_IF -->
</div>
<!-- TMPL_IF NAME="nouser" -->
<div class="error"><h4>Sorry</h4><p>The userid <strong><!-- TMPL_VAR NAME="patronid" --></strong> was not found in the database. Please try again.</p></div>
<br />
<!-- /TMPL_IF -->
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="timedout" -->
<div class="error"><h4>Sorry</h4><p>Your session has timed out due to inactivity. Please sign in.</p></div>
<br />
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="validuser" -->
<div id="newcheckout" class="sco_entry">
<form id="scan_form" name="scan_form" method="post" action="/cgi-bin/koha/sco/sco-main.pl" onsubmit="return checkout_confirm('<!-- TMPL_VAR NAME='patronid' -->');">
<fieldset><legend> Check out or return an item: </legend>
<label for="barcode">Scan a new item or enter its barcode:</label>
<input id="barcode" name="barcode" size="20" class="focus" />
<input type="hidden" name="op" value="checkout" />
<input type="hidden" name="patronid" value="<!-- TMPL_VAR name="patronid" -->" />
<input type="hidden" name="valid_session" value="1" />
<input type="submit" value="Submit" class="submit" /></fieldset>
</form>
<div><form method="post" action="/cgi-bin/koha/sco/sco-main.pl?op=logout" ><input type="submit" value="Finish" class="finish" /></form></div>
</div> <!-- sco_entry --> <!-- newcheckout -->
<div id="borrowerdetails">
<!-- TMPL_IF NAME="issues_count" -->
<table id="loanTable"><caption>Checkouts for <!-- TMPL_VAR NAME='borrowername' --> <span class="count">(<!-- TMPL_VAR NAME="issues_count" --> total)</span></caption>
<!-- ISSUES TABLE ROWS -->
<thead>
<tr><th>Title</th><th>Call No.</th><th>Due</th><th>Renew</th><!-- TMPL_UNLESS NAME="nofines" --><th>Fines</th><!-- /TMPL_UNLESS --></tr>
</thead>
<tbody>
<!-- TMPL_LOOP NAME="ISSUES" -->
<!-- TMPL_UNLESS name="__odd__" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_UNLESS -->
<!-- FIXME: yet another jacket image breakpoint -->
<td><!-- TMPL_IF NAME="amazonimages" --> <!-- TMPL_IF NAME="isbn" --><a href="/cgi-bin/koha/opac-detail.pl?bib=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->"><img src="http://images.amazon.com/images/P/<!-- TMPL_VAR name="isbn" -->.01.THUMBZZZ.jpg" alt="Book Cover Image" class="thumbnail" /></a><!-- /TMPL_IF --> <!-- /TMPL_IF --><!-- TMPL_UNLESS NAME="noitemlinks" --><a href="/cgi-bin/koha/opac-detail.pl?bib=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="title" escape="html" --></a><!-- TMPL_ELSE --><strong><!-- TMPL_VAR NAME="title" escape="html" --></strong><!-- /TMPL_UNLESS --><span class="item-details">
<!-- TMPL_VAR NAME="author" --></span> (<!-- TMPL_VAR NAME="barcode" -->)</td>
<td><!-- TMPL_VAR NAME="itemcallnumber" DEFAULT="&nbsp;" --></td>
<!-- TMPL_IF NAME="overdue" --><td class="overdue"><!-- TMPL_VAR NAME="date_due_display" --></td><!-- TMPL_ELSE --><td><!-- TMPL_VAR NAME="date_due_display" --></td><!-- /TMPL_IF -->
<td>
<form action="/cgi-bin/koha/sco/sco-main.pl" method="post">
<input type="hidden" name="op" value="checkout" />
<input type="hidden" name="patronid" value="<!-- TMPL_VAR NAME="patronid" -->" />
<input type="hidden" name="barcode" value="<!-- TMPL_VAR NAME="barcode" -->" />
<input type="hidden" name="confirmed" value="" />
<!-- TMPL_IF NAME="norenew" -->
<input type="button" value="Return Item" name="confirm" class="return" onclick="this.form.op.value='returnbook';this.form.submit();" />
<!-- TMPL_ELSE -->
<input type="button" value="Renew Item" <!-- TMPL_UNLESS NAME="renew" --> name="confirm"<!-- /TMPL_UNLESS --> class="renew" onclick="this.form.confirmed.value='1';this.form.submit();" />
<!-- /TMPL_IF -->
</form>
</td>
<!-- TMPL_UNLESS NAME="nofines" --><td><!-- TMPL_IF NAME="charges" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td><!-- /TMPL_UNLESS --></tr>
<!-- /TMPL_LOOP -->
</tbody>
</table>
<!-- TMPL_ELSE -->
<h3>You currently have nothing checked out.</h3>
<!-- /TMPL_IF -->
<!-- TMPL_ELSE --><!-- not validuser -->
<div class="sco_entry" >
<form id="mainform" action="/cgi-bin/koha/sco/sco-main.pl" name="mainform" method="post">
<fieldset class="checkout"><label for="patronid">Please enter your card number:</label>
<input type="text" id="patronid" class="focus" size="20" name="patronid" />
<!-- TMPL_LOOP NAME="INPUTS" --><input type="hidden" name="<!-- TMPL_VAR ESCAPE=HTML NAME="name" -->" value="<!-- TMPL_VAR ESCAPE=HTML NAME="value" -->"><!-- /TMPL_LOOP -->
<input type="hidden" name="op" value="login" />
<input type="submit" value="Submit" class="submit" /></fieldset></form>
</div>
<!-- /TMPL_IF -->
<!-- /TMPL_UNLESS --> <!-- ( / hide main) -->
</div>
</div>
</div>
<!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->