|
Lines 547-566
Link Here
|
| 547 |
} |
547 |
} |
| 548 |
|
548 |
|
| 549 |
[% IF Koha.Preference('UseRecalls') %] |
549 |
[% IF Koha.Preference('UseRecalls') %] |
| 550 |
if ( row.recall ) { |
550 |
if ( row.recall && ( row.item_id === row.recall.item_id ) ) { |
| 551 |
if ( row.recall.waiting_date ) { |
551 |
if ( row.recall.waiting_date ) { |
| 552 |
nodes += '<span>%s</span>'.format(_("Waiting at %s since %s").format(escape_str(row.recall.pickup_library_id.str), $date(row.recall.waiting_date))); |
552 |
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 |
} else { |
553 |
} else { |
| 554 |
[%# Hacky for patron_to_html in case we simply want to display the patron's library name %] |
554 |
[%# Hacky for patron_to_html in case we simply want to display the patron's library name %] |
| 555 |
row.recall.patron.library = { name: libraries_names.get(row.recall.patron.library_id) }; |
555 |
row.recall.patron.library = { name: libraries_names.get(row.recall.patron.library_id) }; |
| 556 |
|
556 |
|
| 557 |
let patron_to_html = $patron_to_html(row.recall.patron, {url: true, display_cardnumber: true, hide_patron_name }); |
557 |
let patron_to_html = $patron_to_html(row.recall.patron, {url: true, display_cardnumber: true, hide_patron_name }); |
| 558 |
nodes += '<span>%s</span>'.format(_("recalled by %s on %s").format(patron_to_html, $date(row.recall.created_date))) |
558 |
nodes += '<span>%s</span>'.format(_("Recalled by %s on %s").format(patron_to_html, $date(row.recall.created_date))) |
| 559 |
} |
559 |
} |
| 560 |
} |
560 |
} |
| 561 |
[% END %] |
561 |
[% END %] |
| 562 |
|
562 |
|
| 563 |
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 ) ) { |
563 |
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 |
nodes += ' <span>%s</span>'.format(_("Available")) |
564 |
nodes += ' <span>%s</span>'.format(_("Available")) |
| 565 |
} |
565 |
} |
| 566 |
|
566 |
|
| 567 |
- |
|
|