]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 164009: Add arrows to buglist columns to indicate columns and direction used...
authorwicked%sci.fi <>
Sun, 27 Sep 2009 18:12:48 +0000 (18:12 +0000)
committerwicked%sci.fi <>
Sun, 27 Sep 2009 18:12:48 +0000 (18:12 +0000)
skins/standard/buglist.css
template/en/default/list/table.html.tmpl

index f5d63ab9167a4a942a3d1309dbeb2c58437b2b49..c9f309ccbcb26640fb919e898660d6d61e0cb8cb 100644 (file)
@@ -96,3 +96,7 @@ td.bz_total {
 .bz_query_explain {
     text-align: left;
 }
+
+.bz_sort_order_secondary {
+    color: gray;
+}
index 760a59cfde9726d498f6bb2521c9e49d63e59d04..87833ff5b53096c06b144e49e3879e8c40090801 100644 (file)
@@ -16,6 +16,7 @@
   # Rights Reserved.
   #
   # Contributor(s): Myk Melez <myk@mozilla.org>
+  #                 Jesse Clark <jjclark1982@gmail.com>
   #%]
 
 [%############################################################################%]
       <th>&nbsp;</th>
       [% END %]
       <th colspan="[% splitheader ? 2 : 1 %]" class="first-child">
-        [% desc = '' %]
-        [% IF (om = order.match("^bug_id( DESC)?")) %]
-          [% desc = ' DESC' IF NOT om.0 %]
-        [% END %]
         <a href="buglist.cgi?
-                  [% urlquerypart FILTER html %]&amp;order=bug_id[% desc FILTER url_quote %]
+                  [% urlquerypart FILTER html %]&amp;order=
+                  [% PROCESS new_order id='bug_id' %]
                   [%-#%]&amp;query_based_on=
-                  [% defaultsavename OR searchname FILTER url_quote %]">ID</a>
+                  [% defaultsavename OR searchname FILTER url_quote %]">ID
+          [% PROCESS order_arrow id='bug_id' ~%]
+        </a>
       </th>
 
       [% IF splitheader %]
 
 [% BLOCK columnheader %]
   <th colspan="[% splitheader ? 2 : 1 %]">
-    [% desc = '' %]
-    [% IF (om = order.match("$id( DESC)?")) %]
-      [% desc = ' DESC' IF NOT om.0 %]
-    [% END %]
-    [% order = order.remove("\\b$id( DESC)?(,\\s*|\$)") %]
     <a href="buglist.cgi?[% urlquerypart FILTER html %]&amp;order=
-      [% id FILTER url_quote %][% desc FILTER url_quote %]
-      [% ",$order" FILTER url_quote IF order %]
+      [% PROCESS new_order %]
       [%-#%]&amp;query_based_on=
       [% defaultsavename OR searchname FILTER url_quote %]">
-        [%- abbrev.$id.title || field_descs.$id || column.title -%]</a>
+        [%- abbrev.$id.title || field_descs.$id || column.title -%]
+        [% PROCESS order_arrow ~%]
+    </a>
   </th>
 [% END %]
 
+[% BLOCK new_order %]
+  [% desc = '' %]
+  [% IF (om = order.match("\\b$id( DESC)?")) %]
+    [% desc = ' DESC' IF NOT om.0 %]
+  [% END %]
+  [% id _ desc FILTER url_quote %]
+  [% IF id != 'bug_id' AND order %]
+    [% ',' _ order.remove("\\b$id( DESC)?(,\\s*|\$)") FILTER url_quote %]
+  [% END %]
+[% END %]
+
+[% BLOCK order_arrow %]
+  [% IF order.match("^$id DESC") %]
+    <span class="bz_sort_order_primary">&#x25BC;</span>
+  [% ELSIF order.match("^$id(,\\s*|\$)") %]
+    <span class="bz_sort_order_primary">&#x25B2;</span>
+  [% ELSIF order.match("\\b$id DESC") %]
+    <span class="bz_sort_order_secondary">&#x25BC;</span>
+  [% ELSIF order.match("\\b$id(,\\s*|\$)") %]
+    <span class="bz_sort_order_secondary">&#x25B2;</span>
+  [% END %]
+[% END %]
 
 [%############################################################################%]
 [%# Bug Table                                                                #%]