From dad297316ae335ccc20e5d0546525d1c117131c0 Mon Sep 17 00:00:00 2001 From: "gerv%gerv.net" <> Date: Tue, 29 Oct 2002 15:43:57 +0000 Subject: Bug 173005 - Add bar charts, pie charts etc. to reporting. Patch by gerv; 2xr=joel. --- template/en/default/reports/report-table.html.tmpl | 123 ++++++--------------- 1 file changed, 34 insertions(+), 89 deletions(-) (limited to 'template/en/default/reports/report-table.html.tmpl') diff --git a/template/en/default/reports/report-table.html.tmpl b/template/en/default/reports/report-table.html.tmpl index 9767f5030..5074484c3 100644 --- a/template/en/default/reports/report-table.html.tmpl +++ b/template/en/default/reports/report-table.html.tmpl @@ -21,92 +21,51 @@ #%] [%# INTERFACE: - # querybase: The base query for this table, in URL form - # query: The query for this table, in URL form - # data: hash of hash of hash of numbers. Bug counts. - # names: hash of hash of strings. Names of tables, rows and columns. + # 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.html.tmpl" %] -[% tbl_field_disp = field_descs.$tbl_field || tbl_field %] [% col_field_disp = field_descs.$col_field || col_field %] [% row_field_disp = field_descs.$row_field || row_field %] - -[% title = BLOCK %] - Report: - [% "$tbl_field_disp / " IF tbl_field %] - [% "$col_field_disp / " IF col_field %] - [% row_field_disp %] -[% END %] - -[% PROCESS global/header.html.tmpl - style = " - .t1 { background-color: #ffffff } /* white */ - .t2 { background-color: #dfefff } /* light blue */ - .t3 { background-color: #dddddd } /* grey */ - .t4 { background-color: #c3d3ed } /* darker blue */ - .ttotal { background-color: #cfffdf } /* light green */ - " -%] - -
- [% time2str("%Y-%m-%d %H:%M:%S", time) %] -
- -[% tbl_names = names.tbl.keys.sort %] -[% col_names = names.col.keys.sort %] -[% row_names = names.row.keys.sort %] - -[% total_name = "Total" %] - -[% FOREACH tbl = tbl_names %] - [% FOREACH row = row_names %] - [% FOREACH col = col_names %] - [% data.$tbl.$col.$row = (data.$tbl.$col.$row || 0) %] - - [% IF tbl_field %] - [%# Calculate values for the Total table %] - [% data.$total_name.$col.$row = - (data.$total_name.$col.$row || 0) + data.$tbl.$col.$row %] - [% END %] - [% END %] - [% END %] -[% END %] -[% IF tbl_field %] - [% tbl_names.push(total_name) %] +[% IF tbl == "-total-" %] + [% urlbase = BLOCK %]buglist.cgi?[% buglistbase %][% END %] +[% ELSE %] + [% urlbase = BLOCK %]buglist.cgi?[% buglistbase %]& + [% tbl_field FILTER url_quote %]=[% tbl FILTER url_quote %][% END %] [% END %] -
- -[% FOREACH tbl = tbl_names %] - - [% IF tbl_field %] - - - - - [% END %] +
- -

[% tbl FILTER html %]

-
+ [% IF tbl_field %] - + [% END %] + + + + - - - + + [% END %]
- [% col_field_disp FILTER html %] + +

[% tbl_disp %]

+ + [% col_field_disp FILTER html %] +
- [% row_field_disp FILTER html %] - +
+ [% row_field_disp FILTER html %] + [% classes = [ [ "t1", "t2" ] , [ "t3", "t4" ] ] %] @@ -150,8 +109,7 @@ [% col_idx = 1 - col_idx %] [% IF data.$tbl.$col.$row AND data.$tbl.$col.$row > 0 %] - [% data.$tbl.$col.$row %] @@ -161,8 +119,7 @@ - [% row_total %] [% grand_total = grand_total + row_total %] @@ -179,8 +136,7 @@ [% NEXT IF col == "" %] - [% col_totals.$col %] @@ -188,24 +144,13 @@ [% END %] - [% grand_total %] + [% grand_total %]
- - - - -
- -[% END %] - - Edit this report -
- -
- -[% PROCESS global/footer.html.tmpl %] + + + -- cgit v1.2.3-24-g4f1b