Flesh out Revisions assetHelper.

Add a simple method to WebGUI::HTML to format an array as a table row.
Do not join non-asset tables in queries.
This commit is contained in:
Colin Kuskie 2009-11-29 16:03:51 -08:00
parent eba37b8bc1
commit 3eb0ac756f
3 changed files with 108 additions and 1 deletions

View file

@ -39,6 +39,7 @@ A package for manipulating and massaging HTML.
$html = WebGUI::HTML::makeAbsolute($session, $html);
$html = WebGUI::HTML::processReplacements($session, $html);
$html = WebGUI::HTML::splitTag([$tag,]$html[,$count]); # defaults to ( 'p', $html, 1 )
$html = WebGUI::HTML::arrayToRow(@columnData);
=head1 METHODS
@ -47,6 +48,27 @@ These methods are available from this package:
=cut
#-------------------------------------------------------------------
=head2 arrayToRow ( @columnData )
Wraps each element of @columnData in a table cell tag, concatenates them all together,
and then wraps that in table row tags.
=head3 @columnData
An array of strings to wrap.
=cut
sub arrayToRow {
my @columnData = @_;
my $output = '<tr><td>';
$output .= join '</td><td>', @columnData;
$output .= '</td></tr>';
return $output;
}
#-------------------------------------------------------------------
=head2 cleanSegment ( html , preserveStyleScript )