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.
---
C4/VirtualShelves/Page.pm | 1 +
.../opac-tmpl/prog/en/modules/opac-shelves.tmpl | 5 ++++-
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/C4/VirtualShelves/Page.pm b/C4/VirtualShelves/Page.pm
index bcfd3af..f6a2f97 100644
--- a/C4/VirtualShelves/Page.pm
+++ b/C4/VirtualShelves/Page.pm
@@ -172,6 +172,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'};
}
$showadd = 1;
my $i = 0;
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 ac0c7fd..314fc46 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl
@@ -118,7 +118,10 @@ $.tablesorter.addParser({
</td>
<!-- /TMPL_IF -->
<!-- TMPL_UNLESS NAME="item-level_itypes" --><td>
- <img src="<!-- TMPL_VAR NAME="imageurl" -->" alt="<!--
TMPL_VAR NAME="description" -->" title="<!-- TMPL_VAR NAME="description" -->"
/><!-- TMPL_VAR NAME="description" -->
+ <!-- TMPL_IF NAME="imageurl" -->
+ <img src="<!-- TMPL_VAR NAME="imageurl" -->" alt="<!--
TMPL_VAR NAME="description" -->" title="<!-- TMPL_VAR NAME="description" -->" />
+ </TMPL_IF>
+ <!-- TMPL_VAR NAME="description" -->
</td> <!-- /TMPL_UNLESS -->
<td><!-- TMPL_IF NAME="BiblioDefaultViewmarc" --><a class="title"
href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=<!-- TMPL_VAR
NAME="biblionumber" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="title" escape="html"
--> <!-- TMPL_VAR NAME="subtitle" --></a>
--
1.5.6.3
_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha.org/mailman/listinfo/koha-patches