From 681f39d6a59163e4f36dc5c64c3b528b41bb0639 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Fri, 10 Feb 2012 15:12:33 +0800 Subject: Bug 722335: add sort-by-bug to user activity report --- .../en/default/pages/user_activity.html.tmpl | 132 +++++++++++++-------- 1 file changed, 81 insertions(+), 51 deletions(-) (limited to 'extensions/BMO/template/en/default/pages') 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 4a335eab0..6982148cd 100644 --- a/extensions/BMO/template/en/default/pages/user_activity.html.tmpl +++ b/extensions/BMO/template/en/default/pages/user_activity.html.tmpl @@ -1,21 +1,9 @@ -[%# The contents of this file are subject to the Mozilla Public - # License Version 1.1 (the "License"); you may not use this file - # except in compliance with the License. You may obtain a copy of - # the License at http://www.mozilla.org/MPL/ +[%# This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. # - # Software distributed under the License is distributed on an "AS - # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - # implied. See the License for the specific language governing - # rights and limitations under the License. - # - # The Original Code is the BMO Extension - # - # The Initial Developer of the Original Code is the Mozilla Foundation - # Portions created by the Initial Developers are Copyright (C) 2011 the - # Initial Developer. All Rights Reserved. - # - # Contributor(s): - # Byron Jones + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. #%] [% IF who %] @@ -75,6 +63,15 @@
+ + Sort: + + + + @@ -107,49 +104,67 @@ [% IF who_count > 1 %] Who [% END %] - When - [% terms.Bug %] + [% IF sort == 'when' %] + [% INCLUDE sort_when_link %] + [% INCLUDE sort_bug_link %] + [% ELSE %] + [% INCLUDE sort_bug_link %] + [% INCLUDE sort_when_link %] + [% END %] What Removed Added [% FOREACH operation = operations %] - - [% IF who_count > 1 %] - - [% operation.who FILTER email FILTER html %] + [% tr_class = loop.count % 2 ? 'report_row_even' : 'report_row_odd' %] + [% FOREACH change = operation.changes %] + + [% IF loop.count == 1 %] + [% IF who_count > 1 %] + [% operation.who FILTER email FILTER html %] + [% END %] + [% IF sort == 'when' %] + [% change.when FILTER time FILTER no_break %] + [% operation.bug FILTER bug_link(operation.bug) FILTER none %] + [% ELSE %] + [% operation.bug FILTER bug_link(operation.bug) FILTER none %] + [% change.when FILTER time FILTER no_break %] + [% END %] + [% ELSE %] + [% IF who_count > 1 %] +   + [% END %] +   + [% IF sort == 'when' %] +   + [% ELSE %] + [% change.when FILTER time FILTER no_break %] + [% END %] + [% END %] + + [% IF change.attachid %] + Attachment #[% change.attachid FILTER html %] + [% END %] + [%IF change.comment.defined && change.fieldname == 'longdesc' %] + [% "Comment $change.comment.count" + FILTER bug_link(operation.bug, comment_num => change.comment.count) + FILTER none %] + [% ELSE %] + [%+ field_descs.${change.fieldname} FILTER html %] + [% END %] - [% END %] - - [% operation.when FILTER time FILTER no_break %] - - - [% operation.bug FILTER bug_link(operation.bug) FILTER none %] - - [% FOREACH change = operation.changes %] - [% "" IF loop.index > 0 %] - - [% IF change.attachid %] - Attachment #[% change.attachid FILTER html %] - [% END %] - [%IF change.comment.defined && change.fieldname == 'longdesc' %] - [% "Comment $change.comment.count" FILTER bug_link(operation.bug, comment_num => change.comment.count) FILTER none %] - [% ELSE %] - [%+ field_descs.${change.fieldname} FILTER html %] - [% END %] - - [% PROCESS change_column change_type = change.removed %] - [% PROCESS change_column change_type = change.added %] - [% END %] - + [% PROCESS change_column change_type = change.removed %] + [% PROCESS change_column change_type = change.added %] + + [% END %] [% END %]

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

@@ -185,5 +200,20 @@ [% END %] [% END %] - [% INCLUDE global/footer.html.tmpl %] + +[% BLOCK sort_when_link %] + When +[% END %] + +[% BLOCK sort_bug_link %] + [% terms.Bug %] +[% END %] -- cgit v1.2.3-24-g4f1b