[Bug 8710] New: no images tab if no images
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8710 Priority: P5 - low Change sponsored?: --- Bug ID: 8710 Assignee: oleonard@myacpl.org Summary: no images tab if no images Severity: enhancement Classification: Unclassified OS: All Reporter: nengard@gmail.com Hardware: All Status: NEW Version: master Component: Templates Product: Koha In the opac if the library allows local cover images, the images tab shouldn't show unless there are local cover images on the title. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8710 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|no images tab if no images |Do not show the images tab | |in the OPAC if the record | |has no local cover images -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8710 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8710 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 13072 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13072&action=edit 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. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8710 Melia Meggs <melia@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #13072|0 |1 is obsolete| | --- Comment #2 from Melia Meggs <melia@bywatersolutions.com> --- Created attachment 13297 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13297&action=edit [Signed off] 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> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8710 Melia Meggs <melia@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |melia@bywatersolutions.com --- Comment #3 from Melia Meggs <melia@bywatersolutions.com> --- Before applying this patch, all records had an images tab regardless of whether they actually had a local cover image. After applying the patch, only the patches with an image have an images tab, and the local cover image displays correctly. I am signing off. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8710 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #13297|0 |1 is obsolete| | --- Comment #4 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 13684 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13684&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8710 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |jonathan.druart@biblibre.co | |m Patch complexity|--- |Small patch QA Contact| |jonathan.druart@biblibre.co | |m --- Comment #5 from Jonathan Druart <jonathan.druart@biblibre.com> --- QA Comments: Caused by an array context, the previous test was always true (@image = [undef]). This patch fixes this ergonomic issue. Works as expected. Marked as Passed QA. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8710 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |jcamins@cpbibliography.com --- Comment #6 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- This patch has been pushed to master. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org