Bugzilla – Attachment 139739 Details for
Bug 31446
Make it easier for libraries to hide lightbox_descriptions from OPAC lightbox gallery
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31446: Optionally hide the Opac lightbox image description
Bug-31446-Optionally-hide-the-Opac-lightbox-image-.patch (text/plain), 2.67 KB, created by
Alex Buckley
on 2022-08-25 03:39:50 UTC
(
hide
)
Description:
Bug 31446: Optionally hide the Opac lightbox image description
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2022-08-25 03:39:50 UTC
Size:
2.67 KB
patch
obsolete
>From 9ccf0dcdc33738b92bbffbb10d2d08f4df1310f1 Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Wed, 24 Aug 2022 16:12:06 +0000 >Subject: [PATCH] Bug 31446: Optionally hide the Opac lightbox image > description > >Test plan: >1. Apply patches, update database and restart services > >2. Observe the new system preference OpacLightboxImageDescriptions is >set to 'Show' > >3. Enable OpacAmazonCoverImages, GoogleJackets, Coce (CoceHost = >'https://coce.mykoha.co.nz', CoceProviders = select all, OpacCoce = >'Enable) > >4. In the OPAC visit the item detail page of a record displaying multiple cover images in a gallery - (If such an item does not exist in your catalogue add the ISBN (020$a) of '9780080969572' to a biblio) > >5. Observe descriptions are displayed under each image in the gallery >indicating where the items are from - e.g. 'Coce image from Amazon.com' > >6. Change the OpacLightboxImageDescriptions syspref to "Don't show" > >7. Confirm all the image descriptions are hidden in the OPAC item detail >page. However, the dots to skip between the different cover images >should still be visible. > >8. Disable OpacAmazonCoverImages and Googlejackets sysprefs. Confirm >with only Coce images enabled the image descriptions are still hidden. > >Sponsored-by: Toi Ohomai Institute of Technology, New Zealand >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 5 +++++ > opac/opac-detail.pl | 4 ++++ > 2 files changed, 9 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 e69c3fac730..ad716ffffd6 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -1558,6 +1558,11 @@ > } else { > div.remove(); > } >+ >+ // Optionally hide the Lightbox image descriptions >+ [% IF ( !OpacLightboxImageDescriptions ) %] >+ div.find(".hint").hide(); >+ [% END %] > }); > > // Lightbox for cover images >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index 1c5e7949abd..03d7340a5af 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -1163,6 +1163,10 @@ if (C4::Context->preference("OPACURLOpenInNewWindow")) { > $template->param(covernewwindow => 'false'); > } > >+if (C4::Context->preference("OpacLightboxImageDescriptions")) { >+ $template->param( OpacLightboxImageDescriptions => 1 ); >+} >+ > $template->param(borrowernumber => $borrowernumber); > > if ( C4::Context->preference('OpacStarRatings') !~ /disable/ ) { >-- >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 31446
:
139738
| 139739 |
139971