diff options
author | jouni%heikniemi.net <> | 2004-07-12 12:20:09 +0000 |
---|---|---|
committer | jouni%heikniemi.net <> | 2004-07-12 12:20:09 +0000 |
commit | 8c1a3e8ff7f6c05ee9e7f45871cea073c4c26c91 (patch) | |
tree | fbd32c5f44bf4e4626ad26227fb2c6ddb3954f7b /template/en | |
parent | 5414dfb90d011ce314bb04e7363a931cb4558291 (diff) | |
download | bugs-8c1a3e8ff7f6c05ee9e7f45871cea073c4c26c91.tar bugs-8c1a3e8ff7f6c05ee9e7f45871cea073c4c26c91.tar.gz bugs-8c1a3e8ff7f6c05ee9e7f45871cea073c4c26c91.tar.bz2 bugs-8c1a3e8ff7f6c05ee9e7f45871cea073c4c26c91.tar.xz bugs-8c1a3e8ff7f6c05ee9e7f45871cea073c4c26c91.zip |
Bug 103274: Site Navigation Bar incorrect if viewing a bug not in the list
Patch by GavinS <bugzilla@chimpychompy.org>
r=jouni, a=justdave
Diffstat (limited to 'template/en')
-rw-r--r-- | template/en/default/global/site-navigation.html.tmpl | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/template/en/default/global/site-navigation.html.tmpl b/template/en/default/global/site-navigation.html.tmpl index f48620081..189d596fc 100644 --- a/template/en/default/global/site-navigation.html.tmpl +++ b/template/en/default/global/site-navigation.html.tmpl @@ -37,18 +37,23 @@ [% IF bug && bug_list && bug_list.size > 0 %] <link rel="Up" href="buglist.cgi?regetlastlist=1"> + <link rel="First" href="show_bug.cgi?id=[% bug_list.first %]"> + <link rel="Last" href="show_bug.cgi?id=[% bug_list.last %]"> + [% current_bug_idx = lsearch(bug_list, bug.bug_id) %] - [% IF current_bug_idx > 0 %] - <link rel="First" href="show_bug.cgi?id=[% bug_list.first %]"> - [% prev_bug = current_bug_idx - 1 %] - <link rel="Prev" href="show_bug.cgi?id=[% bug_list.$prev_bug %]"> - [% END %] + [% IF current_bug_idx != -1 %] + + [% IF current_bug_idx > 0 %] + [% prev_bug = current_bug_idx - 1 %] + <link rel="Prev" href="show_bug.cgi?id=[% bug_list.$prev_bug %]"> + [% END %] + + [% IF current_bug_idx + 1 < bug_list.size %] + [% next_bug = current_bug_idx + 1 %] + <link rel="Next" href="show_bug.cgi?id=[% bug_list.$next_bug %]"> + [% END %] - [% IF current_bug_idx + 1 < bug_list.size %] - [% next_bug = current_bug_idx + 1 %] - <link rel="Next" href="show_bug.cgi?id=[% bug_list.$next_bug %]"> - <link rel="Last" href="show_bug.cgi?id=[% bug_list.last %]"> [% END %] [% END %] |