View | Details | Raw Unified | Return to bug 25758
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js (-4 / +4 lines)
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>";
(-)a/svc/checkouts (-2 / +1 lines)
Lines 149-155 while ( my $c = $sth->fetchrow_hashref() ) { Link Here
149
    my ( $can_renew, $can_renew_error ) =
149
    my ( $can_renew, $can_renew_error ) =
150
      CanBookBeRenewed( $c->{borrowernumber}, $c->{itemnumber} );
150
      CanBookBeRenewed( $c->{borrowernumber}, $c->{itemnumber} );
151
    my $can_renew_date =
151
    my $can_renew_date =
152
      @$can_renew_error && $can_renew_error->[0] eq 'too_soon'
152
      $can_renew_error && $can_renew_error->[0] eq 'too_soon'
153
      ? output_pref(
153
      ? output_pref(
154
        {
154
        {
155
            dt => GetSoonestRenewDate( $c->{borrowernumber}, $c->{itemnumber} ),
155
            dt => GetSoonestRenewDate( $c->{borrowernumber}, $c->{itemnumber} ),
156
- 

Return to bug 25758