aboutsummaryrefslogtreecommitdiffstats
path: root/template/en/default/reports
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2005-07-20 09:14:24 +0000
committerlpsolit%gmail.com <>2005-07-20 09:14:24 +0000
commit5f9f484fadbdc28be6b0c6b9ab0b67b6fd4d0e9c (patch)
tree2a298cf1e8bf260063bf40368a179a0cb3ede63a /template/en/default/reports
parent82787bc9132869edb068904dfc8123414c115639 (diff)
downloadbugs-5f9f484fadbdc28be6b0c6b9ab0b67b6fd4d0e9c.tar
bugs-5f9f484fadbdc28be6b0c6b9ab0b67b6fd4d0e9c.tar.gz
bugs-5f9f484fadbdc28be6b0c6b9ab0b67b6fd4d0e9c.tar.bz2
bugs-5f9f484fadbdc28be6b0c6b9ab0b67b6fd4d0e9c.tar.xz
bugs-5f9f484fadbdc28be6b0c6b9ab0b67b6fd4d0e9c.zip
Bug 257767: Option to have fields in CSV files separated by semicolons instead of commas - Patch by Marc Schumann <wurblzap@gmail.com> r=LpSolit a=myk
Diffstat (limited to 'template/en/default/reports')
-rw-r--r--template/en/default/reports/chart.csv.tmpl11
-rw-r--r--template/en/default/reports/report-table.csv.tmpl51
2 files changed, 33 insertions, 29 deletions
diff --git a/template/en/default/reports/chart.csv.tmpl b/template/en/default/reports/chart.csv.tmpl
index 83620bf08..87866dfd6 100644
--- a/template/en/default/reports/chart.csv.tmpl
+++ b/template/en/default/reports/chart.csv.tmpl
@@ -19,10 +19,12 @@
# Contributor(s): Gervase Markham <gerv@gerv.net>
#%]
+[% colsepchar = user.settings.csv_colsepchar.value %]
+
[% data = chart.data %]
-Date\Series,
+Date\Series
[% FOREACH label = chart.labels %]
- [% label FILTER csv %][% "," UNLESS loop.last %]
+ [% colsepchar %][% label FILTER csv %]
[% END %]
[%# The data, which is in the correct format for GD, is conceptually the wrong
# way round for CSV output. So, we need to invert it here, which is why
@@ -32,7 +34,10 @@ Date\Series,
[% WHILE i < data.0.size %]
[% j = 0 %]
[% WHILE j < data.size %]
- [% data.$j.$i %][% "," UNLESS (j == data.size - 1) %]
+ [% IF j > 0 %]
+ [% colsepchar %]
+ [% END %]
+ [% data.$j.$i %]
[% j = j + 1 %]
[% END %]
[% i = i + 1 %]
diff --git a/template/en/default/reports/report-table.csv.tmpl b/template/en/default/reports/report-table.csv.tmpl
index 42fcd6686..96dca3d58 100644
--- a/template/en/default/reports/report-table.csv.tmpl
+++ b/template/en/default/reports/report-table.csv.tmpl
@@ -23,51 +23,50 @@
#%]
[% PROCESS global/variables.none.tmpl %]
+[% colsepchar = user.settings.csv_colsepchar.value %]
+
[% num_bugs = BLOCK %]Number of [% terms.bugs %][% END %]
[% 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 %]
- [% IF tbl_field %]
- [% tbl_field_disp FILTER csv %]: [% tbl FILTER csv %]
-
- [% END %]
- [% IF row_field %]
- [% row_field_disp FILTER csv %]
- [% END %]
- [% " / " IF col_field AND row_field %]
- [% col_field_disp FILTER csv %]
+[% IF tbl_field %]
+ [% tbl_field_disp FILTER csv %]: [% tbl FILTER csv %]
[% END %]
-
-[% title %],
+[% IF row_field %]
+ [% row_field_disp FILTER csv %]
+[% END %]
+[% " / " IF col_field AND row_field %]
+[% col_field_disp FILTER csv %]
[% IF col_field -%]
-[% FOREACH col = col_names -%]
- [% IF col_field == 'bug_status' %]
- [% status_descs.$col FILTER csv -%]
- [% ELSIF col_field == 'resolution' %]
- [% resolution_descs.$col FILTER csv -%]
- [% ELSE %]
- [% col FILTER csv -%],
- [% END %]
-[% END -%]
+ [% FOREACH col = col_names -%]
+ [% colsepchar %]
+ [% IF col_field == 'bug_status' %]
+ [% status_descs.$col FILTER csv -%]
+ [% ELSIF col_field == 'resolution' %]
+ [% resolution_descs.$col FILTER csv -%]
+ [% ELSE %]
+ [% col FILTER csv -%]
+ [% END %]
+ [% END -%]
[% ELSE -%]
- [% num_bugs %],
+ [% colsepchar %][% num_bugs %]
[% END %]
[% FOREACH row = row_names %]
-[% IF row_field == 'bug_status' %]
+ [% IF row_field == 'bug_status' %]
[% status_descs.$row FILTER csv -%]
[% ELSIF row_field == 'resolution' %]
[% resolution_descs.$row FILTER csv -%]
[% ELSE %]
- [% row FILTER csv -%],
+ [% row FILTER csv -%]
[% END %]
[% FOREACH col = col_names %]
+ [% colsepchar %]
[% IF data.$tbl AND data.$tbl.$col AND data.$tbl.$col.$row %]
- [% data.$tbl.$col.$row -%],
+ [% data.$tbl.$col.$row -%]
[% ELSE %]
- [% -%]0,
+ [% -%]0
[% END %]
[% END %]