X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=rt%2Fshare%2Fhtml%2FDashboards%2FRender.html;h=0306077493fc245a3bb2ed4c68a45e1d8133a200;hb=9aee669886202be7035e6c6049fc71bc99dd3013;hp=da9d487ac81fe023b9527013250d34e152c4ce32;hpb=fc6209f398899f0211cfcedeb81a3cd65e04a941;p=freeside.git diff --git a/rt/share/html/Dashboards/Render.html b/rt/share/html/Dashboards/Render.html index da9d487ac..030607749 100644 --- a/rt/share/html/Dashboards/Render.html +++ b/rt/share/html/Dashboards/Render.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -47,24 +47,19 @@ %# END BPS TAGGED BLOCK }}} <& /Elements/Header, Title => $title, - JavaScript => $Preview, ShowBar => $Preview, Refresh => $Refresh, &> % if ($Preview) { -<& /Dashboards/Elements/Tabs, - current_subtab => $current_subtab, - Title => $title, - DashboardObj => $DashboardObj &> +<& /Elements/Tabs &> % } -% $m->callback(CallbackName => 'BeforeTable', Dashboard => $DashboardObj, show_cb => $show_cb); +% $m->callback(CallbackName => 'BeforeTable', Dashboard => $Dashboard, show_cb => $show_cb); - - +
-% $m->callback(CallbackName => 'BeforePanes', Dashboard => $DashboardObj, show_cb => $show_cb); +% $m->callback(CallbackName => 'BeforePanes', Dashboard => $Dashboard, show_cb => $show_cb); @@ -78,26 +73,31 @@ -% $m->callback(CallbackName => 'AfterPanes', Dashboard => $DashboardObj, show_cb => $show_cb); +% $m->callback(CallbackName => 'AfterPanes', Dashboard => $Dashboard, show_cb => $show_cb);
-% $m->callback(CallbackName => 'AfterTable', Dashboard => $DashboardObj, show_cb => $show_cb); - - +% $m->callback(CallbackName => 'AfterTable', Dashboard => $Dashboard, show_cb => $show_cb); +% if (!$Preview) { +% my $edit = RT->Config->Get('WebPath') . '/Dashboards/Modify.html?id='.$id; +% my $subscription = RT->Config->Get('WebPath') . '/Dashboards/Subscription.html?id='.$id; +

<&|/l, $edit, $subscription &>You may edit this dashboard and your subscription to it in RT.

- - +%# We disable autohandlers when mailing (!$Preview) so /Elements/Footer isn't +%# run for us. Tidy up the end of the HTML. We don't use /Elements/Tabs (and +%# hence PageLayout) so we don't need to close any other tags. + + +% } <%INIT> -my $current_subtab = 'Dashboards/Render.html?id=' . $id; use RT::Dashboard; -my $DashboardObj = RT::Dashboard->new($session{'CurrentUser'}); -my ($ok, $msg) = $DashboardObj->LoadById($id); -Abort(loc("Couldn't load dashboard [_1]: [_2]", $id, $msg)) if !$ok; +my $Dashboard = RT::Dashboard->new($session{'CurrentUser'}); +my ($ok, $msg) = $Dashboard->LoadById($id); +$ok || Abort(loc("Couldn't load dashboard [_1]: [_2]", $id, $msg)); my $SubscriptionObj = RT::Attribute->new($session{'CurrentUser'}); my $rows; @@ -117,15 +117,15 @@ unless (defined($rows)) { $rows = defined($prefs->{'RowsPerPage'}) ? $prefs->{'RowsPerPage'} : 50; } -my $title = loc 'Dashboard [_1]', $DashboardObj->Name; +my $title = loc '[_1] Dashboard', $Dashboard->Name; my $show_cb = sub { my $pane = shift; $m->comp('Elements/ShowPortlet/dashboard', - Portlet => $DashboardObj, + Portlet => $Dashboard, Rows => $rows, Preview => $Preview, - Dashboard => $DashboardObj, + Dashboard => $Dashboard, Pane => $pane, Depth => 0, );