- my $html = tidy_up(open_table(\%params, $header),
- build_rows(\%params, @data),
- close_table(\%params, $header));
+ my @lines;
+ push @lines, defined $params{class}
+ ? "<table class=\"".$params{class}.'">'
+ : '<table>';
+ push @lines, "\t<thead>","\t\t<tr>",
+ (map {
+ "\t\t\t<th>".
+ htmlize($params{page}, $params{destpage}, $_).
+ "</th>"
+ } @$header),
+ "\t\t</tr>", "\t</thead>" if defined $header;
+ push @lines, "\t<tbody>";
+ foreach my $record (@data) {
+ push @lines, "\t\t<tr>",
+ (map {
+ "\t\t\t<td>".
+ htmlize($params{page}, $params{destpage}, $_).
+ "</td>"
+ } @$record),
+ "\t\t</tr>";
+ }
+ push @lines, "\t</tbody>" if defined $header;
+ push @lines, '</table>';
+ my $html = join("\n", @lines);