From 150660ee3f4201df06c96b802dbed17753e72b68 Mon Sep 17 00:00:00 2001 From: "gerv%gerv.net" <> Date: Sat, 27 Apr 2002 06:18:53 +0000 Subject: Bug 138994 - split up duplicates.html.tmpl. Patch by gerv; r=myk, bbaetz. --- .../en/default/reports/duplicates-simple.html.tmpl | 42 +++++++ .../en/default/reports/duplicates-table.html.tmpl | 137 +++++++++++++++++++++ template/en/default/reports/duplicates.html.tmpl | 109 +--------------- 3 files changed, 183 insertions(+), 105 deletions(-) create mode 100644 template/en/default/reports/duplicates-simple.html.tmpl create mode 100644 template/en/default/reports/duplicates-table.html.tmpl (limited to 'template/en/default') diff --git a/template/en/default/reports/duplicates-simple.html.tmpl b/template/en/default/reports/duplicates-simple.html.tmpl new file mode 100644 index 000000000..481dd6eca --- /dev/null +++ b/template/en/default/reports/duplicates-simple.html.tmpl @@ -0,0 +1,42 @@ + +[%# 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/ + # + # 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 Bugzilla Bug Tracking System. + # + # The Initial Developer of the Original Code is Netscape Communications + # Corporation. Portions created by Netscape are + # Copyright (C) 1998 Netscape Communications Corporation. All + # Rights Reserved. + # + # Contributor(s): Gervase Markham + #%] + +[%# INTERFACE: + # You need to fulfill the interface to duplicates-table.html.tmpl. + #%] + + + + [% IF product %] + [% title = "Most Frequently Reported Bugs for $product" %] + [% ELSE %] + [% title = "Most Frequently Reported Bugs" %] + [% END%] + + + [% title %] + + + + [% PROCESS "reports/duplicates-table.html.tmpl" %] + + + diff --git a/template/en/default/reports/duplicates-table.html.tmpl b/template/en/default/reports/duplicates-table.html.tmpl new file mode 100644 index 000000000..f7b8ec173 --- /dev/null +++ b/template/en/default/reports/duplicates-table.html.tmpl @@ -0,0 +1,137 @@ + +[%# 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/ + # + # 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 Bugzilla Bug Tracking System. + # + # The Initial Developer of the Original Code is Netscape Communications + # Corporation. Portions created by Netscape are + # Copyright (C) 1998 Netscape Communications Corporation. All + # Rights Reserved. + # + # Contributor(s): Gervase Markham + #%] + +[%# INTERFACE: + # bugs: list of hashes. May be empty. Each hash has nine members: + # id: integer. The bug number + # count: integer. The number of dupes + # delta: integer. The change in count in the last $changedsince days + # component: string. The bug's component + # bug_severity: string. The bug's severity. + # op_sys: string. The bug's reported OS. + # target_milestone: string. The bug's TM. + # short_desc: string. The bug's summary. + # bug_status: string. The bug's status. + # + # bug_ids: list of integers. May be empty. The IDs of the bugs in $bugs. + # + # sortby: string. the column on which we are sorting the buglist. + # reverse: boolean. True if we are reversing the current sort. + # maxrows: integer. Max number of rows to display. + # changedsince: integer. The number of days ago for the changedsince column. + # openonly: boolean. True if we are only showing open bugs. + # product: string. Restrict to this product only. + #%] + +[%# *** Column Headers *** %] + + + + [% FOREACH column = [ { name => "id", description => "Bug #" }, + { name => "count", description => "Dupe
Count" }, + { name => "delta", + description => "Change in last
$changedsince day(s)" }, + { name => "component", description => "Component" }, + { name => "bug_severity", description => "Severity" }, + { name => "op_sys", description => "Op Sys" }, + { name => "target_milestone", + description => "Target
Milestone" }, + { name => "short_desc", description => "Summary" } ] + %] + + [%# Small hack to keep delta column out if we don't need it %] + [% NEXT IF column.name == "delta" AND NOT dobefore %] + + + [% END %] + + +[% IF NOT sortby %] + [% sortby = "count"; reverse = "1" %] +[% END %] + +[% IF sortby == "id" OR sortby == "count" OR sortby == "delta" %] + [%# Numeric sort %] + [% sortedbugs = bugs.nsort(sortby) %] +[% ELSE %] + [% sortedbugs = bugs.sort(sortby) %] +[% END %] + +[% IF reverse %] + [% bugs = sortedbugs.reverse %] +[% ELSE %] + [% bugs = sortedbugs %] +[% END %] + +[%# *** Buglist *** %] + +[%# We need to keep track of the bug IDs we are actually displaying, because + # if the user decides to sort the visible list, we need to know what that + # list actually is. %] +[% vis_bug_ids = [] %] + +[% FOREACH bug = bugs %] + [% LAST IF loop.index() >= maxrows %] + [% vis_bug_ids.push(bug.id) %] + + + + + + + [% IF dobefore %] + + [% END %] + + + + + + + +[% END %] + +
+
+ + [% bug_ids_string = bug_ids.join(',') %] + + [% column.description %] + +
+
+
+ [% "" IF bug.resolution != "" %] + [% bug.id %] + [% "" IF bug.resolution != "" %] +
+
+
+ [% bug.count %] +
+
[% bug.delta %]
[% bug.component %]
[% bug.bug_severity %]
[% bug.op_sys %]
[% bug.target_milestone %]
[% bug.short_desc FILTER html %]
diff --git a/template/en/default/reports/duplicates.html.tmpl b/template/en/default/reports/duplicates.html.tmpl index 48c2bc796..203776cd3 100644 --- a/template/en/default/reports/duplicates.html.tmpl +++ b/template/en/default/reports/duplicates.html.tmpl @@ -20,18 +20,6 @@ #%] [%# INTERFACE: - # bugs: list of hashes. May be empty. Each hash has nine members: - # id: integer. The bug number - # count: integer. The number of dupes - # delta: integer. The change in count in the last $changedsince days - # component: string. The bug's component - # bug_severity: string. The bug's severity. - # op_sys: string. The bug's reported OS. - # target_milestone: string. The bug's TM. - # short_desc: string. The bug's summary. - # bug_status: string. The bug's status. - # - # bug_ids: list of integers. May be empty. The IDs of the bugs in $bugs. # products: list of strings. The products this user can see. # # sortby: string. the column on which we are sorting the buglist. @@ -40,6 +28,9 @@ # changedsince: integer. The number of days ago for the changedsince column. # openonly: boolean. True if we are only showing open bugs. # product: string. Restrict to this product only. + # + # Additionally, you need to fulfill the interface to + # duplicates-table.html.tmpl. #%] [% IF product %] @@ -56,99 +47,7 @@ Change parameters

-[%# *** Column Headers *** %] - - - - [% FOREACH column = [ { name => "id", description => "Bug #" }, - { name => "count", description => "Dupe
Count" }, - { name => "delta", - description => "Change in last
$changedsince day(s)" }, - { name => "component", description => "Component" }, - { name => "bug_severity", description => "Severity" }, - { name => "op_sys", description => "Op Sys" }, - { name => "target_milestone", - description => "Target
Milestone" }, - { name => "short_desc", description => "Summary" } ] - %] - - [%# Small hack to keep delta column out if we don't need it %] - [% NEXT IF column.name == "delta" AND NOT dobefore %] - - - [% END %] - - -[% IF NOT sortby %] - [% sortby = "count"; reverse = "1" %] -[% END %] - -[% IF sortby == "id" OR sortby == "count" OR sortby == "delta" %] - [%# Numeric sort %] - [% sortedbugs = bugs.nsort(sortby) %] -[% ELSE %] - [% sortedbugs = bugs.sort(sortby) %] -[% END %] - -[% IF reverse %] - [% bugs = sortedbugs.reverse %] -[% ELSE %] - [% bugs = sortedbugs %] -[% END %] - -[%# *** Buglist *** %] - -[%# We need to keep track of the bug IDs we are actually displaying, because - # if the user decides to sort the visible list, we need to know what that - # list actually is. %] -[% vis_bug_ids = [] %] - -[% FOREACH bug = bugs %] - [% LAST IF loop.index() >= maxrows %] - [% vis_bug_ids.push(bug.id) %] - - - - - - - [% IF dobefore %] - - [% END %] - - - - - - - -[% END %] - -
-
- - [% bug_ids_string = bug_ids.join(',') %] - - [% column.description %] - -
-
-
- [% "" IF bug.resolution != "" %] - [% bug.id %] - [% "" IF bug.resolution != "" %] -
-
-
- [% bug.count %] -
-
[% bug.delta %]
[% bug.component %]
[% bug.bug_severity %]
[% bug.op_sys %]
[% bug.target_milestone %]
[% bug.short_desc FILTER html %]
+[% PROCESS "reports/duplicates-table.html.tmpl" %]

-- cgit v1.2.3-24-g4f1b