Frédéric Demians
6b3e4f19f4
With this patch, in biblio record data entry form, when ... is clicked for an authority controlled field, it's possible to select which heading repetion to copy if the authority has repeated headings. When there is just one authority repetition, the first one is displayed to choose, as previously. This patch is REQUIRED by French libraries following SUDOC UNIMARC format, and cataloguing multilingual materials ie all Higher Educational and Research libraries. Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
57 lines
1.7 KiB
Cheetah
57 lines
1.7 KiB
Cheetah
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
|
|
<Title>Koha -- Authority details</title>
|
|
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
$(document).ready(function(){
|
|
var index_start = "<!-- TMPL_VAR NAME='index' -->";
|
|
var whichfield;
|
|
try {
|
|
whichfield = opener.opener.document.getElementById(index_start);
|
|
} catch(e) {
|
|
return;
|
|
}
|
|
|
|
// browse all its subfields
|
|
var subfields = whichfield.parentNode.parentNode.getElementsByTagName('input');
|
|
var re = /^tag_\d*_code_/;
|
|
for(var i=0, len = subfields.length ; i< len ; i++) { // browse all subfields
|
|
if(subfields[i].getAttribute('name').match(re)){ // it s a subfield
|
|
var code = subfields[i]; // code is the first input
|
|
var subfield = subfields[i+1]; // subfield the second
|
|
|
|
<!-- TMPL_IF NAME="clear" -->
|
|
if (subfield){subfield.value="" ;}
|
|
<!--TMPL_ELSE-->
|
|
<!-- TMPL_LOOP NAME="SUBFIELD_LOOP" -->
|
|
if (code.value == "<!-- TMPL_VAR ESCAPE="JS" NAME="marc_subfield" -->"){
|
|
subfield.value = "<!-- TMPL_VAR ESCAPE="JS" NAME="marc_value" -->";
|
|
}
|
|
<!-- /TMPL_LOOP -->
|
|
if(code.value=='9'){
|
|
subfield.value = "<!-- TMPL_VAR ESCAPE="JS" NAME="authid" -->";
|
|
}
|
|
<!--/TMPL_IF-->
|
|
}
|
|
}
|
|
opener.close();
|
|
window.close();
|
|
|
|
return false;
|
|
});
|
|
//]]>
|
|
</script>
|
|
</head>
|
|
<body>
|
|
|
|
<div id="doc" class="yui-t7">
|
|
<div id="bd">
|
|
<div class="yui-g">
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- TMPL_INCLUDE NAME="popup-bottom.inc" -->
|