diff options
author | wicked%sci.fi <> | 2009-09-27 20:12:48 +0200 |
---|---|---|
committer | wicked%sci.fi <> | 2009-09-27 20:12:48 +0200 |
commit | f8269f0e978f2cf3e0d46b62f40aa322c56e2c85 (patch) | |
tree | b4ea07ca10a9f472ed1a3a771c81712f2176bcfd | |
parent | 6c090fed8af9808325493dafb155ea2d29611cba (diff) | |
download | bugzilla-f8269f0e978f2cf3e0d46b62f40aa322c56e2c85.tar.gz bugzilla-f8269f0e978f2cf3e0d46b62f40aa322c56e2c85.tar.xz |
Bug 164009: Add arrows to buglist columns to indicate columns and direction used for buglist sorting. Original patch by Jesse Clark <jjclark1982@gmail.com> and modified by Teemu Mannermaa <wicked@sci.fi> r/a=LpSolit
-rw-r--r-- | skins/standard/buglist.css | 4 | ||||
-rw-r--r-- | template/en/default/list/table.html.tmpl | 46 |
2 files changed, 36 insertions, 14 deletions
diff --git a/skins/standard/buglist.css b/skins/standard/buglist.css index f5d63ab91..c9f309ccb 100644 --- a/skins/standard/buglist.css +++ b/skins/standard/buglist.css @@ -96,3 +96,7 @@ td.bz_total { .bz_query_explain { text-align: left; } + +.bz_sort_order_secondary { + color: gray; +} diff --git a/template/en/default/list/table.html.tmpl b/template/en/default/list/table.html.tmpl index 760a59cfd..87833ff5b 100644 --- a/template/en/default/list/table.html.tmpl +++ b/template/en/default/list/table.html.tmpl @@ -16,6 +16,7 @@ # Rights Reserved. # # Contributor(s): Myk Melez <myk@mozilla.org> + # Jesse Clark <jjclark1982@gmail.com> #%] [%############################################################################%] @@ -87,14 +88,13 @@ <th> </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 %]&order=bug_id[% desc FILTER url_quote %] + [% urlquerypart FILTER html %]&order= + [% PROCESS new_order id='bug_id' %] [%-#%]&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 %] @@ -131,20 +131,38 @@ [% 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 %]&order= - [% id FILTER url_quote %][% desc FILTER url_quote %] - [% ",$order" FILTER url_quote IF order %] + [% PROCESS new_order %] [%-#%]&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">▼</span> + [% ELSIF order.match("^$id(,\\s*|\$)") %] + <span class="bz_sort_order_primary">▲</span> + [% ELSIF order.match("\\b$id DESC") %] + <span class="bz_sort_order_secondary">▼</span> + [% ELSIF order.match("\\b$id(,\\s*|\$)") %] + <span class="bz_sort_order_secondary">▲</span> + [% END %] +[% END %] [%############################################################################%] [%# Bug Table #%] |