summaryrefslogtreecommitdiffstats
path: root/template/en/default/reports
diff options
context:
space:
mode:
authorgerv%gerv.net <>2003-06-26 08:22:50 +0200
committergerv%gerv.net <>2003-06-26 08:22:50 +0200
commit4f6b75a65628b0d86c760309dd81dd03f5c6d308 (patch)
tree5363459b06e75bc620ceab9dfd045b0f66b6c27c /template/en/default/reports
parentda6143f4aae6af35f60b8230b82f649b3b0cbd05 (diff)
downloadbugzilla-4f6b75a65628b0d86c760309dd81dd03f5c6d308.tar.gz
bugzilla-4f6b75a65628b0d86c760309dd81dd03f5c6d308.tar.xz
Bug 16009 - generic charting. Patch by gerv; r,a=justdave.
Diffstat (limited to 'template/en/default/reports')
-rw-r--r--template/en/default/reports/chart.csv.tmpl40
-rw-r--r--template/en/default/reports/chart.html.tmpl66
-rw-r--r--template/en/default/reports/chart.png.tmpl56
-rw-r--r--template/en/default/reports/create-chart.html.tmpl281
-rw-r--r--template/en/default/reports/edit-series.html.tmpl57
-rw-r--r--template/en/default/reports/menu.html.tmpl6
-rw-r--r--template/en/default/reports/series-common.html.tmpl117
-rw-r--r--template/en/default/reports/series.html.tmpl96
8 files changed, 718 insertions, 1 deletions
diff --git a/template/en/default/reports/chart.csv.tmpl b/template/en/default/reports/chart.csv.tmpl
new file mode 100644
index 000000000..83620bf08
--- /dev/null
+++ b/template/en/default/reports/chart.csv.tmpl
@@ -0,0 +1,40 @@
+[%# 1.0@bugzilla.org %]
+[%# The contents of this file are subject to the Mozilla Public
+ # License Version 1.1 (the "License"); you may not use this file
+ # except in compliance with the License. You may obtain a copy of
+ # the License at http://www.mozilla.org/MPL/
+ #
+ # Software distributed under the License is distributed on an "AS
+ # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ # implied. See the License for the specific language governing
+ # rights and limitations under the License.
+ #
+ # The Original Code is the Bugzilla Bug Tracking System.
+ #
+ # The Initial Developer of the Original Code is Netscape Communications
+ # Corporation. Portions created by Netscape are
+ # Copyright (C) 1998 Netscape Communications Corporation. All
+ # Rights Reserved.
+ #
+ # Contributor(s): Gervase Markham <gerv@gerv.net>
+ #%]
+
+[% data = chart.data %]
+Date\Series,
+[% FOREACH label = chart.labels %]
+ [% label FILTER csv %][% "," UNLESS loop.last %]
+[% END %]
+[%# The data, which is in the correct format for GD, is conceptually the wrong
+ # way round for CSV output. So, we need to invert it here, which is why
+ # these loops aren't just plain FOREACH.
+ #%]
+[% i = 0 %]
+[% WHILE i < data.0.size %]
+ [% j = 0 %]
+ [% WHILE j < data.size %]
+ [% data.$j.$i %][% "," UNLESS (j == data.size - 1) %]
+ [% j = j + 1 %]
+ [% END %]
+ [% i = i + 1 %]
+
+[% END %]
diff --git a/template/en/default/reports/chart.html.tmpl b/template/en/default/reports/chart.html.tmpl
new file mode 100644
index 000000000..95d52d725
--- /dev/null
+++ b/template/en/default/reports/chart.html.tmpl
@@ -0,0 +1,66 @@
+ <!-- 1.0@bugzilla.org -->
+[%# The contents of this file are subject to the Mozilla Public
+ # License Version 1.1 (the "License"); you may not use this file
+ # except in compliance with the License. You may obtain a copy of
+ # the License at http://www.mozilla.org/MPL/
+ #
+ # Software distributed under the License is distributed on an "AS
+ # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ # implied. See the License for the specific language governing
+ # rights and limitations under the License.
+ #
+ # The Original Code is the Bugzilla Bug Tracking System.
+ #
+ # The Initial Developer of the Original Code is Netscape Communications
+ # Corporation. Portions created by Netscape are
+ # Copyright (C) 1998 Netscape Communications Corporation. All
+ # Rights Reserved.
+ #
+ # Contributor(s): Gervase Markham <gerv@gerv.net>
+ #%]
+
+[%# INTERFACE:
+ #%]
+
+[% DEFAULT width = 600
+ height = 350
+%]
+
+[% PROCESS global/header.html.tmpl
+ title = "Chart"
+ h3 = time2str("%Y-%m-%d %H:%M:%S", time)
+%]
+
+<div align="center">
+
+ [% imageurl = BLOCK %]chart.cgi?
+ [% imagebase FILTER html %]&amp;ctype=png&amp;action=plot&amp;width=
+ [% width %]&amp;height=[% height -%]
+ [% END %]
+
+ <img alt="Graphical report results" src="[% imageurl %]"
+ width="[% width %]" height="[% height %]">
+ <p>
+ [% sizeurl = BLOCK %]chart.cgi?
+ [% imagebase FILTER html %]&amp;action=wrap
+ [% END %]
+ <a href="[% sizeurl %]&amp;width=[% width %]&amp;height=
+ [% height + 100 %]">Taller</a><br>
+ <a href="[% sizeurl %]&amp;width=[% width - 100 %]&amp;height=
+ [% height %]">Thinner</a> *
+ <a href="[% sizeurl %]&amp;width=[% width + 100 %]&amp;height=
+ [% height %]">Fatter</a>&nbsp;&nbsp;&nbsp;&nbsp;<br>
+ <a href="[% sizeurl %]&amp;width=[% width %]&amp;height=
+ [% height - 100 %]">Shorter</a><br>
+ </p>
+
+ <p>
+ <a href="chart.cgi?
+ [% imagebase FILTER html %]&amp;ctype=csv&amp;action=plot">CSV</a> |
+ <a href="chart.cgi?[% imagebase FILTER html %]&amp;action=assemble">Edit
+ this chart</a>
+ </p>
+
+</div>
+
+[% PROCESS global/footer.html.tmpl %]
diff --git a/template/en/default/reports/chart.png.tmpl b/template/en/default/reports/chart.png.tmpl
new file mode 100644
index 000000000..43d4e962d
--- /dev/null
+++ b/template/en/default/reports/chart.png.tmpl
@@ -0,0 +1,56 @@
+[%# 1.0@bugzilla.org %]
+[%# The contents of this file are subject to the Mozilla Public
+ # License Version 1.1 (the "License"); you may not use this file
+ # except in compliance with the License. You may obtain a copy of
+ # the License at http://www.mozilla.org/MPL/
+ #
+ # Software distributed under the License is distributed on an "AS
+ # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ # implied. See the License for the specific language governing
+ # rights and limitations under the License.
+ #
+ # The Original Code is the Bugzilla Bug Tracking System.
+ #
+ # The Initial Developer of the Original Code is Netscape Communications
+ # Corporation. Portions created by Netscape are
+ # Copyright (C) 1998 Netscape Communications Corporation. All
+ # Rights Reserved.
+ #
+ # Contributor(s): Gervase Markham <gerv@gerv.net>
+ #%]
+
+[% y_label = "Bugs" %]
+[% x_label = "Time" %]
+
+[% IF cumulate %]
+ [% USE graph = GD.Graph.area(width, height) %]
+ [% graph.set(cumulate => "true") %]
+[% ELSE %]
+ [% USE graph = GD.Graph.lines(width, height) %]
+[% END %]
+
+[% FILTER null;
+ x_label_skip = (30 * chart.data.0.size / width);
+
+ graph.set(x_label => x_label,
+ y_label => y_label,
+ y_tick_number => 8,
+ x_label_position => 0.5,
+ x_labels_vertical => 1,
+ x_label_skip => x_label_skip,
+ legend_placement => "RT",
+ line_width => 2);
+
+ # Workaround for the fact that set_legend won't take chart.labels directly,
+ # because chart.labels is an array reference rather than an array.
+ graph.set_legend(chart.labels.0, chart.labels.1, chart.labels.2,
+ chart.labels.3, chart.labels.4, chart.labels.5,
+ chart.labels.6, chart.labels.7, chart.labels.8,
+ chart.labels.9, chart.labels.10, chart.labels.11,
+ chart.labels.12, chart.labels.13, chart.labels.14,
+ chart.labels.15);
+
+ graph.plot(chart.data).png | stdout(1);
+ END;
+-%]
+
diff --git a/template/en/default/reports/create-chart.html.tmpl b/template/en/default/reports/create-chart.html.tmpl
new file mode 100644
index 000000000..fe0b4a76c
--- /dev/null
+++ b/template/en/default/reports/create-chart.html.tmpl
@@ -0,0 +1,281 @@
+<!-- 1.0@bugzilla.org -->
+[%# The contents of this file are subject to the Mozilla Public
+ # License Version 1.1 (the "License"); you may not use this file
+ # except in compliance with the License. You may obtain a copy of
+ # the License at http://www.mozilla.org/MPL/
+ #
+ # Software distributed under the License is distributed on an "AS
+ # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ # implied. See the License for the specific language governing
+ # rights and limitations under the License.
+ #
+ # The Original Code is the Bugzilla Bug Tracking System.
+ #
+ # The Initial Developer of the Original Code is Netscape Communications
+ # Corporation. Portions created by Netscape are
+ # Copyright (C) 1998 Netscape Communications Corporation. All
+ # Rights Reserved.
+ #
+ # Contributor(s): Gervase Markham <gerv@gerv.net>
+ #%]
+
+[%# INTERFACE:
+ # chart: Chart object representing the currently assembled chart.
+ # category: hash (keyed by category) of hashes (keyed by subcategory) of
+ # hashes (keyed by name), with value being the series_id of the
+ # series. Contains details of all series the user can see.
+ #%]
+
+[% PROCESS global/header.html.tmpl
+ title = "Create Chart"
+%]
+
+[% PROCESS "reports/series-common.html.tmpl"
+ donames = 1
+%]
+
+<script>
+[%# This function takes necessary action on selection of a subcategory %]
+function subcatSelected() {
+ var cat = document.chartform.category.value;
+ var subcat = document.chartform.subcategory.value;
+ var names = series[cat][subcat];
+
+ var namewidget = document.chartform.name;
+
+ namewidget.options.length = 0;
+ var i = 0;
+
+ for (x in names) {
+ namewidget.options[i] = new Option(x, names[x]);
+ i++;
+ }
+
+ namewidget.options[0].selected = true;
+
+ checkNewState();
+}
+</script>
+
+[% gttext = "Grand Total" %]
+
+<h3>Current Data Sets:</h3>
+
+<form method="get" action="chart.cgi" name="chartform">
+ [% IF chart.lines.size > 0 %]
+ <table border="0" cellspacing="2" cellpadding="2">
+ <tr>
+ <th>Select</th>
+ <th>As</th>
+ <th></th>
+ <th>Data Set</th>
+ <th>Subs</th>
+ <th></th>
+ </tr>
+
+ [%# The external loop has two counters; one which keeps track of where we
+ # are in the old labels array, and one which keeps track of the new
+ # indexes for the form elements. They are different if chart.lines has
+ # empty slots in it.
+ #%]
+ [% labelidx = 0 %]
+ [% newidx = 0 %]
+
+ [% FOREACH line = chart.lines %]
+ [% IF NOT line %]
+ [%# chart.lines has an empty slot, so chart.labels will too. We
+ # increment labelidx only to keep the labels in sync with the data.
+ #%]
+ [% labelidx = labelidx + 1 %]
+ [% NEXT %]
+ [% END %]
+
+ [% FOREACH series = line %]
+ <tr>
+ [% IF loop.first %]
+ <td align="center" rowspan="[% line.size %]">
+ <input type="checkbox" value="1" name="select[% newidx %]">
+ </td>
+ <td rowspan="[% line.size %]">
+ <input type="text" size="20" name="label[% newidx %]"
+ value="[% (chart.labels.$labelidx OR series.name)
+ FILTER html %]">
+ </td>
+ [% END %]
+
+ <td>
+ [% "{" IF line.size > 1 %]
+ </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>
+ [% IF series.creator != 0 %]
+ [% IF series.subscribed %]
+ <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.userid == series.creator OR UserInGroup("admin") %]
+ <a href="chart.cgi?action=edit&series_id=
+ [% series.series_id %]">Edit</a>
+ [% END %]
+ </td>
+ </tr>
+ [% END %]
+ [% labelidx = labelidx + 1 %]
+ [% newidx = newidx + 1 %]
+ [% END %]
+
+ [% IF chart.gt %]
+ <tr>
+ <td align="center">
+ <input type="checkbox" value="1" name="select65536">
+ <input type="hidden" value="1" name="gt">
+ </td>
+ <td>
+ <input type="text" size="20" name="labelgt"
+ value="[% (chart.labelgt OR gttext) FILTER html %]">
+ </td>
+ <td></td>
+ <td>
+ <i>[% gttext FILTER html %]</i>
+ </td>
+ <td></td>
+ <td></td>
+ </tr>
+ [% END %]
+ <tr>
+ <td colspan="6">&nbsp;</td>
+ </tr>
+
+ <tr>
+ <td valign="bottom" style="text-align: center;">
+ <input type="submit" name="action-sum" value="Sum"
+ style="width: 5em;"><br>
+ <input type="submit" name="action-remove" value="Remove"
+ style="width: 5em;">
+ </td>
+
+ <td style="text-align: right; vertical-align: bottom;">
+ <b>Cumulate:</b>
+ <input type="checkbox" name="cumulate" value="1">
+ </td>
+
+ <td></td>
+ <td valign="bottom">
+ <b>Date Range:</b>
+ <input type="text" size="12" name="datefrom"
+ value="[% time2str("%Y-%m-%d", chart.datefrom) IF chart.datefrom%]">
+ <b>to</b>
+ <input type="text" size="12" name="dateto"
+ 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;">
+ </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>
+
+ <td style="text-align: center; vertical-align: middle;">
+ <input type="submit" name="action-add" value="Add"
+ style="width: 3em;"><br>
+ </td>
+ </tr>
+ [% END %]
+ </table>
+
+ <script>
+ document.chartform.category[0].selected = true;
+ catSelected();
+ subcatSelected();
+ </script>
+</form>
+
+[% IF UserInGroup('editbugs') %]
+ <h3><a href="query.cgi?format=create-series">New Data Set</a></h3>
+[% END %]
+
+[% PROCESS global/footer.html.tmpl %]
diff --git a/template/en/default/reports/edit-series.html.tmpl b/template/en/default/reports/edit-series.html.tmpl
new file mode 100644
index 000000000..352e5fade
--- /dev/null
+++ b/template/en/default/reports/edit-series.html.tmpl
@@ -0,0 +1,57 @@
+<!-- 1.0@bugzilla.org -->
+[%# The contents of this file are subject to the Mozilla Public
+ # License Version 1.1 (the "License"); you may not use this file
+ # except in compliance with the License. You may obtain a copy of
+ # the License at http://www.mozilla.org/MPL/
+ #
+ # Software distributed under the License is distributed on an "AS
+ # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ # implied. See the License for the specific language governing
+ # rights and limitations under the License.
+ #
+ # The Original Code is the Bugzilla Bug Tracking System.
+ #
+ # The Initial Developer of the Original Code is Netscape Communications
+ # Corporation. Portions created by Netscape are
+ # Copyright (C) 1998 Netscape Communications Corporation. All
+ # Rights Reserved.
+ #
+ # Contributor(s): Gervase Markham <gerv@gerv.net>
+ #%]
+
+[% title = "Edit Series" %]
+[% h2 = BLOCK %]
+ [% default.category FILTER html %] /
+ [%+ default.subcategory FILTER html %] /
+ [%+ default.name FILTER html %]
+[% END %]
+
+[% PROCESS global/header.html.tmpl %]
+
+<form method="get" action="chart.cgi" name="chartform">
+
+ [% button_name = "Change" %]
+
+ [% PROCESS reports/series.html.tmpl %]
+
+ [% IF default.series_id %]
+ <input type="hidden" name="series_id" value="[% default.series_id %]">
+ [% END %]
+</form>
+
+<p>
+ <b>Creator</b>: <a href="mailto:[% creator.email FILTER html %]">
+ [% creator.email FILTER html %]</a>
+</p>
+
+<p>
+ <a href="query.cgi?[% default.query FILTER html%]">View
+ series search parameters</a> |
+ <a href="buglist.cgi?cmdtype=dorem&amp;namedcmd=
+ [% default.category FILTER html %]-
+ [% default.subcategory FILTER html %]-
+ [% default.name FILTER html %]&amp;remaction=runseries&amp;series_id=
+ [% default.series_id %]">Run series search</a>
+</p>
+
+[% PROCESS global/footer.html.tmpl %]
diff --git a/template/en/default/reports/menu.html.tmpl b/template/en/default/reports/menu.html.tmpl
index 4e21bf4d6..f28f1f697 100644
--- a/template/en/default/reports/menu.html.tmpl
+++ b/template/en/default/reports/menu.html.tmpl
@@ -58,10 +58,14 @@
<ul>
<li>
- <strong><a href="reports.cgi">Charts</a></strong> -
+ <strong><a href="reports.cgi">Old Charts</a></strong> -
plot the status and/or resolution of bugs against
time, for each product in your database.
</li>
+ <li>
+ <strong><a href="chart.cgi">New Charts</a></strong> -
+ plot any arbitrary search against time. Far more powerful.
+ </li>
</ul>
[% PROCESS global/footer.html.tmpl %]
diff --git a/template/en/default/reports/series-common.html.tmpl b/template/en/default/reports/series-common.html.tmpl
new file mode 100644
index 000000000..7fa34c6ec
--- /dev/null
+++ b/template/en/default/reports/series-common.html.tmpl
@@ -0,0 +1,117 @@
+<!-- 1.0@bugzilla.org -->
+[%# The contents of this file are subject to the Mozilla Public
+ # License Version 1.1 (the "License"); you may not use this file
+ # except in compliance with the License. You may obtain a copy of
+ # the License at http://www.mozilla.org/MPL/
+ #
+ # Software distributed under the License is distributed on an "AS
+ # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ # implied. See the License for the specific language governing
+ # rights and limitations under the License.
+ #
+ # The Original Code is the Bugzilla Bug Tracking System.
+ #
+ # The Initial Developer of the Original Code is Netscape Communications
+ # Corporation. Portions created by Netscape are
+ # Copyright (C) 1998 Netscape Communications Corporation. All
+ # Rights Reserved.
+ #
+ # Contributor(s): Gervase Markham <gerv@gerv.net>
+ #%]
+
+[%# INTERFACE:
+ # donames: boolean. True if we have a multi-select for names as well as
+ # categories and subcategories.
+ # category: hash (keyed by category) of hashes (keyed by subcategory) of
+ # hashes (keyed by name), with value being the series_id of the
+ # series. Contains details of all series the user can see.
+ #%]
+
+[% subcategory = category.${default.category} %]
+[% name = subcategory.${default.subcategory} %]
+
+<script>
+[%# This structure holds details of the series the user can select from. %]
+var series = {
+[% FOREACH c = category.keys.sort %]
+ "[%+ c FILTER js %]" : {
+ [% FOREACH s = category.$c.keys.sort %]
+ "[%+ s FILTER js %]" : {
+ [% IF donames %]
+ [% FOREACH n = category.$c.$s.keys.sort %]
+ "[% n FILTER js %]":
+ [% category.$c.$s.$n FILTER js %][% ", " UNLESS loop.last %]
+ [% END %]
+ [% END %]
+ }[% ", " UNLESS loop.last %]
+ [% END %]
+ }[% ", " UNLESS loop.last %]
+[% END %]
+};
+
+[%# Should attempt to preserve selection across invocations @@@ %]
+[%# This function takes necessary action on selection of a category %]
+function catSelected() {
+ var cat = document.chartform.category.value;
+ var subcats = series[cat];
+
+ var subcatwidget = document.chartform.subcategory;
+
+ subcatwidget.options.length = 0;
+ var i = 0;
+
+ for (x in subcats) {
+ subcatwidget.options[i] = new Option(x, x);
+ i++;
+ }
+
+ [% IF newtext %]
+ subcatwidget.options[i] = new Option("[% newtext FILTER js %]", "");
+ [% END %]
+
+ subcatwidget.options[0].selected = true;
+
+ if (document.chartform.action[1]) {
+ [%# On the query form, select the right radio button. %]
+ document.chartform.action[1].checked = true;
+ }
+
+ checkNewState();
+}
+
+[%# This function updates the disabled state of the two "new" textboxes %]
+function checkNewState() {
+ var fm = document.chartform;
+ if (fm.newcategory) {
+ fm.newcategory.disabled =
+ (fm.category.value != "" ||
+ fm.action[1] && fm.action[1].checked == false);
+ fm.newsubcategory.disabled =
+ (fm.subcategory.value != "" ||
+ fm.action[1] && fm.action[1].checked == false);
+ }
+}
+</script>
+
+[%###########################################################################%]
+[%# Block for SELECT fields - pinched from search/form.html.tmpl #%]
+[%###########################################################################%]
+
+[% BLOCK series_select %]
+ <td align="left">
+ <label for="[% sel.name %]" accesskey="[% sel.accesskey %]">
+ <select name="[% sel.name %]" id="[% sel.name %]"
+ size="[% sel.size %]" style="width: 15em"
+ [%+ "onchange='$sel.onchange'" IF sel.onchange %]>
+ [% FOREACH x = ${sel.name}.keys.sort %]
+ <option value="[% x FILTER html %]"
+ [% " selected" IF default.${sel.name} == x %]>
+ [% x FILTER html %]</option>
+ [% END %]
+ [% IF newtext %]
+ <option value="">[% newtext FILTER html %]</option>
+ [% END %]
+ </select>
+ </label>
+ </td>
+[% END %]
diff --git a/template/en/default/reports/series.html.tmpl b/template/en/default/reports/series.html.tmpl
new file mode 100644
index 000000000..a1474a1cf
--- /dev/null
+++ b/template/en/default/reports/series.html.tmpl
@@ -0,0 +1,96 @@
+<!-- 1.0@bugzilla.org -->
+[%# The contents of this file are subject to the Mozilla Public
+ # License Version 1.1 (the "License"); you may not use this file
+ # except in compliance with the License. You may obtain a copy of
+ # the License at http://www.mozilla.org/MPL/
+ #
+ # Software distributed under the License is distributed on an "AS
+ # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ # implied. See the License for the specific language governing
+ # rights and limitations under the License.
+ #
+ # The Original Code is the Bugzilla Bug Tracking System.
+ #
+ # The Initial Developer of the Original Code is Netscape Communications
+ # Corporation. Portions created by Netscape are
+ # Copyright (C) 1998 Netscape Communications Corporation. All
+ # Rights Reserved.
+ #
+ # Contributor(s): Gervase Markham <gerv@gerv.net>
+ #%]
+
+[%# INTERFACE:
+ # default: hash. Defaults for category, subcategory, name etc.
+ # button_name: string. What the button will say.
+ # category: hash (keyed by category) of hashes (keyed by subcategory) of
+ # hashes (keyed by name), with value being the series_id of the
+ # series. Contains details of all series the user can see.
+ #%]
+
+[% PROCESS "reports/series-common.html.tmpl"
+ newtext = "New (name below)"
+ %]
+
+<table cellpadding="2" cellspacing="2" border="0"
+ style="text-align: left; margin-left: 20px">
+ <tbody>
+ <tr>
+ <th>Category:</th>
+ <noscript><th></th></noscript>
+ <th>Sub-category:</th>
+ <th>Name:</th>
+ <td></td>
+ </tr>
+ <tr>
+ [% PROCESS series_select sel = { name => 'category',
+ size => 5,
+ onchange => "catSelected()" } %]
+ <noscript>
+ <td>
+ <input type="submit" name="action-edit" value="Update -->">
+ </td>
+ </noscript>
+
+ [% PROCESS series_select sel = { name => 'subcategory',
+ size => 5,
+ onchange => "checkNewState()" } %]
+
+ <td valign="top" name="name">
+ <input type="text" name="name" maxlength="64"
+ value="[% default.name.0 FILTER html %]" size="25">
+ </td>
+
+ <td valign="top">
+ <span style="font-weight: bold;">Run every</span> &nbsp;
+ <input type="text" size="2" name="frequency"
+ value="[% (default.frequency.0 OR 7) FILTER html %]">
+ <span style="font-weight: bold;">&nbsp;day(s)</span><br>
+ [% IF UserInGroup('admin') %]
+ <input type="checkbox" name="public"
+ [% "checked='checked'" IF default.public.0 %]>
+ <span style="font-weight: bold;">Visible to all</span>
+ [% END %]
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <input type="text" style="width: 100%" name="newcategory"
+ maxlength="64" value="[% default.newcategory.0 FILTER html %]">
+ </td>
+ <noscript><td></td></noscript>
+ <td>
+ <input type="text" style="width: 100%" name="newsubcategory"
+ maxlength="64"
+ value="[% default.newsubcategory.0 FILTER html %]">
+ </td>
+ <td></td>
+ <td>
+ <input type="submit" value="[% button_name FILTER html %]">
+ </td>
+ </tbody>
+</table>
+
+<script>
+ checkNewState();
+</script>