[Koha-cvs] CVS: koha/C4 SearchMarc.pm,1.49,1.50

Paul POULAIN tipaul at users.sourceforge.net
Fri Sep 2 16:28:40 CEST 2005


Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29429/C4

Modified Files:
	SearchMarc.pm 
Log Message:
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.

Index: SearchMarc.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/SearchMarc.pm,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -r1.49 -r1.50
*** SearchMarc.pm	12 Aug 2005 13:51:48 -0000	1.49
--- SearchMarc.pm	2 Sep 2005 14:28:38 -0000	1.50
***************
*** 191,194 ****
--- 191,195 ----
  	# 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
***************
*** 279,283 ****
  
          # /ADDED BY JF
! 
  		$sth_itemCN->execute($biblionumber);
  		my @CNresults = ();
--- 280,289 ----
  
          # /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 = ();





More information about the Koha-cvs mailing list