[Rt-commit] rt branch, 3.9-trunk, updated. rt-3.9.4-506-g1201473
Shawn Moore
sartak at bestpractical.com
Wed Nov 17 18:00:12 EST 2010
The branch, 3.9-trunk has been updated
via 12014734c226944bc0c5f3371f55612d1c5d2b98 (commit)
from f3d065e41fac655e9f0ad948aace04fdd1406665 (commit)
Summary of changes:
share/html/Elements/Dashboards | 2 +-
share/html/Elements/RT__Dashboard/ColumnMap | 32 +++++++++++++++++++++++++++
2 files changed, 33 insertions(+), 1 deletions(-)
- Log -----------------------------------------------------------------
commit 12014734c226944bc0c5f3371f55612d1c5d2b98
Author: Shawn M Moore <sartak at bestpractical.com>
Date: Wed Nov 17 18:00:25 2010 -0500
Include Subscription in ColumnMap and Elements/Dashboards
diff --git a/share/html/Elements/Dashboards b/share/html/Elements/Dashboards
index f5b435f..e145a44 100644
--- a/share/html/Elements/Dashboards
+++ b/share/html/Elements/Dashboards
@@ -63,7 +63,7 @@
% $title = $m->interp->apply_escapes($title, 'h');
<& /Elements/CollectionList,
%ARGS,
- Format => qq{'<a href="__WebPath__/__ShowURL__">__Name__</a>/TITLE:$title'},
+ Format => qq{'<a href="__WebPath__/__ShowURL__">__Name__</a>/TITLE:$title', __Subscription__},
Collection => $Dashboards,
&>
% }
diff --git a/share/html/Elements/RT__Dashboard/ColumnMap b/share/html/Elements/RT__Dashboard/ColumnMap
index 15a9461..d7ca93f 100644
--- a/share/html/Elements/RT__Dashboard/ColumnMap
+++ b/share/html/Elements/RT__Dashboard/ColumnMap
@@ -62,6 +62,38 @@ my $COLUMN_MAP = {
attribute => 'Name',
value => sub { return $_[0]->Name()||loc("Unnamed dashboard") },
},
+ Subscription => {
+ title => 'Subscription', # loc
+ attribute => 'Subscription',
+ value => sub {
+ my $Dashboard = shift;
+ my $Subscription = $Dashboard->Subscription;
+
+ my $url = sprintf '%s/Dashboards/Subscription.html?DashboardId=%d',
+ RT->Config->Get('WebPath'),
+ $Dashboard->Id;
+
+ my $frequency = loc("None");
+
+ if (defined $Subscription) {
+ my $freq = $Subscription->SubValue('Frequency');
+ my $hour = $Subscription->SubValue('Hour');
+
+ if ($freq eq 'weekly') {
+ my $day = $Subscription->SubValue('Dow');
+ $frequency = loc("weekly (on [_1]) at [_2]", loc($day), $hour);
+ }
+ elsif ($freq eq 'monthly') {
+ $frequency = loc("monthly (day [_1]) at [_2]", $Subscription->SubValue('Dom'), $hour);
+ }
+ elsif ($freq eq 'daily') {
+ $frequency = loc("daily at [_1]", $hour);
+ }
+ }
+
+ return \('<a href="'.$url.'">'.$frequency.'</a>');
+ },
+ },
ShowURL => {
title => '',
attribute => 'ShowURL',
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list