blob: 05476fed457ffe7620a2b23ff24228d315dc526c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
[%# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# This Source Code Form is "Incompatible With Secondary Licenses", as
# defined by the Mozilla Public License, v. 2.0.
#%]
[%
search = user.recent_search_for(bug);
RETURN UNLESS search;
last_bug_list = search.bug_list;
this_bug_idx = lsearch(last_bug_list, bug.id);
%]
<div id="search-nav">
<span id="search-nav-label">[% terms.Bug %] List:</span>
([% this_bug_idx + 1 %] of [% last_bug_list.size %])
[% INCLUDE nav_link text="❰❰ First" bug_id=last_bug_list.first %]
[% IF this_bug_idx > 0 %]
[% INCLUDE nav_link text="❰ Prev" bug_id=last_bug_list.item(this_bug_idx - 1) %]
[% ELSE %]
[% INCLUDE nav_link text="❰ Prev" bug_id="" %]
[% END %]
[% IF this_bug_idx + 1 < last_bug_list.size %]
[% INCLUDE nav_link text="Next ❱" bug_id=last_bug_list.item(this_bug_idx + 1) %]
[% ELSE %]
[% INCLUDE nav_link text="Next ❱" bug_id="" %]
[% END %]
[% INCLUDE nav_link text="Last ❱❱" bug_id=last_bug_list.last %]
<a id="search-nav-reget" href="buglist.cgi?regetlastlist=[% my_search.id FILTER uri %]">Last search results</a>
</div>
[% BLOCK nav_link %]
[% IF bug_id == "" %]
<span class="search-nav-disabled">[% text FILTER none %]</span>
[% ELSE %]
<a class="search-nav-link" href="show_bug.cgi?id=[% bug_id FILTER uri %]&list_id=[% my_search.id FILTER uri %]">
[%~ text FILTER none ~%]
</a>
[% END %]
[% END %]
|