[Rt-commit] r6744 - in rt/branches/3.7-EXPERIMENTAL: .

ruz at bestpractical.com ruz at bestpractical.com
Sun Jan 14 23:33:03 EST 2007


Author: ruz
Date: Sun Jan 14 23:33:03 2007
New Revision: 6744

Modified:
   rt/branches/3.7-EXPERIMENTAL/   (props changed)
   rt/branches/3.7-EXPERIMENTAL/html/Elements/CollectionAsTable/Header

Log:
 r4356 at cubic-pc:  cubic | 2007-01-14 11:08:17 +0300
 * Add PassArguments to CollectionAsTable/Header so on sorting via table's titles
   it'll be possible to save custom arguments in the query string


Modified: rt/branches/3.7-EXPERIMENTAL/html/Elements/CollectionAsTable/Header
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Elements/CollectionAsTable/Header	(original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Elements/CollectionAsTable/Header	Sun Jan 14 23:33:03 2007
@@ -45,20 +45,26 @@
 %# END BPS TAGGED BLOCK }}}
 <%ARGS>
 $Class        => 'RT__Ticket'
+
 @Format       => undef
 $FormatString => undef
-$AllowSorting => undef
 $Order        => undef
-$BaseURL      => undef
 $Query        => undef
 $Rows         => undef
 $Page         => undef
+
 $maxitems     => undef
+
+$AllowSorting  => undef
+$BaseURL       => undef
+ at PassArguments => qw(Query Format Rows Page Order OrderBy)
 </%ARGS>
 <tr class="collection-as-table">
 <%PERL>
 
-my %generic_query_args = ( Query => $Query, Rows => $Rows, Page => $Page, Format => $FormatString );
+my %generic_query_args = map { $_ => $ARGS{$_} } @PassArguments;
+# backward compatibility workaround
+$generic_query_args{'Format'} = $FormatString if grep $_ eq 'Format', @PassArguments;
 
 my $item = 0;
 foreach my $col ( @Format ) {


More information about the Rt-commit mailing list