/[pxelator]/lib/PXElator/html.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /lib/PXElator/html.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 188 by dpavlin, Sun Aug 9 22:05:09 2009 UTC revision 307 by dpavlin, Thu Aug 27 14:31:49 2009 UTC
# Line 14  sub table { Line 14  sub table {
14    
15          my @td = map { "<td>$_</td>" } @_;          my @td = map { "<td>$_</td>" } @_;
16          my $html = qq{<table>\n<tr>$th};          my $html = qq{<table>\n<tr>$th};
17            my $row = 0;
18    
19          foreach ( 0 .. $#td ) {          foreach ( 0 .. $#td ) {
20                          $html .= $td[$_];                          $html .= $td[$_];
21                          $html .= qq{</tr>\n<tr>} if ( $_ + 1 ) % $cols == 0;                          if ( ( $_ + 1 ) % $cols == 0 ) {
22                                    $zebra = $row++ % 2 == 0 ? qq{ style="background: #eee"} : '';
23                                    $html .= qq{</tr>\n<tr$zebra>};
24                            };
25          }          }
26          $html .= qq{</tr>\n</table>};          $html .= qq{</tr>\n</table>};
27  }  }

Legend:
Removed from v.188  
changed lines
  Added in v.307

  ViewVC Help
Powered by ViewVC 1.1.26