koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] CVS: koha/admin marctagstructure.pl,1.25.2.2,1.25.2.3


From: Henri-Damien LAURENT
Subject: [Koha-cvs] CVS: koha/admin marctagstructure.pl,1.25.2.2,1.25.2.3
Date: Wed, 01 Jun 2005 06:22:09 -0700

Update of /cvsroot/koha/koha/admin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29405/admin

Modified Files:
      Tag: rel_2_2
        marctagstructure.pl 
Log Message:
Bug Fixing : Ugly display 
Non Working Arrows at the bottom of page.

Index: marctagstructure.pl
===================================================================
RCS file: /cvsroot/koha/koha/admin/marctagstructure.pl,v
retrieving revision 1.25.2.2
retrieving revision 1.25.2.3
diff -C2 -r1.25.2.2 -r1.25.2.3
*** marctagstructure.pl 31 May 2005 21:06:18 -0000      1.25.2.2
--- marctagstructure.pl 1 Jun 2005 13:22:07 -0000       1.25.2.3
***************
*** 219,222 ****
--- 219,223 ----
                 $template->param(searchfield => $searchfield);
        }
+       my $cnt=0;
        if ($dspchoice) {
                #here, user only wants used tags/subfields displayed
***************
*** 224,228 ****
                $searchfield=~ s/\'/\\\'/g;
                my @data=split(' ',$searchfield);
-               my address@hidden;
                my $sth=$dbh->prepare("Select marc_tag_structure.tagfield as 
mts_tagfield,marc_tag_structure.liblibrarian as 
mts_liblibrarian,marc_tag_structure.libopac as 
mts_libopac,marc_tag_structure.repeatable as 
mts_repeatable,marc_tag_structure.mandatory as 
mts_mandatory,marc_tag_structure.authorised_value as 
mts_authorized_value,marc_subfield_structure.* from marc_tag_structure LEFT 
JOIN marc_subfield_structure ON 
(marc_tag_structure.tagfield=marc_subfield_structure.tagfield AND 
marc_tag_structure.frameworkcode=marc_subfield_structure.frameworkcode) where 
(marc_tag_structure.tagfield >= ? and marc_tag_structure.frameworkcode=?) AND 
marc_subfield_structure.tab>=0 order by 
marc_tag_structure.tagfield,marc_subfield_structure.tagsubfield");
                #could be ordoned by tab
--- 225,228 ----
***************
*** 231,234 ****
--- 231,235 ----
                while (my $data=$sth->fetchrow_hashref){
                        push(@results,$data);
+                       $cnt++;
                }
                $sth->finish;
***************
*** 238,242 ****
                my $j=1;
                my $i=$offset;
!               while ($i < 
($offset+$pagesize<scalar(@results)?$offset+$pagesize:scalar(@results))) {
                        if ($toggle eq 0){
                                $toggle=1;
--- 239,243 ----
                my $j=1;
                my $i=$offset;
!               while ($i < ($offset+$pagesize<$cnt?$offset+$pagesize:$cnt)) {
                        if ($toggle eq 0){
                                $toggle=1;
***************
*** 256,260 ****
                        $j=$i;
                        my @internal_loop = ();
!                       while 
(($results[$i]->{'tagfield'}==$results[$j]->{'tagfield'}) and ($j< 
($offset+$pagesize<scalar(@results)?$offset+$pagesize:scalar(@results)))) {
                                if ($toggle eq 0) {
                                        $toggle=1;
--- 257,261 ----
                        $j=$i;
                        my @internal_loop = ();
!                       while 
(($results[$i]->{'tagfield'}==$results[$j]->{'tagfield'}) and ($j< 
($offset+$pagesize<$cnt?$offset+$pagesize:$cnt))) {
                                if ($toggle eq 0) {
                                        $toggle=1;
***************
*** 274,278 ****
                                $subfield_data{value_builder}= 
$results[$j]->{'value_builder'};
                                $subfield_data{toggle}  = $toggle;
!                               warn "tagfield :  
".$results[$j]->{'tagfield'}." tagsubfield :".$results[$j]->{'tagsubfield'};
                                push @internal_loop,\%subfield_data;
                                $j++;
--- 275,279 ----
                                $subfield_data{value_builder}= 
$results[$j]->{'value_builder'};
                                $subfield_data{toggle}  = $toggle;
! #                             warn "tagfield :  
".$results[$j]->{'tagfield'}." tagsubfield :".$results[$j]->{'tagsubfield'};
                                push @internal_loop,\%subfield_data;
                                $j++;
***************
*** 285,306 ****
                $template->param(select_display => "True",
                                                loop => address@hidden);
-               if ($offset>0) {
-                       my $prevpage = $offset-$pagesize;
-                       $template->param(isprevpage => $offset,
-                                                       prevpage=> $prevpage,
-                                                       searchfield => 
$searchfield,
-                                                       script_name => 
$script_name,
-                                                       frameworkcode => 
$frameworkcode,
-                       );
-               }
-               if ($offset+$pagesize<$count) {
-                       my $nextpage =$offset+$pagesize;
-                       $template->param(nextpage =>$nextpage,
-                                                       searchfield => 
$searchfield,
-                                                       script_name => 
$script_name,
-                                                       frameworkcode => 
$frameworkcode,
-                       );
-               }
-               
                #  $sth->execute;
                $sth->finish;
--- 286,289 ----
***************
*** 309,312 ****
--- 292,296 ----
                my $env;
                my 
($count,$results)=StringSearch($env,$searchfield,$frameworkcode);
+               $cnt = $count;
                my $toggle=0;
                my @loop_data = ();
***************
*** 330,350 ****
                }
                $template->param(loop => address@hidden);
!               if ($offset>0) {
!                       my $prevpage = $offset-$pagesize;
!                       $template->param(isprevpage => $offset,
!                                                       prevpage=> $prevpage,
!                                                       searchfield => 
$searchfield,
!                                                       script_name => 
$script_name,
!                                                       frameworkcode => 
$frameworkcode,
!                       );
!               }
!               if ($offset+$pagesize<$count) {
!                       my $nextpage =$offset+$pagesize;
!                       $template->param(nextpage =>$nextpage,
!                                                       searchfield => 
$searchfield,
!                                                       script_name => 
$script_name,
!                                                       frameworkcode => 
$frameworkcode,
!                       );
!               }
        }
  } #---- END $OP eq DEFAULT
--- 314,334 ----
                }
                $template->param(loop => address@hidden);
!       }
!       if ($offset>0) {
!               my $prevpage = $offset-$pagesize;
!               $template->param(isprevpage => $offset,
!                                               prevpage=> $prevpage,
!                                               searchfield => $searchfield,
!                                               script_name => $script_name,
!                                               frameworkcode => $frameworkcode,
!               );
!       }
!       if ($offset+$pagesize<$cnt) {
!               my $nextpage =$offset+$pagesize;
!               $template->param(nextpage =>$nextpage,
!                                               searchfield => $searchfield,
!                                               script_name => $script_name,
!                                               frameworkcode => $frameworkcode,
!               );
        }
  } #---- END $OP eq DEFAULT




reply via email to

[Prev in Thread] Current Thread [Next in Thread]