From: Nahuel Angelinetti Date: Mon, 10 Nov 2008 16:16:16 +0000 (+0100) Subject: bug 2772: bad image location X-Git-Tag: ontop~409 X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=e080066db4d8039a1b70f5782309a48ccd0923ca;p=koha.git bug 2772: bad image location 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 --- diff --git a/C4/VirtualShelves/Page.pm b/C4/VirtualShelves/Page.pm index 27db71e377..b624073e8e 100644 --- a/C4/VirtualShelves/Page.pm +++ b/C4/VirtualShelves/Page.pm @@ -177,6 +177,7 @@ SWITCH: { #$this_item->{imageurl} = $imgdir."/".$itemtypes->{ $this_item->{itemtype} }->{'imageurl'}; #$this_item->{'description'} = $itemtypes->{ $this_item->{itemtype} }->{'description'}; $this_item->{'dateadded'} = format_date($this_item->{'dateadded'}); + $this_item->{'imageurl'} = getitemtypeinfo($this_item->{'itemtype'})->{'imageurl'}; } push @paramsloop, {display => 'privateshelves'} if $category == 1; $showadd = 1; diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl index 9732fdc6a4..5f36998b0e 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl @@ -122,7 +122,10 @@ $.tablesorter.addParser({ - " alt="" title="" /> + + " alt="" title="" /> + + ">