From c42abcbc471c8dba01402c814de65303f4668077 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Wed, 3 Jun 2015 16:12:46 +0800 Subject: Bug 1146779: add search result navigation --- .../en/default/bug_modal/navigate.html.tmpl | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 extensions/BugModal/template/en/default/bug_modal/navigate.html.tmpl (limited to 'extensions/BugModal/template/en/default/bug_modal/navigate.html.tmpl') diff --git a/extensions/BugModal/template/en/default/bug_modal/navigate.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/navigate.html.tmpl new file mode 100644 index 000000000..cb4eb4ab4 --- /dev/null +++ b/extensions/BugModal/template/en/default/bug_modal/navigate.html.tmpl @@ -0,0 +1,43 @@ +[%# This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + # + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. + #%] + + +[% + search = user.recent_search_for(bug); + RETURN UNLESS search; + last_bug_list = my_search.bug_list; + this_bug_idx = lsearch(last_bug_list, bug.id); +%] + +
+ [% terms.Bug %] List: + ([% this_bug_idx + 1 %] of [% last_bug_list.size %]) + [% INCLUDE nav_link text="❰❰ First" bug_id=last_bug_list.first %] + [% IF this_bug_idx > 0 %] + [% INCLUDE nav_link text="❰ Prev" bug_id=last_bug_list.item(this_bug_idx - 1) %] + [% ELSE %] + [% INCLUDE nav_link text="❰ Prev" bug_id="" %] + [% END %] + [% IF this_bug_idx + 1 < last_bug_list.size %] + [% INCLUDE nav_link text="Next ❱" bug_id=last_bug_list.item(this_bug_idx + 1) %] + [% ELSE %] + [% INCLUDE nav_link text="Next ❱" bug_id="" %] + [% END %] + [% INCLUDE nav_link text="Last ❱❱" bug_id=last_bug_list.last %] + Last search results +
+ +[% BLOCK nav_link %] + [% IF bug_id == "" %] + [% text FILTER none %] + [% ELSE %] + + [%~ text FILTER none ~%] + + [% END %] +[% END %] -- cgit v1.2.3-24-g4f1b