Bug 32909: Load item type icons from the correct path
authorAndreas Roussos <a.roussos@dataly.gr>
Wed, 8 Feb 2023 14:07:52 +0000 (15:07 +0100)
committerArthur Suzuki <arthur.suzuki@biblibre.com>
Wed, 29 Mar 2023 08:40:50 +0000 (10:40 +0200)
commit4ae10e645fa2675d33848ba40fcb9911aac6e8d0
tree1d5c2067a8d7d4d46151dbf0b96b147f07bb6fe2
parent5565fb7cfbe3b234fe73d73d08654cd8d0035692
Bug 32909: Load item type icons from the correct path

When placing an item-level hold in the Staff interface,
the table at the bottom of the screen (under the "Place
a hold on a specific item" heading) should display the
icon associated with the item type of each item in the
'Item type' column.

This feature broke in v22.05.00 (for Debian package installs):
instead of the item type icon you get the default 'broken
image URL' image of your web browser.

This patch fixes that.

Test plan:

1) (if needed) Configure the following System preferences:
   - item-level_itypes => 'specific item'
   - noItemTypeImages  => 'Show'

2) (if needed) In Koha Administration > Item types, create
   an item type and associate it with an icon

3) (if needed) Create a test bibliographic record, and add
   an item to it that has an item type with an icon

4) Visit the bibliographic record's details page in the
   Staff interface. Select 'Holds' on the left hand side,
   then pick a patron. The "Place a hold on ..." page should
   load. In the 'Item type' column of the table at the bottom
   of the screen notice that instead of seeing the icon
   associated with the item type of each item you get the
   default 'broken image URL' image of your web browser [*]

   [*] In non-Debian package installs, the 'href' property
       of the item type icon's <img> tag should start with
       '/opac-tmpl/bootstrap/itemtypeimg'

5) Apply this patch, restart Plack and refresh the page.
   The item type icon should now be displayed correctly.

   KTD and Koha Sandboxes users: To verify the patch has
   worked, you should right-click on the item type icon and
   click 'Inspect': the 'href' property of the <img> tag
   should now start with: '/intranet-tmpl/prog/img/itemtypeimg'

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ed84cfd43b0d7c135d96b712713787cf7fd53834)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
(cherry picked from commit c206321d2f27b4fac54c5249f0c087fc203d36f5)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2849807f08f904a732d1c74f1522f5c1444b376b)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
reserve/request.pl