summaryrefslogtreecommitdiffstats
path: root/template/en/default/search
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
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')
-rw-r--r--template/en/default/search/search-advanced.html.tmpl12
-rw-r--r--template/en/default/search/search-specific.html.tmpl8
-rw-r--r--template/en/default/search/tabs.html.tmpl39
3 files changed, 9 insertions, 50 deletions
diff --git a/template/en/default/search/search-advanced.html.tmpl b/template/en/default/search/search-advanced.html.tmpl
index 4f53c2ce1..880715c35 100644
--- a/template/en/default/search/search-advanced.html.tmpl
+++ b/template/en/default/search/search-advanced.html.tmpl
@@ -41,17 +41,7 @@ var queryform = "queryform"
onload = "doOnSelectProduct(0); initHelp();"
javascript = js_data
javascript_urls = [ "js/productform.js" ]
- style = "td.selected_tab {
- border-width: 2px 2px 0px;
- border-style: solid;
- border-color: black;
- }
- td.unselected_tab, td.spacer {
- border-width: 0px 0px 2px 0px;
- border-style: solid;
- border-color: black;
- }
- dl.bug_changes dt {
+ style = "dl.bug_changes dt {
margin-top: 15px;
}"
%]
diff --git a/template/en/default/search/search-specific.html.tmpl b/template/en/default/search/search-specific.html.tmpl
index 8edda69ee..a36be340c 100644
--- a/template/en/default/search/search-specific.html.tmpl
+++ b/template/en/default/search/search-specific.html.tmpl
@@ -24,14 +24,6 @@
[% PROCESS global/header.html.tmpl
title = "Find a Specific " _ terms.Bug
h1 = ""
- style = "td.selected_tab {
- border-width: 2px 2px 0px;
- border-style: solid;
- }
- td.unselected_tab, td.spacer {
- border-width: 0px 0px 2px 0px;
- border-style: solid;
- }"
%]
[% PROCESS search/tabs.html.tmpl %]
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"
+%]