[%# 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: # basequery: The base query for this table, in URL form # row_field: string. The field name for the data in table rows # col_field: string. The field name for the data in table columns # col_names: array of strings. Values for the columns # row_names: array of strings. Values for the rows # col_totals: hash of integers. Totals for the columns, indexed by col_names. # row_totals: hash of integers. Totals for the rows, indexed by row_names. # data: hash of hash of numbers. Bug counts indexed by col_names and # row_names values. #%] [% PROCESS global/header.html.tmpl title = "Report" onload = "selectProduct(document.forms['queryform']);" style = " .t1 { background-color: #ffffff } .t2 { background-color: #dfefff } .t3 { background-color: #dddddd } .t4 { background-color: #c3d3ed } .ttotal { background-color: #cfffdf } " %]
[% col_field FILTER html %]
[% row_field FILTER html %] [% classes = [ [ "t1", "t2" ] , [ "t3", "t4" ] ] %] [% col_idx = 0 %] [% row_idx = 0 %] [% IF col_names %] [% FOREACH col = col_names %] [%# If no col header, skip the col. This makes display look right if there's no defined X axis. Not doing this gives us two cols. %] [% NEXT IF col == "" %] [% col_idx = 1 - col_idx %] [% END %] [% END %] [% FOREACH row = row_names %] [% row_idx = 1 - row_idx %] [% FOREACH col = col_names %] [% NEXT IF col == "" %] [% col_idx = 1 - col_idx %] [% END %] [% END %] [% row_idx = 1 - row_idx %] [% FOREACH col = col_names %] [% NEXT IF col == "" %] [% END %]
[% col FILTER html %] Total
[% row FILTER html %] [% IF data.$row.$col AND data.$row.$col > 0 %] [% data.$row.$col %] [% ELSE %] . [% END %] [% row_totals.$row %]
Total [% col_totals.$col %] [% grand_total %]
Edit this report

[% PROCESS global/footer.html.tmpl %]