Commit 40dcf522 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 307604: "Redisplay table with bug counts" should also be available from…

Bug 307604: "Redisplay table with bug counts" should also be available from editmilestones.cgi and editversions.cgi - Patch by Frédéric Buclin <LpSolit@gmail.com> r=GavinS a=justdave
parent 8a51d31a
...@@ -53,6 +53,7 @@ my $product_name = trim($cgi->param('product') || ''); ...@@ -53,6 +53,7 @@ my $product_name = trim($cgi->param('product') || '');
my $milestone_name = trim($cgi->param('milestone') || ''); my $milestone_name = trim($cgi->param('milestone') || '');
my $sortkey = trim($cgi->param('sortkey') || 0); my $sortkey = trim($cgi->param('sortkey') || 0);
my $action = trim($cgi->param('action') || ''); my $action = trim($cgi->param('action') || '');
my $showbugcounts = (defined $cgi->param('showbugcounts'));
# #
# product = '' -> Show nice list of products # product = '' -> Show nice list of products
...@@ -62,6 +63,7 @@ unless ($product_name) { ...@@ -62,6 +63,7 @@ unless ($product_name) {
my @products = Bugzilla::Product::get_all_products(); my @products = Bugzilla::Product::get_all_products();
$vars->{'showbugcounts'} = $showbugcounts;
$vars->{'products'} = \@products; $vars->{'products'} = \@products;
$template->process("admin/milestones/select-product.html.tmpl", $template->process("admin/milestones/select-product.html.tmpl",
$vars) $vars)
...@@ -81,6 +83,7 @@ unless ($action) { ...@@ -81,6 +83,7 @@ unless ($action) {
my @milestones = my @milestones =
Bugzilla::Milestone::get_milestones_by_product($product->id); Bugzilla::Milestone::get_milestones_by_product($product->id);
$vars->{'showbugcounts'} = $showbugcounts;
$vars->{'product'} = $product->name; $vars->{'product'} = $product->name;
$vars->{'milestones'} = \@milestones; $vars->{'milestones'} = \@milestones;
$vars->{'default_milestone'} = $product->default_milestone; $vars->{'default_milestone'} = $product->default_milestone;
......
...@@ -62,6 +62,7 @@ $user->in_group('editcomponents') ...@@ -62,6 +62,7 @@ $user->in_group('editcomponents')
my $product_name = trim($cgi->param('product') || ''); my $product_name = trim($cgi->param('product') || '');
my $version_name = trim($cgi->param('version') || ''); my $version_name = trim($cgi->param('version') || '');
my $action = trim($cgi->param('action') || ''); my $action = trim($cgi->param('action') || '');
my $showbugcounts = (defined $cgi->param('showbugcounts'));
# #
# product = '' -> Show nice list of products # product = '' -> Show nice list of products
...@@ -70,6 +71,8 @@ my $action = trim($cgi->param('action') || ''); ...@@ -70,6 +71,8 @@ my $action = trim($cgi->param('action') || '');
unless ($product_name) { unless ($product_name) {
my @products = Bugzilla::Product::get_all_products(); my @products = Bugzilla::Product::get_all_products();
$vars->{'showbugcounts'} = $showbugcounts;
$vars->{'products'} = \@products; $vars->{'products'} = \@products;
$template->process("admin/versions/select-product.html.tmpl", $template->process("admin/versions/select-product.html.tmpl",
$vars) $vars)
...@@ -88,6 +91,7 @@ unless ($action) { ...@@ -88,6 +91,7 @@ unless ($action) {
my @versions = my @versions =
Bugzilla::Version::get_versions_by_product($product->id); Bugzilla::Version::get_versions_by_product($product->id);
$vars->{'showbugcounts'} = $showbugcounts;
$vars->{'product'} = $product->name; $vars->{'product'} = $product->name;
$vars->{'versions'} = \@versions; $vars->{'versions'} = \@versions;
$template->process("admin/versions/list.html.tmpl", $template->process("admin/versions/list.html.tmpl",
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
# Rights Reserved. # Rights Reserved.
# #
# Contributor(s): Gavin Shelley <bugzilla@chimpychompy.org> # Contributor(s): Gavin Shelley <bugzilla@chimpychompy.org>
# Frédéric Buclin <LpSolit@gmail.com>
#%] #%]
[%# INTERFACE: [%# INTERFACE:
...@@ -25,9 +26,6 @@ ...@@ -25,9 +26,6 @@
# product: string; the name of the product we are editing components for # product: string; the name of the product we are editing components for
#%] #%]
[% USE Bugzilla %]
[% cgi = Bugzilla.cgi %]
[% PROCESS global/variables.none.tmpl %] [% PROCESS global/variables.none.tmpl %]
[% title = BLOCK %]Select component of product [% title = BLOCK %]Select component of product
...@@ -120,8 +118,8 @@ ...@@ -120,8 +118,8 @@
[% IF ! showbugcounts %] [% IF ! showbugcounts %]
<p><a href="editcomponents.cgi?showbugcounts=1&amp;[% cgi.query_string %]"> <p><a href="editcomponents.cgi?product=[% product FILTER url_quote %]&amp;showbugcounts=1">
Redisplay table with [% terms.bug %] counts (slower)</a></p> Redisplay table with [% terms.bug %] counts (slower)</a></p>
[% END %] [% END %]
......
...@@ -16,32 +16,22 @@ ...@@ -16,32 +16,22 @@
# Copyright (C) 1998 Netscape Communications Corporation. All # Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved. # Rights Reserved.
# #
# Contributor(s): Gavin Shelley (bugzilla@chimpychompy.org) # Contributor(s): Gavin Shelley <bugzilla@chimpychompy.org>
# Frédéric Buclin <LpSolit@gmail.com>
# #
#%] #%]
[%# INTERFACE: [%# INTERFACE:
# products: array of hashes having the properties: # products: array of product objects
# - name: string; The name of the product.
# - description: string; The description of the product.
# - bug_count: number; The number of bugs for the product (if
# showbugcounts defined).
#
# showbugcounts: if defined, then bug counts should be included in the table # showbugcounts: if defined, then bug counts should be included in the table
#%] #%]
[% USE Bugzilla %]
[% cgi = Bugzilla.cgi %]
[% PROCESS global/variables.none.tmpl %] [% PROCESS global/variables.none.tmpl %]
[% PROCESS global/header.html.tmpl [% PROCESS global/header.html.tmpl
title = "Edit components for which product?" title = "Edit components for which product?"
%] %]
[% bug_count_contentlink = BLOCK %]buglist.cgi?component=%%name%%&amp;product=
[%- product FILTER url_quote %][% END %]
[% columns = [ [% columns = [
{ {
name => "name" name => "name"
...@@ -58,26 +48,24 @@ ...@@ -58,26 +48,24 @@
[% IF showbugcounts %] [% IF showbugcounts %]
[% columns.push({ [% columns.push({
name => 'bug_count' name => 'bug_count'
heading => "$terms.Bugs" heading => "$terms.Bugs"
align => "right" align => "right"
contentlink => bug_count_contentlink contentlink => "buglist.cgi?product=%%name%%"
}) %] })
%]
[% END %] [% END %]
[% PROCESS admin/table.html.tmpl [% PROCESS admin/table.html.tmpl
columns = columns columns = columns
data = products data = products
footer = footer_row
%] %]
[% IF ! showbugcounts %] [% IF !showbugcounts %]
<p><a href="editcomponents.cgi?showbugcounts=1">
<p><a href="editcomponents.cgi?showbugcounts=1&amp;[% cgi.query_string %]"> Redisplay table with [% terms.bug %] counts (slower)</a></p>
Redisplay table with [% terms.bug %] counts (slower)</a></p>
[% END %] [% END %]
<p> <p>
......
...@@ -17,13 +17,12 @@ ...@@ -17,13 +17,12 @@
# Rights Reserved. # Rights Reserved.
# #
# Contributor(s): Gavin Shelley <bugzilla@chimpychompy.org> # Contributor(s): Gavin Shelley <bugzilla@chimpychompy.org>
# Frédéric Buclin <LpSolit@gmail.com>
#%] #%]
[%# INTERFACE: [%# INTERFACE:
# milestones: array of hashes having the following properties: # milestones: array of milestone objects
# - name: string; The name of the milestone. # showbugcounts: if defined, then bug counts should be included in the table
# - sortkey: number; The sortkey used to order the milestone.
#
# product: string; the name of the product we are editing milestones for # product: string; the name of the product we are editing milestones for
#%] #%]
...@@ -42,6 +41,8 @@ ...@@ -42,6 +41,8 @@
[%- product FILTER url_quote %]&amp;milestone=%%name%%[% END %] [%- product FILTER url_quote %]&amp;milestone=%%name%%[% END %]
[% delete_contentlink = BLOCK %]editmilestones.cgi?action=del&amp;product= [% delete_contentlink = BLOCK %]editmilestones.cgi?action=del&amp;product=
[%- product FILTER url_quote %]&amp;milestone=%%name%%[% END %] [%- product FILTER url_quote %]&amp;milestone=%%name%%[% END %]
[% bug_count_contentlink = BLOCK %]buglist.cgi?target_milestone=%%name%%&amp;product=
[%- product FILTER url_quote %][% END %]
[% columns = [ [% columns = [
...@@ -53,14 +54,28 @@ ...@@ -53,14 +54,28 @@
{ {
name => "sortkey" name => "sortkey"
heading => "Sortkey" heading => "Sortkey"
}, }
{ ]
%]
[% IF showbugcounts %]
[% columns.push({
name => "bug_count"
heading => "$terms.Bugs"
align => "right"
contentlink => bug_count_contentlink
})
%]
[% END %]
[% columns.push({
name => "action" name => "action"
heading => "Action" heading => "Action"
content => "Delete" content => "Delete"
contentlink => delete_contentlink contentlink => delete_contentlink
} })
]
%] %]
[%# We want to override the usual 'Delete' link for the default [%# We want to override the usual 'Delete' link for the default
...@@ -83,6 +98,13 @@ ...@@ -83,6 +98,13 @@
<p> <p>
[% IF ! showbugcounts %]
<p><a href="editmilestones.cgi?product=[% product FILTER url_quote %]&amp;showbugcounts=1">
Redisplay table with [% terms.bug %] counts (slower)</a></p>
[% END %]
[% PROCESS admin/milestones/footer.html.tmpl [% PROCESS admin/milestones/footer.html.tmpl
no_edit_other_milestones_link = 1 no_edit_other_milestones_link = 1
%] %]
......
...@@ -16,28 +16,22 @@ ...@@ -16,28 +16,22 @@
# Copyright (C) 1998 Netscape Communications Corporation. All # Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved. # Rights Reserved.
# #
# Contributor(s): Gavin Shelley (bugzilla@chimpychompy.org) # Contributor(s): Gavin Shelley <bugzilla@chimpychompy.org>
# Frédéric Buclin <LpSolit@gmail.com>
# #
#%] #%]
[%# INTERFACE: [%# INTERFACE:
# products: array of hashes having the following properties: # products: array of product objects
# - name: string; The name of the product. # showbugcounts: if defined, then bug counts should be included in the table
# - description: string; The description of the product.
#%] #%]
[% USE Bugzilla %]
[% cgi = Bugzilla.cgi %]
[% PROCESS global/variables.none.tmpl %] [% PROCESS global/variables.none.tmpl %]
[% PROCESS global/header.html.tmpl [% PROCESS global/header.html.tmpl
title = "Edit milestones for which product?" title = "Edit milestones for which product?"
%] %]
[% bug_count_contentlink = BLOCK %]buglist.cgi?target_milestone=%%name%%&amp;product=
[%- product FILTER url_quote %][% END %]
[% columns = [ [% columns = [
{ {
name => "name" name => "name"
...@@ -52,11 +46,28 @@ ...@@ -52,11 +46,28 @@
] ]
%] %]
[% IF showbugcounts %]
[% columns.push({
name => 'bug_count'
heading => "$terms.Bugs"
align => "right"
contentlink => "buglist.cgi?product=%%name%%"
})
%]
[% END %]
[% PROCESS admin/table.html.tmpl [% PROCESS admin/table.html.tmpl
columns = columns columns = columns
data = products data = products
%] %]
[% IF !showbugcounts %]
<p><a href="editmilestones.cgi?showbugcounts=1">
Redisplay table with [% terms.bug %] counts (slower)</a></p>
[% END %]
<p> <p>
[% PROCESS global/footer.html.tmpl %] [% PROCESS global/footer.html.tmpl %]
...@@ -17,18 +17,15 @@ ...@@ -17,18 +17,15 @@
# Rights Reserved. # Rights Reserved.
# #
# Contributor(s): Gavin Shelley <bugzilla@chimpychompy.org> # Contributor(s): Gavin Shelley <bugzilla@chimpychompy.org>
# Frédéric Buclin <LpSolit@gmail.com>
#%] #%]
[%# INTERFACE: [%# INTERFACE:
# versions: array of hashes having the following properties: # versions: array of version objects
# - name: string; The name of the version. # showbugcounts: if defined, then bug counts should be included in the table
#
# product: string; the name of the product we are editing versions for # product: string; the name of the product we are editing versions for
#%] #%]
[% USE Bugzilla %]
[% cgi = Bugzilla.cgi %]
[% PROCESS global/variables.none.tmpl %] [% PROCESS global/variables.none.tmpl %]
[% title = BLOCK %]Select version of product [% title = BLOCK %]Select version of product
...@@ -41,6 +38,8 @@ ...@@ -41,6 +38,8 @@
[%- product FILTER url_quote %]&amp;version=%%name%%[% END %] [%- product FILTER url_quote %]&amp;version=%%name%%[% END %]
[% delete_contentlink = BLOCK %]editversions.cgi?action=del&amp;product= [% delete_contentlink = BLOCK %]editversions.cgi?action=del&amp;product=
[%- product FILTER url_quote %]&amp;version=%%name%%[% END %] [%- product FILTER url_quote %]&amp;version=%%name%%[% END %]
[% bug_count_contentlink = BLOCK %]buglist.cgi?version=%%name%%&amp;product=
[%- product FILTER url_quote %][% END %]
[% columns = [ [% columns = [
...@@ -48,13 +47,27 @@ ...@@ -48,13 +47,27 @@
name => "name" name => "name"
heading => "Edit version..." heading => "Edit version..."
contentlink => edit_contentlink contentlink => edit_contentlink
}, }
{ ]
%]
[% IF showbugcounts %]
[% columns.push({
name => "bug_count"
heading => "$terms.Bugs"
align => "right"
contentlink => bug_count_contentlink
})
%]
[% END %]
[% columns.push({
heading => "Action" heading => "Action"
content => "Delete" content => "Delete"
contentlink => delete_contentlink contentlink => delete_contentlink
} })
]
%] %]
[% PROCESS admin/table.html.tmpl [% PROCESS admin/table.html.tmpl
...@@ -64,6 +77,13 @@ ...@@ -64,6 +77,13 @@
<p> <p>
[% IF ! showbugcounts %]
<p><a href="editversions.cgi?product=[% product FILTER url_quote %]&amp;showbugcounts=1">
Redisplay table with [% terms.bug %] counts (slower)</a></p>
[% END %]
[% PROCESS admin/versions/footer.html.tmpl [% PROCESS admin/versions/footer.html.tmpl
no_edit_other_versions_link = 1 no_edit_other_versions_link = 1
%] %]
......
...@@ -16,28 +16,22 @@ ...@@ -16,28 +16,22 @@
# Copyright (C) 1998 Netscape Communications Corporation. All # Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved. # Rights Reserved.
# #
# Contributor(s): Gavin Shelley (bugzilla@chimpychompy.org) # Contributor(s): Gavin Shelley <bugzilla@chimpychompy.org>
# Frédéric Buclin <LpSolit@gmail.com>
# #
#%] #%]
[%# INTERFACE: [%# INTERFACE:
# products: array of hashes having the following properties: # products: array of product objects
# - name: string; The name of the product. # showbugcounts: if defined, then bug counts should be included in the table
# - description: string; The description of the product.
#%] #%]
[% USE Bugzilla %]
[% cgi = Bugzilla.cgi %]
[% PROCESS global/variables.none.tmpl %] [% PROCESS global/variables.none.tmpl %]
[% PROCESS global/header.html.tmpl [% PROCESS global/header.html.tmpl
title = "Edit versions for which product?" title = "Edit versions for which product?"
%] %]
[% bug_count_contentlink = BLOCK %]buglist.cgi?version=%%name%%&amp;product=
[%- product FILTER url_quote %][% END %]
[% columns = [ [% columns = [
{ {
name => "name" name => "name"
...@@ -52,11 +46,28 @@ ...@@ -52,11 +46,28 @@
] ]
%] %]
[% IF showbugcounts %]
[% columns.push({
name => 'bug_count'
heading => "$terms.Bugs"
align => "right"
contentlink => "buglist.cgi?product=%%name%%"
})
%]
[% END %]
[% PROCESS admin/table.html.tmpl [% PROCESS admin/table.html.tmpl
columns = columns columns = columns
data = products data = products
%] %]
[% IF !showbugcounts %]
<p><a href="editversions.cgi?showbugcounts=1">
Redisplay table with [% terms.bug %] counts (slower)</a></p>
[% END %]
<p> <p>
[% PROCESS global/footer.html.tmpl %] [% PROCESS global/footer.html.tmpl %]
...@@ -611,14 +611,6 @@ ...@@ -611,14 +611,6 @@
'comp.bug_count' 'comp.bug_count'
], ],
'admin/components/list.html.tmpl' => [
'cgi.query_string'
],
'admin/components/select-product.html.tmpl' => [
'cgi.query_string'
],
'admin/milestones/confirm-delete.html.tmpl' => [ 'admin/milestones/confirm-delete.html.tmpl' => [
'bug_count' 'bug_count'
], ],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment