diff options
-rwxr-xr-x | buglist.cgi | 9 | ||||
-rw-r--r-- | template/en/default/search/knob.html.tmpl | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/buglist.cgi b/buglist.cgi index 69069ba82..d04637353 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -645,11 +645,12 @@ my @order_columns; if ($order) { # Convert the value of the "order" form field into a list of columns # by which to sort the results. + my $descending = $params->param('descending') ? " DESC" : ""; my %order_types = ( - "Bug Number" => [ "bug_id" ], - "Importance" => [ "priority", "bug_severity" ], - "Assignee" => [ "assigned_to", "bug_status", "priority", "bug_id" ], - "Last Changed" => [ "changeddate", "bug_status", "priority", + "Bug Number" => [ "bug_id$descending" ], + "Importance" => [ "priority$descending", "bug_severity" ], + "Assignee" => [ "assigned_to$descending", "bug_status", "priority", "bug_id" ], + "Last Changed" => [ "changeddate$descending", "bug_status", "priority", "assigned_to", "bug_id" ], ); if ($order_types{$order}) { diff --git a/template/en/default/search/knob.html.tmpl b/template/en/default/search/knob.html.tmpl index e9e3daaf1..62332075b 100644 --- a/template/en/default/search/knob.html.tmpl +++ b/template/en/default/search/knob.html.tmpl @@ -36,6 +36,8 @@ [% ordersdesc.$order FILTER html %]</option> [% END %] </select> + <input type="checkbox" id="descending" name="descending" [% IF default.descending %]checked[% END %]> + <label for="descending">Descending</label> </p> <p> |