Koha/koha-tmpl/intranet-tmpl/default/fr/acqui.simple/addbiblio.tmpl
2003-04-01 13:46:03 +00:00

368 lines
17 KiB
Cheetah

<TMPL_INCLUDE NAME="cat-top.inc">
<STYLE TYPE="text/css" MEDIA=screen>
table { font-family:Arial;
font-weight:normal;
text-decoration:none;
font-size:10pt;}
</STYLE>
<form method="post" name="f">
<table width=100% cellspacing=0 cellpadding=5 border=1>
<tr background="<TMPL_VAR name="themelang">/images/background-mem.gif">
<th>Notice MARC : <TMPL_VAR name="bibid"></th>
</tr>
<tr>
<td>
<table width=100% border=0 colspacing=0 cellpadding=0>
<tr>
<td width=9% align="center"><a href="javascript:active(0)"><div id="link0">0</div></a></td>
<td width=9% align="center"><a href="javascript:active(1)"><div id="link1">1</div></a></td>
<td width=9% align="center"><a href="javascript:active(2)"><div id="link2">2</div></a></td>
<td width=9% align="center"><a href="javascript:active(3)"><div id="link3">3</div></a></td>
<td width=9% align="center"><a href="javascript:active(4)"><div id="link4">4</div></a></td>
<td width=9% align="center"><a href="javascript:active(5)"><div id="link5">5</div></a></td>
<td width=9% align="center"><a href="javascript:active(6)"><div id="link6">6</div></a></td>
<td width=9% align="center"><a href="javascript:active(7)"><div id="link7">7</div></a></td>
<td width=9% align="center"><a href="javascript:active(8)"><div id="link8">8</div></a></td>
<td width=9% align="center"><a href="javascript:active(9)"><div id="link9">9</div></a></td>
<td width=10% align="center"><input type="hidden" name="op" value="addbiblio">
<input type="hidden" name="oldbiblionumber" value="<TMPL_VAR name="oldbiblionumber">">
<input type="button" value="items" onClick='Check(this.form)' accesskey="w">
</td>
</tr>
</table>
</td>
</tr>
</table>
<DIV name="0XX" id="0XX" style="position:absolute;visibility:visible;width:90%">
<table width=100% cellspacing=0 cellpadding=2 border=0>
<TMPL_LOOP name="0XX">
<tr background="<TMPL_VAR name="themelang">/images/background-mem.gif"><td colspan=4><b><TMPL_VAR name="tag"> <input type="hidden" name="ind_tag" value="<TMPL_VAR name="tag">"><input type="text" name="indicator" size=3 maxlength=2 value="<TMPL_VAR name="indicator">"> - <tmpl_var name="tag_lib"></td></tr>
<TMPL_LOOP name="subfield_loop">
<tr>
<td width="3%">&nbsp;</td>
<td width="2%"><b><TMPL_VAR name="subfield"></b></td>
<td width="55%" align="right"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory">*</b></TMPL_IF></td>
<td width="40%">
<TMPL_VAR name="marc_value">
<input type="hidden" name="tag" value="<TMPL_VAR name="tag">">
<input type="hidden" name="subfield" value="<TMPL_VAR name="subfield">">
<input type="hidden" name="mandatory" value="<TMPL_VAR name="mandatory">">
<input type="hidden" name="tag_mandatory" value="<TMPL_VAR name="tag_mandatory">">
</td>
</tr>
</tmpl_loop>
</tmpl_loop>
</table>
</DIV>
<DIV name="1XX" id="1XX" style="position:absolute;visibility:hidden;width:90%">
<table width=100% cellspacing=0 cellpadding=1 border=0>
<TMPL_LOOP name="1XX">
<tr background="<TMPL_VAR name="themelang">/images/background-mem.gif"><td colspan=4><b><TMPL_VAR name="tag"> <input type="hidden" name="ind_tag" value="<TMPL_VAR name="tag">"><input type="text" name="indicator" size=3 maxlength=2 value="<TMPL_VAR name="indicator">"> - <tmpl_var name="tag_lib"></td></tr>
<TMPL_LOOP name="subfield_loop">
<tr>
<td width="3%">&nbsp;</td>
<td width="2%"><b><TMPL_VAR name="subfield"></b></td>
<td width="55%" align="right"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory">*</b></TMPL_IF></td>
<td width="40%">
<TMPL_VAR name="marc_value">
<input type="hidden" name="tag" value="<TMPL_VAR name="tag">">
<input type="hidden" name="subfield" value="<TMPL_VAR name="subfield">">
<input type="hidden" name="mandatory" value="<TMPL_VAR name="mandatory">">
<input type="hidden" name="tag_mandatory" value="<TMPL_VAR name="tag_mandatory">">
</td>
</tr>
</TMPL_LOOP>
</TMPL_LOOP>
</table>
</DIV>
<DIV name="2XX" id="2XX" style="position:absolute;visibility:hidden;width:90%">
<table width=100% cellspacing=0 cellpadding=2 border=0>
<TMPL_LOOP name="2XX">
<tr background="<TMPL_VAR name="themelang">/images/background-mem.gif"><td colspan=4><b><TMPL_VAR name="tag"> <input type="hidden" name="ind_tag" value="<TMPL_VAR name="tag">"><input type="text" name="indicator" size=3 maxlength=2 value="<TMPL_VAR name="indicator">"> - <tmpl_var name="tag_lib"></td></tr>
<TMPL_LOOP name="subfield_loop">
<tr>
<td width="3%">&nbsp;</td>
<td width="2%"><b><TMPL_VAR name="subfield"></b></td>
<td width="55%" align="right"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"> *</b></TMPL_IF></td>
<td width="40%">
<TMPL_VAR name="marc_value">
<input type="hidden" name="tag" value="<TMPL_VAR name="tag">">
<input type="hidden" name="subfield" value="<TMPL_VAR name="subfield">">
<input type="hidden" name="mandatory" value="<TMPL_VAR name="mandatory">">
<input type="hidden" name="tag_mandatory" value="<TMPL_VAR name="tag_mandatory">">
</td>
</tr>
</TMPL_LOOP>
</TMPL_LOOP>
</table>
</DIV>
<DIV name="3XX" id="3XX" style="position:absolute;visibility:hidden;width:90%">
<table width=100% cellspacing=0 cellpadding=2 border=0>
<TMPL_LOOP name="3XX">
<tr background="<TMPL_VAR name="themelang">/images/background-mem.gif"><td colspan=4><b><TMPL_VAR name="tag"> <input type="hidden" name="ind_tag" value="<TMPL_VAR name="tag">"><input type="text" name="indicator" size=3 maxlength=2 value="<TMPL_VAR name="indicator">"> - <tmpl_var name="tag_lib"></td></tr>
<TMPL_LOOP name="subfield_loop">
<tr>
<td width="3%">&nbsp;</td>
<td width="2%"><b><TMPL_VAR name="subfield"></b></td>
<td width="55%" align="right"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><<TMPL_IF name="mandatory"> *</b></TMPL_IF>/td>
<td width="40%">
<TMPL_VAR name="marc_value">
<input type="hidden" name="tag" value="<TMPL_VAR name="tag">">
<input type="hidden" name="subfield" value="<TMPL_VAR name="subfield">">
<input type="hidden" name="mandatory" value="<TMPL_VAR name="mandatory">">
<input type="hidden" name="tag_mandatory" value="<TMPL_VAR name="tag_mandatory">">
</td>
</tr>
</TMPL_LOOP>
</TMPL_LOOP>
</table>
</DIV>
<DIV name="4XX" id="4XX" style="position:absolute;visibility:hidden;width:90%">
<table width=100% cellspacing=0 cellpadding=2 border=0>
<TMPL_LOOP name="4XX">
<tr background="<TMPL_VAR name="themelang">/images/background-mem.gif"><td colspan=4><b><TMPL_VAR name="tag"> <input type="hidden" name="ind_tag" value="<TMPL_VAR name="tag">"><input type="text" name="indicator" size=3 maxlength=2 value="<TMPL_VAR name="indicator">"> - <tmpl_var name="tag_lib"></td></tr>
<TMPL_LOOP name="subfield_loop">
<tr>
<td width="3%">&nbsp;</td>
<td width="2%"><b><TMPL_VAR name="subfield"></b></td>
<td width="55%" align="right"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"> *</b></TMPL_IF></td>
<td width="40%">
<TMPL_VAR name="marc_value">
<input type="hidden" name="tag" value="<TMPL_VAR name="tag">">
<input type="hidden" name="subfield" value="<TMPL_VAR name="subfield">">
<input type="hidden" name="mandatory" value="<TMPL_VAR name="mandatory">">
<input type="hidden" name="tag_mandatory" value="<TMPL_VAR name="tag_mandatory">">
</td>
</tr>
</TMPL_LOOP>
</TMPL_LOOP>
</table>
</DIV>
<DIV name="5XX" id="5XX" style="position:absolute;visibility:hidden;width:90%">
<table width=100% cellspacing=0 cellpadding=2 border=0>
<TMPL_LOOP name="5XX">
<tr background="<TMPL_VAR name="themelang">/images/background-mem.gif"><td colspan=4><b><TMPL_VAR name="tag"> <input type="hidden" name="ind_tag" value="<TMPL_VAR name="tag">"><input type="text" name="indicator" size=3 maxlength=2 value="<TMPL_VAR name="indicator">"> - <tmpl_var name="tag_lib"></td></tr>
<TMPL_LOOP name="subfield_loop">
<tr>
<td width="3%">&nbsp;</td>
<td width="2%"><b><TMPL_VAR name="subfield"></b></td>
<td width="55%" align="right"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"> *</b></TMPL_IF></td>
<td width="40%">
<TMPL_VAR name="marc_value">
<input type="hidden" name="tag" value="<TMPL_VAR name="tag">">
<input type="hidden" name="subfield" value="<TMPL_VAR name="subfield">">
<input type="hidden" name="mandatory" value="<TMPL_VAR name="mandatory">">
<input type="hidden" name="tag_mandatory" value="<TMPL_VAR name="tag_mandatory">">
</td>
</tr>
</TMPL_LOOP>
</TMPL_LOOP>
</table>
</DIV>
<DIV name="6XX" id="6XX" style="position:absolute;visibility:hidden;width:90%">
<table width=90% cellspacing=0 cellpadding=2 border=0>
<TMPL_LOOP name="6XX">
<tr background="<TMPL_VAR name="themelang">/images/background-mem.gif"><td colspan=4><b><TMPL_VAR name="tag"> <input type="hidden" name="ind_tag" value="<TMPL_VAR name="tag">"><input type="text" name="indicator" size=3 maxlength=2 value="<TMPL_VAR name="indicator">"> - <tmpl_var name="tag_lib"></td></tr>
<TMPL_LOOP name="subfield_loop">
<tr>
<td width="3%">&nbsp;</td>
<td width="2%"><b><TMPL_VAR name="subfield"></b></td>
<td width="55%" align="right"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"> *</b></TMPL_IF></td>
<td width="40%">
<TMPL_VAR name="marc_value">
<input type="hidden" name="tag" value="<TMPL_VAR name="tag">">
<input type="hidden" name="subfield" value="<TMPL_VAR name="subfield">">
<input type="hidden" name="mandatory" value="<TMPL_VAR name="mandatory">">
<input type="hidden" name="tag_mandatory" value="<TMPL_VAR name="tag_mandatory">">
</td>
</tr>
</TMPL_LOOP>
</TMPL_LOOP>
</table>
</DIV>
<DIV name="7XX" id="7XX" style="position:absolute;visibility:hidden;width:90%">
<table width=100% cellspacing=0 cellpadding=2 border=0>
<TMPL_LOOP name="7XX">
<tr background="<TMPL_VAR name="themelang">/images/background-mem.gif"><td colspan=4><b><TMPL_VAR name="tag"> <input type="hidden" name="ind_tag" value="<TMPL_VAR name="tag">"><input type="text" name="indicator" size=3 maxlength=2 value="<TMPL_VAR name="indicator">"> - <tmpl_var name="tag_lib"></td></tr>
<TMPL_LOOP name="subfield_loop">
<tr>
<td width="3%">&nbsp;</td>
<td width="2%"><b><TMPL_VAR name="subfield"></b></td>
<td width="55%" align="right"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"> *</b></TMPL_IF></td>
<td width="40%">
<TMPL_VAR name="marc_value">
<input type="hidden" name="tag" value="<TMPL_VAR name="tag">">
<input type="hidden" name="subfield" value="<TMPL_VAR name="subfield">">
<input type="hidden" name="mandatory" value="<TMPL_VAR name="mandatory">">
<input type="hidden" name="tag_mandatory" value="<TMPL_VAR name="tag_mandatory">">
</td>
</tr>
</TMPL_LOOP>
</TMPL_LOOP>
</table>
</DIV>
<DIV name="8XX" id="8XX" style="position:absolute;visibility:hidden;width:90%">
<table width=100% cellspacing=0 cellpadding=2 border=0>
<TMPL_LOOP name="8XX">
<tr background="<TMPL_VAR name="themelang">/images/background-mem.gif"><td colspan=4><b><TMPL_VAR name="tag"> <input type="hidden" name="ind_tag" value="<TMPL_VAR name="tag">"><input type="text" name="indicator" size=3 maxlength=2 value="<TMPL_VAR name="indicator">"> - <tmpl_var name="tag_lib"></td></tr>
<TMPL_LOOP name="subfield_loop">
<tr>
<td width="3%">&nbsp;</td>
<td width="2%"><b><TMPL_VAR name="subfield"></b></td>
<td width="55%" align="right"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"> *</b></TMPL_IF></td>
<td width="40%">
<TMPL_VAR name="marc_value">
<input type="hidden" name="tag" value="<TMPL_VAR name="tag">">
<input type="hidden" name="subfield" value="<TMPL_VAR name="subfield">">
<input type="hidden" name="mandatory" value="<TMPL_VAR name="mandatory">">
<input type="hidden" name="tag_mandatory" value="<TMPL_VAR name="tag_mandatory">">
</td>
</tr>
</TMPL_LOOP>
</TMPL_LOOP>
</table>
</DIV>
<DIV name="9XX" id="9XX" style="position:absolute;visibility:hidden;width:90%">
<table width=90% cellspacing=0 cellpadding=2 border=0>
<TMPL_LOOP name="9XX">
<tr background="<TMPL_VAR name="themelang">/images/background-mem.gif"><td colspan=4><b><TMPL_VAR name="tag"> <input type="hidden" name="ind_tag" value="<TMPL_VAR name="tag">"><input type="text" name="indicator" size=3 maxlength=2 value="<TMPL_VAR name="indicator">"> - <tmpl_var name="tag_lib"></td></tr>
<TMPL_LOOP name="subfield_loop">
<tr>
<td width="3%">&nbsp;</td>
<td width="2%"><b><TMPL_VAR name="subfield"></b></td>
<td width="55%" align="right"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"> *</b></TMPL_IF></td>
<td width="40%">
<TMPL_VAR name="marc_value">
<input type="hidden" name="tag" value="<TMPL_VAR name="tag">">
<input type="hidden" name="subfield" value="<TMPL_VAR name="subfield">">
<input type="hidden" name="mandatory" value="<TMPL_VAR name="mandatory">">
<input type="hidden" name="tag_mandatory" value="<TMPL_VAR name="tag_mandatory">">
</td>
</tr>
</TMPL_LOOP>
</TMPL_LOOP>
</table>
</DIV>
<DIV name="hidden" id="hidden" style="position:absolute;visibility:hidden;width:90%">
<table width=90% cellspacing=0 cellpadding=2 border=0>
<TMPL_LOOP name="hidden_loop">
<tr>
<td width="3%">&nbsp;</td>
<td width="2%"><b><TMPL_VAR name="subfield"></b></td>
<td width="55%" align="right"><TMPL_IF name="mandatory"><b></TMPL_IF><TMPL_VAR name="marc_lib"><TMPL_IF name="mandatory"> *</b></TMPL_IF></td>
<td width="40%">
<TMPL_VAR name="marc_value">
<input type="hidden" name="tag" value="<TMPL_VAR name="tag">">
<input type="hidden" name="subfield" value="<TMPL_VAR name="subfield">">
<input type="hidden" name="mandatory" value="<TMPL_VAR name="mandatory">">
<input type="hidden" name="tag_mandatory" value="<TMPL_VAR name="tag_mandatory">">
</td>
</tr>
</TMPL_LOOP>
</table>
</DIV>
<TMPL_IF name="oldbiblionumtagfield">
<input type="hidden" name="tag" value="<TMPL_VAR name="oldbiblionumtagfield">">
<input type="hidden" name="subfield" value="<TMPL_VAR name="oldbiblionumtagsubfield">">
<input type="hidden" name="field_value" value="<TMPL_VAR name="oldbiblionumber">">
<input type="hidden" name="mandatory" value="0">
<input type="hidden" name="tag" value="<TMPL_VAR name="oldbiblioitemnumtagfield">">
<input type="hidden" name="subfield" value="<TMPL_VAR name="oldbiblioitemnumtagsubfield">">
<input type="hidden" name="field_value" value="<TMPL_VAR name="oldbiblioitemnumber">">
<input type="hidden" name="mandatory" value="0">
<input type="hidden" name="tag_mandatory" value="<TMPL_VAR name="tag_mandatory">">
</TMPL_IF>
</form>
<script LANGUAGE="JavaScript">
function active(numlayer)
{
for (i=0; i < 10 ; i++ ) {
ong = i+"XX";
link = "link"+i;
if (numlayer==i) {
document.getElementById(ong).style.visibility="visible";
document.getElementById(link).style.backgroundColor="#11AA11";
document.getElementById(link).style.backgroundImage="url(<TMPL_VAR name="themelang">/images/background-mem.gif)";
} else {
document.getElementById(ong).style.visibility="hidden";
document.getElementById(link).style.backgroundColor="#FFFFFF";
document.getElementById(link).style.backgroundImage="";
}
}
}
function Check(f) {
// Scan for nonempty fields
var field_is_nonempty_p = new Array();
for (i=0 ; i<f.field_value.length ; i++) {
field_is_nonempty_p[f.tag[i].value] = 0;
}
for (i=0 ; i<f.field_value.length ; i++) {
if (f.field_value[i].value.length != 0) {
field_is_nonempty_p[f.tag[i].value] += 1;
}
}
// Scan for missing mandatory subfields
var total_missing_mandatory_subfields = 0;
for (i=0 ; i<f.field_value.length-2 ; i++) {
if (f.field_value[i].value.length==0 && f.mandatory[i].value==1) {
// We should not flag an error unless the tag is also
// mandatory, or if something else in the tag is entered
if (f.tag_mandatory[i].value == 1 || field_is_nonempty_p[f.tag[i].value]) {
document.getElementById("error"+i).style.backgroundColor="#FF0000";
total_missing_mandatory_subfields++;
}
} else {
document.getElementById("error"+i).style.backgroundColor="#FFFFFF";
}
}
// Scan for missing mandatory tags
var total_missing_mandatory_tags = 0;
var seen_mandatory_tag_p = new Array();
for (i=0 ; i<f.field_value.length ; i++) {
var j = f.tag[i].value;
if (!field_is_nonempty_p[j] && f.tag_mandatory[i].value == 1) {
if (seen_mandatory_tag_p[j] != 1) {
seen_mandatory_tag_p[j] = 1;
total_missing_mandatory_tags++;
}
document.getElementById("error"+i).style.backgroundColor="#ffff00";
}
}
var total_errors = total_missing_mandatory_tags + total_missing_mandatory_subfields;
var alertString2;
if (total_errors!=0) {
alertString2 = "Saisie invalide pour les raisons suivantes :\n";
alertString2 += "------------------------------------------------------------------------------------\n\n";
alertString2 += "- "+ total_missing_mandatory_tags +" zones obligatoires vides\n";
alertString2 += "- "+ total_missing_mandatory_subfields +" sous-zones obligatoires vides (voir sous-zones en gras)";
alert(alertString2);
} else {
document.f.submit();
}
}
function Dopop(link,i) {
defaultvalue=document.forms[0].field_value[i].value;
newin=window.open(link+"&result="+defaultvalue,"value builder",'width=500,height=400,toolbar=false,scrollbars=yes');
}
</script>
</body>
</html>