Koha/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
Kyle M Hall 82d1fe4086 Bug 8559 - conflicting item statuses - Force cancel or revert
If a librarian checks out a waiting hold to a different patron
it gives the item conflicting statuses. The item will show as both
checked out to the different patron, and waiting for the original
patron.

This patch fixes this by not allowing this situation to occurr. If
a librarian attempts to issue an item that is waiting for a different
patron, the system will force the librarian to choose to
a) not issue the item
b) issue the item, and cancel the waiting hold
c) issue the item, and revert the waiting hold

In this scenario, reverting the waiting hold means to push it back
on the reserves queue as a hold with a priority of 1, which will push
the priorities of any existing holds back by 1 as well. It will become
an item level hold for the given item, as we cannot know if the hold
was item-level or bib-level given the data we have about the hold.

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

All three cases tested, correct outcome each time

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-11-28 17:09:32 -05:00

1131 lines
48 KiB
Text

[% USE KohaDates %]
[% INCLUDE 'doc-head-open.inc' %]
<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' %]
[% IF ( UseTablesortForCirc ) %]<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>[% END %]
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery-ui-timepicker-addon.js"></script>
<script type="text/javascript">
//<![CDATA[
[% IF ( borrowernumber ) %]if($.cookie("holdfor") != [% borrowernumber %]){ $.cookie("holdfor",null, { path: "/", expires: 0 }); }[% ELSE %]$.cookie("holdfor",null, { path: "/", expires: 0 });[% END %]
[% IF ( UseTablesortForCirc ) %]$.tablesorter.addParser({
id: 'articles',
is: function(s) {return false; },
format: function(s) { return s.toLowerCase().replace(/^(the|an|a) /,''); },
type: 'text'
});[% END %]
[% UNLESS ( borrowernumber ) %][% UNLESS ( CGIselectborrower ) %]window.onload=function(){ $('#findborrower').focus(); };[% END %][% END %]
$(document).ready(function() {
$('#patronlists').tabs();
[% IF ( UseTablesortForCirc ) %]$.tablesorter.defaults.widgets = ['zebra'];
$("#issuest").tablesorter({[% IF ( dateformat_metric ) %]
dateFormat: 'uk',[% END %]
headers: { 1: { sorter: 'articles' },6: { sorter: false },7:{sorter:false},8:{sorter:false},9:{sorter:false}}
});
$("#relissuest").tablesorter({[% IF ( dateformat_metric ) %]
dateFormat: 'uk',[% END %]
headers: { 1: { sorter: 'articles' },6: { sorter: false },7:{sorter:false},8:{sorter:false},9:{sorter:false}}
});
//FIXME: Sorting does not work when there are previous checkouts only
// (It works fine when there are only checkouts of the day, or both previous and today checkouts)
$("#issuest").bind("sortEnd",function() {
$("#previous").parents("tr").remove(); // 'previous checkouts' header chokes table sorter
});
$("#relissuest").bind("sortEnd",function() {
$("#relprevious").parents("tr").remove(); // 'previous checkouts' header chokes table sorter
});
$("#holdst").tablesorter({[% IF ( dateformat_metric ) %]
dateFormat: 'uk',[% END %]
sortList: [[0,0]],
headers: { 1: { sorter: 'articles' },5: { sorter: false }}
});[% END %]
[% IF ( AllowRenewalLimitOverride ) %]
$( '#override_limit' ).click( function () {
if ( this.checked ) {
$( '.renewals-allowed' ).show(); $( '.renewals-disabled' ).hide();
} else {
$( '.renewals-allowed' ).hide(); $( '.renewals-disabled' ).show();
}
} ).attr( 'checked', false );
[% END %][% IF ( CircAutoPrintQuickSlip ) %]
// listen submit to trigger qslip on empty checkout
$('#mainform').bind('submit',function() {
if ($('#barcode').val() == '') {
return printx_window('qslip'); }
});[% END %]
var allcheckboxes = $(".checkboxed");
$("#renew_all").click(function(){
$(allcheckboxes).checkCheckboxes(":input[name*=items]");
$(allcheckboxes).unCheckCheckboxes(":input[name*=barcodes]");
});
$("#CheckAllitems").click(function(){
$(allcheckboxes).checkCheckboxes(":input[name*=items]");
$(allcheckboxes).unCheckCheckboxes(":input[name*=barcodes]"); return false;
});
$("#CheckNoitems").click(function(){
$(allcheckboxes).unCheckCheckboxes(":input[name*=items]"); return false;
});
$("#CheckAllreturns").click(function(){
$(allcheckboxes).checkCheckboxes(":input[name*=barcodes]");
$(allcheckboxes).unCheckCheckboxes(":input[name*=items]"); return false;
});
$("#CheckNoreturns" ).click(function(){
$(allcheckboxes).unCheckCheckboxes(":input[name*=barcodes]"); return false;
});
$("#CheckAllexports").click(function(){
$(".checkboxed").checkCheckboxes(":input[name*=biblionumbers]");
$(".checkboxed").unCheckCheckboxes(":input[name*=items]");
return false;
});
$("#CheckNoexports").click(function(){
$(".checkboxed").unCheckCheckboxes(":input[name*=biblionumbers]");
return false;
});
$("#relrenew_all").click(function(){
$(allcheckboxes).checkCheckboxes(":input[name*=items]");
$(allcheckboxes).unCheckCheckboxes(":input[name*=barcodes]");
});
$("#relCheckAllitems").click(function(){
$(allcheckboxes).checkCheckboxes(":input[name*=items]");
$(allcheckboxes).unCheckCheckboxes(":input[name*=barcodes]"); return false;
});
$("#relCheckNoitems").click(function(){
$(allcheckboxes).unCheckCheckboxes(":input[name*=items]"); return false;
});
$("#relCheckAllreturns").click(function(){
$(allcheckboxes).checkCheckboxes(":input[name*=barcodes]");
$(allcheckboxes).unCheckCheckboxes(":input[name*=items]"); return false;
});
$("#relCheckNoreturns").click(function(){
$(allcheckboxes).unCheckCheckboxes(":input[name*=barcodes]"); return false;
});
[% IF ( CAN_user_circulate_override_renewals ) %]
[% IF ( AllowRenewalLimitOverride ) %]
$( '#override_limit' ).click( function () {
if ( this.checked ) {
$( '.renewals-allowed' ).show(); $( '.renewals-disabled' ).hide();
} else {
$( '.renewals-allowed' ).hide(); $( '.renewals-disabled' ).show();
}
} ).attr( 'checked', false );
[% END %]
[% END %]
// Clicking the table cell checks the checkbox inside it
$("td").click(function(e){
if(e.target.tagName.toLowerCase() == 'td'){
$(this).find("input:checkbox:visible").each( function() {
if($(this).attr("checked")){
$(this).removeAttr("checked");
} else {
$(this).attr("checked","checked");
// radioCheckBox($(this));
}
});
}
});
// prevent adjacent checkboxes from being checked simultaneously
function radioCheckBox(box){
box.parents("td").siblings().find("input:checkbox:visible").each(function(){
if($(this).attr("checked")){
$(this).removeAttr("checked");
}
});
}
$("#messages ul").after("<a href=\"#\" id=\"addmessage\">"+_("Add a new message")+"</a>");
$("#borrower_messages .cancel").click(function(){
$("#add_message_form").hide();
$("#addmessage").show();
});
$("#addmessage").click(function (){
$(this).hide();
$("#add_message_form").show();
});
$("input.radio").click(function(){
radioCheckBox($(this));
});
$("#exportmenuc").empty();
initExportButton();
$("#newduedate").datetimepicker({
minDate: 1, // require that renewal date is after today
hour: 23,
minute: 59
});
$("#duedatespec").datetimepicker({
onClose: function(dateText, inst) { $("#barcode").focus(); },
hour: 23,
minute: 59
});
});
function initExportButton() {
var exportmenu = [
{ text: _("ISO2709 with items"), onclick: {fn: function(){export_submit("iso2709_995")}} },
{ text: _("ISO2709 without items"), onclick: {fn: function(){export_submit("iso2709")}} },
{ text: _("CSV"), onclick: {fn: function(){export_submit("csv")}} },
];
new YAHOO.widget.Button({
type: "menu",
label: _("Export checkouts"),
name: "exportmenubutton",
menu: exportmenu,
container: "exportmenuc"
});
}
function export_submit(format) {
if ($("input:checkbox[name='biblionumbers'][checked]").length < 1){
alert(_("You must select a checkout to export"));
return;
}
$("input:checkbox[name='biblionumbers']").each( function(){
var input_item = $(this).siblings("input:checkbox");
if ( $(this).is(":checked") ) {
$(input_item).attr("checked", "checked");
} else {
$(input_item).attr("checked", "");
}
} );
if (format == 'iso2709_995') {
format = 'iso2709';
$("#dont_export_item").val(0);
} else if (format == 'iso2709') {
$("#dont_export_item").val(1);
} else {
[% UNLESS ( export_with_csv_profile ) %]
alert(_("You must define a csv profile for export (in tools>CSV export profiles) and fill the ExportWithCsvProfile system preference"));
return false;
[% END %]
}
document.issues.action="/cgi-bin/koha/tools/export.pl";
document.getElementById("export_format").value = format;
document.issues.submit();
/* Reset form action to its initial value */
document.issues.action="/cgi-bin/koha/reserve/renewscript.pl";
};
function validate1(date) {
var today = new Date();
if ( date < today ) {
return true;
} else {
return false;
}
};
//]]>
</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 ( CGIselectborrower ) %]
<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 'circ-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 ( dateexpiry ) %]<div class="dialog message">Patron's account has been renewed until [% dateexpiry %]</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 ( NEEDSCONFIRMATION ) %]
<div class="yui-g">
<div id="circ_needsconfirmation" class="dialog alert">
<h3>Please confirm checkout</h3>
<ul>
[%IF ( AGE_RESTRICTION ) %]
<li>Age restriction [% AGE_RESTRICTION %]. Check out anyway?</li>
[% END %]
[% IF ( DEBT ) %]
<li>The patron has a debt of [% DEBT %]</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 %]). Check in and check out?</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>Item is normally not for loan. Check out anyway?</li>
[% END %]
[% IF ( USERBLOCKEDOVERDUE ) %]
<li>Patron has [% USERBLOCKEDOVERDUE %] overdue item(s). Check out anyway?</li>
[% END %]
[% IF ( ITEM_LOST ) %]
<li>This item has been lost with a status of "[% ITEM_LOST %]". Check out anyway?</li>
[% END %]
[% IF HIGHHOLDS %]
<li>High demand item. Loan period shortened to [% HIGHHOLDS.duration %] days (due [% HIGHHOLDS.returndate %]). Check out anyway?</li>
[% END %]
</ul>
[% IF HIGHHOLDS %]
<script language="JavaScript" type="text/javascript">
$(document).ready(function() {
$("input[name=duedatespec]:hidden").val('[% HIGHHOLDS.returndate %]');
});
</script>
[% END %]
<form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off">
[% 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 %]" />
<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 %]
</form>
<form method="get" action="/cgi-bin/koha/circ/circulation.pl">
<input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
<input type="hidden" name="duedatespec" value="[% duedatespec %]" />
<input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
[% 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 %]
</form>
</div></div>
[% END %] <!-- NEEDSCONFIRMATION -->
[% IF ( IMPOSSIBLE ) %]
[% IF ( soundon ) %]
<audio src="/intranet-tmpl/prog/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 %]</li>
[% IF ( fast_cataloging ) %]
[% IF ( CAN_user_editcatalogue_fast_cataloging ) %]
<a href="/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=FA&amp;barcode=[% barcode %]&amp;borrowernumber=[% borrowernumber %]&amp;branch=[% branch %]&amp;duedatespec=[% duedatespec %]&amp;stickyduedate=[% stickyduedate %]">Fast cataloging</a>
[% END %]
[% END %]
[% END %]
[% IF ( NOT_FOR_LOAN ) %]
<li>Item not for loan</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 ( ITEMNOTSAMEBRANCH ) %]
<li>This item belongs to [% itemhomebranch %] and cannot be issued from this location.</li>
[% END %]
[% IF ( USERBLOCKEDREMAINING ) %]
<li>Patron has had overdue items and is blocked for [% USERBLOCKEDREMAINING %] day(s).</li>
[% END %]
[% IF ( USERBLOCKEDOVERDUE ) %]
<li>Checkouts are BLOCKED because patron has overdue items</li>
[% END %]
</ul>
</div></div>
[% ELSE %]
[% IF ( soundon ) %]
<audio src="/intranet-tmpl/prog/sound/beep.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio>
[% 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 ( CGIselectborrower ) %]
[% 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>
<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 %]" />
<ol> <li>
<label for="borrowernumber">Select a patron: </label>
[% CGIselectborrower %]
</li>
</ol>
<p><input type="submit" value="Select" /></p>
</fieldset>
</form>
[% ELSE %] <!-- CGIselectborrower -->
<!-- BARCODE ENTRY -->
[% IF ( borrowernumber ) %]
<div class="yui-g">
[% UNLESS ( noissues ) %]
[% 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 %]
<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 %]
<input type="submit" value="Check Out" />
[% 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 %]
<input type="button" class="action" id="cleardate" value="Clear" name="cleardate" onclick="this.checked = false; this.form.duedatespec.value = ''; this.form.stickyduedate.checked = false; this.form.barcode.focus(); return false;" />
</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 ) %]<div>[% ELSE %]<div class="yui-u">[% END %]
[% IF ( flagged ) %]
[% IF ( noissues ) %]
<h4>Checking out to [% INCLUDE 'patron-title.inc' %]</h4>
<div id="circmessages" class="circmessage warning">
[% ELSE %]
<div id="circmessages" class="circmessage attention">
[% END %]
<h3>[% IF ( noissues ) %]
Cannot check out!
[% ELSE %]Attention:[% END %]</h3>
<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 comment "[% debarredcomment %]"[% END %]
<form class="inline compact" action="/cgi-bin/koha/members/setstatus.pl" method="post">
<input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
<input type="hidden" name="destination" value="circ" />
<input type="hidden" name="cardnumber" value="[% cardnumber %]" />
<input type="submit" value="Lift restriction" />
</form>
</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 %]
Make <a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% borrowernumber %]">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 %] 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>
<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 ( displayrelissues ) %]
<li><a href="#relissues">Relatives' checkouts</a></li>
[% END %]
<li>[% IF ( countreserv ) %]
<a href="#reserves">[% countreserv %] Hold(s)</a>
[% ELSE %]
<a href="#reserves">0 Holds</a>
[% END %]</li>
</ul>
<!-- SUMMARY : TODAY & PREVIOUS ISSUES -->
<div id="checkouts">
[% IF ( issuecount ) %]
<form name="issues" action="/cgi-bin/koha/reserve/renewscript.pl" method="post" class="checkboxed">
<input type="hidden" value="circ" name="destination" />
<input type="hidden" name="cardnumber" value="[% cardnumber %]" />
<input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
<input type="hidden" name="branch" value="[% branch %]" />
<table id="issuest">
<thead><tr>
<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">Renew <p class="column-tool"><a href="#" id="CheckAllitems">select all</a> | <a href="#" id="CheckNoitems">none</a></p></th>
<th scope="col">Check in <p class="column-tool"><a href="#" id="CheckAllreturns">select all</a> | <a href="#" id="CheckNoreturns">none</a></p></th>
[% IF export_remove_fields OR export_with_csv_profile %]
<th scope="col">Export <p class="column-tool"><a href="#" id="CheckAllexports">select all</a> | <a href="#" id="CheckNoexports">none</a></p></th>
[% END %]
</tr>
[% IF ( todayissues ) %]</thead>
[% INCLUDE 'checkouts-table-footer.inc' %]
<tbody>
[% FOREACH todayissue IN todayissues %]
[% IF ( loop.odd ) %]
<tr>
[% ELSE %]
<tr class="highlight">
[% END %]
[% IF ( todayissue.od ) %]<td class="od">[% ELSE %]<td>[% END %]
[% todayissue.dd %]
</td>
<td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% todayissue.biblionumber %]&amp;type=intra"><strong>[% todayissue.title |html %]</strong></a>[% IF ( todayissue.author ) %], by [% todayissue.author %][% END %][% IF ( todayissue.itemnotes ) %]- <span class="circ-hlt">[% todayissue.itemnotes %]</span>[% END %] <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% todayissue.biblionumber %]&amp;itemnumber=[% todayissue.itemnumber %]#item[% todayissue.itemnumber %]">[% todayissue.barcode %]</a></td>
<td>[% UNLESS ( noItemTypeImages ) %] [% IF ( todayissue.itemtype_image ) %]<img src="[% todayissue.itemtype_image %]" alt="" />[% END %][% END %][% todayissue.itemtype %]</td>
<td>[% todayissue.checkoutdate %]</td>
[% IF ( todayissue.multiple_borrowers ) %]<td>[% todayissue.firstname %] [% todayissue.surname %]</td>[% END %]
<td>[% todayissue.issuingbranchname %]</td>
<td>[% todayissue.itemcallnumber %]</td>
<td>[% todayissue.charge %]</td>
<td>[% todayissue.replacementprice %]</td>
[% IF ( todayissue.renew_failed ) %]
<td class="problem">Renewal failed</td>
[% ELSE %]
<td><span style="padding: 0 1em;">[% IF ( todayissue.renewals ) %][% todayissue.renewals %][% ELSE %]0[% END %]</span>
[% IF ( todayissue.can_renew ) %]
<input type="checkbox" name="all_items[]" value="[% todayissue.itemnumber %]" checked="checked" style="display: none;" />
[% IF ( todayissue.od ) %]
<input type="checkbox" class="radio" name="items[]" value="[% todayissue.itemnumber %]" checked="checked" />
[% ELSE %]
<input type="checkbox" class="radio" name="items[]" value="[% todayissue.itemnumber %]" />
[% END %]
[% ELSE %]
[% IF ( todayissue.can_confirm ) %]<span class="renewals-allowed" style="display: none">
<input type="checkbox" name="all_items[]" value="[% todayissue.itemnumber %]" checked="checked" style="display: none;" />
[% IF ( todayissue.od ) %]
<input type="checkbox" class="radio" name="items[]" value="[% todayissue.itemnumber %]" checked="checked" />
[% ELSE %]
<input type="checkbox" class="radio" name="items[]" value="[% todayissue.itemnumber %]" />
[% END %]
</span>
<span class="renewals-disabled">
[% END %]
[% IF ( todayissue.renew_error_on_reserve ) %]
<a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% todayissue.biblionumber %]">On hold</a>
[% END %]
[% IF ( todayissue.renew_error_too_many ) %]
Not renewable
[% END %]
[% IF ( todayissue.can_confirm ) %]
</span>
[% END %]
[% END %]
</td>
[% END %]
[% IF ( todayissue.return_failed ) %]
<td class="problem">Checkin failed</td>
[% ELSE %]
[% IF ( todayissue.renew_error_on_reserve ) %]
<td><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% todayissue.biblionumber %]">On hold</a>
<input type="checkbox" name="all_barcodes[]" value="[% todayissue.barcode %]" checked="checked" style="display: none;" />
</td>
[% ELSE %]
<td><input type="checkbox" class="radio" name="barcodes[]" value="[% todayissue.barcode %]" />
<input type="checkbox" name="all_barcodes[]" value="[% todayissue.barcode %]" checked="checked" style="display: none;" />
</td>
[% END %]
[% END %]
[% IF export_remove_fields OR export_with_csv_profile %]
<td style="text-align:center;">
<input type="checkbox" id="export_[% todayissue.biblionumber %]" name="biblionumbers" value="[% todayissue.biblionumber %]" />
<input type="checkbox" name="itemnumbers" value="[% todayissue.itemnumber %]" style="visibility:hidden;" />
</td>
[% END %]
</tr>
[% END %] <!-- /loop todayissues -->
<!-- /if todayissues -->[% END %]
[% IF ( previssues ) %]
[% IF ( todayissues ) %]<tr><th colspan="11"><a name="previous" id="previous"></a>Previous checkouts</th></tr>[% ELSE %]
<tr><th class="{sorter: false}" colspan="11"><a name="previous" id="previous"></a>Previous checkouts</th></tr></thead>
[% INCLUDE 'checkouts-table-footer.inc' %]
<tbody>
[% END %]
[% FOREACH previssue IN previssues %]
[% IF ( loop.odd ) %]
<tr>
[% ELSE %]
<tr class="highlight">
[% END %]
[% IF ( previssue.od ) %]<td class="od">[% ELSE %]<td>[% END %]
[% previssue.dd %]
</td>
<td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% previssue.biblionumber %]&amp;type=intra"><strong>[% previssue.title |html %]</strong></a>[% IF ( previssue.author ) %], by [% previssue.author %][% END %] [% IF ( previssue.itemnotes ) %]- [% previssue.itemnotes %][% END %] <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% previssue.biblionumber %]&amp;itemnumber=[% previssue.itemnumber %]#item[% previssue.itemnumber %]">[% previssue.barcode %]</a></td>
<td>
[% previssue.itemtype %]
</td>
<td>[% previssue.displaydate %]</td>
[% IF ( previssue.multiple_borrowers ) %]<td>[% previssue.firstname %] [% previssue.surname %]</td>[% END %]
<td>[% previssue.issuingbranchname %]</td>
<td>[% previssue.itemcallnumber %]</td>
<td>[% previssue.charge %]</td>
<td>[% previssue.replacementprice %]</td>
[% IF ( previssue.renew_failed ) %]
<td class="problem">Renewal failed</td>
[% ELSE %]
<td><span style="padding: 0 1em;">[% IF ( previssue.renewals ) %][% previssue.renewals %][% ELSE %]0[% END %]</span>
[% IF ( previssue.can_renew ) %]
<input type="checkbox" name="all_items[]" value="[% previssue.itemnumber %]" checked="checked" style="display: none;" />
[% IF ( previssue.od ) %]
<input type="checkbox" class="radio" name="items[]" value="[% previssue.itemnumber %]" checked="checked" />
[% ELSE %]
<input type="checkbox" class="radio" name="items[]" value="[% previssue.itemnumber %]" />
[% END %]
[% ELSE %]
[% IF ( previssue.can_confirm ) %]<span class="renewals-allowed" style="display: none">
<input type="checkbox" name="all_items[]" value="[% previssue.itemnumber %]" checked="checked" style="display: none;" />
[% IF ( previssue.od ) %]
<input type="checkbox" class="radio" name="items[]" value="[% previssue.itemnumber %]" checked="checked" />
[% ELSE %]
<input type="checkbox" class="radio" name="items[]" value="[% previssue.itemnumber %]" />
[% END %]
</span>
<span class="renewals-disabled">
[% END %]
[% IF ( previssue.renew_error_on_reserve ) %]
<a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% previssue.biblionumber %]">On hold</a>
[% END %]
[% IF ( previssue.renew_error_too_many ) %]
Not renewable
[% END %]
[% IF ( previssue.can_confirm ) %]
</span>
[% END %]
[% END %]
</td>
[% END %]
[% IF ( previssue.return_failed ) %]
<td class="problem">Check-in failed</td>
[% ELSE %]
[% IF ( previssue.renew_error_on_reserve ) %]
<td><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% previssue.biblionumber %]">On hold</a>
<input type="checkbox" name="all_barcodes[]" value="[% previssue.barcode %]" checked="checked" style="display: none;" />
</td>
[% ELSE %]
<td><input type="checkbox" class="radio" name="barcodes[]" value="[% previssue.barcode %]" />
<input type="checkbox" name="all_barcodes[]" value="[% previssue.barcode %]" checked="checked" style="display: none;" />
</td>
[% END %]
[% END %]
[% IF export_remove_fields OR export_with_csv_profile %]
<td style="text-align:center;">
<input type="checkbox" id="export_[% previssue.biblionumber %]" name="biblionumbers" value="[% previssue.biblionumber %]" />
<input type="checkbox" name="itemnumbers" value="[% previssue.itemnumber %]" style="visibility:hidden;" />
</td>
[% END %]
</tr>
<!-- /loop previssues -->[% END %]
<!--/if previssues -->[% END %]
</tbody>
</table>
[% IF ( issuecount ) %]
<fieldset class="action">
[% IF ( CAN_user_circulate_override_renewals ) %]
[% IF ( AllowRenewalLimitOverride ) %]
<label for="override_limit">Override renewal limit:</label>
<input type="checkbox" name="override_limit" id="override_limit" value="1" />
[% END %]
[% END %]
<input type="submit" name="renew_checked" value="Renew or Return checked items" />
<input type="submit" id="renew_all" name="renew_all" value="Renew all" />
[% IF export_remove_fields OR export_with_csv_profile %]
<br/><br/>
Don't export fields : <input type="text" id="export_remove_fields" name="export_remove_fields" value="[% export_remove_fields %]" title="Use for iso2709 exports" />
<span id="exportmenuc">Export</span>
<input type="hidden" name="op" value="export" />
<input type="hidden" id="export_format" name="format" value="iso2709" />
<input type="hidden" id="dont_export_item" name="dont_export_item" value="0" />
<input type="hidden" id="record_type" name="record_type" value="bibs" />
[% END %]
</fieldset>
[% END %]
</form>
[% ELSE %]
<p>Patron has nothing checked out.</p>
[% END %]
</div>
[% IF ( displayrelissues ) %]
<div id="relissues">
<table id="relissuest">
<thead>
<tr>
<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>
[% IF ( relissues ) %] <tbody>
[% FOREACH relissue IN relissues %]
[% IF ( loop.odd ) %]
<tr>
[% ELSE %]
<tr class="highlight">
[% END %]
[% IF ( relissue.overdue ) %]<td class="od">[% ELSE %]<td>[% END %]
[% relissue.dd %]</td>
<td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% relissue.biblionumber %]&amp;type=intra"><strong>[% relissue.title |html %]</strong></a>[% IF ( relissue.author ) %], by [% relissue.author %][% END %][% IF ( relissue.itemnotes ) %]- <span class="circ-hlt">[% relissue.itemnotes %]</span>[% END %] <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% relissue.biblionumber %]&amp;itemnumber=[% relissue.itemnumber %]#item[% relissue.itemnumber %]">[% relissue.barcode %]</a></td>
<td>[% UNLESS ( noItemTypeImages ) %] [% IF ( relissue.itemtype_image ) %]<img src="[% relissue.itemtype_image %]" alt="" />[% END %][% END %][% relissue.itemtype %]</td>
<td>[% relissue.displaydate %]</td>
<td>[% relissue.issuingbranchname %]</td>
<td>[% relissue.itemcallnumber %]</td>
<td>[% relissue.charge %]</td>
<td>[% relissue.replacementprice %]</td><td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% relissue.borrowernumber %]">[% relissue.firstname %] [% relissue.surname %] ([% relissue.cardnumber %])</a></td>
</tr>
[% END %] <!-- /loop relissues -->
<!-- /if relissues -->[% END %]
[% IF ( relprevissues ) %]
<tr><th class="{sorter: false}" colspan="11"><a name="relprevious" id="relprevious"></a>Previous checkouts</th></tr>
[% FOREACH relprevissue IN relprevissues %]
[% IF ( loop.odd ) %]
<tr>
[% ELSE %]
<tr class="highlight">
[% END %]
[% IF ( relprevissue.overdue ) %]<td class="od">[% ELSE %]<td>[% END %]
[% relprevissue.dd %]
</td>
<td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% relprevissue.biblionumber %]&amp;type=intra"><strong>[% relprevissue.title |html %]</strong></a>[% IF ( relprevissue.author ) %], by [% relprevissue.author %][% END %] [% IF ( relprevissue.itemnotes ) %]- [% relprevissue.itemnotes %][% END %] <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% relprevissue.biblionumber %]&amp;itemnumber=[% relprevissue.itemnumber %]#item[% relprevissue.itemnumber %]">[% relprevissue.barcode %]</a></td>
<td>[% UNLESS noItemTypeImages %][% IF relprevissue.itemtype_image %]<img src="[% relprevissue.itemtype_image %]" alt="" />[% END %][% END %][% relprevissue.itemtype %]</td>
<td>[% relprevissue.displaydate %]</td>
<td>[% relprevissue.issuingbranchname %]</td>
<td>[% relprevissue.itemcallnumber %]</td>
[% IF ( relprevissue.multiple_borrowers ) %]<td>[% relprevissue.firstname %] [% relprevissue.surname %]</td>[% END %]
<td>[% relprevissue.charge %]</td>
<td>[% relprevissue.replacementprice %]</td>
<td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% relprevissue.borrowernumber %]">[% relprevissue.firstname %] [% relprevissue.surname %] ([% relprevissue.cardnumber %])</a></td>
</tr>
<!-- /loop relprevissue -->[% END %]
<!--/if relprevissues -->[% END %]
</tbody>
</table>
</div>
[% END %]<!-- end displayrelissues -->
<div id="reserves">
[% IF ( reservloop ) %]
<form action="/cgi-bin/koha/reserve/modrequest.pl" method="post">
<input type="hidden" name="from" value="circ" />
<table id="holdst">
<thead><tr>
<th>Hold date</th>
<th>Title</th>
<th>Call number</th>
<th>Barcode</th>
<th>Priority</th>
<th>Delete?</th>
<th>&nbsp;</th>
</tr></thead>
<tbody>
[% FOREACH reservloo IN reservloop %]
<tr class="[% reservloo.color %]">
<td>[% reservloo.reservedate %]</td>
<td><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% reservloo.biblionumber %]"><strong>[% reservloo.title |html %]</strong></a>[% IF ( reservloo.author ) %], by [% reservloo.author %][% END %]</td>
<td>[% reservloo.itemcallnumber %]</td>
<td><em>[% IF ( reservloo.barcodereserv ) %]Item [% reservloo.barcodereserv %]
[% END %][% IF ( reservloo.waiting ) %] <strong>waiting at [% reservloo.waitingat %]</strong>
[% END %]
[% IF ( reservloo.transfered ) %] <strong>in transit</strong> from
[% reservloo.frombranch %] since [% reservloo.datesent %]
[% END %]
[% IF ( reservloo.nottransfered ) %] hasn't been transferred yet from [% reservloo.nottransferedby %]</i>
[% END %]</em></td>
<td>
[% IF ( reservloo.waitingposition ) %]<b> [% reservloo.waitingposition %] </b>[% END %]
</td>
<td><select name="rank-request">
<option value="n">No</option>
<option value="del">Yes</option>
</select>
<input type="hidden" name="biblionumber" value="[% reservloo.biblionumber %]" />
<input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
<input type="hidden" name="reservenumber" value="[% reservloo.reservenumber %]" />
</td>
<td>[% IF ( reservloo.suspend ) %]Suspended [% IF ( reservloo.suspend_until ) %] until [% reservloo.suspend_until | $KohaDates %][% END %][% END %]</td>
</tr>
[% END %]</tbody>
</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 ( CGIselectborrower ) %][% IF ( borrowernumber ) %]<div class="yui-b">
[% INCLUDE 'circ-menu.inc' %]
</div>[% END %][% END %]
</div>
[% INCLUDE 'intranet-bottom.inc' %]