]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 307604: "Redisplay table with bug counts" should also be available from editmiles...
authorlpsolit%gmail.com <>
Wed, 28 Sep 2005 05:08:11 +0000 (05:08 +0000)
committerlpsolit%gmail.com <>
Wed, 28 Sep 2005 05:08:11 +0000 (05:08 +0000)
editmilestones.cgi
editversions.cgi
template/en/default/admin/components/list.html.tmpl
template/en/default/admin/components/select-product.html.tmpl
template/en/default/admin/milestones/list.html.tmpl
template/en/default/admin/milestones/select-product.html.tmpl
template/en/default/admin/versions/list.html.tmpl
template/en/default/admin/versions/select-product.html.tmpl
template/en/default/filterexceptions.pl

index b9c4e0d5173d14ee01dede52cc97c6d5177020f2..3e484bbfca307a3232785477be6a16f04921b274 100755 (executable)
@@ -53,6 +53,7 @@ my $product_name   = trim($cgi->param('product')     || '');
 my $milestone_name = trim($cgi->param('milestone')   || '');
 my $sortkey        = trim($cgi->param('sortkey')     || 0);
 my $action         = trim($cgi->param('action')      || '');
+my $showbugcounts = (defined $cgi->param('showbugcounts'));
 
 #
 # product = '' -> Show nice list of products
@@ -62,6 +63,7 @@ unless ($product_name) {
     
     my @products = Bugzilla::Product::get_all_products();
 
+    $vars->{'showbugcounts'} = $showbugcounts;
     $vars->{'products'} = \@products;
     $template->process("admin/milestones/select-product.html.tmpl",
                        $vars)
@@ -81,6 +83,7 @@ unless ($action) {
     my @milestones =
         Bugzilla::Milestone::get_milestones_by_product($product->id);
 
+    $vars->{'showbugcounts'} = $showbugcounts;
     $vars->{'product'} = $product->name;
     $vars->{'milestones'} = \@milestones;
     $vars->{'default_milestone'} = $product->default_milestone;
index 66e81b864b1c5ea71d26fe277017fba125c18356..d29e4d8504f9e1822c6537bb72f76d33c246862c 100755 (executable)
@@ -62,6 +62,7 @@ $user->in_group('editcomponents')
 my $product_name = trim($cgi->param('product') || '');
 my $version_name = trim($cgi->param('version') || '');
 my $action       = trim($cgi->param('action')  || '');
+my $showbugcounts = (defined $cgi->param('showbugcounts'));
 
 #
 # product = '' -> Show nice list of products
@@ -70,6 +71,8 @@ my $action       = trim($cgi->param('action')  || '');
 unless ($product_name) {
 
     my @products = Bugzilla::Product::get_all_products();
+
+    $vars->{'showbugcounts'} = $showbugcounts;
     $vars->{'products'} = \@products;
     $template->process("admin/versions/select-product.html.tmpl",
                        $vars)
@@ -88,6 +91,7 @@ unless ($action) {
     my @versions =
         Bugzilla::Version::get_versions_by_product($product->id);
 
+    $vars->{'showbugcounts'} = $showbugcounts;
     $vars->{'product'} = $product->name;
     $vars->{'versions'} = \@versions;
     $template->process("admin/versions/list.html.tmpl",
index 71444936d47006d8b3f99c01d7db75bc7f343311..0b49986796d3a718c2189a27b3c0d9270969b366 100644 (file)
@@ -17,6 +17,7 @@
   # Rights Reserved.
   #
   # Contributor(s): Gavin Shelley <bugzilla@chimpychompy.org>
+  #                 Frédéric Buclin <LpSolit@gmail.com>
   #%]
 
 [%# INTERFACE:
@@ -25,9 +26,6 @@
   # product: string; the name of the product we are editing components for
   #%]
 
-[% USE Bugzilla %]
-[% cgi = Bugzilla.cgi %]
-
 [% PROCESS global/variables.none.tmpl %]
 
 [% title = BLOCK %]Select component of product
 
 [% IF ! showbugcounts %]
 
-<p><a href="editcomponents.cgi?showbugcounts=1&amp;[% cgi.query_string %]">
-    Redisplay table with [% terms.bug %] counts (slower)</a></p>
+  <p><a href="editcomponents.cgi?product=[% product FILTER url_quote %]&amp;showbugcounts=1">
+      Redisplay table with [% terms.bug %] counts (slower)</a></p>
 
 [% END %]
 
index 7e6cb8be59b3e040b3476d82502701855ecc7891..ea9342dcd335d0071fec54c16e1ab6d955d2955d 100644 (file)
   # Copyright (C) 1998 Netscape Communications Corporation. All
   # Rights Reserved.
   #
-  # Contributor(s): Gavin Shelley (bugzilla@chimpychompy.org)
+  # Contributor(s): Gavin Shelley <bugzilla@chimpychompy.org>
+  #                 Frédéric Buclin <LpSolit@gmail.com>
   #
   #%]
 
 [%# INTERFACE:
-  # products: array of hashes having the properties:
-  #   - 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).
-  #
+  # products: array of product objects
   # showbugcounts: if defined, then bug counts should be included in the table
   #%]
 
-[% USE Bugzilla %]
-[% cgi = Bugzilla.cgi %]
-
 [% PROCESS global/variables.none.tmpl %]
 
 [% PROCESS global/header.html.tmpl
   title = "Edit components for which product?"
 %]
 
-[% bug_count_contentlink = BLOCK %]buglist.cgi?component=%%name%%&amp;product=
-  [%- product FILTER url_quote %][% END %]
-
 [% columns = [
      { 
        name => "name"
 
 [% IF showbugcounts %]
 
-[%  columns.push({
+  [% columns.push({
       name => 'bug_count'
       heading => "$terms.Bugs"
       align => "right"
-      contentlink => bug_count_contentlink
-    }) %]
+      contentlink => "buglist.cgi?product=%%name%%"
+    })
+  %]
 
 [% END %]
 
 [% PROCESS admin/table.html.tmpl
      columns = columns
      data = products
-     footer = footer_row
 %]
 
-[% IF ! showbugcounts %]
-
-<p><a href="editcomponents.cgi?showbugcounts=1&amp;[% cgi.query_string %]">
-    Redisplay table with [% terms.bug %] counts (slower)</a></p>
-
+[% IF !showbugcounts %]
+  <p><a href="editcomponents.cgi?showbugcounts=1">
+      Redisplay table with [% terms.bug %] counts (slower)</a></p>
 [% END %]
 
 <p>
index d36b61a3d9ab73c8b3dfb306746baa1c915c17d5..b9311fc1a439bcd4ea77fd14c7a235cf19b7f2c2 100644 (file)
   # Rights Reserved.
   #
   # Contributor(s): Gavin Shelley <bugzilla@chimpychompy.org>
+  #                 Frédéric Buclin <LpSolit@gmail.com>
   #%]
 
 [%# INTERFACE:
-  # milestones: array of hashes having the following properties:
-  #   - name: string; The name of the milestone.
-  #   - sortkey: number; The sortkey used to order the milestone.
-  #
+  # milestones: array of milestone objects
+  # showbugcounts: if defined, then bug counts should be included in the table
   # product: string; the name of the product we are editing milestones for
   #%]
 
@@ -42,6 +41,8 @@
   [%- product FILTER url_quote %]&amp;milestone=%%name%%[% END %]
 [% delete_contentlink = BLOCK %]editmilestones.cgi?action=del&amp;product=
   [%- 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 = [
      { 
        name => "sortkey"
        heading => "Sortkey"
-     },
-     {
+     }
+   ]
+%]
+
+[% IF showbugcounts %]
+
+  [% columns.push({
+       name => "bug_count"
+       heading => "$terms.Bugs"
+       align => "right"
+       contentlink => bug_count_contentlink
+     })
+  %]
+
+[% END %]
+
+[% columns.push({
        name => "action"
        heading => "Action"
        content => "Delete"
        contentlink => delete_contentlink
-     }
-   ]
+     })
 %]
 
 [%# We want to override the usual 'Delete' link for the default
 
 <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
   no_edit_other_milestones_link = 1
 %]
index b2510ded966210226fdee4330c9a495ee23ddf25..508af6881a0e50b07eabb5b7e02e8b386da087aa 100644 (file)
   # Copyright (C) 1998 Netscape Communications Corporation. All
   # Rights Reserved.
   #
-  # Contributor(s): Gavin Shelley (bugzilla@chimpychompy.org)
+  # Contributor(s): Gavin Shelley <bugzilla@chimpychompy.org>
+  #                 Frédéric Buclin <LpSolit@gmail.com>
   #
   #%]
 
 [%# INTERFACE:
-  # products: array of hashes having the following properties:
-  #   - name: string; The name of the product.
-  #   - description: string; The description of the product.
+  # products: array of product objects
+  # showbugcounts: if defined, then bug counts should be included in the table
   #%]
 
-[% USE Bugzilla %]
-[% cgi = Bugzilla.cgi %]
-
 [% PROCESS global/variables.none.tmpl %]
 
 [% PROCESS global/header.html.tmpl
   title = "Edit milestones for which product?"
 %]
 
-[% bug_count_contentlink = BLOCK %]buglist.cgi?target_milestone=%%name%%&amp;product=
-  [%- product FILTER url_quote %][% END %]
-
 [% columns = [
      { 
        name => "name"
    ]
 %]
 
+[% IF showbugcounts %]
+
+  [% columns.push({
+      name => 'bug_count'
+      heading => "$terms.Bugs"
+      align => "right"
+      contentlink => "buglist.cgi?product=%%name%%"
+    })
+  %]
+
+[% END %]
+
 [% PROCESS admin/table.html.tmpl
      columns = columns
      data = products
 %]
 
+[% IF !showbugcounts %]
+  <p><a href="editmilestones.cgi?showbugcounts=1">
+      Redisplay table with [% terms.bug %] counts (slower)</a></p>
+[% END %]
+
 <p>
 
 [% PROCESS global/footer.html.tmpl %]
index ec47c18d750ca15b1c083191ec62874bb2559963..b2ed2c343ab018a30edc4ecbbfd1aadcbaa854a6 100644 (file)
   # Rights Reserved.
   #
   # Contributor(s): Gavin Shelley <bugzilla@chimpychompy.org>
+  #                 Frédéric Buclin <LpSolit@gmail.com>
   #%]
 
 [%# INTERFACE:
-  # versions: array of hashes having the following properties:
-  #   - name: string; The name of the version.
-  #
+  # versions: array of version objects
+  # showbugcounts: if defined, then bug counts should be included in the table
   # product: string; the name of the product we are editing versions for
   #%]
 
-[% USE Bugzilla %]
-[% cgi = Bugzilla.cgi %]
-
 [% PROCESS global/variables.none.tmpl %]
 
 [% title = BLOCK %]Select version of product
@@ -41,6 +38,8 @@
   [%- product FILTER url_quote %]&amp;version=%%name%%[% END %]
 [% delete_contentlink = BLOCK %]editversions.cgi?action=del&amp;product=
   [%- product FILTER url_quote %]&amp;version=%%name%%[% END %]
+[% bug_count_contentlink = BLOCK %]buglist.cgi?version=%%name%%&amp;product=
+  [%- product FILTER url_quote %][% END %]
 
 
 [% columns = [
        name => "name"
        heading => "Edit version..."
        contentlink => edit_contentlink
-     },
-     {
+     }
+   ]
+%]
+
+[% IF showbugcounts %]
+
+  [% columns.push({
+       name => "bug_count"
+       heading => "$terms.Bugs"
+       align => "right"
+       contentlink => bug_count_contentlink
+     })
+  %]
+
+[% END %]
+
+[% columns.push({
        heading => "Action"
        content => "Delete"
        contentlink => delete_contentlink
-     }
-   ]
+     })
 %]
 
 [% PROCESS admin/table.html.tmpl
 
 <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
   no_edit_other_versions_link = 1
  %]
index 621649cd2bc512582ba72bd6ddb7fef6a837f870..cba4bab4ee7cb1e64c2a3672a0689ef142d8b44e 100644 (file)
   # Copyright (C) 1998 Netscape Communications Corporation. All
   # Rights Reserved.
   #
-  # Contributor(s): Gavin Shelley (bugzilla@chimpychompy.org)
+  # Contributor(s): Gavin Shelley <bugzilla@chimpychompy.org>
+  #                 Frédéric Buclin <LpSolit@gmail.com>
   #
   #%]
 
 [%# INTERFACE:
-  # products: array of hashes having the following properties:
-  #   - name: string; The name of the product.
-  #   - description: string; The description of the product.
+  # products: array of product objects
+  # showbugcounts: if defined, then bug counts should be included in the table
   #%]
 
-[% USE Bugzilla %]
-[% cgi = Bugzilla.cgi %]
-
 [% PROCESS global/variables.none.tmpl %]
 
 [% PROCESS global/header.html.tmpl
   title = "Edit versions for which product?"
 %]
 
-[% bug_count_contentlink = BLOCK %]buglist.cgi?version=%%name%%&amp;product=
-  [%- product FILTER url_quote %][% END %]
-
 [% columns = [
      { 
        name => "name"
    ]
 %]
 
+[% IF showbugcounts %]
+
+  [% columns.push({
+      name => 'bug_count'
+      heading => "$terms.Bugs"
+      align => "right"
+      contentlink => "buglist.cgi?product=%%name%%"
+    })
+  %]
+
+[% END %]
+
 [% PROCESS admin/table.html.tmpl
      columns = columns
      data = products
 %]
 
+[% IF !showbugcounts %]
+  <p><a href="editversions.cgi?showbugcounts=1">
+      Redisplay table with [% terms.bug %] counts (slower)</a></p>
+[% END %]
+
 <p>
 
 [% PROCESS global/footer.html.tmpl %]
index bb45822606d766317954cef34e155a451d573e98..d03a772c47863ed8f465c9a429120ec74d617983 100644 (file)
   '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' => [
   'bug_count'
 ],