1
[%# 1.0@bugzilla.org %]
2
[%# The contents of this file are subject to the Mozilla Public
3
# License Version 1.1 (the "License"); you may not use this file
4
# except in compliance with the License. You may obtain a copy of
5
# the License at http://www.mozilla.org/MPL/
7
# Software distributed under the License is distributed on an "AS
8
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
9
# implied. See the License for the specific language governing
10
# rights and limitations under the License.
12
# The Original Code is the Bugzilla Bug Tracking System.
14
# The Initial Developer of the Original Code is Netscape Communications
15
# Corporation. Portions created by Netscape are
16
# Copyright (C) 1998 Netscape Communications Corporation. All
19
# Contributor(s): Gervase Markham <gerv@gerv.net>
23
# chart: Chart object representing the currently assembled chart.
24
# category: hash (keyed by category) of hashes (keyed by subcategory) of
25
# hashes (keyed by name), with value being the series_id of the
26
# series. Contains details of all series the user can see.
29
[% PROCESS global/header.html.tmpl
30
title = "Create Chart"
33
[% PROCESS "reports/series-common.html.tmpl"
37
<script language="JavaScript" type="text/javascript">
38
[%# This function takes necessary action on selection of a subcategory %]
39
function subcatSelected() {
40
var cat = document.chartform.category.value;
41
var subcat = document.chartform.subcategory.value;
42
var names = series[cat][subcat];
44
var namewidget = document.chartform.name;
46
namewidget.options.length = 0;
50
namewidget.options[i] = new Option(x, names[x]);
54
namewidget.options[0].selected = true;
60
[% gttext = "Grand Total" %]
62
<form method="get" action="chart.cgi" name="chartform">
64
<table cellpadding="2" cellspacing="2" border="0">
65
[% IF NOT category OR category.size == 0 %]
68
<i>No data sets exist, or none are visible to you.</i>
75
<th>Sub-category:</th>
83
[% PROCESS series_select sel = { name => 'category',
85
onchange = "catSelected();
86
subcatSelected();" } %]
90
<input type="submit" name="action-assemble" value="Update -->">
94
[% PROCESS series_select sel = { name => 'subcategory',
96
onchange = "subcatSelected()" } %]
100
<input type="submit" name="action-assemble" value="Update -->">
105
<label for="name" accesskey="N">
106
<select name="name" id="name" style="width: 15em"
107
size="5" multiple="multiple"
108
[%+ "disabled=\"disabled\"" UNLESS name.keys.size %]>
109
[% FOREACH x = name.keys.sort %]
110
<option value="[% name.$x FILTER html %]">
111
[% x FILTER html %]</option>
113
[% UNLESS name.keys.size %]
114
<option value="" disabled="disabled"></option>
120
<td align="center" valign="middle">
121
<input type="submit" name="action-add" value="Add To List"><br>
127
<script language="JavaScript" type="text/javascript">
128
document.chartform.category[0].selected = true;
129
document.chartform.subcategory.disabled = '';
130
document.chartform.name.disabled = '';
135
<h3>List Of Data Sets To Plot</h3>
137
[% IF chart.lines.size > 0 %]
138
<table cellspacing="2" cellpadding="2">
140
<th style="width: 5em;">Select</th>
147
[%# The external loop has two counters; one which keeps track of where we
148
# are in the old labels array, and one which keeps track of the new
149
# indexes for the form elements. They are different if chart.lines has
155
[% FOREACH line = chart.lines %]
157
[%# chart.lines has an empty slot, so chart.labels will too. We
158
# increment labelidx only to keep the labels in sync with the data.
160
[% labelidx = labelidx + 1 %]
164
[% FOREACH series = line %]
167
<td align="center" rowspan="[% line.size %]">
168
<input type="checkbox" value="1" name="select[% newidx %]">
170
<td rowspan="[% line.size %]">
171
<input type="text" size="20" name="label[% newidx %]"
172
value="[% (chart.labels.$labelidx OR series.name)
178
[% "{" IF line.size > 1 %]
182
[% series.category FILTER html %] /
183
[%+ series.subcategory FILTER html %] /
184
[%+ series.name FILTER html %]
185
<input type="hidden" name="line[% newidx %]"
186
value="[% series.series_id %]">
190
[% IF user.id == series.creator OR UserInGroup("admin") %]
191
<a href="chart.cgi?action=edit&series_id=
192
[% series.series_id %]">Edit</a> |
194
<a href="buglist.cgi?cmdtype=dorem&namedcmd=
195
[% series.category FILTER url_quote %]%20/%20
196
[% series.subcategory FILTER url_quote %]%20/%20
197
[% series.name FILTER url_quote -%]&series_id=
198
[% series.series_id %]&remaction=runseries">Run Search</a>
202
[% labelidx = labelidx + 1 %]
203
[% newidx = newidx + 1 %]
209
<input type="checkbox" value="1" name="select65536">
210
<input type="hidden" value="1" name="gt">
213
<input type="text" size="20" name="labelgt"
214
value="[% (chart.labelgt OR gttext) FILTER html %]">
218
<i>[% gttext FILTER html %]</i>
224
<td colspan="6"> </td>
228
<td valign="bottom" style="text-align: center;">
229
<input type="submit" name="action-sum" value="Sum"
230
style="width: 5em;"><br>
231
<input type="submit" name="action-remove" value="Remove"
235
<td style="text-align: right; vertical-align: bottom;">
237
<input type="checkbox" name="cumulate" value="1"
238
[% " checked" IF chart.cumulate %]>
244
<input type="text" size="12" name="datefrom"
245
value="[% time2str("%Y-%m-%d", chart.datefrom) IF chart.datefrom%]">
247
<input type="text" size="12" name="dateto"
248
value="[% time2str("%Y-%m-%d", chart.dateto) IF chart.dateto %]">
251
<td style="text-align: right" valign="bottom">
252
<input type="submit" name="action-wrap" value="Chart This List">
261
[% IF UserInGroup('editbugs') %]
262
<h3><a href="query.cgi?format=create-series">Create New Data Set</a></h3>
265
[% PROCESS global/footer.html.tmpl %]