From f487b3403cf0c36df9f6f04f57dae533443c9cbc Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" Date: Sat, 16 Feb 2013 22:45:44 +0000 Subject: [PATCH] Bug 836436: Add a "search_tabs" hook to allow additional search tabs r/a=LpSolit git-svn-id: svn://10.0.0.236/trunk@264750 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/bugzilla/.bzrrev | 2 +- .../default/hook/search/tabs-search_tabs.html.tmpl | 13 +++++++++++++ .../template/en/default/search/tabs.html.tmpl | 12 ++++++++---- 3 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 mozilla/webtools/bugzilla/extensions/Example/template/en/default/hook/search/tabs-search_tabs.html.tmpl diff --git a/mozilla/webtools/bugzilla/.bzrrev b/mozilla/webtools/bugzilla/.bzrrev index a15d13d5d01..1d87f1adb42 100644 --- a/mozilla/webtools/bugzilla/.bzrrev +++ b/mozilla/webtools/bugzilla/.bzrrev @@ -1 +1 @@ -8578 \ No newline at end of file +8579 \ No newline at end of file diff --git a/mozilla/webtools/bugzilla/extensions/Example/template/en/default/hook/search/tabs-search_tabs.html.tmpl b/mozilla/webtools/bugzilla/extensions/Example/template/en/default/hook/search/tabs-search_tabs.html.tmpl new file mode 100644 index 00000000000..c40cb6e5e1f --- /dev/null +++ b/mozilla/webtools/bugzilla/extensions/Example/template/en/default/hook/search/tabs-search_tabs.html.tmpl @@ -0,0 +1,13 @@ +[%# 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. + #%] + +[% + tabs.push ({ name => 'newsearch', label => "New Search", + link => "query.cgi?format=newsearch" }) +%] + diff --git a/mozilla/webtools/bugzilla/template/en/default/search/tabs.html.tmpl b/mozilla/webtools/bugzilla/template/en/default/search/tabs.html.tmpl index f7703fd929a..74569dceb70 100644 --- a/mozilla/webtools/bugzilla/template/en/default/search/tabs.html.tmpl +++ b/mozilla/webtools/bugzilla/template/en/default/search/tabs.html.tmpl @@ -10,11 +10,15 @@ # This template has no interface. #%] +[% tabs = [ { name => 'specific', label => "Simple Search", + link => "query.cgi?format=specific" }, + { name => 'advanced', label => "Advanced Search", + link => "query.cgi?format=advanced" } ] %] + +[% Hook.process('search_tabs') %] + [% WRAPPER global/tabs.html.tmpl - tabs = [ { name => 'specific', label => "Simple Search", - link => "query.cgi?format=specific" }, - { name => 'advanced', label => "Advanced Search", - link => "query.cgi?format=advanced" } ] + tabs = tabs current_tab_name = query_format || format || "advanced" %]