]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 836436: Add a "search_tabs" hook to allow additional search tabs
authorAlbert Ting <altlist@gmail.com>
Sat, 16 Feb 2013 22:44:08 +0000 (23:44 +0100)
committerFrédéric Buclin <LpSolit@gmail.com>
Sat, 16 Feb 2013 22:44:08 +0000 (23:44 +0100)
r/a=LpSolit

extensions/Example/template/en/default/hook/search/tabs-search_tabs.html.tmpl [new file with mode: 0644]
template/en/default/search/tabs.html.tmpl

diff --git a/extensions/Example/template/en/default/hook/search/tabs-search_tabs.html.tmpl b/extensions/Example/template/en/default/hook/search/tabs-search_tabs.html.tmpl
new file mode 100644 (file)
index 0000000..c40cb6e
--- /dev/null
@@ -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" }) 
+%]
+
index f7703fd929a380417b116772d1ac68274864f067..74569dceb702818439f581063d061e8df0152b9b 100644 (file)
   # 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"
 %]