From 6d74968993444e1414c6c549f6231c038bbc7c14 Mon Sep 17 00:00:00 2001 From: tipaul Date: Fri, 11 Oct 2002 09:19:57 +0000 Subject: [PATCH] bugfixes + improvment in navigation --- admin/marc_subfields_structure.pl | 29 ++++++++++++---- .../parameters/marc_subfields_structure.tmpl | 34 ++++++++++++------- .../en/parameters/marctagstructure.tmpl | 1 - 3 files changed, 43 insertions(+), 21 deletions(-) diff --git a/admin/marc_subfields_structure.pl b/admin/marc_subfields_structure.pl index c6d0b26e04..e55dd173ae 100755 --- a/admin/marc_subfields_structure.pl +++ b/admin/marc_subfields_structure.pl @@ -108,7 +108,12 @@ if ($op eq 'add_form') { $toggle="white"; } $row_data{tab} = CGI::scrolling_list(-name=>'tab[]', - -values=>['','0','1','2','3','4','5','6','7','8','9','items'], + -values=>['','0','1','2','3','4','5','6','7','8','9','10'], + -labels => {'' =>'','0'=>'0','1'=>'1', + '2' =>'2','3'=>'3','4'=>'4', + '5' =>'5','6'=>'6','7'=>'7', + '8' =>'8','9'=>'9','10'=>'items (10)', + }, -default=>$data->{'tab'}, -size=>1, -multiple=>0, @@ -131,7 +136,7 @@ if ($op eq 'add_form') { # add an empty line for add if needed my %row_data; # get a fresh hash for the row data $row_data{tab} = CGI::scrolling_list(-name=>'tab[]', - -values=>['','0','1','2','3','4','5','6','7','8','9','items'], + -values=>['','0','1','2','3','4','5','6','7','8','9','items (10)'], -default=>"", -size=>1, -multiple=>0, @@ -141,7 +146,12 @@ if ($op eq 'add_form') { $row_data{libopac} = ""; $row_data{repeatable} = CGI::checkbox('repeatable[]','',1,''); $row_data{mandatory} = CGI::checkbox('mandatory[]','',1,''); - $row_data{kohafield} = ''; + $row_data{kohafield}= CGI::scrolling_list( -name=>'kohafield[]', + -values=> \@kohafields, + -default=> "", + -size=>1, + -multiple=>0, + ); $row_data{bgcolor} = $toggle; push(@loop_data, \%row_data); @@ -162,7 +172,6 @@ if ($op eq 'add_form') { my @mandatory = $input->param('mandatory[]'); my @kohafield = $input->param('kohafield[]'); my @tab = $input->param('tab[]'); - warn "taille : $#tagsubfield"; for (my $i=0; $i<= $#tagsubfield ; $i++) { my $tagfield =$input->param('tagfield'); my $tagsubfield =$tagsubfield[$i]; @@ -184,7 +193,7 @@ if ($op eq 'add_form') { } } $sth->finish; - print "Content-Type: text/html\n\n"; + print "Content-Type: text/html\n\n"; exit; # END $OP eq ADD_VALIDATE @@ -197,6 +206,9 @@ if ($op eq 'add_form') { my $data=$sth->fetchrow_hashref; $sth->finish; $template->param(liblibrarian => $data->{'liblibrarian'}, + tagsubfield => $tagsubfield, + delete_link => $script_name, + tagfield =>$tagfield, tagsubfield => $tagsubfield, ); # END $OP eq DELETE_CONFIRM @@ -207,6 +219,9 @@ if ($op eq 'add_form') { my $sth=$dbh->prepare($reqdel); $sth->execute; $sth->finish; + print "Content-Type: text/html\n\n"; + exit; + $template->param(tagfield => $tagfield); # END $OP eq DELETE_CONFIRMED ################## DEFAULT ################################## } else { # DEFAULT @@ -228,7 +243,7 @@ if ($op eq 'add_form') { $row_data{repeatable} = $results->[$i]{'repeatable'}; $row_data{mandatory} = $results->[$i]{'mandatory'}; $row_data{tab} = $results->[$i]{'tab'}; - $row_data{delete} = "$script_name?op=delete_confirm&tagfield=$tagfield&tagsubfield=".$results->[$i]{'tagfield'}; + $row_data{delete} = "$script_name?op=delete_confirm&tagfield=$tagfield&tagsubfield=".$results->[$i]{'tagsubfield'}; $row_data{bgcolor} = $toggle; push(@loop_data, \%row_data); } @@ -240,7 +255,7 @@ if ($op eq 'add_form') { } if ($offset+$pagesize<$count) { my $nextpage =$offset+$pagesize; - $template->param(next => "a href=$script_name?offset=".$nextpage.'Next >>'); + $template->param(next => "'); } } #---- END $OP eq DEFAULT 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 a68ab71bc1..2c1055ea48 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 @@ -3,7 +3,7 @@

-
+ @@ -32,19 +32,21 @@
Tag/subfield
- + - + + + - + data deleted -
+ '>
@@ -68,14 +74,16 @@ +
tagSubfield
 
CONFIRM DELETION
">
YesNo YesNo ">delete
- +
- - + + +
Back to Tags
diff --git a/koha-tmpl/intranet-tmpl/default/en/parameters/marctagstructure.tmpl b/koha-tmpl/intranet-tmpl/default/en/parameters/marctagstructure.tmpl index 93013e4087..f1784cfe7e 100644 --- a/koha-tmpl/intranet-tmpl/default/en/parameters/marctagstructure.tmpl +++ b/koha-tmpl/intranet-tmpl/default/en/parameters/marctagstructure.tmpl @@ -108,7 +108,6 @@ Tag Lib - Subfields Repeatable Mandatory Subfields -- 2.39.5