[Rt-commit] rt branch, 4.0/validate-dashboard-args, updated. rt-4.0.0rc6-126-ge86e6bf
Shawn Moore
sartak at bestpractical.com
Wed Mar 9 11:56:26 EST 2011
The branch, 4.0/validate-dashboard-args has been updated
via e86e6bfa8608edb97b49f29dbc83bd6f8f5acf1b (commit)
from 157890dee1af16a954109e8edc3d3b6a26201c4d (commit)
Summary of changes:
share/html/Dashboards/Render.html | 18 +++++++++---------
share/html/Dashboards/Subscription.html | 18 +++++++++---------
2 files changed, 18 insertions(+), 18 deletions(-)
- Log -----------------------------------------------------------------
commit e86e6bfa8608edb97b49f29dbc83bd6f8f5acf1b
Author: Shawn M Moore <sartak at bestpractical.com>
Date: Wed Mar 9 11:56:17 2011 -0500
Use $Dashboard over $DashboardObj for consistency
diff --git a/share/html/Dashboards/Render.html b/share/html/Dashboards/Render.html
index 52c3d59..73113d8 100644
--- a/share/html/Dashboards/Render.html
+++ b/share/html/Dashboards/Render.html
@@ -56,11 +56,11 @@
<& /Elements/Tabs &>
% }
-% $m->callback(CallbackName => 'BeforeTable', Dashboard => $DashboardObj, show_cb => $show_cb);
+% $m->callback(CallbackName => 'BeforeTable', Dashboard => $Dashboard, show_cb => $show_cb);
<table class="dashboard" id="dashboard-<%$id%>">
-% $m->callback(CallbackName => 'BeforePanes', Dashboard => $DashboardObj, show_cb => $show_cb);
+% $m->callback(CallbackName => 'BeforePanes', Dashboard => $Dashboard, show_cb => $show_cb);
<tr valign="top">
@@ -74,11 +74,11 @@
</tr>
-% $m->callback(CallbackName => 'AfterPanes', Dashboard => $DashboardObj, show_cb => $show_cb);
+% $m->callback(CallbackName => 'AfterPanes', Dashboard => $Dashboard, show_cb => $show_cb);
</table>
-% $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;
@@ -94,8 +94,8 @@
use RT::Dashboard;
-my $DashboardObj = RT::Dashboard->new($session{'CurrentUser'});
-my ($ok, $msg) = $DashboardObj->LoadById($id);
+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'});
@@ -116,15 +116,15 @@ unless (defined($rows)) {
$rows = defined($prefs->{'RowsPerPage'}) ? $prefs->{'RowsPerPage'} : 50;
}
-my $title = loc 'Dashboard [_1]', $DashboardObj->Name;
+my $title = loc 'Dashboard [_1]', $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,
);
diff --git a/share/html/Dashboards/Subscription.html b/share/html/Dashboards/Subscription.html
index ca58244..7531d97 100644
--- a/share/html/Dashboards/Subscription.html
+++ b/share/html/Dashboards/Subscription.html
@@ -62,13 +62,13 @@
<tr><td class="label">
<&|/l&>Dashboard</&>:
</td><td class="value">
-<% $DashboardObj->Name %>
+<% $Dashboard->Name %>
</td></tr>
<tr><td class="label">
<&|/l&>Queries</&>:
</td><td class="value">
-% my @portlets = grep { defined } $DashboardObj->Portlets;
+% my @portlets = grep { defined } $Dashboard->Portlets;
% if (!@portlets) {
(<&|/l&>none</&>)
% } else {
@@ -193,11 +193,11 @@ my $Loaded = 0;
my $timezone = $session{'CurrentUser'}->UserObj->Timezone || RT->Config->Get('Timezone');
use RT::Dashboard;
-my $DashboardObj = RT::Dashboard->new($session{'CurrentUser'});
-my ($ok, $msg) = $DashboardObj->LoadById($id);
+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 = $DashboardObj->Subscription;
+my $SubscriptionObj = $Dashboard->Subscription;
$id = $SubscriptionObj ? $SubscriptionObj->SubValue('DashboardId') : $ARGS{'id'};
@@ -244,7 +244,7 @@ if (defined $ARGS{Save}) {
# create
else {
Abort(loc("Unable to subscribe to dashboard [_1]: Permission denied", $id))
- unless $DashboardObj->CurrentUserCanSubscribe;
+ unless $Dashboard->CurrentUserCanSubscribe;
$SubscriptionObj = RT::Attribute->new($session{CurrentUser});
($ok, $msg) = $SubscriptionObj->Create(
@@ -255,7 +255,7 @@ if (defined $ARGS{Save}) {
Content => \%fields,
);
if ($ok) {
- push @results, loc("Subscribed to dashboard [_1]", $DashboardObj->Name);
+ push @results, loc("Subscribed to dashboard [_1]", $Dashboard->Name);
push @results, loc("Warning: you have no email address set, so you will not receive this dashboard until you have it set")
unless $session{'CurrentUser'}->EmailAddress || $fields{Recipient};
}
@@ -266,10 +266,10 @@ if (defined $ARGS{Save}) {
}
if ($SubscriptionObj) {
- $title = loc("Modify the subscription to dashboard [_1]", $DashboardObj->Name);
+ $title = loc("Modify the subscription to dashboard [_1]", $Dashboard->Name);
}
else {
- $title = loc("Subscribe to dashboard [_1]", $DashboardObj->Name);
+ $title = loc("Subscribe to dashboard [_1]", $Dashboard->Name);
}
</%INIT>
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list