[Rt-commit] r6745 - in rt/branches/3.7-EXPERIMENTAL: .
ruz at bestpractical.com
ruz at bestpractical.com
Sun Jan 14 23:33:23 EST 2007
Author: ruz
Date: Sun Jan 14 23:33:23 2007
New Revision: 6745
Modified:
rt/branches/3.7-EXPERIMENTAL/ (props changed)
rt/branches/3.7-EXPERIMENTAL/html/Elements/CollectionAsTable/Header
Log:
r4357 at cubic-pc: cubic | 2007-01-14 16:28:23 +0300
* better handling of sorting via columns
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:23 2007
@@ -48,7 +48,8 @@
@Format => undef
$FormatString => undef
-$Order => undef
+ at OrderBy => ()
+ at Order => ()
$Query => undef
$Rows => undef
$Page => undef
@@ -121,12 +122,15 @@
)
)
{
+ my $new_order = 'ASC';
+ $new_order = $Order[0] eq 'ASC'? 'DESC': 'ASC'
+ if $OrderBy[0] && $OrderBy[0] eq $attr;
+
$m->out(
'<a href="' . $BaseURL
. $m->comp( '/Elements/QueryString',
%generic_query_args,
- OrderBy => $attr || $col->{'attribute'},
- Order => ( $ARGS{'Order'} eq 'ASC' ? 'DESC' : 'ASC' )
+ OrderBy => $attr, Order => $new_order
)
. '">'. $title .'</a>'
);
More information about the Rt-commit
mailing list