Lines 517-525
$(document).ready(function() {
Link Here
|
517 |
} |
517 |
} |
518 |
|
518 |
|
519 |
var can_force_renew = ( oObj.onsite_checkout == 0 ) && |
519 |
var can_force_renew = ( oObj.onsite_checkout == 0 ) && |
520 |
( !oObj.can_renew_error.includes("on_reserve") || (oObj.can_renew_error.includes("on_reserve") && AllowRenewalOnHoldOverride)) |
520 |
( !oObj.can_renew_error || !oObj.can_renew_error.includes("on_reserve") || (oObj.can_renew_error.includes("on_reserve") && AllowRenewalOnHoldOverride)) |
521 |
? true : false; |
521 |
? true : false; |
522 |
var can_renew = ( oObj.renewals_remaining > 0 && !oObj.can_renew_error.length ); |
522 |
var can_renew = ( oObj.renewals_remaining > 0 && ( !oObj.can_renew_error || !oObj.can_renew_error.length ) ); |
523 |
content += "<span>"; |
523 |
content += "<span>"; |
524 |
if ( can_renew || can_force_renew ) { |
524 |
if ( can_renew || can_force_renew ) { |
525 |
content += "<span style='padding: 0 1em;'>" + oObj.renewals_count + "</span>"; |
525 |
content += "<span style='padding: 0 1em;'>" + oObj.renewals_count + "</span>"; |
Lines 528-534
$(document).ready(function() {
Link Here
|
528 |
if ( oObj.date_due_overdue && can_renew ) { |
528 |
if ( oObj.date_due_overdue && can_renew ) { |
529 |
content += "checked='checked' "; |
529 |
content += "checked='checked' "; |
530 |
} |
530 |
} |
531 |
if (oObj.can_renew_error.includes("on_reserve")) { |
531 |
if (oObj.can_renew_error && oObj.can_renew_error.includes("on_reserve")) { |
532 |
content += "data-on-reserve "; |
532 |
content += "data-on-reserve "; |
533 |
} |
533 |
} |
534 |
content += "class='renew' id='renew_" + oObj.itemnumber + "' name='renew' value='" + oObj.itemnumber +"'/>" |
534 |
content += "class='renew' id='renew_" + oObj.itemnumber + "' name='renew' value='" + oObj.itemnumber +"'/>" |
Lines 550-556
$(document).ready(function() {
Link Here
|
550 |
"bSortable": false, |
550 |
"bSortable": false, |
551 |
"bVisible": AllowCirculate ? true : false, |
551 |
"bVisible": AllowCirculate ? true : false, |
552 |
"mDataProp": function ( oObj ) { |
552 |
"mDataProp": function ( oObj ) { |
553 |
if ( oObj.can_renew_error.includes("on_reserve") ) { |
553 |
if ( oObj.can_renew_error && oObj.can_renew_error.includes("on_reserve") ) { |
554 |
return "<a href='/cgi-bin/koha/reserve/request.pl?biblionumber=" + oObj.biblionumber + "'>" + ON_HOLD + "</a>"; |
554 |
return "<a href='/cgi-bin/koha/reserve/request.pl?biblionumber=" + oObj.biblionumber + "'>" + ON_HOLD + "</a>"; |
555 |
} else { |
555 |
} else { |
556 |
return "<input type='checkbox' class='checkin' id='checkin_" + oObj.itemnumber + "' name='checkin' value='" + oObj.itemnumber +"'></input>"; |
556 |
return "<input type='checkbox' class='checkin' id='checkin_" + oObj.itemnumber + "' name='checkin' value='" + oObj.itemnumber +"'></input>"; |