bug 2772: bad image location
authorNahuel Angelinetti <nahuel.angelinetti@biblibre.com>
Mon, 10 Nov 2008 16:16:16 +0000 (17:16 +0100)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Tue, 26 May 2009 19:14:59 +0000 (21:14 +0200)
This patch make Page.pm to use the getitemtypeinfo function to generate the imageurl, and check (in the template) if an
image is set.
Before this patch, always the "Alt" information was shown, because the url wasn't right.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
C4/VirtualShelves/Page.pm

index 2176df5..1e44bc9 100644 (file)
@@ -179,6 +179,7 @@ SWITCH: {
                                $this_item->{'dateadded'} = format_date($this_item->{'dateadded'});
                 $this_item->{'coins'} = GetCOinSBiblio($this_item->{'biblionumber'});
                 warn $this_item->{'coins'};
+                $this_item->{'imageurl'} = getitemtypeinfo($this_item->{'itemtype'})->{'imageurl'};
                        }
                        push @paramsloop, {display => 'privateshelves'} if $category == 1;
                        $showadd = 1;