From: jouni%heikniemi.net <> Date: Mon, 12 Jul 2004 12:20:09 +0000 (+0000) Subject: Bug 103274: Site Navigation Bar incorrect if viewing a bug not in the list X-Git-Tag: bugzilla-2.19.1~166 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c1a3e8ff7f6c05ee9e7f45871cea073c4c26c91;p=thirdparty%2Fbugzilla.git Bug 103274: Site Navigation Bar incorrect if viewing a bug not in the list Patch by GavinS r=jouni, a=justdave --- diff --git a/template/en/default/global/site-navigation.html.tmpl b/template/en/default/global/site-navigation.html.tmpl index f48620081e..189d596fc2 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 %] + + + [% current_bug_idx = lsearch(bug_list, bug.bug_id) %] - [% IF current_bug_idx > 0 %] - - [% prev_bug = current_bug_idx - 1 %] - - [% END %] + [% IF current_bug_idx != -1 %] + + [% IF current_bug_idx > 0 %] + [% prev_bug = current_bug_idx - 1 %] + + [% END %] + + [% IF current_bug_idx + 1 < bug_list.size %] + [% next_bug = current_bug_idx + 1 %] + + [% END %] - [% IF current_bug_idx + 1 < bug_list.size %] - [% next_bug = current_bug_idx + 1 %] - - [% END %] [% END %]