Koha/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
Kyle M Hall e96e1126b6 Bug 13315 - Add feedback for last item checked out to circulation.pl
It seems that many librarians find it disconcerting to have no feedback
with the new checkouts table. It seems that many of them wait for it to
fully load, check to verify the item was checked out, and only then
check out the next item.

To help alleviate this issue, we can have the checkouts page give
feedback about the item that was just checked out.

Test Plan:
1) Apply this patch
2) Check an item out
3) Note the message "$title ($barcode) due on $date_due"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

This works well and fixes a very problematic issue with the new AJAX
circ. I will be submitting a follow-up which I think is an improvement
to the display.

Signed-off-by: Jason Burds  <jburds@dubuque.lib.ia.us>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-13 14:52:26 -03:00

931 lines
36 KiB
Text

[% USE Koha %]
[% USE Branches %]
[% USE KohaDates %]
[% IF Koha.Preference('ExportRemoveFields') OR Koha.Preference('ExportWithCsvProfile') %]
[% SET exports_enabled = 1 %]
[% END %]
[% USE AuthorisedValues %]
[% INCLUDE 'doc-head-open.inc' %]
[% SET destination = "circ" %]
<title>Koha &rsaquo; Circulation
[% IF borrowernumber %]
&rsaquo; Checking out to [% INCLUDE 'patron-title.inc' invert_name = 1 %]
[% END %]
</title>
[% INCLUDE 'doc-head-close.inc' %]
[% INCLUDE 'calendar.inc' %]
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
[% INCLUDE 'strings.inc' %]
[% INCLUDE 'datatables.inc' %]
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery-ui-timepicker-addon.min.js"></script>
[% INCLUDE 'timepicker.inc' %]
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.rowGrouping.js"></script>
<script type="text/javascript" src="[% themelang %]/js/pages/circulation.js"></script>
<script type="text/javascript" src="[% themelang %]/js/checkouts.js"></script>
<script type="text/javascript" src="[% themelang %]/js/holds.js"></script>
<script type="text/javascript">
//<![CDATA[
/* Set some variable needed in circulation.js */
var MSG_DT_LOADING_RECORDS = _("Loading... you may continue scanning.");
var interface = "[% interface %]";
var theme = "[% theme %]";
var borrowernumber = "[% borrowernumber %]";
var branchcode = "[% branch %]";
var exports_enabled = "[% exports_enabled %]";
var AllowRenewalLimitOverride = [% (CAN_user_circulate_override_renewals && AllowRenewalLimitOverride)? 1: 0 %];
var script = "circulation";
var relatives_borrowernumbers = new Array();
[% FOREACH b IN relatives_borrowernumbers %]
relatives_borrowernumbers.push("[% b %]");
[% END %]
var MSG_ADD_MESSAGE = _("Add a new message");
var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export");
[% IF ( borrowernumber ) %]if($.cookie("holdfor") != [% borrowernumber %]){ $.cookie("holdfor",null, { path: "/", expires: 0 }); }[% ELSE %]$.cookie("holdfor",null, { path: "/", expires: 0 });[% END %]
[% UNLESS ( borrowernumber ) %][% UNLESS ( borrowers ) %]window.onload=function(){ $('#findborrower').focus(); };[% END %][% END %]
// On-site checkout
function toggle_onsite_checkout(){
if ( $("#onsite_checkout").attr('checked') ) {
$("#duedatespec").val("[% todaysdate | $KohaDates with_hours => 1%]")
[% IF !Koha.Preference('SpecifyDueDate') %]
$("#duedatespec").datetimepicker('destroy');
[% END %]
} else {
$("#duedatespec").datetimepicker({
onClose: function(dateText, inst) { $("#barcode").focus(); },
hour: 23,
minute: 59
});
}
}
$(document).ready(function() {
$('#mainform').on('submit',function() {
$('#barcode').on('keypress',function(event) {
$('#barcodeSubmittedModal').modal();
event.preventDefault(); }
);
});
[% IF !( CircAutoPrintQuickSlip == 'clear' ) %]
// listen submit to trigger qslip on empty checkout
$('#mainform').bind('submit',function() {
if ($('#barcode').val() == '') {
return printx_window( '[% CircAutoPrintQuickSlip %]' );
}
});
[% END %]
toggle_onsite_checkout();
$("#onsite_checkout").click(function(){
toggle_onsite_checkout();
});
var table = $("#table_borrowers").dataTable($.extend(true, {}, dataTablesDefaults, {
"aoColumnDefs": [
{ "aTargets": [ 0 ], "bSortable": false, "bSearchable": false },
],
"aaSorting": [ 2, "asc" ],
"sDom": "t",
"iDisplayLength": -1
}));
$(table).find('tbody tr').filter(':has(:radio:checked)').end().click(function(event) {
$('#table_borrowers tbody tr').removeClass('selected');
$(this).addClass('selected');
if (event.target.type !== 'radio') {
$(':radio', this).attr('checked', 'true')
}
});
});
//]]>
</script>
</head>
<body id="circ_circulation" class="circ">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'circ-search.inc' %]
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> &rsaquo;
[% IF ( borrowernumber ) %]
<a href="/cgi-bin/koha/circ/circulation.pl">Checkouts</a> &rsaquo; [% INCLUDE 'patron-title.inc' %]
[% ELSE %]
<strong>Checkouts</strong>
[% END %]
</div>
[% IF ( $borrowers ) %]
<div id="doc" class="yui-t7">
<div id="bd">
<div id="yui-main">
<div class="yui-g">
[% ELSE %]
<div id="doc3" class="yui-t2">
<div id="bd">
<div id="yui-main">
<div class="yui-b">
[% END %]
[% IF ( borrowernumber ) %]
[% INCLUDE 'members-toolbar.inc' %]
[% END %]
<!-- INITIAL BLOC : PARAMETERS & BORROWER INFO -->
<div style="display: none;" id="add_message_form">
<form method="post" action="/cgi-bin/koha/circ/add_message.pl" id="message_form" name="message_f">
<fieldset id="borrower_messages" class="brief">
<legend>Leave a message</legend>
<ol>
<li>
<label for="message_type">Add a message for:</label>
<select name="message_type" id="message_type">
<option value="L">Other librarians</option>
<option value="B">[% firstname %]</option>
</select>
</li>
[% IF ( canned_bor_notes_loop ) %]
<li>
<label for="type">Predefined notes: </label>
<select name="type" id="type" onchange="this.form.borrower_message.value=this.options[this.selectedIndex].value;">
<option value="">Select note</option>
[% FOREACH canned_bor_notes_loo IN canned_bor_notes_loop %]
<option value="[% canned_bor_notes_loo.lib %]">[% canned_bor_notes_loo.lib %]</option>
[% END %]
</select>
</li>
[% END %]
<li>
<textarea rows="3" cols="60" name="borrower_message" id="borrower_message" ></textarea>
</li>
</ol>
<fieldset class="action">
<input type="submit" value="Save" /> <a href="#" class="cancel">Cancel</a>
</fieldset>
<input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
<input type="hidden" name="branchcode" value="[% branch %]" />
</fieldset>
</form>
</div>
[% IF ( was_renewed ) %]<div class="dialog message">Patron's account has been renewed until [% expiry %]</div>[% END %]
[% IF additional_materials %]
<div id="materials" class="dialog message">Note about the accompanying materials: <br />
[% additional_materials %]
</div>
[% END %]
[% IF ( alert.ITEM_LOST ) %]
<div class="dialog message">This item has been lost with a status of "[% alert.ITEM_LOST %]".</div>
[% END %]
[% IF ( alert.OTHER_CHARGES ) %]
<div class="dialog message">The patron has unpaid charges for reserves, rentals etc of [% alert.OTHER_CHARGES %]</div>
[% END %]
[% IF ( NEEDSCONFIRMATION ) %]
<div class="yui-g">
<div id="circ_needsconfirmation" class="dialog alert">
[% IF CAN_user_circulate_force_checkout %]
<h3>Please confirm checkout</h3>
[% ELSE %]
<h3>Cannot check out</h3>
[% END %]
<ul>
[%IF ( AGE_RESTRICTION ) %]
<li>Age restriction [% AGE_RESTRICTION %].
[% IF CAN_user_circulate_force_checkout %]
Check out anyway?
[% END %]
</li>
[% END %]
[% IF ( DEBT ) %]
<li>The patron has a debt of [% DEBT %].</li>
[% END %]
[% IF ( RENTALCHARGE > 0 ) %]
<li>Rental charge for this item: [% RENTALCHARGE %]</li>
[% END %]
[% IF ( RENEW_ISSUE ) %]
<li>Item <i>[% getTitleMessageIteminfo %]</i> ([% getBarcodeMessageIteminfo %]) is currently checked out to this patron. Renew?</li>
[% END %]
[% IF ( RESERVE_WAITING ) %]
<li>Item <i>[% getTitleMessageIteminfo %]</i> ([% getBarcodeMessageIteminfo %]) has been waiting for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% resborrowernumber %]">[% resfirstname %] [% ressurname %]</a> ([% rescardnumber %]) at [% resbranchname %] since [% reswaitingdate %]</li>
[% END %]
[% IF ( RESERVED ) %]
<li>Item <i>[% getTitleMessageIteminfo %]</i> ([% getBarcodeMessageIteminfo %]) has been on hold for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% resborrowernumber %]">[% resfirstname %] [% ressurname %]</a> ([% rescardnumber %]) at [% resbranchname %] since [% resreservedate %]</li>
[% END %]
[% IF ( ISSUED_TO_ANOTHER ) %]
<li>Item <i>[% getTitleMessageIteminfo %]</i> ([% getBarcodeMessageIteminfo %]) is checked out to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% issued_borrowernumber %]">[% issued_firstname %] [% issued_surname %]</a> ([% issued_cardnumber %]).
[% IF CAN_user_circulate_force_checkout %]
Check in and check out?
[% END %]
</li>
[% END %]
[% IF ( TOO_MANY ) %]
<li>Too many checked out. [% current_loan_count %] checked out, only [% max_loans_allowed %] are allowed.</li>
[% END %]
[% IF ( BORRNOTSAMEBRANCH ) %]
<li>This patrons is from a different library ([% BORRNOTSAMEBRANCH %])</li>
[% END %]
[% IF ( PATRON_CANT ) %]
<li>This patron can't check out this item per library circulation policy</li>
[% END %]
[% IF ( NOT_FOR_LOAN_FORCING ) %]
<li>
[% IF ( itemtype_notforloan ) %]
Item type is normally not for loan.
[% ELSIF ( item_notforloan ) %]
[% item_notforloan_lib = AuthorisedValues.GetByCode( authvalcode_notforloan, item_notforloan, 0 ) %]
Item is normally not for loan [% IF (item_notforloan_lib) %]([% item_notforloan_lib %])[% END %].
[% END %]
[% IF CAN_user_circulate_force_checkout %]
Check out anyway?
[% END %]
</li>
[% END %]
[% IF ( USERBLOCKEDOVERDUE ) %]
<li>Patron has [% USERBLOCKEDOVERDUE %] overdue item(s).
[% IF CAN_user_circulate_force_checkout %]
Check out anyway?
[% END %]
</li>
[% END %]
[% IF ( ITEM_LOST ) %]
<li>This item has been lost with a status of "[% ITEM_LOST %]".
[% IF CAN_user_circulate_force_checkout %]
Check out anyway?
[% END %]
</li>
[% END %]
[% IF HIGHHOLDS %]
<li>High demand item. Loan period shortened to [% HIGHHOLDS.duration %] days (due [% HIGHHOLDS.returndate %]). Check out anyway?</li>
[% END %]
[% IF BIBLIO_ALREADY_ISSUED %]
<li>
Patron has already checked out another item from this record.
[% IF CAN_user_circulate_force_checkout %]
Check out anyway?
[% END %]
</li>
[% END %]
</ul>
[% IF HIGHHOLDS %]
<script language="JavaScript" type="text/javascript">
$(document).ready(function() {
$("input[name=duedatespec]:hidden").val('[% HIGHHOLDS.returndate %]');
});
</script>
[% END %]
[% IF CAN_user_circulate_force_checkout or HIGHHOLDS %]
<form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off">
[% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
[% IF ( RESERVED ) %]
<p>
<input type="checkbox" id="cancelreserve" name="cancelreserve" value="cancel" />
<label for="cancelreserve">Cancel hold</label>
</p>
[% END %]
[% IF ( RESERVE_WAITING ) %]
<p>
<label for="cancelreserve">Cancel hold</label>
<input type="radio" value="cancel" name="cancelreserve" id="cancelreserve" /><br />
<label for="revertreserve">Revert waiting status</label>
<input type="radio" value="revert" name="cancelreserve" id="revertreserve" checked="checked"/>
</p>
[% END %]
<input type="hidden" name="barcode" value="[% barcode |html %]" />
<input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
<input type="hidden" name="issueconfirmed" value="1" />
[% IF ( DEBT ) %]<input type="hidden" name="debt_confirmed" value="1" />[% END %]
[% IF ( INVALID_DATE ) %]
<p>
<input type="text" size="13" id="duedatespec" name="duedatespec" readonly="readonly" value="[% duedatespec %]" />
<label for="duedatespec">Due date</label>
</p>
[% ELSE %]
<input type="hidden" name="duedatespec" value="[% duedatespec %]" />
[% END %]
<input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
<input type="hidden" name="branch" value="[% branch %]" />
[% IF ( RENEW_ISSUE ) %]
<input type="submit" class="approve" value="Yes, renew (Y)" accesskey="y" />
[% ELSE %]
<input type="submit" class="approve" value="Yes, check out (Y)" accesskey="y" />
[% END %]
<input type="hidden" name="onsite_checkout" value="[% onsite_checkout %]" />
</form>
[% END %]
<form method="get" action="/cgi-bin/koha/circ/circulation.pl">
[% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
<input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
<input type="hidden" name="duedatespec" value="[% duedatespec %]" />
<input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
[% IF CAN_user_circulate_force_checkout or HIGHHOLDS %]
[% IF ( RENEW_ISSUE ) %]
<input type="submit" class="deny" value="No, don't renew (N)" accesskey="n" />
[% ELSE %]
<input type="submit" class="deny" value="No, don't check out (N)" accesskey="n" />
[% END %]
[% ELSE %]
<input type="submit" class="deny" value="Continue" />
[% END %]
</form>
</div></div>
[% END %] <!-- NEEDSCONFIRMATION -->
[% IF ( IMPOSSIBLE ) %]
[% IF ( soundon ) %]
<audio src="[% interface %]/[% theme %]/sound/critical.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio>
[% END %]
<div class="yui-g">
<div id="circ_impossible" class="dialog alert">
<!-- RESULT OF ISSUING REQUEST -->
<ul>
[% IF ( STATS ) %]
<li>Local use recorded</li>
[% END %]
[% IF ( INVALID_DATE ) %]
<li>The due date &quot;[% INVALID_DATE %]&quot; is invalid</li>
[% END %]
[% IF ( UNKNOWN_BARCODE ) %]
<li>The barcode was not found [% barcode |html %]
[% IF ( fast_cataloging ) %]
[% IF ( CAN_user_editcatalogue_fast_cataloging ) %]
<a href="/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=FA&amp;barcode=[% barcode |uri %]&amp;circborrowernumber=[% borrowernumber %]&amp;branch=[% branch %]&amp;duedatespec=[% duedatespec %]&amp;stickyduedate=[% stickyduedate %]">Fast cataloging</a>
[% END %]
[% END %]
[% IF ( FALLBACK ) %]
[% IF options %]
<br />The following items were found by searching:
[% FOREACH book IN options %]
<br />
<form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off">
[% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
<input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
<input type="hidden" name="duedatespec" value="[% duedatespec %]" />
<input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
<input type="hidden" name="branch" value="[% branch %]" />
<input type="hidden" name="barcode" value="[% book.barcode %]" />
<input type="submit" name="x" value="Check out [% book.barcode %]: [% book.title %]" />
</form>
[% END %]
[% ELSE %]
<br />No items were found by searching.
[% END %]
[% END %]
</li>
[% END %]
[% IF ( NOT_FOR_LOAN ) %]
<li>
[% IF ( itemtype_notforloan ) %]
Item type not for loan.
[% ELSIF ( item_notforloan ) %]
[% item_notforloan_lib = AuthorisedValues.GetByCode( authvalcode_notforloan, item_notforloan, 0 ) %]
Item not for loan [% IF (item_notforloan_lib) %]([% item_notforloan_lib %])[% END %].
[% END %]
</li>
[% END %]
[% IF ( WTHDRAWN ) %]
<li>Item has been withdrawn</li>
[% END %]
[% IF ( RESTRICTED ) %]
<li>Item is restricted</li>
[% END %]
[% IF ( GNA ) %]
<li>Patron's address is in doubt</li>
[% END %]
[% IF ( CARD_LOST ) %]
<li>Patron's card is lost</li>
[% END %]
[% IF ( DEBARRED ) %]
<li>Patron is restricted</li>
[% END %]
[% IF ( NO_MORE_RENEWALS ) %]
<li>No more renewals possible</li>
[% END %]
[%IF ( AGE_RESTRICTION ) %]
<li>Age restriction [% AGE_RESTRICTION %].</li>
[% END %]
[% IF ( EXPIRED ) %]
<li>Patron's card is expired</li>
[% END %]
[% IF ( TOO_MANY ) %]
<li>Too many checked out. [% current_loan_count %] checked out, only [% max_loans_allowed %] are allowed.</li>
[% END %]
[% IF ( ITEMNOTSAMEBRANCH ) %]
<li>This item belongs to [% Branches.GetName( itemhomebranch ) %] and cannot be checked out from this location.</li>
[% END %]
[% IF ( USERBLOCKEDWITHENDDATE ) %]
<li>Patron has a restriction until [% USERBLOCKEDWITHENDDATE | $KohaDates %].</li>
[% END %]
[% IF ( USERBLOCKEDNOENDDATE ) %]
<li>Patron has an indefinite restriction.</li>
[% END %]
[% IF ( USERBLOCKEDOVERDUE ) %]
<li>Checkouts are BLOCKED because patron has overdue items.</li>
[% END %]
</ul>
[% IF (forceallow) %]
<li>Restriction overridden temporarily.</li>
[% END %]
</div></div>
[% ELSE %]
[% IF ( soundon ) %]
<audio src="[% interface %]/[% theme %]/sound/beep.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio>
[% END %]
[% IF (forceallow) %]
<div id="overridden_debarment" class="dialog alert">Restriction overridden temporarily</div>
[% END %]
[% END %] <!-- /impossible -->
[% IF ( issued ) %]
<p>Item checked out</p>
[% END %]
[% IF ( message ) %]
[% INCLUDE 'patron-toolbar.inc' %]
<h4>
No patron matched <span class="ex">[% message %]</span>
</h4>
[% END %]
[% IF ( borrowers ) %]
[% INCLUDE 'patron-toolbar.inc' %]
<form method="post" action="/cgi-bin/koha/circ/circulation.pl" id="mainform" name="mainform" autocomplete="off">
<fieldset id="circ_circulation_selectborrower" class="brief">
<legend>Patron selection</legend>
[% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
<input type="hidden" name="branch" value="[% branch %]" />
<input type="hidden" name="printer" value="[% printer %]" />
<input type="hidden" name="duedatespec" value="[% duedatespec %]" />
<input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
<table id="table_borrowers">
<thead>
<tr>
<th></th>
<th>Name</th>
<th>Cardnumber</th>
<th>Category</th>
<th>Library</th>
<th>Address</th>
</tr>
</thead>
<tbody>
[% FOREACH borrower IN borrowers %]
<tr>
<td><input type="radio" name="borrowernumber" value="[% borrower.borrowernumber %]" /></td>
<td>[% borrower.surname %], [% borrower.firstname %]</td>
<td>[% borrower.cardnumber %]</td>
<td>[% borrower.categorycode %]</td>
<td>[% borrower.branchcode %]</td>
<td>[% borrower.address %]</td>
</tr>
[% END %]
</tbody>
</table>
<fieldset class="action"><input type="submit" value="Select" /></fieldset>
</fieldset>
</form>
[% ELSE %]
<!-- BARCODE ENTRY -->
[% IF ( borrowernumber ) %]
<div class="yui-g">
[% IF ( !noissues ) || ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') )%]
[% IF ( flagged ) %]
<div class="yui-u first">
[% ELSE %]
<div>
[% END %]
<form method="post" action="/cgi-bin/koha/circ/circulation.pl" id="mainform" name="mainform" autocomplete="off">
<fieldset id="circ_circulation_issue">
[% IF ( DisplayClearScreenButton ) %]
<span id="clearscreen"><a href="/cgi-bin/koha/circ/circulation.pl" title="Clear screen">x</a></span>
[% END %]
[% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
<label for="barcode">Checking out to [% INCLUDE 'patron-title.inc' %]</label>
<div class="hint">Enter item barcode:</div>
[% IF NEEDSCONFIRMATION %]
<input type="text" name="barcode" id="barcode" class="barcode focus" size="14" disabled="disabled" />
[% ELSE %]
<input type="text" name="barcode" id="barcode" class="barcode focus" size="14" />
[% END %]
<button type="submit" class="btn">Check out</button>
<div class="date-select">
[% IF NEEDSCONFIRMATION %]
<input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled" />
[% ELSE %]
<input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" />
[% END %]
<label for="auto_renew">Automatic renewal</label>
</div>
[% UNLESS ( noissues && Koha.Preference('OnSiteCheckoutsForce') ) %]
[% IF ( SpecifyDueDate ) %]
<div class="date-select">
<div class="hint">Specify due date [% INCLUDE 'date-format.inc' %]: </div>
[% IF ( duedatespec ) %]
<input type="text" size="13" id="duedatespec" name="duedatespec" value="[% duedatespec %]" readonly="readonly" />
[% ELSE %]
<input type="text" size="13" id="duedatespec" name="duedatespec" value="" readonly="readonly" />
[% END %]
<label for="stickyduedate"> Remember for session:</label>
[% IF ( stickyduedate ) %]
<input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" checked="checked" />
[% ELSE %]
<input type="checkbox" id="stickyduedate" onclick="this.form.barcode.focus();" name="stickyduedate" />
[% END %]
<button class="btn btn-small action" id="cleardate" name="cleardate" onclick="this.checked = false; this.form.duedatespec.value = ''; this.form.stickyduedate.checked = false; this.form.barcode.focus(); return false;" >Clear</button>
</div>
[% END %]
[% END %]
[% IF Koha.Preference('OnSiteCheckouts') %]
<div class="onsite_checkout-select">
[% IF noissues %]
<div class="onsite-checkout-only">
<input type="checkbox" id="onsite_checkout" name="onsite_checkout_forced" checked="checked" disabled="disabled" /> <label for="onsite_checkout">On-site checkouts only. Automatic due date: </label>
<input type="text" name="duedatespec" id="duedatespec" readonly="readonly" />
<input type="hidden" name="onsite_checkout" checked="checked" value="1" />
</div>
[% ELSE %]
<input type="checkbox" id="onsite_checkout" name="onsite_checkout" /> <label for="onsite_checkout">On-site checkout</label>
[% END %]
</div>
[% END %]
<input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" />
<input type="hidden" name="branch" value="[% branch %]" />
<input type="hidden" name="printer" value="[% printer %]" />
<input type="hidden" name="print" value="maybe" />
<input type="hidden" name="debt_confirmed" value="[% debt_confirmed %]" />
[% IF ( CHARGES ) %]
<input type="hidden" name="charges" value="yes" />
<input type="hidden" name="oldamount" value="[% amountold %]" />
[% END %]
</fieldset>
</form></div>[% END %]<!-- /unless noissues -->
[% IF ( noissues ) %]
[% IF ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') ) %]
<div class="yui-u">
[% ELSE %]
<div>
[% END %]
[% ELSE %]
<div class="yui-u">
[% END %]
[% IF flagged %]
[% IF ( noissues ) %]
[% IF ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') ) %]
<div id="circmessages" class="circmessage attention">
[% ELSE %]
<h4>Checking out to [% INCLUDE 'patron-title.inc' %]</h4>
<div id="circmessages" class="circmessage warning">
[% END %]
<h3>
Cannot check out!
[% IF ( Koha.Preference('OnSiteCheckouts') && Koha.Preference('OnSiteCheckoutsForce') ) %]
<span class="circ-hlt">Only on-site checkouts are allowed</span>
[% END %]
</h3>
[% ELSE %]
<div id="circmessages" class="circmessage attention">
<h3>Attention:</h3>
[% END %]
<ul>
[% IF ( warndeparture ) %]
<li><span class="circ-hlt">Expiration:</span> Patron's card will expire soon.
Patron's card expires on [% expiry %] <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% borrowernumber %]&amp;cardnumber=[% cardnumber %]&amp;destination=circ&amp;reregistration=y">Renew</a> or <a href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=circ&amp;borrowernumber=[% borrowernumber %]&amp;categorycode=[% categorycode %]">Edit Details</a>
</li>
[% END %]
[% IF ( returnbeforeexpiry ) %]
<li><span class="circ-hlt">Set due date to expiry:</span> You have the ReturnBeforeExpiry system preference enabled this means if the
expiry date is before the date due, the date due will be set to the expiry date
</li>
[% END %]
[% IF ( expired ) %]
<li><span class="circ-hlt">Expiration:</span> Patron's card has expired.
[% IF ( expiry ) %]Patron's card expired on [% expiry %][% END %] <a href="/cgi-bin/koha/members/setstatus.pl?borrowernumber=[% borrowernumber %]&amp;cardnumber=[% cardnumber %]&amp;destination=circ&amp;reregistration=y">Renew</a> or <a href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=circ&amp;borrowernumber=[% borrowernumber %]&amp;categorycode=[% categorycode %]">Edit Details</a>
</li>
[% END %]
[% IF ( gna ) %]
<li class="blocker"><span class="circ-hlt">Address:</span> Patron's address in doubt</li>
[% END %]
[% IF ( lost ) %]
<li class="blocker"><span class="circ-hlt">Lost: </span>Patron's card is lost</li>
[% END %]
[% IF ( userdebarred ) %]
<li class="blocker">
<span class="circ-hlt"> Restricted:</span> Patron's account is restricted
[% IF ( userdebarreddate ) %]
until [% userdebarreddate %]
[% END %]
[% IF ( debarredcomment ) %]
with the explanation: <br/><i>[% debarredcomment | html_line_break %]</i>
[% END %]
<br/>
<a class="btn btn-small" href="#reldebarments" onclick="$('#debarments-tab-link').click()"><i class="icon-ban-circle"></i> View restrictions</a>
[% IF (noissues && borrowernumber && CAN_user_circulate_force_checkout) %]
<span class="override_debarment">
<a href="/cgi-bin/koha/circ/circulation.pl?forceallow=1&amp;borrowernumber=[% borrowernumber %]" class="btn btn-small">Override restriction temporarily</a>
</span>
[% END %]
</li>
[% END %]
[% IF ( odues ) %]<li>[% IF ( nonreturns ) %]<span class="circ-hlt">Overdues:</span> Patron has <span class="circ-hlt">ITEMS OVERDUE</span>. See highlighted items <a href="#checkouts">below</a>[% END %]</li>
[% END %]
[% IF ( charges ) %]
<li>
<span class="circ-hlt">Fees &amp; Charges:</span> Patron has <a href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% borrowernumber %]">Outstanding fees &amp; charges[% IF ( chargesamount ) %] of [% chargesamount %][% END %]</a>.
[% IF ( charges_is_blocker ) %]
Checkouts are <span class="circ-hlt">BLOCKED</span> because fine balance is <span class="circ-hlt">OVER THE LIMIT</span>.
[% END %]
<a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% borrowernumber %]">Make payment</a></li>
[% END %]
[% IF ( credits ) %]
<li>
<span class="circ-hlt">Credits:</span> Patron has a credit[% IF ( creditsamount ) %] of [% creditsamount %][% END %]
</li>
[% END %]
</ul>
</div>
[% IF ( WaitingReserveLoop ) %]
<div id="holdswaiting" class="circmessage">
<h4>Holds waiting:</h4>
[% FOREACH WaitingReserveLoo IN WaitingReserveLoop %]
<ul>
<li> <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% WaitingReserveLoo.biblionumber %]">[% WaitingReserveLoo.title |html %]</a> ([% WaitingReserveLoo.itemtype %]), [% IF ( WaitingReserveLoo.author ) %]by [% WaitingReserveLoo.author %][% END %] [% IF ( WaitingReserveLoo.itemcallnumber ) %][[% WaitingReserveLoo.itemcallnumber %]] [% END %]Hold placed on [% WaitingReserveLoo.reservedate %].
[% IF ( WaitingReserveLoo.waitingat ) %]
<br />[% IF ( WaitingReserveLoo.waitinghere ) %]<strong class="waitinghere">[% ELSE %]<strong>[% END %]Waiting at [% WaitingReserveLoo.waitingat %]</strong>
[% END %]
</li>
</ul>
[% END %]
</div>
<!-- /If WaitingReserveLoop -->[% END %]
[% IF ( notes ) %]
<div id="circnotes" class="circmessage">
<h4>Notes:</h4>
<p><span class="circ-hlt">[% notesmsg %]</span></p>
</div>
<!-- /If notes -->[% END %]
<div id="messages" class="circmessage">
<h4>Messages:</h4>
<ul>
[% FOREACH lib_messages_loo IN lib_messages_loop %]
<li>
<span class="circ-hlt">
[% lib_messages_loo.message_date_formatted %]
[% lib_messages_loo.branchcode %]
<i>"[% lib_messages_loo.message %]"</i>
</span>
[% IF ( lib_messages_loo.can_delete ) %]
<a href="/cgi-bin/koha/circ/del_message.pl?message_id=[% lib_messages_loo.message_id %]&amp;borrowernumber=[% lib_messages_loo.borrowernumber %]">[Delete]</a>
[% ELSE %]
[% IF ( all_messages_del ) %]
<a href="/cgi-bin/koha/circ/del_message.pl?message_id=[% lib_messages_loo.message_id %]&amp;borrowernumber=[% lib_messages_loo.borrowernumber %]">[Delete]</a>
[% END %]
[% END %]
</li>
[% END %]
[% FOREACH bor_messages_loo IN bor_messages_loop %]
<li><span class="">[% bor_messages_loo.message_date_formatted %] [% bor_messages_loo.branchcode %] <i>"[% bor_messages_loo.message %]"</i></span> [% IF ( bor_messages_loo.can_delete ) %]<a href="/cgi-bin/koha/circ/del_message.pl?message_id=[% bor_messages_loo.message_id %]&amp;borrowernumber=[% bor_messages_loo.borrowernumber %]">[Delete]</a>
[% ELSIF ( all_messages_del ) %]
<a href="/cgi-bin/koha/circ/del_message.pl?message_id=[% bor_messages_loo.message_id %]&amp;borrowernumber=[% bor_messages_loo.borrowernumber %]">[Delete]</a>
[% END %]</li>
[% END %]
</ul>
</div>
<!-- /If flagged -->[% END %]
</div>
</div>
[% IF ( issue ) %]
<div class="dialog message">[% issue.item.biblio.title %] ([% issue.item.barcode %]) due on [% issue.date_due | $KohaDates %]</div>
[% END %]
<div class="yui-g"><div id="patronlists" class="toptabs">
<ul>
<li>
[% IF ( issuecount ) %]
<a href="#checkouts">[% issuecount %] Checkout(s)</a>
[% ELSE %]
<a href="#checkouts">0 Checkouts</a>
[% END %]
</li>
[% IF relatives_issues_count %]
<li><a id="relatives-issues-tab" href="#relatives-issues">Relatives' checkouts</a></li>
[% END %]
<li>
[% IF ( holds_count ) %]
<a href="#reserves" id="holds-tab">[% holds_count %] Hold(s)</a>
[% ELSE %]
<a href="#reserves" id="holds-tab">0 Holds</a>
[% END %]
</li>
<li><a id="debarments-tab-link" href="#reldebarments">[% debarments.size %] Restrictions</a></li>
</ul>
<!-- SUMMARY : TODAY & PREVIOUS ISSUES -->
[% INCLUDE "checkouts-table.inc" %]
[% IF ( relatives_issues_count ) %]
<div id="relatives-issues">
<table id="relatives-issues-table">
<thead>
<tr>
<th scope="col">Due date (unformatted, hidden)</th>
<th scope="col">Due date</th>
<th scope="col">Title</th>
<th scope="col">Item type</th>
<th scope="col">Checked out on</th>
<th scope="col">Checked out from</th>
<th scope="col">Call no</th>
<th scope="col">Charge</th>
<th scope="col">Price</th>
<th scope="col">Patron</th>
</tr>
</thead>
</table>
</div>
[% END %]
[% INCLUDE borrower_debarments.inc %]
<div id="reserves">
[% IF ( holds_count ) %]
<form action="/cgi-bin/koha/reserve/modrequest.pl" method="post">
<input type="hidden" name="from" value="circ" />
<table id="holds-table" style="width: 100% !Important;">
<thead>
<tr>
<th>Hold date</th>
<th>Title</th>
<th>Call number</th>
<th>Barcode</th>
<th>Expiration</th>
<th>Priority</th>
<th>Delete?</th>
</tr>
</thead>
</table>
<fieldset class="action">
<input type="submit" class="cancel" name="submit" value="Cancel marked holds" />
</fieldset>
</form>
[% IF SuspendHoldsIntranet %]
<fieldset class="action">
<form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
<input type="hidden" name="from" value="circ" />
<input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
<input type="submit" value="Suspend all holds" />
[% IF AutoResumeSuspendedHolds %]
<label for="suspend_until">until</label>
<input type="text" size="10" id="suspend_until" name="suspend_until" class="datepicker" />
<span class="hint">Specify date on which to resume [% INCLUDE 'date-format.inc' %]: </span>
[% END %]
</form>
</fieldset>
<fieldset class="action">
<form action="/cgi-bin/koha/reserve/modrequest_suspendall.pl" method="post">
<input type="hidden" name="from" value="circ" />
<input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
<input type="hidden" name="suspend" value="0" />
<input type="submit" value="Resume all suspended holds" />
</form>
</fieldset>
[% END # IF SuspendHoldsIntranet %]
[% ELSE %]
<p>Patron has nothing on hold.</p>
[% END %]
</div> <!-- reservesloop -->
[% END %] <!-- borrowernumber -->
</div></div>
[% END %]
</div>
</div>
[% UNLESS ( borrowers ) %][% IF ( borrowernumber ) %]<div class="yui-b">
[% INCLUDE 'circ-menu.inc' %]
</div>[% END %][% END %]
</div>
<!-- Modal -->
<div id="barcodeSubmittedModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="barcodeSubmittedModalLabel" aria-hidden="true">
<div class="modal-header">
<h3 id="barcodeSubmittedModalLabel">Barcode submitted</h3>
</div>
<div class="modal-body">
<p>You have already submitted a barcode, please wait for the checkout to process...</p>
</div>
</div>
[% INCLUDE 'intranet-bottom.inc' %]