X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FDashboards%2Findex.html;h=70672188a5956f887be8361248cb76bcd547a581;hb=7322f2afedcc2f427e997d1535a503613a83f088;hp=afc0dbd13e567b2115b7a826457550073cd53d17;hpb=fc6209f398899f0211cfcedeb81a3cd65e04a941;p=freeside.git diff --git a/rt/share/html/Dashboards/index.html b/rt/share/html/Dashboards/index.html index afc0dbd13..70672188a 100644 --- a/rt/share/html/Dashboards/index.html +++ b/rt/share/html/Dashboards/index.html @@ -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 %# %# %# (Except where explicitly superseded by other copyright notices) @@ -45,63 +45,9 @@ %# 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', -); - -<%ARGS> -$Deleted => undef - +<& /Elements/ListActions &> +<& /Dashboards/Elements/ShowDashboards &>