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 <oleonard@myacpl.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
876332b676
commit
313f7e86b8
|
|
@ -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
|
||||
? '<img src="%s" alt="%s" title="%s" /> '.format(escape_str(image_location), escape_str(item_type_description), escape_str(item_type_description))
|
||||
: '';
|
||||
node += '<span class="itypedesc itypetext">%s</span>'.format(escape_str(item_type_description));
|
||||
[% END %]
|
||||
node += '<span class="itypedesc itypetext">%s</span>'.format(escape_str(item_type_description));
|
||||
return node;
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue