diff options
author | lpsolit%gmail.com <> | 2008-02-06 20:34:49 +0100 |
---|---|---|
committer | lpsolit%gmail.com <> | 2008-02-06 20:34:49 +0100 |
commit | 8474e73b2aed9342d7ffe12aaf40adf085fdc606 (patch) | |
tree | c9575f2e53ed14d5725fdb050be4d6da3e44fc68 /template/en/default/global | |
parent | 90bf2307e3f5f19171e5f60bfe34d7c90ad1bf10 (diff) | |
download | bugzilla-8474e73b2aed9342d7ffe12aaf40adf085fdc606.tar.gz bugzilla-8474e73b2aed9342d7ffe12aaf40adf085fdc606.tar.xz |
Bug 359943: Prev/Next <link rel>s not working on process_bug.cgi page - Patch by Frédéric Buclin <LpSolit@gmail.com> r=wurblzap a=LpSolit
Diffstat (limited to 'template/en/default/global')
-rw-r--r-- | template/en/default/global/site-navigation.html.tmpl | 23 |
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 %] |