]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 231391 - make "cumulate" option work on new charts, together with a few UI tweaks...
authorgerv%gerv.net <>
Thu, 22 Jan 2004 08:02:25 +0000 (08:02 +0000)
committergerv%gerv.net <>
Thu, 22 Jan 2004 08:02:25 +0000 (08:02 +0000)
Bugzilla/Chart.pm
buglist.cgi
template/en/default/reports/chart.png.tmpl
template/en/default/reports/create-chart.html.tmpl

index 8d3d9f643d123b4a91365325f2c2d500bc704e3b..42827750fbcb32b46bd1658f646afd95549c2530 100644 (file)
@@ -89,6 +89,9 @@ sub init {
     $self->{'datefrom'} = $cgi->param('datefrom');
     $self->{'dateto'}   = $cgi->param('dateto');
     
+    # If we are cumulating, a grand total makes no sense
+    $self->{'gt'} = 0 if $self->{'cumulate'};
+    
     # Make sure the dates are ones we are able to interpret
     foreach my $date ('datefrom', 'dateto') {
         if ($self->{$date}) {
index b822968c3247fe4f93dcdf3067ca682f59fd10be..116e2ea757292fecfe9af48abd5beecdf3ce4dba 100755 (executable)
@@ -280,7 +280,7 @@ if ($::FORM{'cmdtype'} eq "dorem") {
     }
     elsif ($::FORM{'remaction'} eq "runseries") {
         $::buffer = LookupSeries($::FORM{"series_id"});
-        $vars->{'title'} = "Bug List: $::FORM{'namedcmd'}";
+        $vars->{'searchname'} = $::FORM{'namedcmd'};
         $params = new Bugzilla::CGI($::buffer);
         $order = $params->param('order') || $order;
     }
index 43d4e962dfbfbcf8accadeae8c812b252bcb4f3f..18452175cb830b306104ac5011843c7449a6f740 100644 (file)
@@ -22,7 +22,7 @@
 [% y_label = "Bugs" %]
 [% x_label = "Time" %]
 
-[% IF cumulate %]
+[% IF chart.cumulate %]
   [% USE graph = GD.Graph.area(width, height) %]
   [% graph.set(cumulate => "true") %]
 [% ELSE %]
index 2751c7eeddf97b851929ab8356e8d67bcfdc9cb7..0879d8ec6f5ee0bdb2d42feb40a08d1b42787274 100644 (file)
@@ -139,11 +139,11 @@ function subcatSelected() {
   [% IF chart.lines.size > 0 %]
     <table cellspacing="2" cellpadding="2">
       <tr>
-        <th>Select</th>
+        <th style="width: 5em;">Select</th>
         <th>Label</th>
         <th></th>
         <th>Data Set</th>
-        <th>Subs</th>
+        <th></th>
         <th></th>
       </tr>
       
@@ -182,34 +182,35 @@ function subcatSelected() {
             </td>
 
             <td>
-              <a href="buglist.cgi?cmdtype=dorem&amp;namedcmd=
-                [% series.category FILTER html %]-
-                [% series.subcategory FILTER html %]-
-                [% series.name FILTER html -%]&amp;series_id=
-                [% series.series_id %]&amp;remaction=runseries">
               [% series.category FILTER html %] / 
               [%+ series.subcategory FILTER html %] /
               [%+ series.name FILTER html %]
-              </a>
               <input type="hidden" name="line[% newidx %]" 
                      value="[% series.series_id %]">
             </td>
 
             <td align="center">
-              [% IF series.creator != 0 AND series.isSubscribed(user.id) %]
-                <input type="submit" value="Unsubscribe" style="width: 12ex;"
-                       name="action-unsubscribe[% series.series_id %]">
-              [% ELSE %]
-                <input type="submit" value="Subscribe" style="width: 12ex;"
-                       name="action-subscribe[% series.series_id %]">
+              [% IF series.creator != 0 %]
+                [% IF series.isSubscribed(user.id) %]
+                  <input type="submit" value="Unsubscribe" style="width: 12ex;"
+                         name="action-unsubscribe[% series.series_id %]">
+                [% ELSE %]
+                  <input type="submit" value="Subscribe" style="width: 12ex;"
+                         name="action-subscribe[% series.series_id %]">
+                [% END %]
               [% END %]
             </td>
 
             <td align="center">
               [% IF user.id == series.creator OR UserInGroup("admin") %]
                <a href="chart.cgi?action=edit&series_id=
-                       [% series.series_id %]">Edit</a>
+                       [% series.series_id %]">Edit</a> |
               [% END %]
+              <a href="buglist.cgi?cmdtype=dorem&amp;namedcmd=
+                [% series.category FILTER html %]%20/%20
+                [% series.subcategory FILTER html %]%20/%20
+                [% series.name FILTER html -%]&amp;series_id=
+                [% series.series_id %]&amp;remaction=runseries">Run Search</a>
             </td>        
           </tr>
         [% END %]
@@ -249,7 +250,8 @@ function subcatSelected() {
 
         <td style="text-align: right; vertical-align: bottom;">
           <b>Cumulate:</b> 
-          <input type="checkbox" name="cumulate" value="1">
+          <input type="checkbox" name="cumulate" value="1"
+          [% " checked" IF chart.cumulate %]>
         </td>
 
         <td></td>