[Bps-public-commit] RT-Extension-ActivityReports branch, master, updated. 1.01-9-g3ff17d9
Kevin Falcone
falcone at bestpractical.com
Fri Jul 8 18:19:30 EDT 2011
The branch, master has been updated
via 3ff17d9dc53149a6d6fa8435f2d13fea8743656a (commit)
via 3764c669b00d677c9f82843e6cdf91345c80c0e0 (commit)
via 6911f61c807713941e617f2cbfe9c9a4a6f2fff9 (commit)
via 326ddfce55f42c9bdf41dceb6f941e430928d0a4 (commit)
via 33e6abd7d05beaab41b966b6d52b9bd131d4040d (commit)
via ef60019ce54a42754d43c6c7498189eb91314f71 (commit)
via 58dacc15883534c9de8371477ba2caef18159156 (commit)
from e19aa4e68f448fb44f997606ddc6c342cd4ac4fc (commit)
Summary of changes:
.../ActivityReports/Elements/Tabs/Privileged | 13 ++++++++++---
html/Reports/Activity/index.html | 2 +-
2 files changed, 11 insertions(+), 4 deletions(-)
- Log -----------------------------------------------------------------
commit 58dacc15883534c9de8371477ba2caef18159156
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Fri Jul 8 16:07:23 2011 -0400
Avoid setting ReportType to undef and causing a ton of warnings
diff --git a/html/Reports/Activity/index.html b/html/Reports/Activity/index.html
index 8f65227..d8b71cb 100644
--- a/html/Reports/Activity/index.html
+++ b/html/Reports/Activity/index.html
@@ -15,7 +15,7 @@ $ReportType => ''
$mode => 'screen'
</%args>
<%init>
-$ReportType = $ARGS{ReportType} ||= $ARGS{type};
+$ReportType = $ARGS{ReportType} ||= $ARGS{type} ||= '';
$ARGS{Start} ||= $ARGS{start};
$ARGS{End} ||= $ARGS{end};
$ARGS{Query} ||= $ARGS{query};
commit ef60019ce54a42754d43c6c7498189eb91314f71
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Fri Jul 8 18:12:06 2011 -0400
Tabs belong on more than the results page
Also, you can see results while being on Build.html
Yay
diff --git a/html/Callbacks/ActivityReports/Elements/Tabs/Privileged b/html/Callbacks/ActivityReports/Elements/Tabs/Privileged
index 500c179..cae4eb8 100644
--- a/html/Callbacks/ActivityReports/Elements/Tabs/Privileged
+++ b/html/Callbacks/ActivityReports/Elements/Tabs/Privileged
@@ -55,7 +55,7 @@ my $query_string = sub {
return $u->query;
};
-if ( $request_path =~ qr{^/Search/Results.html} ) {
+if ( $request_path =~ qr{^/Search/(?:Article|Build|Bulk|Chart|Graph|Results)\.html} ) {
my $tabs = PageMenu;
$tabs->child( 'activity' => title => loc('Generate reports'),
path => '/Reports/Activity/index.html?Query=' .$m->request_args->{'Query'} );
commit 33e6abd7d05beaab41b966b6d52b9bd131d4040d
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Fri Jul 8 18:12:36 2011 -0400
Add our link as the penultimate tab
diff --git a/html/Callbacks/ActivityReports/Elements/Tabs/Privileged b/html/Callbacks/ActivityReports/Elements/Tabs/Privileged
index cae4eb8..9920a91 100644
--- a/html/Callbacks/ActivityReports/Elements/Tabs/Privileged
+++ b/html/Callbacks/ActivityReports/Elements/Tabs/Privileged
@@ -57,8 +57,12 @@ my $query_string = sub {
if ( $request_path =~ qr{^/Search/(?:Article|Build|Bulk|Chart|Graph|Results)\.html} ) {
my $tabs = PageMenu;
+ my $last = ($tabs->children)[-1];
+ my $sort_order = $last->sort_order;
+ $last->sort_order( $sort_order + 1 );
$tabs->child( 'activity' => title => loc('Generate reports'),
- path => '/Reports/Activity/index.html?Query=' .$m->request_args->{'Query'} );
+ path => '/Reports/Activity/index.html?Query=' .$m->request_args->{'Query'},
+ sort_order => $sort_order );
}
</%INIT>
commit 326ddfce55f42c9bdf41dceb6f941e430928d0a4
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Fri Jul 8 18:14:22 2011 -0400
Rename so that the link bears a resemblance to the extension name
diff --git a/html/Callbacks/ActivityReports/Elements/Tabs/Privileged b/html/Callbacks/ActivityReports/Elements/Tabs/Privileged
index 9920a91..34651a2 100644
--- a/html/Callbacks/ActivityReports/Elements/Tabs/Privileged
+++ b/html/Callbacks/ActivityReports/Elements/Tabs/Privileged
@@ -60,7 +60,7 @@ if ( $request_path =~ qr{^/Search/(?:Article|Build|Bulk|Chart|Graph|Results)\.ht
my $last = ($tabs->children)[-1];
my $sort_order = $last->sort_order;
$last->sort_order( $sort_order + 1 );
- $tabs->child( 'activity' => title => loc('Generate reports'),
+ $tabs->child( 'activity' => title => loc('Activity Reports'),
path => '/Reports/Activity/index.html?Query=' .$m->request_args->{'Query'},
sort_order => $sort_order );
}
commit 6911f61c807713941e617f2cbfe9c9a4a6f2fff9
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Fri Jul 8 18:14:55 2011 -0400
Back in 3.6 or 3.4 we had tabs to go with the dropdown
Bring back the tabs for 4.0 and pass arguments
Unfortunately, the sub pages expect the lowercase arguments
but index.html expects ucfirst case. See
2a7b8882973a316acca6ee4fdc48fd2a9d2ff650 for the reason.
diff --git a/html/Callbacks/ActivityReports/Elements/Tabs/Privileged b/html/Callbacks/ActivityReports/Elements/Tabs/Privileged
index 34651a2..e6ecf1d 100644
--- a/html/Callbacks/ActivityReports/Elements/Tabs/Privileged
+++ b/html/Callbacks/ActivityReports/Elements/Tabs/Privileged
@@ -65,4 +65,24 @@ if ( $request_path =~ qr{^/Search/(?:Article|Build|Bulk|Chart|Graph|Results)\.ht
sort_order => $sort_order );
}
+
+if ( $request_path =~ qr{^/Reports/Activity} ) {
+ my $top = $m->caller_args(-1);
+ if ($top->{Query}) {
+ my $args = "?" . $query_string->(query => $top->{Query},
+ start => $top->{Start},
+ end => $top->{End});
+ my $tabs = PageMenu;
+ $tabs->child( 'activity-detail' => title => loc('Activity detail'),
+ path => '/Reports/Activity/ActivityDetail.html'.$args );
+ $tabs->child( 'activity-summary' => title => loc('Activity summary'),
+ path => '/Reports/Activity/ActivitySummary.html'.$args );
+ $tabs->child( 'resolution-comments' => title => loc('Resolution comments'),
+ path => '/Reports/Activity/ResolutionComments.html'.$args );
+ $tabs->child( 'resolution-statistics' => title => loc('Resolution statistics'),
+ path => '/Reports/Activity/ResolutionStatistics.html'.$args );
+ $tabs->child( 'time-worked-statistic' => title => 'Time worked statistics',
+ path => '/Reports/Activity/WorkedStatistics.html'.$args );
+ }
+}
</%INIT>
commit 3764c669b00d677c9f82843e6cdf91345c80c0e0
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Fri Jul 8 18:16:33 2011 -0400
Add us into the Tools list
Before, we sometimes sort of were added next to Offline, maybe, if you
were running an old version of RT with the tab structure expected.
In recent RTs, you could only really get here from the query builder.
diff --git a/html/Callbacks/ActivityReports/Elements/Tabs/Privileged b/html/Callbacks/ActivityReports/Elements/Tabs/Privileged
index e6ecf1d..ae97ece 100644
--- a/html/Callbacks/ActivityReports/Elements/Tabs/Privileged
+++ b/html/Callbacks/ActivityReports/Elements/Tabs/Privileged
@@ -85,4 +85,8 @@ if ( $request_path =~ qr{^/Reports/Activity} ) {
path => '/Reports/Activity/WorkedStatistics.html'.$args );
}
}
+
+my $menu = Menu;
+my $tools = $menu->child('tools');
+$tools->child('activity-reports' => title => loc('Activity Reports'), path => 'Reports/Activity/index.html' );
</%INIT>
commit 3ff17d9dc53149a6d6fa8435f2d13fea8743656a
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Fri Jul 8 18:18:49 2011 -0400
On second thought, keep these hidden
These haven't worked in 5 years, and would need massive rototilling to
be compliant with the new tab scheme. Once you click into one, you
can't get back out.
diff --git a/html/Callbacks/ActivityReports/Elements/Tabs/Privileged b/html/Callbacks/ActivityReports/Elements/Tabs/Privileged
index ae97ece..332d44a 100644
--- a/html/Callbacks/ActivityReports/Elements/Tabs/Privileged
+++ b/html/Callbacks/ActivityReports/Elements/Tabs/Privileged
@@ -65,27 +65,6 @@ if ( $request_path =~ qr{^/Search/(?:Article|Build|Bulk|Chart|Graph|Results)\.ht
sort_order => $sort_order );
}
-
-if ( $request_path =~ qr{^/Reports/Activity} ) {
- my $top = $m->caller_args(-1);
- if ($top->{Query}) {
- my $args = "?" . $query_string->(query => $top->{Query},
- start => $top->{Start},
- end => $top->{End});
- my $tabs = PageMenu;
- $tabs->child( 'activity-detail' => title => loc('Activity detail'),
- path => '/Reports/Activity/ActivityDetail.html'.$args );
- $tabs->child( 'activity-summary' => title => loc('Activity summary'),
- path => '/Reports/Activity/ActivitySummary.html'.$args );
- $tabs->child( 'resolution-comments' => title => loc('Resolution comments'),
- path => '/Reports/Activity/ResolutionComments.html'.$args );
- $tabs->child( 'resolution-statistics' => title => loc('Resolution statistics'),
- path => '/Reports/Activity/ResolutionStatistics.html'.$args );
- $tabs->child( 'time-worked-statistic' => title => 'Time worked statistics',
- path => '/Reports/Activity/WorkedStatistics.html'.$args );
- }
-}
-
my $menu = Menu;
my $tools = $menu->child('tools');
$tools->child('activity-reports' => title => loc('Activity Reports'), path => 'Reports/Activity/index.html' );
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list