[Rt-commit] r7077 - in rt/branches/3.7-EXPERIMENTAL: .
ruz at bestpractical.com
ruz at bestpractical.com
Mon Feb 26 09:44:42 EST 2007
Author: ruz
Date: Mon Feb 26 09:44:42 2007
New Revision: 7077
Modified:
rt/branches/3.7-EXPERIMENTAL/ (props changed)
rt/branches/3.7-EXPERIMENTAL/html/Elements/MyRT
Log:
r4611 at cubic-pc (orig r7052): ruz | 2007-02-23 02:45:27 +0300
r4603 at cubic-pc (orig r7039): ruz | 2007-02-21 03:58:29 +0300
* backport 'RT at glance with one column' feature from 3.7
Modified: rt/branches/3.7-EXPERIMENTAL/html/Elements/MyRT
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Elements/MyRT (original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Elements/MyRT Mon Feb 26 09:44:42 2007
@@ -46,13 +46,13 @@
<table border="0" width="100%">
<tr valign="top">
-<td class="boxcontainer" <% $two_columns ? 'width="70%"':'' %>>
-% $show_cb->($_) foreach @{$Portlets->{body}};
+<td class="boxcontainer" width="70%" <% $summary? 'width="70%"': '' %>>
+% $show_cb->($_) foreach @$body;
</td>
-% if( $two_columns ) {
+% if ( $summary ) {
<td class="boxcontainer">
-% $show_cb->($_) foreach @{$Portlets->{summary}};
+% $show_cb->($_) foreach @$summary;
</td>
% }
@@ -71,7 +71,12 @@
);
}
-my $two_columns = $Portlets->{summary} && @{$Portlets->{summary}};
+my ($body, $summary) = @{$Portlets}{qw(body summary)};
+unless( $body && @$body ) {
+ $body = $summary || [];
+ $summary = undef;
+}
+$summary = undef unless $summary && @$summary;
my $Rows = $user->Preferences( 'SummaryRows', ( RT->Config->Get('DefaultSummaryRows') || 10 ) );
More information about the Rt-commit
mailing list