# We set CSV files to be downloaded, as they are designed for importing
# into other programs.
$disposition = "attachment";
+
+ # If the user clicked the CSV link in the search results,
+ # They should get the Field Description, not the column name in the db
+ $vars->{'human'} = $cgi->param('human');
}
# Suggest a name for the bug list if the user wants to save it as a file.
#
# Contributor(s): Myk Melez <myk@mozilla.org>
# Gervase Markham <gerv@gerv.net>
+ # miketosh
#%]
[% PROCESS "global/field-descs.none.tmpl" %]
[% colsepchar = user.settings.csv_colsepchar.value %]
-bug_id
-[% FOREACH column = displaycolumns %]
- [% colsepchar %][% column FILTER csv %]
+[% IF human %]
+ [% field_descs.bug_id FILTER csv %]
+ [% FOREACH column = displaycolumns %]
+ [% colsepchar %][% field_descs.$column FILTER csv %]
+ [% END %]
+[% ELSE %]
+ bug_id
+ [% FOREACH column = displaycolumns %]
+ [% colsepchar %][% column FILTER csv %]
+ [% END %]
[% END %]
[% FOREACH bug = bugs %]
<td valign="middle" class="bz_query_links">
<a href="buglist.cgi?
- [% urlquerypart FILTER html %]&ctype=csv">CSV</a> |
+ [% urlquerypart FILTER html %]&ctype=csv&human=1">CSV</a> |
<a href="buglist.cgi?
[% urlquerypart FILTER html %]&title=
[%- title FILTER html %]&ctype=atom">Feed</a> |