From 313f7e86b8b9bb063d07be292dd352c2f889fa99 Mon Sep 17 00:00:00 2001 From: Emmi Takkinen Date: Thu, 18 Jul 2024 12:34:12 +0300 Subject: [PATCH] Bug 37399: Fix showing itemtype on holdings table If syspref "noItemTypeImages" is disabled, holdings table won't display itemtype column. This patch fixes this. To reproduce: 1. Enable syspref "noItemTypeImages". 2. Find biblio with items. => Note that itemtype column is displayed on holdings table. 3. Disable syspref "noItemTypeImages". => Itemtype column is no longer displayed on holdings table. 4. Apply this patch. => Now column should be displayed correctly. Sponsored-by: Koha-Suomi Oy Signed-off-by: Owen Leonard Signed-off-by: Tomas Cohen Arazi Signed-off-by: Martin Renvoize --- .../includes/html_helpers/tables/items/catalogue_detail.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc index 18a2c36630..c24d148bb4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc @@ -345,14 +345,14 @@ orderable: true, render: function (data, type, row, meta) { let node = ''; + let item_type_description = row._strings.item_type_id.str; [% 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(escape_str(image_location), escape_str(item_type_description), escape_str(item_type_description)) : ''; - node += '%s'.format(escape_str(item_type_description)); [% END %] + node += '%s'.format(escape_str(item_type_description)); return node; } }, -- 2.39.5