X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FDashboards%2Findex.html;fp=rt%2Fshare%2Fhtml%2FDashboards%2Findex.html;h=f6a352ef70bb71c7f2c1abc74ad71c9727efe1d7;hb=33beebf4cb42eba3e1dd868ad5e0af102de961da;hp=afc0dbd13e567b2115b7a826457550073cd53d17;hpb=7ac86daf67b0a95153b736d5811f9050363f6553;p=freeside.git diff --git a/rt/share/html/Dashboards/index.html b/rt/share/html/Dashboards/index.html index afc0dbd13..f6a352ef7 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-2012 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 &>