From: Dobrica Pavlinusic Date: Thu, 20 May 2010 18:51:18 +0000 (+0200) Subject: don't display ¶ after last item X-Git-Url: http://git.rot13.org/?p=MojoFacets.git;a=commitdiff_plain;h=bf321aef9e0db33769b3ce75bea39af980d20c4a don't display ¶ after last item --- diff --git a/templates/data/items/table.html.ep b/templates/data/items/table.html.ep index 2577868..4954137 100644 --- a/templates/data/items/table.html.ep +++ b/templates/data/items/table.html.ep @@ -28,9 +28,10 @@ filter % foreach my $col ( @$columns ) { {$col} ? ' class=numeric' : '' %>> % if ( ref $row->{$col} eq 'ARRAY' ) { -% foreach ( @{ $row->{$col} } ) { -<%= $_ %> -% if ( $#{ $row->{$col} } ) { +% my $last = $#{ $row->{$col} }; +% foreach ( 0 .. $last ) { +<%= $row->{$col}->[$_] %> +% if ( $_ < $last ) { % } % } @@ -40,8 +41,8 @@ filter <%= $row->{$col} %> % } -% } +% } # columns -% } +% } # sorted