don't display ¶ after last item
authorDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 20 May 2010 18:51:18 +0000 (20:51 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 20 May 2010 18:51:18 +0000 (20:51 +0200)
templates/data/items/table.html.ep

index 2577868..4954137 100644 (file)
@@ -28,9 +28,10 @@ filter
 % foreach my $col ( @$columns ) {
 <td<%= $numeric->{$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 ) {
 <span class=d>&para;</span>
 %    }
 %   }
@@ -40,8 +41,8 @@ filter
 <%= $row->{$col} %>
 %  }
 </td>
-% }
+% } # columns
 </tr>
-% }
+% } # sorted
 
 </table>