summaryrefslogtreecommitdiffstats
path: root/template/en/default/search/tabs.html.tmpl
diff options
context:
space:
mode:
authormyk%mozilla.org <>2005-07-30 09:41:09 +0200
committermyk%mozilla.org <>2005-07-30 09:41:09 +0200
commitf55027e7a07f4cb3f74cd6c42e710e794564df3c (patch)
treeb1862ec2fc0966880f67691bc9e2fd81972c1d1f /template/en/default/search/tabs.html.tmpl
parentab199bf568703d0c287d0f21ce1816e44183aa02 (diff)
downloadbugzilla-f55027e7a07f4cb3f74cd6c42e710e794564df3c.tar.gz
bugzilla-f55027e7a07f4cb3f74cd6c42e710e794564df3c.tar.xz
Fix for bug 302702: refactors tabs code into shared file so not only prefs and search but also other pages can use it
Diffstat (limited to 'template/en/default/search/tabs.html.tmpl')
-rw-r--r--template/en/default/search/tabs.html.tmpl39
1 files changed, 8 insertions, 31 deletions
diff --git a/template/en/default/search/tabs.html.tmpl b/template/en/default/search/tabs.html.tmpl
index 06b22f7a2..00358cb59 100644
--- a/template/en/default/search/tabs.html.tmpl
+++ b/template/en/default/search/tabs.html.tmpl
@@ -21,36 +21,13 @@
#%]
[%# INTERFACE:
- # tabs: List of hashes. May not be empty. Each hash has two members:
- # name: string. Name of the tab and the format it represents.
- # description: string. Description of the tab (used in tab title).
+ # This template has no interface.
#%]
-[% tabs = [ { name => 'specific', description => "Find a Specific $terms.Bug " },
- { name => 'advanced', description => "Advanced Search" } ] %]
-
-[% current_tab = query_format || format || "advanced" %]
-
-<center>
- <table cellspacing="0" cellpadding="10" border="0" width="100%">
- <tr>
- <td class="spacer">&nbsp;</td>
-
- [% FOREACH tab = tabs %]
- [% IF tab.name == current_tab %]
- <td align="center" bgcolor="lightblue" class="selected_tab">
- [% tab.description %]
- </td>
- [% ELSE %]
- <td align="center" bgcolor="#BBBBEE" class="unselected_tab">
- <a href="query.cgi?format=[% tab.name %]" >
- [% tab.description %]
- </a>
- </td>
- [% END %]
- [% END %]
-
- <td class="spacer">&nbsp;</td>
- </tr>
- </table>
-</center>
+[% PROCESS global/tabs.html.tmpl
+ tabs = [ { name => 'specific', label => "Find a Specific $terms.Bug",
+ link => "query.cgi?format=specific" },
+ { name => 'advanced', label => "Advanced Search",
+ link => "query.cgi?format=advanced" } ]
+ current_tab_name = query_format || format || "advanced"
+%]