my $user = Bugzilla->login(LOGIN_REQUIRED);
my $whoid = $user->id;
+my $dbh = Bugzilla->dbh;
my $cgi = Bugzilla->cgi;
my $template = Bugzilla->template;
my $vars = {};
my $classification_name = trim($cgi->param('classification') || '');
my $product_name = trim($cgi->param('product') || '');
my $action = trim($cgi->param('action') || '');
-my $dbh = Bugzilla->dbh;
+my $showbugcounts = (defined $cgi->param('showbugcounts'));
#
# product = '' -> Show nice list of classifications (if
@products = Bugzilla::Product::get_all_products;
}
- $vars->{'products'} = \@products;
+ $vars->{'products'} = \@products;
+ $vars->{'showbugcounts'} = $showbugcounts;
- $template->process("admin/products/list.html.tmpl",
- $vars)
+ $template->process("admin/products/list.html.tmpl", $vars)
|| ThrowTemplateError($template->error());
-
exit;
}
# classification: Bugzilla::Classification object; If classifications
# are enabled, then this is
# the currently selected classification
+ # showbugcounts: boolean; true if bug counts should be included in the table
#%]
[% PROCESS global/variables.none.tmpl %]
name => "votestoconfirm"
heading => "Votes To Confirm"
align => 'right'
- },
- {
+ } ]
+%]
+
+[% IF showbugcounts %]
+
+ [% columns.push({
name => "bug_count"
heading => "$terms.Bug Count"
align => 'right'
contentlink => bug_count_contentlink
- },
- {
+ })
+ %]
+
+[% END %]
+
+[% columns.push({
heading => "Action"
content => "Delete"
contentlink => delete_contentlink
- },
- ]
+ })
%]
[% overrides.disallow_new = [ {
<p>
+[% IF !showbugcounts %]
+
+ <p><a href="editproducts.cgi?showbugcounts=1[% classification_url_part %]">
+ Redisplay table with [% terms.bug %] counts (slower)</a></p>
+
+[% END %]
+
[% PROCESS admin/products/footer.html.tmpl
no_edit_other_products_link = 1
%]