[Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/en/z3950 searchresult.tmpl,NONE,1.1

Paul POULAIN tipaul at users.sourceforge.net
Tue Apr 29 18:48:28 CEST 2003


Update of /cvsroot/koha/koha/koha-tmpl/intranet-tmpl/default/en/z3950
In directory sc8-pr-cvs1:/tmp/cvs-serv3884/koha-tmpl/intranet-tmpl/default/en/z3950

Added Files:
	searchresult.tmpl 
Log Message:
really proud of this commit :-)
z3950 search and import seems to works fine.
Let me explain how :
* a "search z3950" button is added in the addbiblio template.
* when clicked, a popup appears and z3950/search.pl is called
* z3950/search.pl calls addz3950search in the DB
* the z3950 daemon retrieve the records and stores them in z3950results AND in marc_breeding table.
* as long as there as searches pending, the popup auto refresh every 2 seconds, and says how many searches are pending.
* when the user clicks on a z3950 result => the parent popup is called with the requested biblio, and auto-filled

Note :
* character encoding support : (It's a nightmare...) In the z3950servers table, a "encoding" column has been added. You can put "UNIMARC" or "USMARC" in this column. Depending on this, the char_decode in C4::Biblio.pm replaces marc-char-encode by an iso 8859-1 encoding. Note that in the breeding import this value has been added too, for a better support.
* the marc_breeding and z3950* tables have been modified : they have an encoding column and the random z3950 number is stored too for convenience => it's the key I use to list only requested biblios in the popup.


--- NEW FILE ---
<HTML>
<TMPL_IF name="refresh">
	<meta http-equiv="refresh" content="2; url=<TMPL_VAR name="refresh">">
</TMPL_IF>
<font size="6"><em>Z3950 Search Results</em></font><br />

<table width="80%" cellpadding="3">
	<tr valign="center">
	<td><font size="4">Biblios found</font></td>
	</tr>
</table>
<table border="0" cellspacing="0" cellpadding="5" width="80%">
	<tr valign=top bgcolor=#ffcc00>
		<td><b>Title</b></td>
		<td><b>Author</b></td>
		<td><b>ISBN</b></td>
		<td><b>coming from</b></td>
		<td><b>&nbsp;</b></td>
		<td>&nbsp;</td>
	</tr>
	<TMPL_IF name="breeding_loop">
	<TMPL_LOOP name="breeding_loop">
		<tr valign="top" bgcolor="<TMPL_VAR name="toggle">">
			<td><TMPL_VAR name="title"></a>
			<td><TMPL_VAR name="author"></td>
			<td><TMPL_VAR name="isbn"></td>
			<td><TMPL_VAR name="file"></td>
			<td><a href="javascript:Import(<TMPL_VAR name="id">)">Import this biblio</a></td>
		</tr>
	</TMPL_LOOP>
	<TMPL_ELSE>
		<tr><td colspan=6>Nothing found</td></tr>
	</TMPL_IF>
</table>
<TMPL_IF name="numberpending"><H1><center>Still <TMPL_VAR name="numberpending"> requests to go</center></H1></TMPL_IF>
<br />
<script>
	function Import(GetThisOne) {
		opener.document.location= "../acqui.simple/addbiblio.pl?z3950=1&oldbiblionumber=<TMPL_VAR name="oldbiblionumber">&breedingid="+GetThisOne;
		self.close();
		return false;
	}
</script>
<TMPL_INCLUDE NAME="acquisitions-bottom.inc">





More information about the Koha-cvs mailing list