[Rt-commit] r7052 - in rt/branches/3.7-EXPERIMENTAL-RTIR-2.2: .

ruz at bestpractical.com ruz at bestpractical.com
Thu Feb 22 18:45:27 EST 2007


Author: ruz
Date: Thu Feb 22 18:45:27 2007
New Revision: 7052

Modified:
   rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/   (props changed)
   rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/html/Elements/MyRT

Log:
 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-RTIR-2.2/html/Elements/MyRT
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/html/Elements/MyRT	(original)
+++ rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/html/Elements/MyRT	Thu Feb 22 18:45:27 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