Lines 485-491
Link Here
|
485 |
let patron_to_html = $patron_to_html(row.checkout.patron, { url: true, display_cardnumber: true, hide_patron_name }); |
485 |
let patron_to_html = $patron_to_html(row.checkout.patron, { url: true, display_cardnumber: true, hide_patron_name }); |
486 |
nodes += _("Currently in local use by %s").format(patron_to_html); |
486 |
nodes += _("Currently in local use by %s").format(patron_to_html); |
487 |
} else { |
487 |
} else { |
488 |
nodes += '<span class="datedue">'; |
488 |
nodes += '<span class="holding_status datedue">'; |
489 |
let patron_to_html = $patron_to_html(row.checkout.patron, { url: true, display_cardnumber: true, hide_patron_name }); |
489 |
let patron_to_html = $patron_to_html(row.checkout.patron, { url: true, display_cardnumber: true, hide_patron_name }); |
490 |
nodes += _("Checked out to %s").format(patron_to_html); |
490 |
nodes += _("Checked out to %s").format(patron_to_html); |
491 |
} |
491 |
} |
Lines 494-537
Link Here
|
494 |
nodes += "</span>" |
494 |
nodes += "</span>" |
495 |
} else if ( row.transfer ) { |
495 |
} else if ( row.transfer ) { |
496 |
if ( row.transfer.datesent ) { |
496 |
if ( row.transfer.datesent ) { |
497 |
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))); |
497 |
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))); |
498 |
} else { |
498 |
} else { |
499 |
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))); |
499 |
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))); |
500 |
} |
500 |
} |
501 |
} |
501 |
} |
502 |
|
502 |
|
503 |
if ( row.lost_status ) { |
503 |
if ( row.lost_status ) { |
504 |
let lost_lib = av_lost.get(row.lost_status.toString()) || _("Unavailable (lost or missing"); |
504 |
let lost_lib = av_lost.get(row.lost_status.toString()) || _("Unavailable (lost or missing"); |
505 |
nodes += '<span class="lost">%s</span>'.format(escape_str(lost_lib)); |
505 |
nodes += '<span class="holding_status lost">%s</span>'.format(escape_str(lost_lib)); |
506 |
[% IF Koha.Preference('ClaimReturnedLostValue') %] |
506 |
[% IF Koha.Preference('ClaimReturnedLostValue') %] |
507 |
const hasReturnClaims = row.return_claims.filter(rc => !rc.resolution).length > 0 ? true : false |
507 |
const hasReturnClaims = row.return_claims.filter(rc => !rc.resolution).length > 0 ? true : false |
508 |
if(hasReturnClaims) { |
508 |
if(hasReturnClaims) { |
509 |
nodes += '<span class="claimed_returned">' + _("(Claimed returned)") + '</span>'; |
509 |
nodes += '<span class="holding_status claimed_returned">' + _("(Claimed returned)") + '</span>'; |
510 |
} |
510 |
} |
511 |
[% END %] |
511 |
[% END %] |
512 |
} |
512 |
} |
513 |
|
513 |
|
514 |
if ( row.withdrawn ) { |
514 |
if ( row.withdrawn ) { |
515 |
let withdrawn_lib = av_withdrawn.get(row.withdrawn.toString()) || _("Withdrawn"); |
515 |
let withdrawn_lib = av_withdrawn.get(row.withdrawn.toString()) || _("Withdrawn"); |
516 |
nodes += '<span class="wdn">%s</span>'.format(escape_str(withdrawn_lib)); |
516 |
nodes += '<span class="holding_status wdn">%s</span>'.format(escape_str(withdrawn_lib)); |
517 |
} |
517 |
} |
518 |
|
518 |
|
519 |
if ( row.damaged_status ) { |
519 |
if ( row.damaged_status ) { |
520 |
let damaged_lib = av_damaged.get(row.damaged_status.toString()) || _("Damaged"); |
520 |
let damaged_lib = av_damaged.get(row.damaged_status.toString()) || _("Damaged"); |
521 |
nodes += '<span class="dmg">%s</span>'.format(escape_str(damaged_lib)); |
521 |
nodes += '<span class="holding_status dmg">%s</span>'.format(escape_str(damaged_lib)); |
522 |
} |
522 |
} |
523 |
|
523 |
|
524 |
if ( row.not_for_loan_status || item_types_notforloan.get(row.item_type_id) ) { |
524 |
if ( row.not_for_loan_status || item_types_notforloan.get(row.item_type_id) ) { |
525 |
let not_for_loan_lib = av_not_for_loan.get(row.not_for_loan_status.toString()); |
525 |
let not_for_loan_lib = av_not_for_loan.get(row.not_for_loan_status.toString()); |
526 |
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>'; |
526 |
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>'; |
527 |
} |
527 |
} |
528 |
|
528 |
|
529 |
if ( row.first_hold ) { |
529 |
if ( row.first_hold ) { |
530 |
if ( row.first_hold.waiting_date ) { |
530 |
if ( row.first_hold.waiting_date ) { |
531 |
if ( row.first_hold.desk ) { |
531 |
if ( row.first_hold.desk ) { |
532 |
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))); |
532 |
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))); |
533 |
} else { |
533 |
} else { |
534 |
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))); |
534 |
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))); |
535 |
} |
535 |
} |
536 |
[% IF Koha.Preference('canreservefromotherbranches') %] |
536 |
[% IF Koha.Preference('canreservefromotherbranches') %] |
537 |
if ( row.first_hold.waiting_date || row.first_hold.priority == 1 ) { |
537 |
if ( row.first_hold.waiting_date || row.first_hold.priority == 1 ) { |
Lines 539-576
Link Here
|
539 |
row.first_hold.patron.library = { name: libraries_names.get(row.first_hold.patron.library_id) }; |
539 |
row.first_hold.patron.library = { name: libraries_names.get(row.first_hold.patron.library_id) }; |
540 |
|
540 |
|
541 |
let patron_to_html = $patron_to_html(row.first_hold.patron, { url: true, display_cardnumber: true, hide_patron_name }); |
541 |
let patron_to_html = $patron_to_html(row.first_hold.patron, { url: true, display_cardnumber: true, hide_patron_name }); |
542 |
nodes += ' <span class="heldfor">%s</span>'.format(_("Hold for: %s").format(patron_to_html)); |
542 |
nodes += ' <span class="holding_status heldfor">%s</span>'.format(_("Hold for: %s").format(patron_to_html)); |
543 |
} |
543 |
} |
544 |
[% END %] |
544 |
[% END %] |
545 |
} else { |
545 |
} else { |
546 |
nodes += ' <span class="holdonitem">%s</span>'.format(_("There is an item level hold on this item (priority = %s).").format(row.first_hold.priority)); |
546 |
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)); |
547 |
} |
547 |
} |
548 |
} |
548 |
} |
549 |
|
549 |
|
550 |
[% IF Koha.Preference('UseRecalls') %] |
550 |
[% IF Koha.Preference('UseRecalls') %] |
551 |
if ( row.recall && ( row.item_id === row.recall.item_id ) ) { |
551 |
if ( row.recall && ( row.item_id === row.recall.item_id ) ) { |
552 |
if ( row.recall.waiting_date ) { |
552 |
if ( row.recall.waiting_date ) { |
553 |
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))); |
553 |
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))); |
554 |
} else { |
554 |
} else { |
555 |
[%# Hacky for patron_to_html in case we simply want to display the patron's library name %] |
555 |
[%# Hacky for patron_to_html in case we simply want to display the patron's library name %] |
556 |
row.recall.patron.library = { name: libraries_names.get(row.recall.patron.library_id) }; |
556 |
row.recall.patron.library = { name: libraries_names.get(row.recall.patron.library_id) }; |
557 |
|
557 |
|
558 |
let patron_to_html = $patron_to_html(row.recall.patron, {url: true, display_cardnumber: true, hide_patron_name }); |
558 |
let patron_to_html = $patron_to_html(row.recall.patron, {url: true, display_cardnumber: true, hide_patron_name }); |
559 |
nodes += '<span>%s</span>'.format(_("Recalled by %s on %s").format(patron_to_html, $date(row.recall.created_date))) |
559 |
nodes += '<span class="holding_status recalledby">%s</span>'.format(_("Recalled by %s on %s").format(patron_to_html, $date(row.recall.created_date))) |
560 |
} |
560 |
} |
561 |
} |
561 |
} |
562 |
[% END %] |
562 |
[% END %] |
563 |
|
563 |
|
564 |
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 ) ) )) { |
564 |
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 ) ) )) { |
565 |
nodes += ' <span>%s</span>'.format(_("Available")) |
565 |
nodes += ' <span class="holding_status available">%s</span>'.format(_("Available")) |
566 |
} |
566 |
} |
567 |
|
567 |
|
568 |
if ( row.restricted_status ) { |
568 |
if ( row.restricted_status ) { |
569 |
nodes += '<span class="restricted">(%s)</span>'.format(escape_str(av_restricted.get(row.restricted_status.toString()))); |
569 |
nodes += '<span class="holding_status restricted">(%s)</span>'.format(escape_str(av_restricted.get(row.restricted_status.toString()))); |
570 |
} |
570 |
} |
571 |
|
571 |
|
572 |
if ( row.in_bundle ) { |
572 |
if ( row.in_bundle ) { |
573 |
nodes += '<span class="bundled">%s</span>'.format(_("In bundle: %s").format($biblio_to_html(row.bundle_host.biblio, { link: true }))); |
573 |
nodes += '<span class="holding_status bundled">%s</span>'.format(_("In bundle: %s").format($biblio_to_html(row.bundle_host.biblio, { link: true }))); |
574 |
} |
574 |
} |
575 |
return nodes; |
575 |
return nodes; |
576 |
} |
576 |
} |
577 |
- |
|
|