]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 907710 - Add UI to reverse sort order
authorDavid Lawrence <dkl@mozilla.com>
Mon, 16 May 2016 02:17:33 +0000 (02:17 +0000)
committerDavid Lawrence <dkl@mozilla.com>
Mon, 16 May 2016 02:17:33 +0000 (02:17 +0000)
r=LpSolit

buglist.cgi
template/en/default/search/knob.html.tmpl

index 69069ba82fa52e366d9884a9331b71eb394502fb..d0463735306d2f0c2e62200aba09e0eeb20b2215 100755 (executable)
@@ -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}) {
index e9e3daaf127fb797ca17c6bf729b2a462ce67e44..62332075b22c851b1f982078e789c497240f3c97 100644 (file)
@@ -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>