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

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

Return to bug 38512