From 1622591fb61de5f8f2a2b482c9df5816d379892e Mon Sep 17 00:00:00 2001 From: Pami Ketolainen Date: Tue, 29 Oct 2013 12:58:45 +0100 Subject: Bug 863745: Enable multi-select fields in reports r=LpSolit a=glob --- template/en/default/reports/report-table.html.tmpl | 23 +++++++++++----------- 1 file changed, 12 insertions(+), 11 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 2747166be..927a38917 100644 --- a/template/en/default/reports/report-table.html.tmpl +++ b/template/en/default/reports/report-table.html.tmpl @@ -156,7 +156,7 @@ YAHOO.util.Event.addListener(window, "load", function() { [% classes = [ [ "t1", "t2" ] , [ "t3", "t4" ] ] %] [% col_idx = 0 %] [% row_idx = 0 %] -[% grand_total = 0 %] +[% total_key = '-total-' %]
[% IF col_field %] @@ -165,7 +165,6 @@ YAHOO.util.Event.addListener(window, "load", function() { [% FOREACH col = col_names %] - [% col_totals.$col = 0 %] [% NEXT IF col == "" %] [% col_idx = 1 - col_idx %] @@ -181,17 +180,13 @@ YAHOO.util.Event.addListener(window, "load", function() { [% 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 || 0) + data.$tbl.$col.$row %] [% col_idx = 1 - col_idx %] [% END %] @@ -221,19 +215,19 @@ YAHOO.util.Event.addListener(window, "load", function() { [% FOREACH col = col_names %] [% NEXT IF col == "" %] - + [% END %] @@ -245,6 +239,13 @@ YAHOO.util.Event.addListener(window, "load", function() {
[% PROCESS value_display value = row field = row_field %] @@ -209,8 +204,7 @@ YAHOO.util.Event.addListener(window, "load", function() { - [% row_total %] - [% grand_total = grand_total + row_total %] + [% data.$tbl.$total_key.$row OR 0 FILTER html %]
- [% col_totals.$col %] + [% data.$tbl.$col.$total_key OR 0 FILTER html %] [% grand_total %] + [% "&$col_vals" IF col_vals %]">[% 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' -- cgit v1.2.3-24-g4f1b