summaryrefslogtreecommitdiffstats
path: root/template/en/default
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2010-06-16 03:40:27 +0200
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-06-16 03:40:27 +0200
commitfbe9a7a9a22004e3cc23a61b84148da8a0c300e9 (patch)
tree0fec2fa81dcaac47c45b56c6b696b10a53a27270 /template/en/default
parent4291fb9fc4f9210d1ca54ca559d701b5cdca13b5 (diff)
downloadbugzilla-fbe9a7a9a22004e3cc23a61b84148da8a0c300e9.tar.gz
bugzilla-fbe9a7a9a22004e3cc23a61b84148da8a0c300e9.tar.xz
Bug 24896: Make the First/Last/Prev/Next navigation on bugs work with
multiple buglists at once r=glob, a=mkanat
Diffstat (limited to 'template/en/default')
-rw-r--r--template/en/default/bug/navigate.html.tmpl61
-rw-r--r--template/en/default/global/user-error.html.tmpl2
2 files changed, 31 insertions, 32 deletions
diff --git a/template/en/default/bug/navigate.html.tmpl b/template/en/default/bug/navigate.html.tmpl
index 4a3d063af..869d338dc 100644
--- a/template/en/default/bug/navigate.html.tmpl
+++ b/template/en/default/bug/navigate.html.tmpl
@@ -36,45 +36,41 @@
<div class="navigation">
-[% IF last_bug_list.size > 0 %]
- [% this_bug_idx = lsearch(last_bug_list, bug.id) %]
+[% SET my_search = user.recent_search_for(bug) %]
+[% IF my_search %]
+ [% SET last_bug_list = my_search.bug_list %]
+ [% SET this_bug_idx = lsearch(last_bug_list, bug.id) %]
<b>[% terms.Bug %] List:</b>
- [% IF this_bug_idx != -1 %]
- ([% this_bug_idx + 1 %] of [% last_bug_list.size %])
- [% END %]
- [% IF this_bug_idx != -1 %]
- <a href="show_bug.cgi?id=
- [%- last_bug_list.first FILTER url_quote %]">First</a>
+ ([% this_bug_idx + 1 %] of [% last_bug_list.size %])
+
+ <a href="show_bug.cgi?id=
+ [%- last_bug_list.first FILTER url_quote %]&amp;list_id=
+ [%- my_search.id FILTER url_quote %]">First</a>
+ <a href="show_bug.cgi?id=
+ [%- last_bug_list.last FILTER url_quote %]&amp;list_id=
+ [%- my_search.id FILTER url_quote %]">Last</a>
+
+ [% IF this_bug_idx > 0 %]
+ [% prev_bug = this_bug_idx - 1 %]
<a href="show_bug.cgi?id=
- [%- last_bug_list.last FILTER url_quote %]">Last</a>
+ [%- last_bug_list.$prev_bug FILTER url_quote %]&amp;list_id=
+ [%- my_search.id FILTER url_quote %]">Prev</a>
+ [% ELSE %]
+ <i><font color="#777777">Prev</font></i>
[% END %]
- [% IF bug.bug_id %]
- [% IF this_bug_idx != -1 %]
- [% IF this_bug_idx > 0 %]
- [% prev_bug = this_bug_idx - 1 %]
- <a href="show_bug.cgi?id=
- [%- last_bug_list.$prev_bug FILTER url_quote %]">Prev</a>
- [% ELSE %]
- <i><font color="#777777">Prev</font></i>
- [% END %]
-
- [% IF this_bug_idx + 1 < last_bug_list.size %]
- [% next_bug = this_bug_idx + 1 %]
- <a href="show_bug.cgi?id=
- [%- last_bug_list.$next_bug FILTER url_quote %]">Next</a>
- [% ELSE %]
- <i><font color="#777777">Next</font></i>
- [% END %]
- [% ELSE %]
- (This [% terms.bug %] is not in your last search results)
- [% END %]
+ [% IF this_bug_idx + 1 < last_bug_list.size %]
+ [% next_bug = this_bug_idx + 1 %]
+ <a href="show_bug.cgi?id=
+ [%- last_bug_list.$next_bug FILTER url_quote %]&amp;list_id=
+ [%- my_search.id FILTER url_quote %]">Next</a>
[% ELSE %]
- &nbsp;&nbsp;
+ <i><font color="#777777">Next</font></i>
[% END %]
- &nbsp;&nbsp;<a href="buglist.cgi?regetlastlist=1">Show last search results</a>
+ &nbsp;&nbsp;<a href="buglist.cgi?regetlastlist=
+ [%- my_search.id FILTER url_quote %]">Show last search results</a>
[% ELSE %]
[%# With no list, don't show link to search results %]
<i><font color="#777777">First</font></i>
@@ -82,6 +78,7 @@
<i><font color="#777777">Prev</font></i>
<i><font color="#777777">Next</font></i>
&nbsp;&nbsp;
- <i><font color="#777777">No search results available</font></i>
+ <i><font color="#777777">This [% terms.bug %] is not in your last
+ search results.</font></i>
[% END %]
</div>
diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl
index 1d5997861..669d6adb3 100644
--- a/template/en/default/global/user-error.html.tmpl
+++ b/template/en/default/global/user-error.html.tmpl
@@ -1783,6 +1783,8 @@
group
[% ELSIF class == "Bugzilla::Product" %]
product
+ [% ELSIF class == "Bugzilla::Search::Recent" %]
+ recent search
[% ELSIF class == "Bugzilla::Search::Saved" %]
saved search
[% ELSIF ( matches = class.match('^Bugzilla::Field::Choice::(.+)') ) %]