- # here, $op can be unset or set to "authtype_create_confirm".
-# warn "authtype : $authtypecode";
- if ($searchfield ne '') {
- $template->param(searchfield => $searchfield);
- }
- my $env;
- my ($count,$results)=StringSearch($env,$searchfield,$authtypecode);
- my $toggle="white";
- my @loop_data = ();
- for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){
- if ($toggle eq 'white'){
- $toggle="#ffffcc";
- } else {
- $toggle="white";
- }
- my %row_data; # get a fresh hash for the row data
- $row_data{tagfield} = $results->[$i]{'tagfield'};
- $row_data{liblibrarian} = $results->[$i]{'liblibrarian'};
- $row_data{repeatable} = $results->[$i]{'repeatable'};
- $row_data{mandatory} = $results->[$i]{'mandatory'};
- $row_data{authorised_value} = $results->[$i]{'authorised_value'};
- $row_data{subfield_link} ="auth_subfields_structure.pl?tagfield=".$results->[$i]{'tagfield'}."&authtypecode=".$authtypecode;
- $row_data{edit} = "$script_name?op=add_form&searchfield=".$results->[$i]{'tagfield'}."&authtypecode=".$authtypecode;
- $row_data{delete} = "$script_name?op=delete_confirm&searchfield=".$results->[$i]{'tagfield'}."&authtypecode=".$authtypecode;
- $row_data{bgcolor} = $toggle;
- push(@loop_data, \%row_data);
- }
- $template->param(loop => \@loop_data,
- authtypecode => $authtypecode,
- );
- if ($offset>0) {
- my $prevpage = $offset-$pagesize;
- $template->param(isprevpage => $offset,
- prevpage=> $prevpage,
- searchfield => $searchfield,
- script_name => $script_name,
- );
- }
- if ($offset+$pagesize<$count) {
- my $nextpage =$offset+$pagesize;
- $template->param(nextpage =>$nextpage,
- searchfield => $searchfield,
- script_name => $script_name,
- );
- }
+ # here, $op can be unset or set to "authtype_create_confirm".
+# warn "authtype : $authtypecode";
+ if ($searchfield ne '') {
+ $template->param(searchfield => $searchfield);
+ }
+ my ($count,$results)=StringSearch($searchfield,$authtypecode);
+ my @loop_data = ();
+ for ( my $i = $offset ; $i < $count ; $i++ ) {
+ my %row_data; # get a fresh hash for the row data
+ $row_data{tagfield} = $results->[$i]{'tagfield'};
+ $row_data{liblibrarian} = $results->[$i]{'liblibrarian'};
+ $row_data{repeatable} = $results->[$i]{'repeatable'};
+ $row_data{mandatory} = $results->[$i]{'mandatory'};
+ $row_data{authorised_value} = $results->[$i]{'authorised_value'};
+ $row_data{subfield_link} = "auth_subfields_structure.pl?tagfield=" . $results->[$i]{'tagfield'} . "&authtypecode=" . $authtypecode;
+ $row_data{edit} = "$script_name?op=add_form&searchfield=" . $results->[$i]{'tagfield'} . "&authtypecode=" . $authtypecode;
+ $row_data{delete} = "$script_name?op=delete_confirm&searchfield=" . $results->[$i]{'tagfield'} . "&authtypecode=" . $authtypecode;
+ push(@loop_data, \%row_data);
+ }
+ $template->param(loop => \@loop_data,
+ authtypecode => $authtypecode,
+ );
+ if ($offset>0) {
+ $template->param(isprevpage => $offset,
+ searchfield => $searchfield,
+ );
+ }
+ if ( $offset < $count ) {
+ $template->param(
+ searchfield => $searchfield,
+ );
+ }