Bugzilla – Attachment 138016 Details for
Bug 31207
The OPAC Shelf browser fails to display local cover images
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31207: Fix the display of local cover images in the OPAC Shelf browser
Bug-31207-Fix-the-display-of-local-cover-images-in.patch (text/plain), 3.15 KB, created by
ByWater Sandboxes
on 2022-07-22 12:26:11 UTC
(
hide
)
Description:
Bug 31207: Fix the display of local cover images in the OPAC Shelf browser
Filename:
MIME Type:
Creator:
ByWater Sandboxes
Created:
2022-07-22 12:26:11 UTC
Size:
3.15 KB
patch
obsolete
>From 8d1151067227ec972eb3fc3ccceaa5e36aca6432 Mon Sep 17 00:00:00 2001 >From: Andreas Roussos <a.roussos@dataly.gr> >Date: Fri, 22 Jul 2022 13:36:14 +0200 >Subject: [PATCH] Bug 31207: Fix the display of local cover images in the OPAC > Shelf browser > >In the OPAC Details page for a biblio, opening the Shelf browser >results in a nice display of adjacent items next to each other >based on their call number, which also shows any cover images >found. Since 21.11.00 this has been broken when local covers are >exclusively in use, as it fails to fetch the related images that >have been uploaded *at the biblio level*. > >This patch fixes that by adding back TT code that was removed >in commit fad97080e97da5bc77724c68b9394aba15518847 (Bug 28180). > >Test plan: > >0) Under Home > Administration > System preferences: > - in section 'OPAC -> Shelf browser', make sure OPACShelfBrowser > is enabled (i.e. set to 'Show') > - in section 'Enhanced content -> Local or remote cover images', > make sure both LocalCoverImages and OPACLocalCoverImages > are enabled (i.e. set to 'Show') > - make sure no other cover image provider is enabled > - make sure OpacSeparateHoldings and OpacSeparateHoldingsBranch > are set to 'Don't separate' and 'home library', respectively > >1) In the Staff interface, create a record that has: > - a local cover image at the biblio level (use the 'Images' tab > in the Details page of the record to upload a test image) > - at least one item attached to it that has a Call number (the > call number value can be anything -- it's only needed to > trigger the display of the 'Browse shelf' hyperlink) > >2) In the OPAC, visit the Details page of the record you just added > the cover image to, and click on the 'Browse shelf' link found > in the 'Call number' column. When the Shelf browser expands, > you'll notice there's no cover image displayed for the item(s) > that belong to your test biblio. > >3) Apply the patch and refresh the OPAC biblio Details page. > This time the shelf browser should display the local cover images > associated with your test record. > >4) Make sure the relevant unit test passes: > > prove -v t/db_dependent/ShelfBrowser.t > >Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 7 +++++++ > 1 file changed, 7 insertions(+) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >index 7c30dafda9..e1b663a251 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -1771,6 +1771,13 @@ > KOHA.OpenLibrary.GetCoverFromIsbn(); > [% END %] > >+ [% IF OPACLocalCoverImages %] >+ KOHA.LocalCover.GetCoverFromBibnumber(true); >+ [% IF itemloop_has_images OR otheritemloop_has_images %] >+ KOHA.LocalCover.GetCoverFromItemnumber(true); >+ [% END %] >+ [% END %] >+ > [% IF ( NovelistSelectProfile && ( normalized_isbn || normalized_upc ) ) %] > novSelect.loadContentForQuery( > { >-- >2.30.2
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 31207
:
137950
|
137951
|
138010
|
138011
|
138013
|
138014
|
138015
|
138016
|
138017
|
145805
|
145806