Bugzilla – Attachment 145805 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), 2.72 KB, created by
Andreas Roussos
on 2023-01-30 18:56:07 UTC
(
hide
)
Description:
Bug 31207: Fix the display of local cover images in the OPAC Shelf browser
Filename:
MIME Type:
Creator:
Andreas Roussos
Created:
2023-01-30 18:56:07 UTC
Size:
2.72 KB
patch
obsolete
>From 18069f4b62314537564976daf6a0d5a806e5e240 Mon Sep 17 00:00:00 2001 >From: Andreas Roussos <a.roussos@dataly.gr> >Date: Mon, 30 Jan 2023 08:35:33 +0100 >Subject: [PATCH] Bug 31207: Fix the display of local cover images in the OPAC > Shelf browser > >This patch adds back Template Toolkit and JavaScript code that >was removed in commit fad97080e97da5bc77724c68b9394aba15518847 >(Bug 28180), thus fixing the problem of Shelf browser images >not being loaded in the OPAC Details page for a biblio. > >This feature stopped working in v21.11.00, and these conditions >must be met to be able to reproduce the problem: >a) Exclusive use of local cover images, and >b) Covers uploaded at the biblio level only. > >Test plan: > >0) Configure the following System Preferences: > - OPACShelfBrowser => 'Show' > - LocalCoverImages => 'Show' > - OPACLocalCoverImages => 'Show' > (ensure no other cover image provider is enabled) > - OpacSeparateHoldings => 'Don't separate' > - OpacSeparateHoldingsBranch => 'home library' > >1) Create a bibliographic 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) > - a single item with a Call number (the Call number value can > be anything, it's only needed to trigger the Shelf browser) > >2) In the OPAC, visit the Details page of the record you just added, > and click on the 'Browse shelf' link found in the 'Call number' > column of the 'Holdings' tab. When the Shelf browser expands, > there will be no cover image displayed. > >3) Apply the patch and refresh the page with CTRL-F5. The Shelf > browser will now display the local cover image associated with > your test record. > >4) Make sure the relevant unit test passes: > > prove -v t/db_dependent/ShelfBrowser.t >--- > 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 e97198aed4..3df59c5eaf 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -1810,6 +1810,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.20.1
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