summaryrefslogtreecommitdiffstats
path: root/template/en/default/global
diff options
context:
space:
mode:
Diffstat (limited to 'template/en/default/global')
-rw-r--r--template/en/default/global/site-navigation.html.tmpl23
1 files changed, 12 insertions, 11 deletions
diff --git a/template/en/default/global/site-navigation.html.tmpl b/template/en/default/global/site-navigation.html.tmpl
index d533627a3..2acbcf44d 100644
--- a/template/en/default/global/site-navigation.html.tmpl
+++ b/template/en/default/global/site-navigation.html.tmpl
@@ -33,26 +33,27 @@
<link rel="Top" href="[% urlbase FILTER html %]">
[%# *** Bug List Navigation *** %]
- [% IF bug && bug_list && bug_list.size > 0 %]
+ [% IF 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 bug && bug.bug_id %]
+ [% current_bug_idx = lsearch(bug_list, bug.bug_id) %]
+ [% IF current_bug_idx != -1 %]
- [% 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 > 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 %]">
[% END %]
-
[% END %]
[% END %]