From b3abb29f2814bafd69095f3ef91bc40cbe5f866c Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Fri, 25 Sep 2015 18:28:20 +0200 Subject: Bug 1204238: Migrate tabular report sorting from YUI to jQuery r=gerv --- template/en/default/reports/report-table.html.tmpl | 176 +++------------------ 1 file changed, 24 insertions(+), 152 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 57e998b1d..03f3147df 100644 --- a/template/en/default/reports/report-table.html.tmpl +++ b/template/en/default/reports/report-table.html.tmpl @@ -15,6 +15,7 @@ # 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. + # table_id: the incremented number of the table being displayed. #%] [% col_field_disp = field_descs.$col_field || col_field %] @@ -29,177 +30,44 @@ [% 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-' %] -
- +[%# Most of these classes are defined in the DataTables plugin itself. %] +
[% 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 %] [% END %] + + - [% row_idx = 1 - row_idx %] - + [% FOREACH col = col_names %] [% NEXT IF col == "" %] - - +
- ↓ [% row_field_disp FILTER html %] \ [% col_field_disp FILTER html %] → - [% PROCESS value_display value = col field = col_field %] - [% PROCESS value_display value = col field = col_field %] - Total - 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 %] - . + 0 [% END %]
- Total - Total
-
-
+ [% IF note_multi_select %]

-- cgit v1.2.3-24-g4f1b