patch to hide empty fields
authortipaul <tipaul>
Wed, 23 Feb 2005 14:11:21 +0000 (14:11 +0000)
committertipaul <tipaul>
Wed, 23 Feb 2005 14:11:21 +0000 (14:11 +0000)
koha-tmpl/intranet-tmpl/default/en/reports/borrowers_stats.tmpl
reports/borrowers_stats.pl

index c7d83be..8941a86 100644 (file)
                        </td>
                        <td>&nbsp;</td>
                        </tr>
-                       <tr>
-                       <td>Sort1</td>
-                       <td align="center"><input type="radio" name="Line" value="sort1"></td>
-                       <td align="center"><input type="radio" name="Column" value="sort1"></td>
-                       <td ><!-- TMPL_VAR NAME="CGISort1" --></td>
-                       </tr>
+                       <!-- TMPL_IF name="hassort1" -->
+                               <tr>
+                               <td>Sort1</td>
+                               <td align="center"><input type="radio" name="Line" value="sort1"></td>
+                               <td align="center"><input type="radio" name="Column" value="sort1"></td>
+                               <td ><!-- TMPL_VAR NAME="CGISort1" --></td>
+                               </tr>
+                       <!-- /TMPL_IF -->
                        <tr class="hilighted" >
                        <td>Sort2</td>
                        <td align="center"><input type="radio" name="Line" value="sort2"></td>
index 171351e..b12386f 100755 (executable)
@@ -123,8 +123,12 @@ if ($do_it) {
        $req->execute;
        my @select_sort1;
        push @select_sort1,"";
+       my $hassort1;
        while (my ($value) =$req->fetchrow) {
-               push @select_sort1, $value;
+               if ($value) {
+                       $hassort1=1;
+                       push @select_sort1, $value;
+               }
        }
        my $CGIsort1=CGI::scrolling_list( -name     => 'Filter',
                                -id => 'Filter',
@@ -164,9 +168,9 @@ if ($do_it) {
                                -values   => \@dels,
                                -size     => 1,
                                -multiple => 0 );
-       
        $template->param(CGICatcode => $CGICatCode,
                                        CGISort1 => $CGIsort1,
+                                       hassort1 => $hassort1,
                                        CGISort2 => $CGIsort2,
                                        CGIextChoice => $CGIextChoice,
                                        CGIsepChoice => $CGIsepChoice