Since bug 28180 lightbox descriptions have displayed under cover images in the OPAC lightbox gallery. For example: 'Coce image from Amazon.com'. These descriptions are useful if there are multiple cover images in the lightbox gallery. But if there is only one image (for example the library only uses coce images, and not local cover images or other sources) then it would be useful to be able to optionally hide these descriptions.
Created attachment 139738 [details] [review] Bug 31446: Add new OpacLightboxImageDescriptions system preference Sponsored-by: Toi Ohomai Institute of Technology, New Zealand
Created attachment 139739 [details] [review] 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
Ready for testing.
Created attachment 139971 [details] [review] Bug 31446: Add IDs to parent elements of cover images Having ID attributes for all parent div tags of OPAC lightbox cover images would make it easier for libraries to hide the lightbox descriptions hint text displaying under cover images. Libraries could simply add some JavaScript (in a format like below) to their OpacUserJS system preference for each image content source they use: $("#coce-coverimg > .hint").hide(); Test plan: 1. Apply patch 2. Confirm all parent div elements of cover images now have an ID in opac-detail.tt Sponsored-by: Toi Ohomai Institute of Technology, New Zealand
I am working on a compromise patch for this bug report - as per https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31456#c6
Just noting we have decided not to proceed with this fix. As Katrin pointed out in https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31456#c5 some content providers look to require text attribution in the Koha OPAC in order for their images to be used, so it is best for these attributions to be retained. If libraries do not use those content providers and want to hide where their cover images are coming from they can already do that using custom JavaScript in the OpacUserJS syspref.