Bugzilla – Attachment 120110 Details for
Bug 28178
Image viewer does not select the correct image
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28178: Display the correct image in the image viewer
Bug-28178-Display-the-correct-image-in-the-image-v.patch (text/plain), 3.01 KB, created by
Kyle M Hall
on 2021-04-23 14:22:22 UTC
(
hide
)
Description:
Bug 28178: Display the correct image in the image viewer
Filename:
MIME Type:
Creator:
Kyle M Hall
Created:
2021-04-23 14:22:22 UTC
Size:
3.01 KB
patch
obsolete
>From 633e8c13110cd75410ecb3c9f0d256b537dc80a2 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 19 Apr 2021 12:11:36 +0200 >Subject: [PATCH] Bug 28178: Display the correct image in the image viewer > >When there are several images attached to a bibliographic record, one can click >an image and see it in the image viewer. But the first image is always displayed. > >Test plan: >0. Turn on LocalCoverImages and AllowMultipleCovers >1. Attach at least two images to a bibliographic record >2. Go to the detail page, click the "Images" tab and click the second >image. >=> With this patch applied you should see the image you selected > >Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch) > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > catalogue/imageviewer.pl | 2 +- > .../intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > >diff --git a/catalogue/imageviewer.pl b/catalogue/imageviewer.pl >index d78024bde9..9cc96c11d6 100755 >--- a/catalogue/imageviewer.pl >+++ b/catalogue/imageviewer.pl >@@ -77,7 +77,7 @@ if ( C4::Context->preference("LocalCoverImages") ) { > $template->param( > LocalCoverImages => 1, > images => $images, >- imagenumber => (@$images ? $images->[0]->imagenumber : undef), >+ imagenumber => ( $imagenumber || ( @$images ? $images->[0]->imagenumber : undef ) ), > ); > } > $template->{VARS}->{'count'} = $itemcount; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt >index b16e906685..5e76e1e3e3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt >@@ -83,7 +83,7 @@ > [% FOREACH image IN images %] > <li id="imagenumber-[% image.imagenumber | html %]" data-itemnumber="[% image.itemnumber | html %]" data-biblionumber="[% image.biblionumber | html %]" class="thumbnail"> > <a class="show_cover" data-coverimg="[% image.imagenumber | html %]" href="/cgi-bin/koha/catalogue/imageviewer.pl?biblionumber=[% biblionumber | html %]&imagenumber=[% image.imagenumber | html %]"> >- [% IF loop.first %] >+ [% IF image.imagenumber == imagenumber %] > <img class="selected" id="thumbnail_[% image.imagenumber | html %]" src="/cgi-bin/koha/catalogue/image.pl?imagenumber=[% image.imagenumber | html %]&thumbnail=1" alt="Thumbnail" /> > [% ELSE %] > <img id="thumbnail_[% image.imagenumber | html %]" src="/cgi-bin/koha/catalogue/image.pl?imagenumber=[% image.imagenumber | html %]&thumbnail=1" alt="Thumbnail" /> >-- >2.24.3 (Apple Git-128)
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 28178
:
119910
|
119913
| 120110