import rt 3.8.7
[freeside.git] / rt / share / html / Dashboards / Elements / ListOfDashboards
1 <%init>
2 # put the list of dashboards into the navigation
3 use RT::Dashboard;
4
5 my @objs = RT::Dashboard->new($session{CurrentUser})->_PrivacyObjects(ShowSystem => 1);
6 my $dashboard_map = $m->comp("/Dashboards/Elements/DashboardsForObjects", Objects => \@objs);
7
8 my @dashboards = (
9     (sort { $a->Id <=> $b->Id } @{ $dashboard_map->{personal} || [] }),
10     (sort { $a->Id <=> $b->Id } @{ $dashboard_map->{system}   || [] }),
11
12     map { sort { $a->Id <=> $b->Id } @{ $dashboard_map->{group}{$_} } }
13         keys %{ $dashboard_map->{group} || {} },
14 );
15
16 $m->callback(%ARGS, dashboards => \@dashboards, CallbackName => 'ModifyDashboards');
17
18 return @dashboards;
19 </%init>