[Koha-patches] [PATCH] bug 2505 followup: restored correct item type image display

Galen Charlton galen.charlton at liblime.com
Fri Apr 24 17:04:20 CEST 2009


---
 opac/opac-detail.pl |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl
index 3df0989..ae6bc41 100755
--- a/opac/opac-detail.pl
+++ b/opac/opac-detail.pl
@@ -146,6 +146,10 @@ for my $itm (@items) {
     if ( defined $itm->{'location'} ) {
         $itm->{'location_description'} = $shelflocations->{ $itm->{'location'} };
     }
+    if (exists $itm->{itype} && defined($itm->{itype}) && exists $itemtypes->{ $itm->{itype} }) {
+        $itm->{'imageurl'}    = getitemtypeimagelocation( 'opac', $itemtypes->{ $itm->{itype} }->{'imageurl'} );
+        $itm->{'description'} = $itemtypes->{ $itm->{itype} }->{'description'};
+    }
     foreach (qw(ccode enumchron copynumber itemnotes)) {
         $itemfields{$_} = 1 if ($itm->{$_});
     }
-- 
1.5.6.5




More information about the Koha-patches mailing list