[Rt-commit] r15748 - in rt/3.8/trunk: .

sartak at bestpractical.com sartak at bestpractical.com
Wed Sep 3 20:43:50 EDT 2008


Author: sartak
Date: Wed Sep  3 20:43:46 2008
New Revision: 15748

Modified:
   rt/3.8/trunk/   (props changed)
   rt/3.8/trunk/share/html/Dashboards/Render.html

Log:
 r70997 at onn:  sartak | 2008-09-03 20:32:13 -0400
 Render the two different panes!


Modified: rt/3.8/trunk/share/html/Dashboards/Render.html
==============================================================================
--- rt/3.8/trunk/share/html/Dashboards/Render.html	(original)
+++ rt/3.8/trunk/share/html/Dashboards/Render.html	Wed Sep  3 20:43:46 2008
@@ -57,19 +57,17 @@
 <table class="dashboard">
 <tr valign="top">
 
-<td class="boxcontainer" width="70%">
-<%perl>
-foreach my $portlet ($DashboardObj->Portlets) {
-    my $portlet_type = $portlet->{portlet_type};
-    my $component = "Elements/ShowPortlet/$portlet_type";
-    $m->comp($component,
-        Portlet   => $portlet,
-        Rows      => $rows,
-        Preview   => $Preview,
-        Dashboard => $DashboardObj,
-    );
-}
-</%perl>
+<td class="boxcontainer">
+% $show_cb->($_) foreach @{ $panes{body} || [] };
+</td>
+
+% if (@{ $panes{sidebar} || [] }) {
+<td class="boxcontainer">
+% $show_cb->($_) foreach @{ $panes{sidebar} || [] };
+</td>
+% }
+
+</tr></table>
 </td>
 
 
@@ -99,6 +97,19 @@
 my $rows = $Loaded ? $SubscriptionObj->SubValue('Rows') : 20;
 my $title = loc 'Dashboard [_1]', $DashboardObj->Name;
 
+my %panes = %{ $DashboardObj->Panes };
+
+my $show_cb = sub {
+    my $portlet = shift;
+    my $portlet_type = $portlet->{portlet_type};
+    my $component = "Elements/ShowPortlet/$portlet_type";
+    $m->comp($component,
+        Portlet   => $portlet,
+        Rows      => $rows,
+        Preview   => $Preview,
+        Dashboard => $DashboardObj,
+    );
+};
 </%INIT>
 <%ARGS>
 $id => undef


More information about the Rt-commit mailing list