Commit 2db8904f authored by David Lawrence's avatar David Lawrence

Bug 907710 - Add UI to reverse sort order

r=LpSolit
parent 0748e841
...@@ -645,11 +645,12 @@ my @order_columns; ...@@ -645,11 +645,12 @@ my @order_columns;
if ($order) { if ($order) {
# Convert the value of the "order" form field into a list of columns # Convert the value of the "order" form field into a list of columns
# by which to sort the results. # by which to sort the results.
my $descending = $params->param('descending') ? " DESC" : "";
my %order_types = ( my %order_types = (
"Bug Number" => [ "bug_id" ], "Bug Number" => [ "bug_id$descending" ],
"Importance" => [ "priority", "bug_severity" ], "Importance" => [ "priority$descending", "bug_severity" ],
"Assignee" => [ "assigned_to", "bug_status", "priority", "bug_id" ], "Assignee" => [ "assigned_to$descending", "bug_status", "priority", "bug_id" ],
"Last Changed" => [ "changeddate", "bug_status", "priority", "Last Changed" => [ "changeddate$descending", "bug_status", "priority",
"assigned_to", "bug_id" ], "assigned_to", "bug_id" ],
); );
if ($order_types{$order}) { if ($order_types{$order}) {
......
...@@ -36,6 +36,8 @@ ...@@ -36,6 +36,8 @@
[% ordersdesc.$order FILTER html %]</option> [% ordersdesc.$order FILTER html %]</option>
[% END %] [% END %]
</select> </select>
<input type="checkbox" id="descending" name="descending" [% IF default.descending %]checked[% END %]>
<label for="descending">Descending</label>
</p> </p>
<p> <p>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment