From 07ea313528d6f5fad27ddb9521d071b928a37ab4 Mon Sep 17 00:00:00 2001 From: tipaul Date: Fri, 2 Sep 2005 14:28:38 +0000 Subject: [PATCH] new feature : image for itemtypes. * run updater/updatedatabase to create imageurl field in itemtypes. * go to Koha >> parameters >> itemtypes >> modify (or add) an itemtype. You will see around 20 nice images to choose between (thanks to owen). If you prefer your own image, you also can type a complete url (http://www.myserver.lib/path/to/my/image.gif) * go to OPAC, and search something. In the result list, you now have the picture instead of the text itemtype. --- C4/SearchMarc.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/C4/SearchMarc.pm b/C4/SearchMarc.pm index 9b093dcee2..f06140c253 100644 --- a/C4/SearchMarc.pm +++ b/C4/SearchMarc.pm @@ -190,6 +190,7 @@ sub catalogsearch { } # prepare the query to find date_due where applicable my $sth_issue = $dbh->prepare("select date_due,returndate from issues where itemnumber=?"); + my $sth_itemtype = $dbh->prepare("select itemtypes.description,itemtypes.notforloan,itemtypes.imageurl from itemtypes where itemtype=?"); # prepare the query to find subtitles my $sth_subtitle = $dbh->prepare("SELECT subtitle FROM bibliosubtitle WHERE biblionumber=?"); # Added BY JF for Subtitles @@ -278,7 +279,12 @@ sub catalogsearch { # warn "and here's the subtitle: ".$subtitle_here; # /ADDED BY JF - + # search itemtype information + $sth_itemtype->execute($line->{itemtype}); + my ($itemtype_description,$itemtype_notforloan,$itemtype_imageurl) = $sth_itemtype->fetchrow; + $line->{description} = $itemtype_description; + $line->{imageurl} = $itemtype_imageurl; + $line->{notforloan} = $itemtype_notforloan; $sth_itemCN->execute($biblionumber); my @CNresults = (); my $notforloan=1; # to see if there is at least 1 item that can be issued -- 2.39.5