while ( ( my $field ) = $sth2->fetchrow_array ) {
push @kohafields, "biblio." . $field;
}
- my $sth2 = $dbh->prepare("SHOW COLUMNS from biblioitems");
+ $sth2 = $dbh->prepare("SHOW COLUMNS from biblioitems");
$sth2->execute;
while ( ( my $field ) = $sth2->fetchrow_array ) {
if ( $field eq 'notes' ) { $field = 'bnotes'; }
push @kohafields, "biblioitems." . $field;
}
- my $sth2 = $dbh->prepare("SHOW COLUMNS from items");
+ $sth2 = $dbh->prepare("SHOW COLUMNS from items");
$sth2->execute;
while ( ( my $field ) = $sth2->fetchrow_array ) {
push @kohafields, "items." . $field;
}
push( @authorised_values, "branches" );
push( @authorised_values, "itemtypes" );
+ push( @authorised_values, "cn_source" );
# build thesaurus categories list
$sth2->finish;
. "<input type=\"hidden\" name=\"tagsubfield\" value=\""
. $data->{'tagsubfield'}
. "\" id=\"tagsubfield\" />";
- $row_data{subfieldcode} = $data->{'tagsubfield'};
+ $row_data{subfieldcode} = $data->{'tagsubfield'} eq '@'?'_':$data->{'tagsubfield'};
$row_data{liblibrarian} = CGI::escapeHTML( $data->{'liblibrarian'} );
$row_data{libopac} = CGI::escapeHTML( $data->{'libopac'} );
$row_data{seealso} = CGI::escapeHTML( $data->{'seealso'} );
# add more_subfields empty lines for add if needed
for ( my $j = 1 ; $j <= 1 ; $j++ ) {
my %row_data; # get a fresh hash for the row data
+ $row_data{'new_subfield'} = 1;
$row_data{'subfieldcode'} = '';
$row_data{tab} = CGI::scrolling_list(
$template->param( 'heading-edit-subfields-p' => 1 );
$template->param(
action => "Edit subfields",
- tagfield =>
-"<input type=\"hidden\" name=\"tagfield\" value=\"$tagfield\" />$tagfield",
+ tagfield => $tagfield,
loop => \@loop_data,
more_subfields => $more_subfields,
more_tag => $tagfield
my $tagfield = $input->param('tagfield');
my $tagsubfield = $tagsubfield[$i];
$tagsubfield = "@" unless $tagsubfield ne '';
+ $tagsubfield = "@" if $tagsubfield eq '_';
my $liblibrarian = $liblibrarian[$i];
my $libopac = $libopac[$i];
my $repeatable = $input->param("repeatable$i") ? 1 : 0;
if ( $offset > 0 ) {
my $prevpage = $offset - $pagesize;
$template->param(
- prev => "<a href=\"$script_name?offset=$prevpage\">" );
+ prev => "<a href=\"$script_name?offset=$prevpage\&tagfield=$tagfield\&frameworkcode=$frameworkcode \">" );
}
if ( $offset + $pagesize < $count ) {
my $nextpage = $offset + $pagesize;
$template->param(
- next => "<a href=\"$script_name?offset=$nextpage\">" );
+ next => "<a href=\"$script_name?offset=$nextpage\&tagfield=$tagfield\&frameworkcode=$frameworkcode \">" );
}
} #---- END $OP eq DEFAULT