[Rt-commit] r19248 - in rt/3.8/trunk: share/html/Dashboards/Elements
sartak at bestpractical.com
sartak at bestpractical.com
Thu Apr 16 20:37:51 EDT 2009
Author: sartak
Date: Thu Apr 16 20:37:51 2009
New Revision: 19248
Modified:
rt/3.8/trunk/ (props changed)
rt/3.8/trunk/share/html/Dashboards/Elements/DashboardsForObjects
Log:
r82246 at onn: sartak | 2009-04-16 20:36:01 -0400
Return a flattenned list of dashboards if requested
Modified: rt/3.8/trunk/share/html/Dashboards/Elements/DashboardsForObjects
==============================================================================
--- rt/3.8/trunk/share/html/Dashboards/Elements/DashboardsForObjects (original)
+++ rt/3.8/trunk/share/html/Dashboards/Elements/DashboardsForObjects Thu Apr 16 20:37:51 2009
@@ -48,6 +48,7 @@
<%args>
$Objects => undef
$dashboards => {}
+$flatten => 0
</%args>
<%init>
# Returns a hash of dashboards associated with @Objects
@@ -65,6 +66,15 @@
for keys %{ $new_dashboards->{group} || {} };
}
+if ($flatten) {
+ my @dashboards;
+ push @dashboards, @{ $dashboards->{personal} || [] };
+ push @dashboards, map { @{ $_ || [] } } values %{ $dashboards->{group} };
+ push @dashboards, @{ $dashboards->{system} || [] };
+
+ return \@dashboards;
+}
+
return $dashboards;
</%init>
More information about the Rt-commit
mailing list