diff options
author | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-03-17 11:26:23 +0100 |
---|---|---|
committer | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-03-17 11:26:23 +0100 |
commit | c47b010b3b0c817e46bab0136b64edb1bdc2fc48 (patch) | |
tree | 395ac59321ae7c8bb98decf916a6c6e6b6122f49 /template/en | |
parent | a41f75ddfe91e2da353caa2fcf6afba7b5ee2ca6 (diff) | |
download | bugzilla-c47b010b3b0c817e46bab0136b64edb1bdc2fc48.tar.gz bugzilla-c47b010b3b0c817e46bab0136b64edb1bdc2fc48.tar.xz |
Bug 545587: Make colchange.cgi use the database to determine buglist-able
columns, instead of having a fixed list.
r=LpSolit, a=LpSolit
Diffstat (limited to 'template/en')
-rw-r--r-- | template/en/default/list/change-columns.html.tmpl | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/template/en/default/list/change-columns.html.tmpl b/template/en/default/list/change-columns.html.tmpl index 36cd5dbb8..77deb503c 100644 --- a/template/en/default/list/change-columns.html.tmpl +++ b/template/en/default/list/change-columns.html.tmpl @@ -34,10 +34,22 @@ [% PROCESS "global/field-descs.none.tmpl" %] [% field_descs.short_short_desc = "Summary (first 60 characters)" %] -[% field_descs.short_desc = "Full Summary" %] -[% field_descs.assigned_to_realname = "Assignee Realname" %] -[% field_descs.reporter_realname = "Reporter Realname" %] -[% field_descs.qa_contact_realname = "QA Contact Realname" %] +[% field_descs.short_desc = "Summary (Full)" %] +[% field_descs.assigned_to_realname = "$field_descs.assigned_to Real Name" %] +[% field_descs.reporter_realname = "$field_descs.reporter Real Name" %] +[% field_descs.qa_contact_realname = "$field_descs.qa_contact Real Name" %] + +[%# Create a mapping of field descriptions to field names, so that + # the "Available Columns" list can be sorted alphabetically by + # field description. + #%] +[% SET available_columns = {} %] +[% FOREACH column = columns.keys %] + [% NEXT IF collist.contains(column) %] + [%# We lowecase the keys so that the sort happens case-insensitively. %] + [% SET column_desc = field_descs.$column || column FILTER lower %] + [% available_columns.$column_desc = column %] +[% END %] <form name="changecolumns" action="colchange.cgi" onsubmit="change_submit();"> <input type="hidden" name="rememberedquery" value="[% buffer FILTER html %]"> @@ -70,12 +82,13 @@ [% (field_descs.${column} || column) FILTER html %] </option> [% END %] - [% FOREACH column = masterlist %] - [% IF lsearch(collist, column) == -1 %] - <option value="[% column FILTER html %]"> - [% (field_descs.${column} || column) FILTER html %] - </option> - [% END %] + [% FOREACH key = available_columns.keys.sort %] + [% SET column = available_columns.$key %] + <option value="[% column FILTER html %]"> + [%# Don't display the lower-cased column description, + # display the correct-case one. %] + [% (field_descs.$column || column) FILTER html %] + </option> [% END %] </select> </td> |