]> git.koha-community.org Git - koha.git/commit
Bug 8710 - Don't show the images tab in the OPAC if the record has no local images
authorOwen Leonard <oleonard@myacpl.org>
Fri, 26 Oct 2012 13:14:15 +0000 (09:14 -0400)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Wed, 28 Nov 2012 23:54:40 +0000 (18:54 -0500)
commitbc1cd0a656269ec0503f11ca17e955b09d44c456
treee33ac80a764f9abb53f934e2b78b99e3fb1b49b8
parent9aa1969a04f25e65264f4ef10bad4e3573a53f22
Bug 8710 - Don't show the images tab in the OPAC if the record has no local images

For unknown reasons, having ListImagesForBiblio return undef
when there are no images still results in a variable being passed
to the template which evaluates as true, with a size of 1.

This patch alters ListImagesForBiblio to remove the "return undef"
condition, allowing the template to evaluate images as false
and show no tab.

To test, turn on local cover images and view records in the OPAC
which do and do not have cover images attached. Images should
display as expected when present, and no images tab should appear
on records which have none.

Signed-off-by: Melia Meggs <melia@test.bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
C4/Images.pm
koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt