From d8aacfbbfa67b50528d6573b1f048c7835d54153 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 18 Nov 2016 08:23:16 +0000 Subject: [PATCH] Bug 17657: Fix locations of item types images Content-Type: text/plain; charset=utf-8 Koha::ItemType->image_location takes the interface in parameter or default to OPAC. From the item types admin page, we need to specify the intranet interface to retrieve the correct image's url Test plan: Go on the item types admin page, see the source of the page and find the image' urls. => Without this patch, they point to the OPAC => With this patch, the location is correct Signed-off-by: Josef Moravec --- koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt index 95bbb7b..2c288b0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt @@ -185,7 +185,7 @@ Item types administration [% imageset.imagesetname %] [% END %] - [% IF itemtype.image_location.match('^http') %]
  • [% ELSE %]
  • [% END %]Remote image
  • + [% IF itemtype.image_location('intranet').match('^http') %]
  • [% ELSE %]
  • [% END %]Remote image
    • @@ -319,7 +319,8 @@ Item types administration Image - [% IF itemtype.image_location %][% END %] + [% SET image_location = itemtype.image_location('intranet') %] + [% IF image_location %][% END %] [% END %] @@ -352,7 +353,12 @@ Item types administration [% FOREACH itemtype IN itemtypes %] - [% UNLESS Koha.Preference('noItemTypeImages') %] [% IF itemtype.image_location %][% ELSE %] [% END %][% END %] + [% UNLESS Koha.Preference('noItemTypeImages') %] + + [% SET image_location = itemtype.image_location('intranet') %] + [% IF image_location %][% ELSE %] [% END %] + + [% END %] [% itemtype.itemtype %] -- 2.1.4