diff options
author | lpsolit%gmail.com <> | 2008-01-12 21:26:25 +0100 |
---|---|---|
committer | lpsolit%gmail.com <> | 2008-01-12 21:26:25 +0100 |
commit | 3566e55c432388dd8936fa2d7f3e5e14518d3cfd (patch) | |
tree | bd712f333f64b807cde442fa9295136c3478afad | |
parent | 6724564ea0bce0d971480711fe5d89f38b7be28b (diff) | |
download | bugzilla-3566e55c432388dd8936fa2d7f3e5e14518d3cfd.tar.gz bugzilla-3566e55c432388dd8936fa2d7f3e5e14518d3cfd.tar.xz |
Bug 383643: When using "Find a specific bug", the generated buglist does not let you change the sort order - Patch by Alex Schuilenburg <alex@schuilenburg.org> r/a=LpSolit
-rwxr-xr-x | buglist.cgi | 2 | ||||
-rw-r--r-- | template/en/default/list/list.html.tmpl | 1 | ||||
-rw-r--r-- | template/en/default/list/table.html.tmpl | 54 |
3 files changed, 24 insertions, 33 deletions
diff --git a/buglist.cgi b/buglist.cgi index fa75778b9..89b164dd8 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -965,7 +965,7 @@ if (defined $cgi->param('limit')) { } elsif ($fulltext) { $query .= " " . $dbh->sql_limit(FULLTEXT_BUGLIST_LIMIT); - $vars->{'sorted_by_relevance'} = 1; + $vars->{'message'} = 'buglist_sorted_by_relevance' if ($cgi->param('order') =~ /^relevance/); } diff --git a/template/en/default/list/list.html.tmpl b/template/en/default/list/list.html.tmpl index 17afee014..0a8eb402c 100644 --- a/template/en/default/list/list.html.tmpl +++ b/template/en/default/list/list.html.tmpl @@ -36,7 +36,6 @@ [% END %] [% qorder = order FILTER url_quote IF order %] -[% message = "buglist_sorted_by_relevance" IF sorted_by_relevance %] [%############################################################################%] diff --git a/template/en/default/list/table.html.tmpl b/template/en/default/list/table.html.tmpl index c2904ceb9..47d2e4643 100644 --- a/template/en/default/list/table.html.tmpl +++ b/template/en/default/list/table.html.tmpl @@ -85,18 +85,14 @@ <th> </th> [% END %] <th colspan="[% splitheader ? 2 : 1 %]" class="first-child"> - [% IF sorted_by_relevance %] - ID - [% ELSE %] - [% desc = '' %] - [% IF (om = order.match("^bugs\.bug_id( desc)?")) %] - [% desc = ' desc' IF NOT om.0 %] - [% END %] - <a href="buglist.cgi? - [% urlquerypart FILTER html %]&order=bugs.bug_id[% desc FILTER url_quote %] - [%-#%]&query_based_on= - [% defaultsavename OR searchname FILTER url_quote %]">ID</a> + [% desc = '' %] + [% IF (om = order.match("^bugs\.bug_id( desc)?")) %] + [% desc = ' desc' IF NOT om.0 %] [% END %] + <a href="buglist.cgi? + [% urlquerypart FILTER html %]&order=bugs.bug_id[% desc FILTER url_quote %] + [%-#%]&query_based_on= + [% defaultsavename OR searchname FILTER url_quote %]">ID</a> </th> [% IF splitheader %] @@ -133,28 +129,24 @@ [% BLOCK columnheader %] <th colspan="[% splitheader ? 2 : 1 %]"> - [% IF sorted_by_relevance %] - [%- abbrev.$id.title || field_descs.$id || column.title -%] + [% IF column.name.match('\s+AS\s+') %] + [%# For aliased columns, use their ID for sorting. %] + [% column.sortalias = id %] [% ELSE %] - [% IF column.name.match('\s+AS\s+') %] - [%# For aliased columns, use their ID for sorting. %] - [% column.sortalias = id %] - [% ELSE %] - [%# Other columns may sort on their name directly. %] - [% column.sortalias = column.name %] - [% END %] - [% desc = '' %] - [% IF (om = order.match("$column.sortalias( desc)?")) %] - [% desc = ' desc' IF NOT om.0 %] - [% END %] - [% order = order.remove("$column.sortalias( desc)?,?") %] - <a href="buglist.cgi?[% urlquerypart FILTER html %]&order= - [% column.sortalias FILTER url_quote %][% desc FILTER url_quote %] - [% ",$order" FILTER url_quote IF order %] - [%-#%]&query_based_on= - [% defaultsavename OR searchname FILTER url_quote %]"> - [%- abbrev.$id.title || field_descs.$id || column.title -%]</a> + [%# Other columns may sort on their name directly. %] + [% column.sortalias = column.name %] + [% END %] + [% desc = '' %] + [% IF (om = order.match("$column.sortalias( desc)?")) %] + [% desc = ' desc' IF NOT om.0 %] [% END %] + [% order = order.remove("$column.sortalias( desc)?,?") %] + <a href="buglist.cgi?[% urlquerypart FILTER html %]&order= + [% column.sortalias FILTER url_quote %][% desc FILTER url_quote %] + [% ",$order" FILTER url_quote IF order %] + [%-#%]&query_based_on= + [% defaultsavename OR searchname FILTER url_quote %]"> + [%- abbrev.$id.title || field_descs.$id || column.title -%]</a> </th> [% END %] |