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>
20
# <rdean@cambianetworks.com>
24
# buglistbase: The base query for this table, in URL form
25
# col_field: string. Name of the field being plotted as columns.
26
# row_field: string. Name of the field being plotted as rows.
27
# tbl_field: string. Name of the field being plotted as tables.
28
# col_names: array. List of values for the field being plotted as columns.
29
# row_names: array. List of values for the field being plotted as rows.
30
# data: <depends on format>. Data to plot. Only data.$tbl is accessed.
31
# tbl: Name of a hash in data which is the table to be plotted.
34
[% PROCESS "global/field-descs.none.tmpl" %]
36
[% col_field_disp = field_descs.$col_field || col_field %]
37
[% row_field_disp = field_descs.$row_field || row_field %]
39
[% IF tbl == "-total-" %]
40
[% urlbase = BLOCK %]buglist.cgi?[% buglistbase %]
41
[% "&$tbl_vals" IF tbl_vals %][% END %]
43
[% urlbase = BLOCK %]buglist.cgi?[% buglistbase %]&
44
[% tbl_field FILTER url_quote %]=[% tbl FILTER url_quote %][% END %]
53
<h2>[% tbl_disp FILTER html %]</h2>
61
<strong>[% col_field_disp FILTER html %]</strong>
67
<strong>[% row_field_disp FILTER html %]</strong>
72
[% classes = [ [ "t1", "t2" ] , [ "t3", "t4" ] ] %]
80
<td class="[% classes.$row_idx.$col_idx %]">
82
[% FOREACH col = col_names %]
83
[% col_totals.$col = 0 %]
84
[% NEXT IF col == "" %]
86
[% col_idx = 1 - col_idx %]
87
<td class="[% classes.$row_idx.$col_idx %]">
88
[% col FILTER html FILTER replace('^ $',' ') %]
97
[% FOREACH row = row_names %]
100
[% row_idx = 1 - row_idx %]
102
<td class="[% classes.$row_idx.$col_idx %]" align="right">
103
[% row FILTER html FILTER replace('^ $',' ') %]
105
[% FOREACH col = col_names %]
106
[% row_total = row_total + data.$tbl.$col.$row %]
107
[% NEXT IF col == "" %]
108
[% col_totals.$col = col_totals.$col + data.$tbl.$col.$row %]
110
[% col_idx = 1 - col_idx %]
111
<td class="[% classes.$row_idx.$col_idx %]" align="center">
112
[% IF data.$tbl.$col.$row AND data.$tbl.$col.$row > 0 %]
113
<a href="[% urlbase %]&
114
[% row_field FILTER url_quote %]=[% row FILTER url_quote %]&
115
[% col_field FILTER url_quote %]=[% col FILTER url_quote %]">
116
[% data.$tbl.$col.$row %]</a>
122
<td class="ttotal" align="right">
123
<a href="[% urlbase %]&
124
[% row_field FILTER url_quote %]=[% row FILTER url_quote %]
125
[% "&$col_vals" IF col_vals %]">
127
[% grand_total = grand_total + row_total %]
133
[% row_idx = 1 - row_idx %]
137
[% FOREACH col = col_names %]
138
[% NEXT IF col == "" %]
140
<td class="ttotal" align="center">
141
<a href="[% urlbase %]&
142
[% col_field FILTER url_quote %]=[% col FILTER url_quote %]
143
[% "&$row_vals" IF row_vals %]">
144
[% col_totals.$col %]</a>
148
<td class="ttotal" align="right">
150
<a href="[% urlbase %]
151
[% "&$row_vals" IF row_vals %]
152
[% "&$col_vals" IF col_vals %]">[% grand_total %]</a>