From 4a8ae6a31bd8c5eafdb2c21381fed2e16e30da86 Mon Sep 17 00:00:00 2001 From: doxulting Date: Tue, 6 Jul 2004 13:15:11 +0000 Subject: [PATCH] New stuff for authorities --- admin/marc_subfields_structure.pl | 12 +++++++++--- authorities/authorities-home.pl | 8 +++----- .../en/parameters/marc_subfields_structure.tmpl | 1 + 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/admin/marc_subfields_structure.pl b/admin/marc_subfields_structure.pl index cbe15ea0c5..9944bf37e9 100755 --- a/admin/marc_subfields_structure.pl +++ b/admin/marc_subfields_structure.pl @@ -197,6 +197,7 @@ if ($op eq 'add_form') { $row_data{hidden} = CGI::checkbox("hidden$i",$data->{'hidden'}?'checked':'',1,''); $row_data{isurl} = CGI::checkbox("isurl$i",$data->{'isurl'}?'checked':'',1,''); $row_data{bgcolor} = $toggle; + $row_data{link} = CGI::escapeHTML($data->{'link'}); push(@loop_data, \%row_data); $i++; } @@ -238,6 +239,7 @@ if ($op eq 'add_form') { -size=>1, -multiple=>0, ); + $row_data{link} = CGI::escapeHTML($data->{'link'}); $row_data{bgcolor} = $toggle; push(@loop_data, \%row_data); } @@ -255,8 +257,8 @@ if ($op eq 'add_form') { } elsif ($op eq 'add_validate') { my $dbh = C4::Context->dbh; $template->param(tagfield => "$input->param('tagfield')"); - my $sth=$dbh->prepare("replace marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,seealso,authorised_value,authtypecode,value_builder,hidden,isurl,frameworkcode) - values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); + my $sth=$dbh->prepare("replace marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,seealso,authorised_value,authtypecode,value_builder,hidden,isurl,frameworkcode, link) + values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); my @tagsubfield = $input->param('tagsubfield'); my @liblibrarian = $input->param('liblibrarian'); my @libopac = $input->param('libopac'); @@ -266,6 +268,7 @@ if ($op eq 'add_form') { my @authorised_values = $input->param('authorised_value'); my @authtypecodes = $input->param('authtypecode'); my @value_builder =$input->param('value_builder'); + my @link =$input->param('link'); for (my $i=0; $i<= $#tagsubfield ; $i++) { my $tagfield =$input->param('tagfield'); my $tagsubfield =$tagsubfield[$i]; @@ -282,6 +285,7 @@ if ($op eq 'add_form') { my $value_builder=$value_builder[$i]; my $hidden = $input->param("hidden$i")?1:0; my $isurl = $input->param("isurl$i")?1:0; + my $link = $link[$i]; if ($liblibrarian) { unless (C4::Context->config('demo') eq 1) { $sth->execute ($tagfield, @@ -299,7 +303,9 @@ if ($op eq 'add_form') { $hidden, $isurl, $frameworkcode, - ); + + $link, + ); } } } diff --git a/authorities/authorities-home.pl b/authorities/authorities-home.pl index 1094c217d3..7255588eb7 100755 --- a/authorities/authorities-home.pl +++ b/authorities/authorities-home.pl @@ -36,10 +36,10 @@ use C4::Koha; # XXX subfield_is_koha_internal_p my $query=new CGI; my $op = $query->param('op'); my $authtypecode = $query->param('authtypecode'); -warn "La authtypecode = $authtypecode\n"; my $dbh = C4::Context->dbh; my $startfrom=$query->param('startfrom'); +my $authid=$query->param('authid'); $startfrom=0 if(!defined $startfrom); my ($template, $loggedinuser, $cookie); my $resultsperpage; @@ -65,8 +65,6 @@ if ($op eq "do_search") { $resultsperpage= $query->param('resultsperpage'); $resultsperpage = 19 if(!defined $resultsperpage); my @tags; - warn "a ce pont labas dbh ($dbh), tags(\@tags), and_or (\@and_or), excluding (\@excluding), operator (\@operator), value (\@value), resultsperpage $resultsperpage, $startfrom, [$authtypecode]"; - my ($results,$total) = authoritysearch($dbh, \@tags,\@and_or, \@excluding, \@operator, \@value, $startfrom*$resultsperpage, $resultsperpage,$authtypecode); @@ -144,8 +142,8 @@ if ($op eq "do_search") { } elsif ($op eq "delete") { - warn "Ici effacement\n"; - + &AUTHdelauthority($dbh,$authid, 1); + ($template, $loggedinuser, $cookie) = get_template_and_user({template_name => "authorities/authorities-home.tmpl", query => $query, diff --git a/koha-tmpl/intranet-tmpl/default/en/parameters/marc_subfields_structure.tmpl b/koha-tmpl/intranet-tmpl/default/en/parameters/marc_subfields_structure.tmpl index 8ae0575146..a9d9631d12 100644 --- a/koha-tmpl/intranet-tmpl/default/en/parameters/marc_subfields_structure.tmpl +++ b/koha-tmpl/intranet-tmpl/default/en/parameters/marc_subfields_structure.tmpl @@ -44,6 +44,7 @@ or thesaurus: or plugin: + or link: " size=10 maxlength=5> (exemple :200b)

-- 2.39.5