From 936fb6045f9ce584a5c43369379bd14f3199b91f Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Tue, 31 Jan 2012 03:30:50 +0800 Subject: Bug 722327: add "as bug list" to user activity report --- extensions/BMO/lib/Reports.pm | 6 ++++ .../en/default/pages/user_activity.html.tmpl | 39 ++++++++++------------ extensions/BMO/web/styles/reports.css | 5 +++ 3 files changed, 28 insertions(+), 22 deletions(-) diff --git a/extensions/BMO/lib/Reports.pm b/extensions/BMO/lib/Reports.pm index cae19b05d..3337963b9 100644 --- a/extensions/BMO/lib/Reports.pm +++ b/extensions/BMO/lib/Reports.pm @@ -208,6 +208,7 @@ sub user_activity_report { my $operation = {}; my $changes = []; my $incomplete_data = 0; + my %bug_ids; foreach my $entry (@$list) { my ($fieldname, $bugid, $attachid, $when, $removed, $added, $who, @@ -256,6 +257,8 @@ sub user_activity_report { $changes = []; } + $bug_ids{$bugid} = 1; + $operation->{'bug'} = $bugid; $operation->{'who'} = $who; $operation->{'when'} = $when; @@ -285,6 +288,9 @@ sub user_activity_report { $vars->{'incomplete_data'} = $incomplete_data; $vars->{'operations'} = \@operations; + + my @bug_ids = sort { $a <=> $b } keys %bug_ids; + $vars->{'bug_ids'} = \@bug_ids; } $vars->{'action'} = $input->{'action'}; diff --git a/extensions/BMO/template/en/default/pages/user_activity.html.tmpl b/extensions/BMO/template/en/default/pages/user_activity.html.tmpl index b42a9d797..dd9449b3d 100644 --- a/extensions/BMO/template/en/default/pages/user_activity.html.tmpl +++ b/extensions/BMO/template/en/default/pages/user_activity.html.tmpl @@ -28,17 +28,9 @@ title = "User Activity Report" _ who_title yui = [ 'autocomplete', 'calendar' ] javascript_urls = [ "js/util.js", "js/field.js" ] -%] - - +%] [% PROCESS "global/field-descs.none.tmpl" %] [% PROCESS bug/time.html.tmpl %] @@ -46,11 +38,12 @@
- +
+ - + - + - - +
- Who: - + Who: + [% INCLUDE global/userselect.html.tmpl id => "who" @@ -62,9 +55,9 @@ %]   - Period: - + Period: + Calendar
-
- - - + to @@ -90,6 +79,7 @@
@@ -158,6 +148,11 @@ [% END %] +

+ + Show as a [% terms.Bug %] List +

+ [% ELSE %]

No changes. diff --git a/extensions/BMO/web/styles/reports.css b/extensions/BMO/web/styles/reports.css index f75f72b8b..fa2acf8d3 100644 --- a/extensions/BMO/web/styles/reports.css +++ b/extensions/BMO/web/styles/reports.css @@ -6,6 +6,11 @@ width: 20em; } +#parameters th { + text-align: left; + vertical-align: middle !important; +} + #report tr.bugitem:hover { background: #ccccff; } -- cgit v1.2.3-24-g4f1b