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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc (-2 / +12 lines)
Lines 172-177 Link Here
172
                e["_str"] = e["branchname"];
172
                e["_str"] = e["branchname"];
173
                return e;
173
                return e;
174
            });
174
            });
175
    const libraries_names = new Map(all_libraries.map( l => [l.branchcode, l.branchname] ));
175
    const all_item_types = [% To.json(ItemTypes.Get) | $raw %];
176
    const all_item_types = [% To.json(ItemTypes.Get) | $raw %];
176
    const item_types_filters = all_item_types.map(e => {
177
    const item_types_filters = all_item_types.map(e => {
177
                e["_id"] = e["itemtype"];
178
                e["_id"] = e["itemtype"];
Lines 437-449 Link Here
437
                render: function (data, type, row, meta) {
438
                render: function (data, type, row, meta) {
438
                    let nodes = "";
439
                    let nodes = "";
439
                    if ( row.checkout ) {
440
                    if ( row.checkout ) {
441
                        [%# Hacky for patron_to_html in case we simply want to display the patron's library name %]
442
                        row.checkout.patron.library = { name: libraries_names.get(row.checkout.patron.library_id) };
443
440
                        nodes += '<span>';
444
                        nodes += '<span>';
441
                        if ( row.checkout.onsite_checkout ) {
445
                        if ( row.checkout.onsite_checkout ) {
442
                            let patron_to_html = $patron_to_html(row.checkout.patron); [%# FIXME What about hide_patron_infos_if_needed?? %]
446
                            let patron_to_html = $patron_to_html(row.checkout.patron);
443
                            nodes += _("Currently in local use by %s").format(patron_to_html);
447
                            nodes += _("Currently in local use by %s").format(patron_to_html);
444
                        } else {
448
                        } else {
445
                            nodes += '<span class="datedue">';
449
                            nodes += '<span class="datedue">';
446
                            let patron_to_html = $patron_to_html(row.checkout.patron); [%# FIXME What about hide_patron_infos_if_needed?? %]
450
                            let patron_to_html = $patron_to_html(row.checkout.patron);
447
                            nodes += _("Checked out to %s").format(patron_to_html);
451
                            nodes += _("Checked out to %s").format(patron_to_html);
448
                        }
452
                        }
449
                        nodes += ': ';
453
                        nodes += ': ';
Lines 486-491 Link Here
486
                            }
490
                            }
487
                            [% IF Koha.Preference('canreservefromotherbranches') %]
491
                            [% IF Koha.Preference('canreservefromotherbranches') %]
488
                                if ( row.first_hold.waiting_date || row.first_hold.priority == 1 ) {
492
                                if ( row.first_hold.waiting_date || row.first_hold.priority == 1 ) {
493
                                    [%# Hacky for patron_to_html in case we simply want to display the patron's library name %]
494
                                    row.first_hold.patron.library = { name: libraries_names.get(row.first_hold.patron.library_id) };
495
489
                                    let patron_to_html = $patron_to_html(row.first_hold.patron); [%# FIXME What about hide_patron_infos_if_needed?? %]
496
                                    let patron_to_html = $patron_to_html(row.first_hold.patron); [%# FIXME What about hide_patron_infos_if_needed?? %]
490
                                    nodes += ' <span class="heldfor">%s</span>'.format(_("Hold for: %s").format(patron_to_html));
497
                                    nodes += ' <span class="heldfor">%s</span>'.format(_("Hold for: %s").format(patron_to_html));
491
                                }
498
                                }
Lines 500-505 Link Here
500
                            if ( row.recall.waiting_date ) {
507
                            if ( row.recall.waiting_date ) {
501
                                nodes += '<span>%s</span>'.format(_("Waiting at %s since %s").format(escape_str(row.recall.pickup_library_id.str), $date(row.recall.waiting_date)));
508
                                nodes += '<span>%s</span>'.format(_("Waiting at %s since %s").format(escape_str(row.recall.pickup_library_id.str), $date(row.recall.waiting_date)));
502
                            } else {
509
                            } else {
510
                                [%# Hacky for patron_to_html in case we simply want to display the patron's library name %]
511
                                row.recall.patron.library = { name: libraries_names.get(row.recall.patron.library_id) };
512
503
                                let patron_to_html = $patron_to_html(row.recall.patron);
513
                                let patron_to_html = $patron_to_html(row.recall.patron);
504
                                nodes += '<span>%s</span>'.format(_("recalled by %s on %s").format(patron_to_html, $date(row.recall.created_date)))
514
                                nodes += '<span>%s</span>'.format(_("recalled by %s on %s").format(patron_to_html, $date(row.recall.created_date)))
505
                            }
515
                            }
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/js-patron-format.inc (-1 / +4 lines)
Lines 49-54 Link Here
49
                }
49
                }
50
            }
50
            }
51
51
52
            if ( name.replace(' ', '').length == 0 ) {
53
                name = _("A patron from library %s".format(patron.library.name));
54
            }
55
52
            return name;
56
            return name;
53
        };
57
        };
54
    })();
58
    })();
55
- 

Return to bug 33568