Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
150660ee
Commit
150660ee
authored
Apr 27, 2002
by
gerv%gerv.net
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 138994 - split up duplicates.html.tmpl. Patch by gerv; r=myk, bbaetz.
parent
6578779d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
189 additions
and
107 deletions
+189
-107
duplicates.cgi
duplicates.cgi
+6
-2
duplicates-simple.html.tmpl
template/en/default/reports/duplicates-simple.html.tmpl
+42
-0
duplicates-table.html.tmpl
template/en/default/reports/duplicates-table.html.tmpl
+137
-0
duplicates.html.tmpl
template/en/default/reports/duplicates.html.tmpl
+4
-105
No files found.
duplicates.cgi
View file @
150660ee
...
@@ -191,13 +191,17 @@ $vars->{'changedsince'} = $changedsince;
...
@@ -191,13 +191,17 @@ $vars->{'changedsince'} = $changedsince;
$vars
->
{
'maxrows'
}
=
$maxrows
;
$vars
->
{
'maxrows'
}
=
$maxrows
;
$vars
->
{
'openonly'
}
=
$openonly
;
$vars
->
{
'openonly'
}
=
$openonly
;
$vars
->
{
'reverse'
}
=
$reverse
;
$vars
->
{
'reverse'
}
=
$reverse
;
$vars
->
{
'format'
}
=
$::FORM
{
'format'
};
$vars
->
{
'product'
}
=
$product
;
$vars
->
{
'product'
}
=
$product
;
$vars
->
{
'products'
}
=
\
@::legal_product
;
$vars
->
{
'products'
}
=
\
@::legal_product
;
print
"Content-type: text/html\n\n"
;
my
$format
=
ValidateOutputFormat
(
$::FORM
{
'format'
},
"duplicates"
,
"reports"
);
print
"Content-Type: $format->{'contenttype'}\n\n"
;
# Generate and return the UI (HTML page) from the appropriate template.
# Generate and return the UI (HTML page) from the appropriate template.
$template
->
process
(
"reports/
duplicates.html.tmpl
"
,
$vars
)
$template
->
process
(
"reports/
$format->{'template'}
"
,
$vars
)
||
ThrowTemplateError
(
$template
->
error
());
||
ThrowTemplateError
(
$template
->
error
());
...
...
template/en/default/reports/duplicates-simple.html.tmpl
0 → 100644
View file @
150660ee
<!-- 1.0@bugzilla.org -->
[%# 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
<gerv
@
gerv
.
net
>
#%]
[%# INTERFACE:
# You need to fulfill the interface to duplicates-table.html.tmpl.
#%]
<html>
[% IF product %]
[% title = "Most Frequently Reported Bugs for $product" %]
[% ELSE %]
[% title = "Most Frequently Reported Bugs" %]
[% END%]
<head>
<title>
[% title %]
</title>
</head>
<body>
[% PROCESS "reports/duplicates-table.html.tmpl" %]
</body>
</html>
template/en/default/reports/duplicates-table.html.tmpl
0 → 100644
View file @
150660ee
<!-- 1.0@bugzilla.org -->
[%# 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 <gerv@gerv.net>
#%]
[%# 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 *** %]
<table border>
<tr BGCOLOR="#CCCCCC">
[% FOREACH column = [ { name => "id", description => "Bug #" },
{ name => "count", description => "Dupe<br>Count" },
{ name => "delta",
description => "Change in last<br>$changedsince day(s)" },
{ name => "component", description => "Component" },
{ name => "bug_severity", description => "Severity" },
{ name => "op_sys", description => "Op Sys" },
{ name => "target_milestone",
description => "Target<br>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 %]
<td>
<center>
<b>
[% bug_ids_string = bug_ids.join(',') %]
<a href="duplicates.cgi?sortby=[% column.name %]
[% "&reverse=1" IF NOT reverse AND sortby == column.name %]
[% "&maxrows=$maxrows" IF maxrows %]
[% "&changedsince=$changedsince" IF changedsince %]
[% "&openonly=1" IF openonly %]
[% "&product=$product" IF product %]
[% "&format=$format" IF format %]
[% "&bug_id=$bug_ids_string&sortvisible=1" IF sortvisible %]">
[% column.description %]</a>
</b>
</center>
</td>
[% END %]
</tr>
[% 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) %]
<tr>
<td>
<center>
[% "<strike>" IF bug.resolution != "" %]
<A HREF="show_bug.cgi?id=[% bug.id %]">[% bug.id %]</a>
[% "</strike>" IF bug.resolution != "" %]
</center>
</td>
<td>
<center>
[% bug.count %]
</center>
</td>
[% IF dobefore %]
<td><center>[% bug.delta %]</center></td>
[% END %]
<td>[% bug.component %]</td>
<td><center>[% bug.bug_severity %]</center></td>
<td><center>[% bug.op_sys %]</center></td>
<td><center>[% bug.target_milestone %]</center></td>
<td>[% bug.short_desc FILTER html %]</td>
</tr>
[% END %]
</table>
template/en/default/reports/duplicates.html.tmpl
View file @
150660ee
...
@@ -20,18 +20,6 @@
...
@@ -20,18 +20,6 @@
#%]
#%]
[%# INTERFACE:
[%# 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.
# products: list of strings. The products this user can see.
#
#
# sortby: string. the column on which we are sorting the buglist.
# sortby: string. the column on which we are sorting the buglist.
...
@@ -40,6 +28,9 @@
...
@@ -40,6 +28,9 @@
# changedsince: integer. The number of days ago for the changedsince column.
# changedsince: integer. The number of days ago for the changedsince column.
# openonly: boolean. True if we are only showing open bugs.
# openonly: boolean. True if we are only showing open bugs.
# product: string. Restrict to this product only.
# product: string. Restrict to this product only.
#
# Additionally, you need to fulfill the interface to
# duplicates-table.html.tmpl.
#%]
#%]
[% IF product %]
[% IF product %]
...
@@ -56,99 +47,7 @@
...
@@ -56,99 +47,7 @@
<a href="#params">Change parameters</a>
<a href="#params">Change parameters</a>
</p>
</p>
[%# *** Column Headers *** %]
[% PROCESS "reports/duplicates-table.html.tmpl" %]
<table border>
<tr BGCOLOR="#CCCCCC">
[% FOREACH column = [ { name => "id", description => "Bug #" },
{ name => "count", description => "Dupe<br>Count" },
{ name => "delta",
description => "Change in last<br>$changedsince day(s)" },
{ name => "component", description => "Component" },
{ name => "bug_severity", description => "Severity" },
{ name => "op_sys", description => "Op Sys" },
{ name => "target_milestone",
description => "Target<br>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 %]
<td>
<center>
<b>
[% bug_ids_string = bug_ids.join(',') %]
<a href="duplicates.cgi?sortby=[% column.name %]
[% "&reverse=1" IF NOT reverse AND sortby == column.name %]
[% "&maxrows=$maxrows" IF maxrows %]
[% "&changedsince=$changedsince" IF changedsince %]
[% "&openonly=1" IF openonly %]
[% "&product=$product" IF product %]
[% "&bug_id=$bug_ids_string&sortvisible=1" IF sortvisible %]">
[% column.description %]</a>
</b>
</center>
</td>
[% END %]
</tr>
[% 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) %]
<tr>
<td>
<center>
[% "<strike>" IF bug.resolution != "" %]
<A HREF="show_bug.cgi?id=[% bug.id %]">[% bug.id %]</a>
[% "</strike>" IF bug.resolution != "" %]
</center>
</td>
<td>
<center>
[% bug.count %]
</center>
</td>
[% IF dobefore %]
<td><center>[% bug.delta %]</center></td>
[% END %]
<td>[% bug.component %]</td>
<td><center>[% bug.bug_severity %]</center></td>
<td><center>[% bug.op_sys %]</center></td>
<td><center>[% bug.target_milestone %]</center></td>
<td>[% bug.short_desc FILTER html %]</td>
</tr>
[% END %]
</table>
<br>
<br>
<br>
<br>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment