X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=rt%2Fshare%2Fhtml%2FElements%2FCollectionList;h=3acee5aaa7ed6f699277f22aa719c9ed1d7b7b5a;hb=44dd00a3ff974a17999e86e64488e996edc71e3c;hp=b47c7aabd5879b8f595b0b9452f836949ae68106;hpb=3d0a1bb06b895c5be6e3f0517d355442a6b1e125;p=freeside.git diff --git a/rt/share/html/Elements/CollectionList b/rt/share/html/Elements/CollectionList index b47c7aabd..3acee5aaa 100644 --- a/rt/share/html/Elements/CollectionList +++ b/rt/share/html/Elements/CollectionList @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2019 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 ) @@ -112,23 +113,24 @@ if ($Class =~ /::/) { # older passed in value } $m->out(''); + ($Collection->isa('RT::Tickets') ? 'ticket-list' : 'collection') . ' collection-as-table">'); 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, {});