X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FElements%2FCollectionList;h=cd86235ff6ba18e5a75860a34042c82064be70b4;hp=402a272b4affc7b64acec514b6424619cbd616c0;hb=de9d037528895f7151a9aead6724ce2df95f9586;hpb=f3c4966ed1f6ec3db7accd6dcdd3a5a3821d72a7 diff --git a/rt/share/html/Elements/CollectionList b/rt/share/html/Elements/CollectionList index 402a272b4..cd86235ff 100644 --- a/rt/share/html/Elements/CollectionList +++ b/rt/share/html/Elements/CollectionList @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -68,9 +68,10 @@ if ( $Rows ) { # collection is ordered or not if ( @OrderBy && ($AllowSorting || !$Collection->{'order_by'}) ) { if ( $OrderBy[0] =~ /\|/ ) { - @OrderBy = grep length($_), split /\|/, $OrderBy[0]; + @OrderBy = split /\|/, $OrderBy[0]; @Order = split /\|/,$Order[0]; } + @OrderBy = grep length, @OrderBy; $Collection->OrderByCols( map { { FIELD => $OrderBy[$_], ORDER => $Order[$_] } } ( 0 .. $#OrderBy ) @@ -111,24 +112,25 @@ if ($Class =~ /::/) { # older passed in value $Class =~ s/:/_/g; } -$m->out(''); +$m->out('
'); if ( $ShowHeader ) { - $m->comp('/Elements/CollectionAsTable/Header', - %ARGS, - Class => $Class, - Format => \@Format, - FormatString => $Format, - Order => \@Order, - OrderBy => \@OrderBy, - Rows => $Rows, - Page => $Page, - AllowSorting => $AllowSorting, - BaseURL => $BaseURL, - GenericQueryArgs => $GenericQueryArgs, - maxitems => $maxitems, - ); + $m->comp('/Elements/CollectionAsTable/Header', + %ARGS, + Class => $Class, + Format => \@Format, + FormatString => $Format, + Order => \@Order, + OrderBy => \@OrderBy, + Rows => $Rows, + Page => $Page, + AllowSorting => $AllowSorting, + BaseURL => $BaseURL, + GenericQueryArgs => $GenericQueryArgs, + maxitems => $maxitems, + PassArguments => \@PassArguments, + ); } my ($i, $column_map) = (0, {});