=cut
sub plugin_javascript {
my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
-my $function_name= "210c".(int(rand(100000))+1);
+my $function_name= $field_number;
#---- build editors list.
#---- the editor list is built from the "EDITORS" thesaurus
#---- this thesaurus category must be filled as follow :
#---- 200$a for isbn
#---- 200$b for editor
#---- 200$c (repeated) for collections
- my $sth;
-#= $dbh->prepare("select auth_subfield_table.authid,subfieldvalue from auth_subfield_table
-# left join auth_header on auth_subfield_table.authid=auth_header.authid
-# where authtypecode='EDITORS' and tag='200' and subfieldcode='a'");
- my $sth2;
- # = $dbh->prepare("select subfieldvalue from auth_subfield_table where tag='200' and subfieldcode='b' and authid=?");
+ my $sth
+= $dbh->prepare("select auth_subfield_table.authid,subfieldvalue from auth_subfield_table
+ left join auth_header on auth_subfield_table.authid=auth_header.authid
+ where authtypecode='EDITORS' and tag='200' and subfieldcode='a'");
+ my $sth2
+ = $dbh->prepare("select subfieldvalue from auth_subfield_table where tag='200' and subfieldcode='b' and authid=?");
$sth->execute;
my @editors;
my $authoritysep = C4::Context->preference("authoritysep");
}
function Clic$function_name(subfield_managed) {
- defaultvalue=escape(document.forms['f'].field_value[subfield_managed].value);
+ defaultvalue=escape(document.getElementById(\"$field_number\").value);
newin=window.open(\"plugin_launcher.pl?plugin_name=unimarc_field_210c.pl&index=\"+subfield_managed,\"unimarc 225a\",'width=500,height=600,toolbar=false,scrollbars=yes');
}
</script>
# builds tag and subfield arrays
my @tags;
- my ($results,$total) = authoritysearch($dbh, \@tags,\@and_or,
+ my ($results,$total) = SearchAuthorities( \@tags,\@and_or,
\@excluding, \@operator, \@value,
$startfrom*$resultsperpage, $resultsperpage,$authtypecode);# $orderby);
$to = (($startfrom+1)*$resultsperpage);
}
$template->param(result => $results) if $results;
- $template->param(index => $query->param('index'));
+ $template->param('index' => $query->param('index'));
$template->param(startfrom=> $startfrom,
displaynext=> $displaynext,
displayprev=> $displayprev,
resultsperpage => $resultsperpage,
startfromnext => $startfrom+1,
startfromprev => $startfrom-1,
- index => $index,
total=>$total,
from=>$from,
to=>$to,