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

(-)a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss (+6 lines)
Lines 2313-2318 td.bundle { Link Here
2313
    color: #669900;
2313
    color: #669900;
2314
}
2314
}
2315
2315
2316
#holdings_table {
2317
    .holding_status {
2318
        display: block;
2319
    }
2320
}
2321
2316
#mainuserblock {
2322
#mainuserblock {
2317
    border: 1px solid #E8E8E8;
2323
    border: 1px solid #E8E8E8;
2318
    margin-top: .5em;
2324
    margin-top: .5em;
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc (-18 / +17 lines)
Lines 488-494 Link Here
488
                            let patron_to_html = $patron_to_html(row.checkout.patron, { url: true, display_cardnumber: true, hide_patron_name });
488
                            let patron_to_html = $patron_to_html(row.checkout.patron, { url: true, display_cardnumber: true, hide_patron_name });
489
                            nodes += _("Currently in local use by %s").format(patron_to_html);
489
                            nodes += _("Currently in local use by %s").format(patron_to_html);
490
                        } else {
490
                        } else {
491
                            nodes += '<span class="datedue">';
491
                            nodes += '<span class="holding_status datedue">';
492
                            let patron_to_html = $patron_to_html(row.checkout.patron, { url: true, display_cardnumber: true, hide_patron_name });
492
                            let patron_to_html = $patron_to_html(row.checkout.patron, { url: true, display_cardnumber: true, hide_patron_name });
493
                            nodes += _("Checked out to %s").format(patron_to_html);
493
                            nodes += _("Checked out to %s").format(patron_to_html);
494
                        }
494
                        }
Lines 497-540 Link Here
497
                        nodes += "</span>"
497
                        nodes += "</span>"
498
                    } else if ( row.transfer ) {
498
                    } else if ( row.transfer ) {
499
                        if ( row.transfer.datesent ) {
499
                        if ( row.transfer.datesent ) {
500
                            nodes += '<span class="intransit">%s</span>'.format(_("In transit from %s to %s since %s").format(escape_str(row.transfer._strings.from_library.str), escape_str(row.transfer._strings.to_library.str), $date(row.transfer.datesent)));
500
                            nodes += '<span class="holding_status intransit">%s</span>'.format(_("In transit from %s to %s since %s").format(escape_str(row.transfer._strings.from_library.str), escape_str(row.transfer._strings.to_library.str), $date(row.transfer.datesent)));
501
                        } else {
501
                        } else {
502
                            nodes += '<span class="transitrequested">%s</span>'.format(_("Transit pending from %s to %s since %s").format(escape_str(row.transfer._strings.from_library.str), escape_str(row.transfer._strings.to_library.str), $date(row.transfer.daterequested)));
502
                            nodes += '<span class="holding_status transitrequested">%s</span>'.format(_("Transit pending from %s to %s since %s").format(escape_str(row.transfer._strings.from_library.str), escape_str(row.transfer._strings.to_library.str), $date(row.transfer.daterequested)));
503
                        }
503
                        }
504
                    }
504
                    }
505
505
506
                    if ( row.lost_status ) {
506
                    if ( row.lost_status ) {
507
                        let lost_lib = av_lost.get(row.lost_status.toString()) || _("Unavailable (lost or missing");
507
                        let lost_lib = av_lost.get(row.lost_status.toString()) || _("Unavailable (lost or missing");
508
                        nodes += '<span class="lost">%s</span>'.format(escape_str(lost_lib));
508
                        nodes += '<span class="holding_status lost">%s</span>'.format(escape_str(lost_lib));
509
                        [% IF Koha.Preference('ClaimReturnedLostValue') %]
509
                        [% IF Koha.Preference('ClaimReturnedLostValue') %]
510
                            const hasReturnClaims = row.return_claims.filter(rc => !rc.resolution).length > 0 ? true : false
510
                            const hasReturnClaims = row.return_claims.filter(rc => !rc.resolution).length > 0 ? true : false
511
                            if(hasReturnClaims) {
511
                            if(hasReturnClaims) {
512
                                nodes += '<span class="claimed_returned">' + _("(Claimed returned)") + '</span>';
512
                                nodes += '<span class="holding_status claimed_returned">' + _("(Claimed returned)") + '</span>';
513
                            }
513
                            }
514
                        [% END %]
514
                        [% END %]
515
                    }
515
                    }
516
516
517
                    if ( row.withdrawn ) {
517
                    if ( row.withdrawn ) {
518
                        let withdrawn_lib = av_withdrawn.get(row.withdrawn.toString()) || _("Withdrawn");
518
                        let withdrawn_lib = av_withdrawn.get(row.withdrawn.toString()) || _("Withdrawn");
519
                        nodes += '<span class="wdn">%s</span>'.format(escape_str(withdrawn_lib));
519
                        nodes += '<span class="holding_status wdn">%s</span>'.format(escape_str(withdrawn_lib));
520
                    }
520
                    }
521
521
522
                    if ( row.damaged_status ) {
522
                    if ( row.damaged_status ) {
523
                        let damaged_lib = av_damaged.get(row.damaged_status.toString()) || _("Damaged");
523
                        let damaged_lib = av_damaged.get(row.damaged_status.toString()) || _("Damaged");
524
                        nodes += '<span class="dmg">%s</span>'.format(escape_str(damaged_lib));
524
                        nodes += '<span class="holding_status dmg">%s</span>'.format(escape_str(damaged_lib));
525
                    }
525
                    }
526
526
527
                    if ( row.not_for_loan_status || item_types_notforloan.get(row.item_type_id) ) {
527
                    if ( row.not_for_loan_status || item_types_notforloan.get(row.item_type_id) ) {
528
                        let not_for_loan_lib = av_not_for_loan.get(row.not_for_loan_status.toString());
528
                        let not_for_loan_lib = av_not_for_loan.get(row.not_for_loan_status.toString());
529
                        nodes += '<span class="notforloan">%s'.format(_("Not for loan")) + ( not_for_loan_lib ? '<span class="reason"> (%s)</span>'.format(escape_str(not_for_loan_lib)) : '' ) + '</span>';
529
                        nodes += '<span class="holding_status notforloan">%s'.format(_("Not for loan")) + ( not_for_loan_lib ? '<span class="reason"> (%s)</span>'.format(escape_str(not_for_loan_lib)) : '' ) + '</span>';
530
                    }
530
                    }
531
531
532
                    if ( row.first_hold ) {
532
                    if ( row.first_hold ) {
533
                        if ( row.first_hold.waiting_date ) {
533
                        if ( row.first_hold.waiting_date ) {
534
                            if ( row.first_hold.desk ) {
534
                            if ( row.first_hold.desk ) {
535
                                nodes += '<span class="waitingat">%s</span>'.format(_("Waiting at %s, %s since %s.").format(row.first_hold._strings.pickup_library_id.str, row.first_hold.desk.desk_name, $date(row.first_hold.waiting_date)));
535
                                nodes += '<span class="holding_status waitingat">%s</span>'.format(_("Waiting at %s, %s since %s.").format(row.first_hold._strings.pickup_library_id.str, row.first_hold.desk.desk_name, $date(row.first_hold.waiting_date)));
536
                            } else {
536
                            } else {
537
                                nodes += '<span class="waitingat">%s</span>'.format(_("Waiting at %s since %s.").format(row.first_hold._strings.pickup_library_id.str, $date(row.first_hold.waiting_date)));
537
                                nodes += '<span class="holding_status waitingat">%s</span>'.format(_("Waiting at %s since %s.").format(row.first_hold._strings.pickup_library_id.str, $date(row.first_hold.waiting_date)));
538
                            }
538
                            }
539
                            [% IF Koha.Preference('canreservefromotherbranches') %]
539
                            [% IF Koha.Preference('canreservefromotherbranches') %]
540
                                if ( row.first_hold.waiting_date || row.first_hold.priority == 1 ) {
540
                                if ( row.first_hold.waiting_date || row.first_hold.priority == 1 ) {
Lines 542-579 Link Here
542
                                    row.first_hold.patron.library = { name: libraries_names.get(row.first_hold.patron.library_id) };
542
                                    row.first_hold.patron.library = { name: libraries_names.get(row.first_hold.patron.library_id) };
543
543
544
                                    let patron_to_html = $patron_to_html(row.first_hold.patron, { url: true, display_cardnumber: true, hide_patron_name });
544
                                    let patron_to_html = $patron_to_html(row.first_hold.patron, { url: true, display_cardnumber: true, hide_patron_name });
545
                                    nodes += ' <span class="heldfor">%s</span>'.format(_("Hold for: %s").format(patron_to_html));
545
                                    nodes += ' <span class="holding_status heldfor">%s</span>'.format(_("Hold for: %s").format(patron_to_html));
546
                                }
546
                                }
547
                            [% END %]
547
                            [% END %]
548
                        } else {
548
                        } else {
549
                            nodes += ' <span class="holdonitem">%s</span>'.format(_("There is an item level hold on this item (priority = %s).").format(row.first_hold.priority));
549
                            nodes += ' <span class="holding_status holdonitem">%s</span>'.format(_("There is an item level hold on this item (priority = %s).").format(row.first_hold.priority));
550
                        }
550
                        }
551
                    }
551
                    }
552
552
553
                    [% IF Koha.Preference('UseRecalls') %]
553
                    [% IF Koha.Preference('UseRecalls') %]
554
                        if ( row.recall && ( row.item_id === row.recall.item_id ) ) {
554
                        if ( row.recall && ( row.item_id === row.recall.item_id ) ) {
555
                            if ( row.recall.waiting_date ) {
555
                            if ( row.recall.waiting_date ) {
556
                                nodes += '<span>%s</span>'.format(_("Waiting recall at %s since %s").format(escape_str(row.recall._strings.pickup_library_id.str), $date(row.recall.waiting_date)));
556
                                nodes += '<span class="holding_status recallwaiting">%s</span>'.format(_("Waiting recall at %s since %s").format(escape_str(row.recall._strings.pickup_library_id.str), $date(row.recall.waiting_date)));
557
                            } else {
557
                            } else {
558
                                [%# Hacky for patron_to_html in case we simply want to display the patron's library name %]
558
                                [%# Hacky for patron_to_html in case we simply want to display the patron's library name %]
559
                                row.recall.patron.library = { name: libraries_names.get(row.recall.patron.library_id) };
559
                                row.recall.patron.library = { name: libraries_names.get(row.recall.patron.library_id) };
560
560
561
                                let patron_to_html = $patron_to_html(row.recall.patron, {url: true, display_cardnumber: true, hide_patron_name });
561
                                let patron_to_html = $patron_to_html(row.recall.patron, {url: true, display_cardnumber: true, hide_patron_name });
562
                                nodes += '<span>%s</span>'.format(_("Recalled by %s on %s").format(patron_to_html, $date(row.recall.created_date)))
562
                                nodes += '<span class="holding_status recalledby">%s</span>'.format(_("Recalled by %s on %s").format(patron_to_html, $date(row.recall.created_date)))
563
                            }
563
                            }
564
                        }
564
                        }
565
                    [% END %]
565
                    [% END %]
566
566
567
                    if ( ! ( row.not_for_loan_status || item_types_notforloan.get(row.item_type_id) || row.checked_out_date || row.lost_status || row.withdrawn || row.damaged_status || row.transfer || row.first_hold || ( row.recall && ( row.item_id === row.recall.item_id ) ) )) {
567
                    if ( ! ( row.not_for_loan_status || item_types_notforloan.get(row.item_type_id) || row.checked_out_date || row.lost_status || row.withdrawn || row.damaged_status || row.transfer || row.first_hold || ( row.recall && ( row.item_id === row.recall.item_id ) ) )) {
568
                        nodes += ' <span>%s</span>'.format(_("Available"))
568
                        nodes += ' <span class="holding_status available">%s</span>'.format(_("Available"))
569
                    }
569
                    }
570
570
571
                    if ( row.restricted_status ) {
571
                    if ( row.restricted_status ) {
572
                        nodes += '<span class="restricted">(%s)</span>'.format(escape_str(av_restricted.get(row.restricted_status.toString())));
572
                        nodes += '<span class="holding_status restricted">(%s)</span>'.format(escape_str(av_restricted.get(row.restricted_status.toString())));
573
                    }
573
                    }
574
574
575
                    if ( row.in_bundle ) {
575
                    if ( row.in_bundle ) {
576
                        nodes += '<span class="bundled">%s</span>'.format(_("In bundle: %s").format($biblio_to_html(row.bundle_host.biblio, { link: true })));
576
                        nodes += '<span class="holding_status bundled">%s</span>'.format(_("In bundle: %s").format($biblio_to_html(row.bundle_host.biblio, { link: true })));
577
                    }
577
                    }
578
                    return nodes;
578
                    return nodes;
579
                }
579
                }
580
- 

Return to bug 38767