rt 4.2.13 ticket#13852
[freeside.git] / rt / share / html / Dashboards / index.html
index afc0dbd..7067218 100644 (file)
@@ -2,7 +2,7 @@
 %#
 %# COPYRIGHT:
 %#
-%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2016 Best Practical Solutions, LLC
 %#                                          <sales@bestpractical.com>
 %#
 %# (Except where explicitly superseded by other copyright notices)
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-<& /Elements/Header, Title => $title &>
-<& /Dashboards/Elements/Tabs,
-    current_subtab => 'Dashboards/index.html',
-    Title => $title &>
+<& /Elements/Header, Title => loc("Dashboards") &>
+<& /Elements/Tabs &>
 
-<& /Elements/ListActions, actions => \@actions &>
-
-<& /Dashboards/Elements/ShowDashboards,
-    Title      => loc('Personal Dashboards'),
-    Dashboards => \@personal_dashboards,
-&>
-
-<& /Dashboards/Elements/ShowDashboards,
-    Title      => loc('System Dashboards'),
-    Dashboards => \@system_dashboards,
-&>
-
-% for (@grouped_dashboards) {
-%   my $group = $_->{name};
-%   my $dashboards = $_->{dashboards};
-
-    <& /Dashboards/Elements/ShowDashboards,
-        Title      => loc('[_1] DashBoards', $group),
-        Dashboards => $dashboards,
-    &>
-% }
-
-<%INIT>
-my $title = loc("Dashboards");
-use RT::Dashboard;
-
-my $dashboards = $m->comp("/Dashboards/Elements/DashboardsForObjects");
-
-my @actions;
-if (defined $Deleted) {
-    push @actions, loc("Deleted dashboard [_1]", $Deleted);
-}
-
-my @personal_dashboards = sort { $a->Id <=> $b->Id } @{ $dashboards->{personal} || [] };
-my @system_dashboards = sort { $a->Id <=> $b->Id } @{ $dashboards->{system} || [] };
-
-my @groups = sort keys %{ $dashboards->{group} || {} };
-my @grouped_dashboards = map {
-    {
-        name => $_,
-        dashboards => [ sort { $a->Id <=> $b->Id } @{ $dashboards->{group}{$_} || [] } ],
-    }
-} @groups;
-
-$m->callback(
-    PersonalDashboards => \@personal_dashboards,
-    SystemDashboards   => \@system_dashboards,
-    GroupedDashboards  => \@grouped_dashboards,
-    CallbackName       => 'MassageDashboards',
-);
-</%INIT>
-<%ARGS>
-$Deleted => undef
-</%ARGS>
+<& /Elements/ListActions &>
 
+<& /Dashboards/Elements/ShowDashboards &>