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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc (-6 / +5 lines)
Lines 337-343 Link Here
337
                orderable: true,
337
                orderable: true,
338
                render: function (data, type, row, meta) {
338
                render: function (data, type, row, meta) {
339
                    let node = '';
339
                    let node = '';
340
                    let item_type_description = row._strings.item_type_id.str;
340
                    let item_type_description = row._strings.item_type_id ? row._strings.item_type_id.str : row.item_type_id;
341
                    [% UNLESS noItemTypeImages %]
341
                    [% UNLESS noItemTypeImages %]
342
                        let image_location = item_type_image_locations[row.item_type_id];
342
                        let image_location = item_type_image_locations[row.item_type_id];
343
                        node += image_location
343
                        node += image_location
Lines 355-361 Link Here
355
                searchable: true,
355
                searchable: true,
356
                orderable: true,
356
                orderable: true,
357
                render: function (data, type, row, meta) {
357
                render: function (data, type, row, meta) {
358
                    return escape_str(row._strings.holding_library_id.str);
358
                    return escape_str(row._strings.holding_library_id ? row._strings.holding_library_id.str : row.holding_library_id);
359
                }
359
                }
360
            },
360
            },
361
            {
361
            {
Lines 364-375 Link Here
364
                searchable: true,
364
                searchable: true,
365
                orderable: true,
365
                orderable: true,
366
                render: function (data, type, row, meta) {
366
                render: function (data, type, row, meta) {
367
                    let nodes = '<span class="homebranchdesc">%s</span>'.format(escape_str(row._strings.home_library_id.str));
367
                    let nodes = '<span class="homebranchdesc">%s</span>'.format(escape_str(row._strings.home_library_id ? row._strings.home_library_id.str : row.home_library_id));
368
                    nodes += '<span class="shelvingloc">'
368
                    nodes += '<span class="shelvingloc">'
369
                    [%# If permanent location is defined, show description or code and             %]
369
                    [%# If permanent location is defined, show description or code and             %]
370
                    [%# display current location in parentheses. If not, display current location. %]
370
                    [%# display current location in parentheses. If not, display current location. %]
371
                    [%# Note that permanent location is a code, and location may be an authval.    %]
371
                    [%# Note that permanent location is a code, and location may be an authval.    %]
372
                    let loc_str = row._strings.location.str;
372
                    let loc_str = row._strings.location ? row._strings.location.str : row.location;
373
                    if ( row.permanent_location && row.permanent_location != row.location ) {
373
                    if ( row.permanent_location && row.permanent_location != row.location ) {
374
                        let permanent_loc_str = av_loc.get(row.permanent_location);
374
                        let permanent_loc_str = av_loc.get(row.permanent_location);
375
                        nodes += '%s (%s)'.format(escape_str(permanent_loc_str), escape_str(loc_str));
375
                        nodes += '%s (%s)'.format(escape_str(permanent_loc_str), escape_str(loc_str));
Lines 385-391 Link Here
385
                searchable: true,
385
                searchable: true,
386
                orderable: true,
386
                orderable: true,
387
                render: function (data, type, row, meta) {
387
                render: function (data, type, row, meta) {
388
                    return escape_str(row._strings.collection_code.str);
388
                    return escape_str(row._strings.collection_code ? row._strings.collection_code.str : row.collection_code);
389
                }
389
                }
390
            },
390
            },
391
            [% IF Koha.Preference('EnableItemGroups') %]
391
            [% IF Koha.Preference('EnableItemGroups') %]
392
- 

Return to bug 37375