Bug 38845 - OpacNoItemTypeImages required to show item type images in staff interface advanced search
Summary: OpacNoItemTypeImages required to show item type images in staff interface adv...
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Caroline Cyr La Rose
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-07 21:46 UTC by Caroline Cyr La Rose
Modified: 2025-01-10 18:21 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes the display of item type images in the staff interface's advanced search. The noItemTypeImages system preference now correctly controls the display of the item type images. Previously, it was incorrectly controlled by the OpacNoItemTypeImages system preference.
Version(s) released in:
25.05.00
Circulation function:


Attachments
Bug 38845: OpacNoItemTypeImages required to show item type images in staff interface advanced search (2.48 KB, patch)
2025-01-07 21:53 UTC, Caroline Cyr La Rose
Details | Diff | Splinter Review
Bug 38845: OpacNoItemTypeImages required to show item type images in staff interface advanced search (2.53 KB, patch)
2025-01-09 08:07 UTC, David Nind
Details | Diff | Splinter Review
Bug 38845: OpacNoItemTypeImages required to show item type images in staff interface advanced search (2.63 KB, patch)
2025-01-10 09:53 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Caroline Cyr La Rose 2025-01-07 21:46:36 UTC
In koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt, there is this line

[% UNLESS ( Koha.Preference('OpacNoItemTypeImages') ) %]

However, the item type images in the staff interface are (should be) managed by noItemTypeImages.

To test:

1. Add images to item types, if there aren't any already (KTD has them by default)
   1.1. Go to Administration > Item types
   1.2. Click 'Edit' next to one of the item types
   1.3. Choose an icon
   1.4. Click 'Save changes'

2. Disable OpacNoItemTypeImages

3. Enable noItemTypeImages (already enabled in KTD)

4. Go to the advanced search page
   --> The item types don't have any images next to them

5. Reenable OpacNoItemTypeImages and go back the the advanced search page
   --> The images are displayed
Comment 1 Caroline Cyr La Rose 2025-01-07 21:53:56 UTC
Created attachment 176211 [details] [review]
Bug 38845: OpacNoItemTypeImages required to show item type images in staff interface advanced search

This patch makes it so that the noItemTypeImages system preference is
the one that controls the display of item type images in the staff
interface advanced search page. It was previously erroneously managed by
the OpacNoItemTypeImages system preference.

To test:

1. Add images to item types, if there aren't any already (KTD has them by default)
   1.1. Go to Administration > Item types
   1.2. Click 'Edit' next to one of the item types
   1.3. Choose an icon
   1.4. Click 'Save changes'

2. Disable OpacNoItemTypeImages

3. Enable noItemTypeImages (already enabled in KTD)

4. Go to the advanced search page
   --> The item types don't have any images next to them

5. Apply patch and refresh the page
   --> The item type images should be displayed
Comment 2 David Nind 2025-01-09 08:07:37 UTC
Created attachment 176283 [details] [review]
Bug 38845: OpacNoItemTypeImages required to show item type images in staff interface advanced search

This patch makes it so that the noItemTypeImages system preference is
the one that controls the display of item type images in the staff
interface advanced search page. It was previously erroneously managed by
the OpacNoItemTypeImages system preference.

To test:

1. Add images to item types, if there aren't any already (KTD has them by default)
   1.1. Go to Administration > Item types
   1.2. Click 'Edit' next to one of the item types
   1.3. Choose an icon
   1.4. Click 'Save changes'

2. Disable OpacNoItemTypeImages

3. Enable noItemTypeImages (already enabled in KTD)

4. Go to the advanced search page
   --> The item types don't have any images next to them

5. Apply patch and refresh the page
   --> The item type images should be displayed

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Marcel de Rooy 2025-01-10 09:52:44 UTC
Nice catch
Comment 4 Marcel de Rooy 2025-01-10 09:53:12 UTC
Created attachment 176316 [details] [review]
Bug 38845: OpacNoItemTypeImages required to show item type images in staff interface advanced search

This patch makes it so that the noItemTypeImages system preference is
the one that controls the display of item type images in the staff
interface advanced search page. It was previously erroneously managed by
the OpacNoItemTypeImages system preference.

To test:

1. Add images to item types, if there aren't any already (KTD has them by default)
   1.1. Go to Administration > Item types
   1.2. Click 'Edit' next to one of the item types
   1.3. Choose an icon
   1.4. Click 'Save changes'

2. Disable OpacNoItemTypeImages

3. Enable noItemTypeImages (already enabled in KTD)

4. Go to the advanced search page
   --> The item types don't have any images next to them

5. Apply patch and refresh the page
   --> The item type images should be displayed

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 5 Katrin Fischer 2025-01-10 18:21:19 UTC
Pushed for 25.05!

Well done everyone, thank you!