@@ -, +, @@ --- catalogue/detail.pl | 7 +++++++ .../prog/en/modules/catalogue/detail.tt | 13 ++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) --- a/catalogue/detail.pl +++ a/catalogue/detail.pl @@ -640,6 +640,13 @@ my %can_edit_items_from = map { } @libraries; $template->param(can_edit_items_from => \%can_edit_items_from); +my @itemtypes = Koha::ItemTypes->search->as_list; +my %item_type_image_locations = map { + $_->itemtype => $_->image_location('intranet') +} @itemtypes; +$template->param(item_type_image_locations => \%item_type_image_locations); + + $template->param(found1 => scalar $query->param('found1') ); $template->param(biblio => $biblio); --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -2492,6 +2492,8 @@ }); [% END %] + const can_edit_items_from = [% To.json(can_edit_items_from) | $raw %]; + const item_type_image_locations = [% To.json(item_type_image_locations) | $raw %]; let table_url = "/api/v1/biblios/[% biblio.biblionumber | uri %]/items?"; var items_table = $("#table_items").kohaTable({ ajax: { url: table_url }, @@ -2529,7 +2531,16 @@ searchable: true, orderable: true, render: function (data, type, row, meta) { - return row._strings.item_type_id.str; // FIXME Display the image + let node = ''; + [% UNLESS noItemTypeImages %] + let image_location = item_type_image_locations[row.item_type_id]; + let item_type_description = row._strings.item_type_id.str; + node += image_location + ? '%s '.format(image_location, item_type_description, item_type_description) + : ''; + [% END %] + node += '%s'.format(item_type_description); + return node; } }, [% END %] --