summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2016-05-16 04:17:33 +0200
committerDavid Lawrence <dkl@mozilla.com>2016-05-16 04:17:33 +0200
commit2db8904f0e386e0bc872cd3f6d7f843fd2068bbe (patch)
tree72b1af9c0fb8965c1f7ae4fdf87bbaf49fe80460
parent0748e8411232181e3a769a5f3a3b60ad98239777 (diff)
downloadbugzilla-2db8904f0e386e0bc872cd3f6d7f843fd2068bbe.tar.gz
bugzilla-2db8904f0e386e0bc872cd3f6d7f843fd2068bbe.tar.xz
Bug 907710 - Add UI to reverse sort order
r=LpSolit
-rwxr-xr-xbuglist.cgi9
-rw-r--r--template/en/default/search/knob.html.tmpl2
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>