Bugzilla – Attachment 57645 Details for
Bug 17657
Item type's images could not be displayed correctly on the item types admin page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17657: Fix locations of item types images
Bug-17657-Fix-locations-of-item-types-images.patch (text/plain), 3.08 KB, created by
Marcel de Rooy
on 2016-11-18 13:10:06 UTC
(
hide
)
Description:
Bug 17657: Fix locations of item types images
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2016-11-18 13:10:06 UTC
Size:
3.08 KB
patch
obsolete
>From d8aacfbbfa67b50528d6573b1f048c7835d54153 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >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 <josef.moravec@gmail.com> >--- > 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 > <a href="#[% imageset.imagesetname %]">[% imageset.imagesetname %]</a> > </li> > [% END %] >- [% IF itemtype.image_location.match('^http') %]<li class="ui-tabs-active">[% ELSE %]<li>[% END %]<a href="#remote">Remote image</a></li> >+ [% IF itemtype.image_location('intranet').match('^http') %]<li class="ui-tabs-active">[% ELSE %]<li>[% END %]<a href="#remote">Remote image</a></li> > </ul> > <div id="none"> > <ul> >@@ -319,7 +319,8 @@ Item types administration > <tr> > <th scope="row">Image</th> > <td> >- [% IF itemtype.image_location %]<img src="[% itemtype.image_location %]" alt="" />[% END %] >+ [% SET image_location = itemtype.image_location('intranet') %] >+ [% IF image_location %]<img src="[% image_location %]" alt="" />[% END %] > </td> > </tr> > [% END %] >@@ -352,7 +353,12 @@ Item types administration > </thead> > [% FOREACH itemtype IN itemtypes %] > <tr> >- [% UNLESS Koha.Preference('noItemTypeImages') %] <td>[% IF itemtype.image_location %]<img src="[% itemtype.image_location %]" alt="" />[% ELSE %] [% END %]</td>[% END %] >+ [% UNLESS Koha.Preference('noItemTypeImages') %] >+ <td> >+ [% SET image_location = itemtype.image_location('intranet') %] >+ [% IF image_location %]<img src="[% image_location %]" alt="" />[% ELSE %] [% END %] >+ </td> >+ [% END %] > <td> > <a href="/cgi-bin/koha/admin/itemtypes.pl?op=add_form&itemtype=[% itemtype.itemtype |html %]"> > [% itemtype.itemtype %] >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 17657
:
57617
|
57618
|
57645
|
57646