summaryrefslogtreecommitdiffstats
path: root/template/en/default/search
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2014-04-10 16:29:25 +0200
committerDavid Lawrence <dkl@mozilla.com>2014-04-10 16:29:25 +0200
commita2689d0747d489c5d6f1b073a829df7d69357bda (patch)
tree5766084111249223f20337ecfdac5d74af777bd5 /template/en/default/search
parent13408dc745948de52f0dc6f1a3e7080a39289ab4 (diff)
downloadbugzilla-a2689d0747d489c5d6f1b073a829df7d69357bda.tar.gz
bugzilla-a2689d0747d489c5d6f1b073a829df7d69357bda.tar.xz
Backout of Bug 990982 - backport bug 539894 to bmo (Use <optgroup/> to group products into classifications in the product drop-down on show_bug.cgi)
Diffstat (limited to 'template/en/default/search')
-rw-r--r--template/en/default/search/search-instant.html.tmpl28
-rw-r--r--template/en/default/search/search-specific.html.tmpl29
2 files changed, 47 insertions, 10 deletions
diff --git a/template/en/default/search/search-instant.html.tmpl b/template/en/default/search/search-instant.html.tmpl
index 94cb619d0..5d75d1996 100644
--- a/template/en/default/search/search-instant.html.tmpl
+++ b/template/en/default/search/search-instant.html.tmpl
@@ -41,11 +41,29 @@ YAHOO.bugzilla.instantSearch.setLabels( {
<b><label for="product">Product:</label></b>
</td>
<td>
- [% INCLUDE "global/product-select.html.tmpl"
- id => "product"
- name => "product"
- value => default.product.0
- %]
+ <select name="product" id="product">
+ [% IF Param('useclassification') %]
+ [% FOREACH c = classification %]
+ <optgroup label="[% c.name FILTER html %]">
+ [% FOREACH p = user.get_selectable_products(c.id) %]
+ [% IF p.components.size %]
+ <option value="[% p.name FILTER html %]"
+ [% " selected" IF lsearch(default.product, p.name) != -1 %]>
+ [% p.name FILTER html %]
+ </option>
+ [% END %]
+ [% END %]
+ </optgroup>
+ [% END %]
+ [% ELSE %]
+ [% FOREACH p = product %]
+ <option value="[% p.name FILTER html %]"
+ [% " selected" IF lsearch(default.product, p.name) != -1 %]>
+ [% p.name FILTER html %]
+ </option>
+ [% END %]
+ [% END %]
+ </select>
</td>
</tr>
<tr>
diff --git a/template/en/default/search/search-specific.html.tmpl b/template/en/default/search/search-specific.html.tmpl
index ea522a877..7e5de2c4a 100644
--- a/template/en/default/search/search-specific.html.tmpl
+++ b/template/en/default/search/search-specific.html.tmpl
@@ -67,11 +67,30 @@ for "crash secure SSL flash".
<label for="product">[% field_descs.product FILTER html %]:</label>
</th>
<td>
- [% INCLUDE "global/product-select.html.tmpl"
- id => "product"
- name => "product"
- add => "All"
- %]
+ <select name="product" id="product">
+ <option value="">All</option>
+ [% IF Param('useclassification') %]
+ [% FOREACH c = classification %]
+ <optgroup label="[% c.name FILTER html %]">
+ [% FOREACH p = user.get_selectable_products(c.id) %]
+ [% IF p.components.size %]
+ <option value="[% p.name FILTER html %]"
+ [% " selected" IF default.product.contains(p.name) %]>
+ [% p.name FILTER html %]
+ </option>
+ [% END %]
+ [% END %]
+ </optgroup>
+ [% END %]
+ [% ELSE %]
+ [% FOREACH p = product %]
+ <option value="[% p.name FILTER html %]"
+ [% " selected" IF default.product.contains(p.name) %]>
+ [% p.name FILTER html %]
+ </option>
+ [% END %]
+ [% END %]
+ </select>
</td>
</tr>
<tr>