[%# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # # This Source Code Form is "Incompatible With Secondary Licenses", as # defined by the Mozilla Public License, v. 2.0. #%] [%# 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. #%] [% col_field_disp = field_descs.$col_field || col_field %] [% row_field_disp = field_descs.$row_field || row_field %] [% urlbase = BLOCK %]buglist.cgi?[% buglistbase FILTER html %][% END %] [% IF tbl == "-total-" %] [% IF tbl_vals %] [% urlbase = urlbase _ "&" _ tbl_vals %] [% END %] [% ELSIF tbl_field %] [% urlbase = BLOCK %][% urlbase %]&[% tbl_field FILTER uri %]=[% tbl FILTER uri %][% END %] [% END %] [% IF tbl_field %]

[% tbl_disp FILTER email FILTER html %]

[% END %]
[% col_field_disp FILTER html %]
[% row_field_disp FILTER html %] [% classes = [ [ "t1", "t2" ] , [ "t3", "t4" ] ] %] [% col_idx = 0 %] [% row_idx = 0 %] [% total_key = '-total-' %]
[% IF col_field %] [% FOREACH col = col_names %] [% 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 %]
[% PROCESS value_display value = col field = col_field %] Total
[% PROCESS value_display value = row field = row_field %] [% IF data.$tbl.$col.$row AND data.$tbl.$col.$row > 0 %] [% data.$tbl.$col.$row %] [% ELSE %] . [% END %] [% data.$tbl.$total_key.$row OR 0 FILTER html %]
Total [% data.$tbl.$col.$total_key OR 0 FILTER html %] [% data.$tbl.$total_key.$total_key OR 0 FILTER html %]
[% IF note_multi_select %]

NOTE: Axes contain multi-value fields, so the total numbers might not add up, as a single [% terms.bug %] can match several rows or columns.

[% END %] [% BLOCK value_display %] [% SET disp_value = display_value(field, value) %] [% IF field == 'assigned_to' OR field == 'reporter' OR field == 'qa_contact' %] [% disp_value = value FILTER email %] [% END %] [% disp_value FILTER html FILTER replace('^ $',' ') %] [% END %]