[Rt-commit] r19247 - in rt/3.8/trunk: . share/html/Dashboards/Elements

sartak at bestpractical.com sartak at bestpractical.com
Thu Apr 16 20:37:48 EDT 2009


Author: sartak
Date: Thu Apr 16 20:37:48 2009
New Revision: 19247

Modified:
   rt/3.8/trunk/   (props changed)
   rt/3.8/trunk/share/html/Dashboards/Elements/DashboardsForObjects
   rt/3.8/trunk/share/html/Dashboards/index.html

Log:
 r82245 at onn:  sartak | 2009-04-16 20:35:35 -0400
 Asking for "all" dashboards is probably common enough to make it the default


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:48 2009
@@ -46,13 +46,16 @@
 %# 
 %# END BPS TAGGED BLOCK }}}
 <%args>
- at Objects
+$Objects => undef
 $dashboards => {}
 </%args>
 <%init>
 # Returns a hash of dashboards associated with @Objects
+if (!defined($Objects)) {
+    @$Objects = RT::Dashboard->new($session{CurrentUser})->_PrivacyObjects;
+}
 
-for my $object (@Objects) {
+for my $object (@$Objects) {
     my $new_dashboards = $m->comp("/Dashboards/Elements/DashboardsForObject", Object => $object);
 
     push @{ $dashboards->{$_} }, @{ $new_dashboards->{$_} || [] }

Modified: rt/3.8/trunk/share/html/Dashboards/index.html
==============================================================================
--- rt/3.8/trunk/share/html/Dashboards/index.html	(original)
+++ rt/3.8/trunk/share/html/Dashboards/index.html	Thu Apr 16 20:37:48 2009
@@ -73,8 +73,7 @@
 my $title = loc("Dashboards");
 use RT::Dashboard;
 
-my @objs = RT::Dashboard->new($session{CurrentUser})->_PrivacyObjects;
-my $dashboards = $m->comp("/Dashboards/Elements/DashboardsForObjects", Objects => \@objs);
+my $dashboards = $m->comp("/Dashboards/Elements/DashboardsForObjects");
 
 my @actions;
 if (defined $Deleted) {


More information about the Rt-commit mailing list