Bug 42708: (bug 41566 follow-up) Restore display of itemtype images

> - [% UNLESS noItemTypeImages %]
> + if (prefs.noItemTypeImages){

This is wrong!

Test plan:
Go to /cgi-bin/koha/catalogue/detail.pl?biblionumber=4
Notice that with this patch the "Book" icon is displayed
Turn off noItemTypeImages and reload
=> It's now hidden!

Without this patch the behavior is reversed

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2026-05-28 16:48:44 +02:00 committed by Lucas Gass
parent 10a3768991
commit 67ff112866
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
1 changed files with 1 additions and 1 deletions

View File

@ -430,7 +430,7 @@
render: function (data, type, row, meta) {
let node = "";
let item_type_description = row._strings.item_type_id ? row._strings.item_type_id.str : row.item_type_id;
if (Koha.prefs.noItemTypeImages) {
if (!Koha.prefs.noItemTypeImages) {
let image_location = item_type_image_locations[row.item_type_id];
node += image_location ? '<img class="itemtype-image" src="%s" alt="" /> '.format(escape_str(image_location), escape_str(item_type_description), escape_str(item_type_description)) : "";
}