[%# 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 # #%] [%# INTERFACE: # buglistbase: The base query for this table, in URL form # col_field: string. Name of the field being plotted as columns. # row_field: string. Name of the field being plotted as rows. # tbl_field: string. Name of the field being plotted as tables. # col_names: array. List of values for the field being plotted as columns. # row_names: array. List of values for the field being plotted as rows. # data: . Data to plot. Only data.$tbl is accessed. # tbl: Name of a hash in data which is the table to be plotted. #%] [% PROCESS "global/field-descs.none.tmpl" %] [% col_field_disp = field_descs.$col_field || col_field %] [% row_field_disp = field_descs.$row_field || row_field %] [% IF tbl == "-total-" %] [% urlbase = BLOCK %]buglist.cgi?[% buglistbase FILTER html %] [% "&$tbl_vals" IF tbl_vals %][% END %] [% ELSE %] [% urlbase = BLOCK %]buglist.cgi?[% buglistbase FILTER html %]& [% tbl_field FILTER url_quote %]=[% tbl FILTER url_quote %][% END %] [% END %] [% IF tbl_field %]

[% tbl_disp FILTER html %]

[% END %]
[% col_field_disp FILTER html %]
[% row_field_disp FILTER html %] [% classes = [ [ "t1", "t2" ] , [ "t3", "t4" ] ] %] [% col_idx = 0 %] [% row_idx = 0 %] [% grand_total = 0 %] [% IF col_field %] [% FOREACH col = col_names %] [% col_totals.$col = 0 %] [% NEXT IF col == "" %] [% col_idx = 1 - col_idx %] [% END %] [% END %] [% FOREACH row = row_names %] [% row_total = 0 %] [% row_idx = 1 - row_idx %] [% FOREACH col = col_names %] [% row_total = row_total + data.$tbl.$col.$row %] [% NEXT IF col == "" %] [% col_totals.$col = col_totals.$col + data.$tbl.$col.$row %] [% col_idx = 1 - col_idx %] [% END %] [% END %] [% row_idx = 1 - row_idx %] [% FOREACH col = col_names %] [% NEXT IF col == "" %] [% END %]
[% IF col_field == 'bug_status' %] [% status_descs.$col FILTER html FILTER replace('^ $',' ') %] [% ELSIF col_field == 'resolution' %] [% get_resolution(col) FILTER html FILTER replace('^ $',' ') %] [% ELSE %] [% col FILTER html FILTER replace('^ $',' ') %] [% END %] Total
[% IF row_field == 'bug_status' %] [% status_descs.$row FILTER html FILTER replace('^ $',' ') %] [% ELSIF row_field == 'resolution' %] [% get_resolution(row) FILTER html FILTER replace('^ $',' ') %] [% ELSE %] [% row FILTER html FILTER replace('^ $',' ') %] [% END %] [% IF data.$tbl.$col.$row AND data.$tbl.$col.$row > 0 %] [% data.$tbl.$col.$row %] [% ELSE %] . [% END %] [% row_total %] [% grand_total = grand_total + row_total %]
Total [% col_totals.$col %] [% grand_total %]