]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 218568 - Clean up charting UI. Having played with it for a bit, it needed work...
authorgerv%gerv.net <>
Mon, 8 Dec 2003 06:41:53 +0000 (06:41 +0000)
committergerv%gerv.net <>
Mon, 8 Dec 2003 06:41:53 +0000 (06:41 +0000)
template/en/default/reports/create-chart.html.tmpl
template/en/default/reports/edit-series.html.tmpl
template/en/default/reports/series.html.tmpl
template/en/default/search/form.html.tmpl
template/en/default/search/search-create-series.html.tmpl

index 441bd9b0638f86b8c276dbb60b4c91ef6028a169..9d187fb60d2f980962f7138151b684d45f465597 100644 (file)
@@ -34,7 +34,7 @@
   donames = 1 
 %]
 
-<script>
+<script language="JavaScript" type="text/javascript">
 [%# This function takes necessary action on selection of a subcategory %]
 function subcatSelected() {
   var cat = document.chartform.category.value;
@@ -59,14 +59,88 @@ function subcatSelected() {
   
 [% gttext = "Grand Total" %]
 
-<h3>Current Data Sets:</h3>
+<form method="get" action="chart.cgi" name="chartform">  
+  <p>
+    <span style="color: red">
+      Note: this new charting system is in beta. This means that retention of
+      data or defined data sets is on a best-efforts basis only, and cannot be
+      guaranteed. Please file any bugs you find or enhancement ideas you think
+      of.
+    </span>
+  </p>
+  
+  <table cellpadding="2" cellspacing="2" border="0">
+    [% IF NOT category OR category.size == 0 %]
+      <tr>
+        <td>
+          <i>No data sets exist, or none are visible to you.</i>
+        </td>
+      </tr>
+    [% ELSE %]
+      <tr>
+        <th>Category:</th>
+        <noscript><th></th></noscript>
+        <th>Sub-category:</th>
+        <noscript><th></th></noscript>
+        <th>Name:</th>
+        <th><br>
+        </th>
+      </tr>
+      <tr>
+      
+        [% PROCESS series_select sel = { name => 'category', 
+                                         size => 5,
+                                         onchange = "catSelected();
+                                                     subcatSelected();" } %]
+                                   
+        <noscript>
+          <td>
+            <input type="submit" name="action-assemble" value="Update --&gt;">
+          </td>
+        </noscript>
+        
+        [% PROCESS series_select sel = { name => 'subcategory', 
+                                         size => 5,
+                                         onchange = "subcatSelected()" } %]
+                                   
+        <noscript>
+          <td>
+            <input type="submit" name="action-assemble" value="Update --%gt;">
+          </td>
+        </noscript>
+        
+        <td align="left">
+          <label for="name" accesskey="N">
+            <select name="name" id="name" style="width: 15em"
+                    size="5" multiple="multiple"
+              [% FOREACH x = name.keys.sort %]
+                <option value="[% name.$x FILTER html %]">
+                  [% x FILTER html %]</option>
+              [% END %]
+            </select>
+          </label>
+        </td>
+
+        <td align="center" valign="middle"> 
+          <input type="submit" name="action-add" value="Add To List"><br>
+        </td>
+      </tr>
+    [% END %]
+  </table>
+
+  <script language="JavaScript" type="text/javascript">
+    document.chartform.category[0].selected = true;
+    catSelected();
+    subcatSelected();
+  </script>
+
+  <h3>List Of Data Sets To Plot</h3>
 
-<form method="get" action="chart.cgi" name="chartform">
   [% IF chart.lines.size > 0 %]
-    <table border="0" cellspacing="2" cellpadding="2">
+    <table cellspacing="2" cellpadding="2">
       <tr>
         <th>Select</th>
-        <th>As</th>
+        <th>Label</th>
         <th></th>
         <th>Data Set</th>
         <th>Subs</th>
@@ -121,15 +195,13 @@ function subcatSelected() {
                      value="[% series.series_id %]">
             </td>
 
-            <td>
-              [% 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 %]
+            <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 %]">
               [% END %]
             </td>
 
@@ -181,7 +253,7 @@ function subcatSelected() {
         </td>
 
         <td></td>
-        <td valign="bottom"> 
+        <td valign="bottom" colspan="2"
           <b>Date Range:</b> 
           <input type="text" size="12" name="datefrom" 
             value="[% time2str("%Y-%m-%d", chart.datefrom) IF chart.datefrom%]">
@@ -190,92 +262,33 @@ function subcatSelected() {
             value="[% time2str("%Y-%m-%d", chart.dateto) IF chart.dateto %]">
         </td>
 
-        <td valign="bottom">
-        </td>
-
         <td style="text-align: right" valign="bottom">
-          <input type="submit" name="action-wrap" value="Chart"
-                 style="width: 5em;">
+          <input type="submit" name="action-wrap" value="Chart This List">
         </td>
       </tr>
     </table>
   [% ELSE %]
   <p><i>None</i></p>
-  [% END %]
-  
-<h3>Select Data Sets:</h3>
-
-  <table cellpadding="2" cellspacing="2" border="0">
-    [% IF NOT category OR category.size == 0 %]
-      <tr>
-        <td>
-          <i>You do not have permissions to see any data sets, or none
-             exist.</i>
-        </td>
-      </tr>
-    [% ELSE %]
-      <tr>
-        <th>Category:</th>
-        <noscript><th></th></noscript>
-        <th>Sub-category:</th>
-        <noscript><th></th></noscript>
-        <th>Name:</th>
-        <th><br>
-        </th>
-      </tr>
-      <tr>
-      
-        [% PROCESS series_select sel = { name => 'category', 
-                                         size => 5,
-                                         onchange = "catSelected();
-                                                     subcatSelected();" } %]
-                                   
-        <noscript>
-          <td>
-            <input type="submit" name="action-assemble" value="Update -->">
-          </td>
-        </noscript>
-        
-        [% PROCESS series_select sel = { name => 'subcategory', 
-                                         size => 5,
-                                         onchange = "subcatSelected()" } %]
-                                   
-        <noscript>
-          <td>
-            <input type="submit" name="action-assemble" value="Update -->">
-          </td>
-        </noscript>
-        
-        <td align="left">
-          <label for="name" accesskey="N">
-            <select name="name" id="name" style="width: 15em"
-                    size="5" multiple="multiple"
-              [% FOREACH x = name.keys.sort %]
-                <option value="[% name.$x FILTER html %]"
-                  [%# " selected" IF lsearch(default.name, x) != -1 %]>
-                  [% x FILTER html %]</option>
-              [% END %]
-            </select>
-          </label>
-        </td>
+  [% END %]  
+</form>
 
-        <td style="text-align: center; vertical-align: middle;"> 
-          <input type="submit" name="action-add" value="Add" 
-                 style="width: 3em;"><br>
-        </td>
-      </tr>
-    [% END %]
-  </table>
+<h4>How Subscriptions Work</h4>
 
-  <script>
-    document.chartform.category[0].selected = true;
-    catSelected();
-    subcatSelected();
-  </script>
-</form>
+<p>
+Administrators may mark data sets as public, which then show up in everyone's
+list. All others are not public, and you must explicitly subscribe to them in
+order for them to appear in your list.
+</p>
 
+<p>
+When you 
 [% IF UserInGroup('editbugs') %]
-  <h3><a href="query.cgi?format=create-series">New Data Set</a></h3>
-[% END %]
+  <a href="query.cgi?format=create-series">create a new data set</a>,
+[% ELSE %]
+  create a new data set,
+[% END %]                 
+you are automatically subscribed to it. When the last person unsubscribes 
+from a data set, data stops being collected.
+</p>
 
 [% PROCESS global/footer.html.tmpl %]
index 352e5fade54e44e2b0a1cee39545126a7cbb4888..201c26a2f47b99757617a17a3e4e63f491a41d34 100644 (file)
@@ -33,6 +33,7 @@
   [% button_name = "Change" %]
 
   [% PROCESS reports/series.html.tmpl %]
+  <input type="hidden" name="action-alter" value="1">
   
   [% IF default.series_id %]
     <input type="hidden" name="series_id" value="[% default.series_id %]">
 </form>
 
 <p>
-  <b>Creator</b>: <a href="mailto:[% creator.email FILTER html %]">
-  [% creator.email FILTER html %]</a>
+  <b>Creator</b>: 
+  [% IF creator.email %]
+    <a href="mailto:[% creator.email FILTER html %]">
+    [% creator.email FILTER html %]</a>
+  [% ELSE %]
+    (automatically created by [% terms.Bugzilla %])
+  [% END %]
 </p>
 
 <p>
index a1474a1cf6317e6d55b7ad9b0579cb2e9111ae17..6a7730045c745a3a24199514c08f88a4f2c5c180 100644 (file)
       </td>
       <td></td>
       <td>
-      <input type="submit" value="[% button_name FILTER html %]">
-    </td>
+        <input type="submit" name="action-create" value="Create Data Set">
+      </td>
+    </tr>
   </tbody>
 </table>
 
-<script>
+<script language="JavaScript" type="text/javascript">
+  document.chartform.category[0].selected = true;
+  catSelected();
   checkNewState();
 </script>
index c33b2f0bd02f15e84839412c7b56712fd0a8efb4..b01765470623b252313423a193e95380eac9a22b 100644 (file)
@@ -352,7 +352,9 @@ function selectProduct(f) {
              value="[% default.short_desc.0 FILTER html %]">
     </td>
     <td>
-      <input type="submit" value="[% button_name FILTER html %]">
+      [% IF button_name %]
+        <input type="submit" value="[% button_name FILTER html %]">
+      [% END %]
     </td>
   </tr>
 
index 83aa5a912b8ecd95063b98b5571aa264b306074e..a1a1ec312179990d0681db51f1ace829597cf2b0 100644 (file)
   onload = "selectProduct(document.forms['chartform']);"
 %]
 
-[% button_name = "I'm Feeling Buggy" %]
-
 <form method="get" action="chart.cgi" name="chartform">
   
 [% PROCESS search/form.html.tmpl %]
 
-<table>
-  <tr>
-    <td>
-      <input type="radio" id="action-search"
-             name="action" value="search" checked="checked">
-      <label for="action-search">Run this search</label></td>
-  </tr>
-
-  <tr>
-    <td>
-      <input type="radio" id="action-create" name="action" value="create">
-      <label for="action-create">
-        Start recording [% terms.bug %] count data for this search, as follows:
-      </label>
-      <br>
+<p>
+  <input type="submit" name="action-search" value="Run Search">
+  to see which bugs would be included in this series.
+</p>
+    
+<h3>Data Set Parameters</h3>
       
-      [% INCLUDE reports/series.html.tmpl %]
+[% INCLUDE reports/series.html.tmpl %]
       
-    </td>
-  </tr>
-</table>
-
 <hr>
 
 [% PROCESS "search/boolean-charts.html.tmpl" %]