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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-4 / +17 lines)
Lines 2487-2495 Link Here
2487
2487
2488
            });
2488
            });
2489
        [% END %]
2489
        [% END %]
2490
2491
        const can_edit_items_from = [% To.json(can_edit_items_from) | $raw %];
2490
        const can_edit_items_from = [% To.json(can_edit_items_from) | $raw %];
2492
        const item_type_image_locations = [% To.json(item_type_image_locations) | $raw %];
2491
        const item_type_image_locations = [% To.json(item_type_image_locations) | $raw %];
2492
        const av_loc = new Map([% To.json(AuthorisedValues.Get('LOC')) | $raw %].map( av => [av.authorised_value, av.lib]));
2493
        let table_url = "/api/v1/biblios/[% biblio.biblionumber | uri %]/items?";
2493
        let table_url = "/api/v1/biblios/[% biblio.biblionumber | uri %]/items?";
2494
        let embed = ["+strings"];
2494
        let embed = ["+strings"];
2495
        [% IF Koha.Preference('LocalCoverImages') %]
2495
        [% IF Koha.Preference('LocalCoverImages') %]
Lines 2577-2585 Link Here
2577
                searchable: true,
2577
                searchable: true,
2578
                orderable: true,
2578
                orderable: true,
2579
                render: function (data, type, row, meta) {
2579
                render: function (data, type, row, meta) {
2580
                    return row._strings.home_library_id.str;
2580
                    let nodes = '<span class="homebranchdesc">%s</span>'.format(row._strings.home_library_id.str);
2581
                    nodes += '<span class="shelvingloc">'
2582
                    [%# If permanent location is defined, show description or code and
2583
                        display current location in parentheses. If not, display current location.
2584
                        Note that permanent location is a code, and location may be an authval.
2585
                    %]
2586
2587
                    let loc_str = row._strings.location.str;
2588
                    if ( row.permanent_location && row.permanent_location != row.location ) {
2589
                        let permanent_loc_str = av_loc[row.permanent_location];
2590
                        nodes += '%s (%s)'.format(permanent_loc_str, loc_str);
2591
                    } else {
2592
                        nodes += loc_str;
2593
                    }
2594
                    nodes += '</span>';
2595
                    return nodes;
2581
                }
2596
                }
2582
                // FIXME Display the shelving location
2583
            },
2597
            },
2584
            {
2598
            {
2585
                data: "me.collection_code",
2599
                data: "me.collection_code",
2586
- 

Return to bug 33568