From 8c1a3e8ff7f6c05ee9e7f45871cea073c4c26c91 Mon Sep 17 00:00:00 2001 From: "jouni%heikniemi.net" <> Date: Mon, 12 Jul 2004 12:20:09 +0000 Subject: Bug 103274: Site Navigation Bar incorrect if viewing a bug not in the list Patch by GavinS r=jouni, a=justdave --- .../en/default/global/site-navigation.html.tmpl | 23 +++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'template/en/default/global') 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 %] + + + [% 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 %] -- cgit v1.2.3-24-g4f1b