summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'template/en/default/search')
-rw-r--r--template/en/default/search/boolean-charts.html.tmpl12
-rw-r--r--template/en/default/search/field.html.tmpl8
-rw-r--r--template/en/default/search/form.html.tmpl26
-rw-r--r--template/en/default/search/search-advanced.html.tmpl4
-rw-r--r--template/en/default/search/search-create-series.html.tmpl4
-rw-r--r--template/en/default/search/search-report-graph.html.tmpl126
-rw-r--r--template/en/default/search/search-report-select.html.tmpl2
-rw-r--r--template/en/default/search/search-report-table.html.tmpl52
-rw-r--r--template/en/default/search/search-specific.html.tmpl58
-rw-r--r--template/en/default/search/tabs.html.tmpl12
10 files changed, 134 insertions, 170 deletions
diff --git a/template/en/default/search/boolean-charts.html.tmpl b/template/en/default/search/boolean-charts.html.tmpl
index 508e11c65..bfb4e7bf1 100644
--- a/template/en/default/search/boolean-charts.html.tmpl
+++ b/template/en/default/search/boolean-charts.html.tmpl
@@ -33,6 +33,8 @@
"changedby",
"matches",
"notmatches",
+ "isempty",
+ "isnotempty",
] %]
<div class="bz_section_title" id="custom_search_filter">
@@ -132,7 +134,15 @@
id="f[% cond_num FILTER html %]"
onchange="fix_query_string(this)"
class="custom_search_form_field">
- [% FOREACH field = fields %]
+ [%# Turn the array in to a hash with the name as the key %]
+ [%
+ field_hash = {};
+ FOREACH field IN fields;
+ field_hash.${field.name} = field;
+ END;
+ %]
+ [% FOREACH field_name = field_hash.keys.sort_by_field_name(field_descs) %]
+ [% field = field_hash.$field_name %]
<option value="[% field.name FILTER html %]"
[%~ ' selected="selected"' IF field.name == condition.f %]>
[% field_descs.${field.name} || field.description FILTER html %]
diff --git a/template/en/default/search/field.html.tmpl b/template/en/default/search/field.html.tmpl
index 45c3650f8..5a95d67c1 100644
--- a/template/en/default/search/field.html.tmpl
+++ b/template/en/default/search/field.html.tmpl
@@ -23,7 +23,7 @@
<input name="[% field.name FILTER html %]"
id="[% field.name FILTER html %]" size="40"
[% IF onchange %] onchange="[% onchange FILTER html %]"[% END %]
- value="[% value FILTER html %]">
+ value="[% value FILTER html %]" [% 'autofocus' IF focus %]>
[% CASE constants.FIELD_TYPE_KEYWORDS %]
[% INCLUDE "bug/field-label.html.tmpl"
field = field
@@ -39,10 +39,10 @@
<input name="[% field.name FILTER html %]"
id="[% field.name FILTER html %]" size="40"
[% IF onchange %] onchange="[% onchange FILTER html %]"[% END %]
- value="[% value FILTER html %]">
+ value="[% value FILTER html %]" [% 'autofocus' IF focus %]>
<div id="[% field.name FILTER html %]_autocomplete"></div>
</div>
- <script type="text/javascript" defer="defer">
+ <script type="text/javascript">
if (typeof YAHOO.bugzilla.field_array === "undefined")
YAHOO.bugzilla.field_array = [];
YAHOO.bugzilla.field_array["[% field.name FILTER js %]"] = [
@@ -52,7 +52,7 @@
YAHOO.bugzilla.fieldAutocomplete.init('[% field.name FILTER js %]',
'[% field.name FILTER js %]_autocomplete');
</script>
- [% CASE constants.FIELD_TYPE_DATETIME %]
+ [% CASE [constants.FIELD_TYPE_DATETIME, constants.FIELD_TYPE_DATE] %]
[% INCLUDE "bug/field-label.html.tmpl"
field = field
tag_name = "span"
diff --git a/template/en/default/search/form.html.tmpl b/template/en/default/search/form.html.tmpl
index 8cfb12aac..0420811ee 100644
--- a/template/en/default/search/form.html.tmpl
+++ b/template/en/default/search/form.html.tmpl
@@ -52,11 +52,8 @@ TUI_hide_default('information_query');
value = default.short_desc.0
type_selected = default.short_desc_type.0
accesskey = "s"
- %]
- <script type="text/javascript"> <!--
- document.getElementById('short_desc').focus();
- // -->
- </script>
+ focus = 1
+ %]
[% IF button_name %]
<input type="submit" id="[% button_name FILTER css_class_quote %]_top"
@@ -114,7 +111,7 @@ TUI_hide_default('information_query');
[%+ field_descs.longdesc FILTER html %]s, [%+ field_descs.bug_file_loc FILTER html %],
[% IF Param('usestatuswhiteboard') %] [%+ field_descs.status_whiteboard FILTER html %], [%+ END %]
[% IF use_keywords %] [%+ field_descs.keywords FILTER html %], [%+ END %]
- [% IF user.is_timetracker %] [%+ field_descs.deadline FILTER html %], [%+ END %]
+ [% IF Param('timetrackinggroup') %] [%+ field_descs.deadline FILTER html %], [%+ END %]
[% terms.Bug %] Numbers, [%+ field_descs.version FILTER html %],
[% IF Param('usetargetmilestone') %] [%+ field_descs.target_milestone FILTER html %], [%+ END %]
[% field_descs.bug_severity FILTER html %], [%+ field_descs.priority FILTER html %], [%+ field_descs.rep_platform FILTER html %],
@@ -153,8 +150,7 @@ TUI_hide_default('information_query');
</div>
[% END %]
- [%# Deadline %]
- [% IF user.is_timetracker %]
+ [% IF Param('timetrackinggroup') %]
<div class="search_field_row">
[% INCLUDE "search/field.html.tmpl"
field = bug_fields.deadline
@@ -166,16 +162,18 @@ TUI_hide_default('information_query');
<div class="search_field_row">
<span class="field_label"><label for="bug_id">[% terms.Bugs %] numbered</label></span>
- <div id="bug_id_container" >
+ <div id="bug_id_container">
<input type="text" name="bug_id" id="bug_id"
value="[% default.bug_id.0 FILTER html %]" size="20">
<div class="field_help">(comma-separated list)</div>
</div>
- should be
- <select name="bug_id_type" id="bug_id_type">
- <option value="anyexact"[% " selected" IF default.bug_id_type.0 == "anyexact" %]>only included in</option>
- <option value="nowords"[% " selected" IF default.bug_id_type.0 == "nowords" %]>excluded from</option>
- </select> the results
+ <span class="field_label field_label_sup">
+ should be
+ <select name="bug_id_type" id="bug_id_type">
+ <option value="anyexact"[% " selected" IF default.bug_id_type.0 == "anyexact" %]>only included in</option>
+ <option value="nowords"[% " selected" IF default.bug_id_type.0 == "nowords" %]>excluded from</option>
+ </select> the results
+ </span>
</div>
[% Hook.process('after_freetext_fields') %]
diff --git a/template/en/default/search/search-advanced.html.tmpl b/template/en/default/search/search-advanced.html.tmpl
index 2bff834bc..07c5fc528 100644
--- a/template/en/default/search/search-advanced.html.tmpl
+++ b/template/en/default/search/search-advanced.html.tmpl
@@ -29,8 +29,8 @@ function remove_token() {
yui = [ 'autocomplete', 'calendar' ]
javascript = javascript
javascript_urls = [ "js/util.js", "js/TUI.js", "js/field.js"]
- style_urls = [ "skins/standard/search_form.css" ]
- doc_section = "query.html"
+ style_urls = ['skins/standard/buglist.css']
+ doc_section = "using/finding.html"
%]
[% WRAPPER search/tabs.html.tmpl %]
diff --git a/template/en/default/search/search-create-series.html.tmpl b/template/en/default/search/search-create-series.html.tmpl
index d2f8f7d0b..95750ebc0 100644
--- a/template/en/default/search/search-create-series.html.tmpl
+++ b/template/en/default/search/search-create-series.html.tmpl
@@ -22,8 +22,8 @@
yui = [ 'autocomplete', 'calendar' ]
javascript = js_data
javascript_urls = [ "js/util.js", "js/TUI.js", "js/field.js" ]
- style_urls = [ "skins/standard/search_form.css" ]
- doc_section = "reporting.html#charts-new-series"
+ style_urls = ['skins/standard/buglist.css']
+ doc_section = "using/reports-and-charts.html#creating-charts"
%]
<form method="get" action="chart.cgi" name="chartform">
diff --git a/template/en/default/search/search-report-graph.html.tmpl b/template/en/default/search/search-report-graph.html.tmpl
index 698132ee6..b382edf95 100644
--- a/template/en/default/search/search-report-graph.html.tmpl
+++ b/template/en/default/search/search-report-graph.html.tmpl
@@ -21,8 +21,8 @@ var queryform = "reportform"
yui = [ 'autocomplete', 'calendar' ]
javascript = js_data
javascript_urls = [ "js/util.js", "js/TUI.js", "js/field.js" ]
- style_urls = [ "skins/standard/search_form.css" ]
- doc_section = "reporting.html#reports"
+ style_urls = ['skins/standard/buglist.css']
+ doc_section = "using/reports-and-charts.html#reports"
%]
[% PROCESS "search/search-report-select.html.tmpl" %]
@@ -52,71 +52,63 @@ var queryform = "reportform"
[% button_name = "Generate Report" %]
<form method="get" action="report.cgi" name="reportform" id="reportform">
-
-<table align="center">
- <tr>
- <td valign="middle">
- <b>Vertical Axis:</b><br>
- <noscript><small>(not for pie charts)</small><br></noscript>
- [% PROCESS select name = 'y_axis_field' %]<br>
- <br>
- <b>Plot Data Sets:</b><br>
- <input type="radio" name="cumulate" value="0"
- [% " checked" IF default.cumulate.0 != "1" %]>
- Individually<br>
- <input type="radio" name="cumulate" value="1"
- [% " checked" IF default.cumulate.0 == "1" %]>
- Stacked
- </td>
- <td width="150" height="150">
- <table border="1" width="100%" height="100%">
- <tr>
- <td align="center" valign="middle">
- <b>Multiple Images:</b><br>
- [% PROCESS select name = 'z_axis_field' %]
- </td>
- </tr>
- </table>
- </td>
- <td rowspan="2">
- <b>Format:</b><br>
- [% chart_formats = [
- { name => "line", description => "Line Graph" },
- { name => "bar", description => "Bar Chart" },
- { name => "pie", description => "Pie Chart" } ] %]
- [% default.chart_format.0 = default.chart_format.0 || "bar" %]
-
- [% FOREACH chart_format = chart_formats %]
- <input type="radio" name="format"
- value="[% chart_format.name FILTER html %]"
- onchange="chartTypeChanged()"
- [% " checked" IF default.chart_format.0 == chart_format.name %]>
- [% chart_format.description FILTER html %]<br>
- [% END %]
- </td>
- </tr>
-
- <tr>
- <td>
- </td>
- <td align="left">
- <b>Horizontal Axis:</b>
- [% PROCESS select name = 'x_axis_field' %]<br>
- <label for="x_labels_vertical"><b>Vertical labels:</b></label>
- <input type="checkbox" name="x_labels_vertical" id="x_labels_vertical"
- value="1"
- [% " checked" IF default.x_labels_vertical.0 == "1" %]>
- </td>
- <td>
- </td>
- </tr>
-</table>
-
-<hr>
-
-[% PROCESS search/form.html.tmpl %]
-
-[% PROCESS "search/boolean-charts.html.tmpl" %]
+ <table id="graphical_reports_menu">
+ <tr>
+ <th id="reports_menu_vertical_axis">
+ Vertical Axis:<br>
+ [% PROCESS select name = 'y_axis_field' %]<br>
+ <br>
+ Plot Data Sets:<br>
+ <input type="radio" id="cumulate_indiv" name="cumulate" value="0"
+ [%+ 'checked="checked"' IF default.cumulate.0 != "1" %]>
+ <label for="cumulate_indiv">Individually</label><br>
+ <input type="radio" id="cumulate_stacked" name="cumulate" value="1"
+ [%+ 'checked="checked"' IF default.cumulate.0 == "1" %]>
+ <label for="cumulate_stacked">Stacked</label>
+ </th>
+ <th id="reports_menu_multiple_tables">
+ Multiple Images:<br>
+ [% PROCESS select name = 'z_axis_field' %]
+ </th>
+ <th id="reports_menu_format">
+ Format:<br>
+ [% chart_formats = [
+ { name => "line", description => "Line Graph" },
+ { name => "bar", description => "Bar Chart" },
+ { name => "pie", description => "Pie Chart" } ] %]
+ [% default.chart_format.0 = default.chart_format.0 || "bar" %]
+
+ [% FOREACH chart_format = chart_formats %]
+ <input type="radio" id="format_[% chart_format.name FILTER html %]"
+ name="format" value="[% chart_format.name FILTER html %]"
+ onchange="chartTypeChanged()"
+ [%+ 'checked="checked"' IF default.chart_format.0 == chart_format.name %]>
+ <label for="format_[% chart_format.name FILTER html %]">
+ [% chart_format.description FILTER html %]
+ </label><br>
+ [% END %]
+ </th>
+ </tr>
+
+ <tr>
+ <th></th>
+ <th id="reports_menu_horizontal_axis">
+ Horizontal Axis:<br>
+ [% PROCESS select name = 'x_axis_field' %]<br>
+ <input type="checkbox" name="x_labels_vertical" id="x_labels_vertical"
+ value="1"
+ [%+ 'checked="checked"' IF default.x_labels_vertical.0 == "1" %]>
+ <label for="x_labels_vertical">Vertical labels</label>
+ </th>
+ <th></th>
+ </tr>
+ </table>
+
+ <hr>
+
+ [% PROCESS search/form.html.tmpl %]
+
+ [% PROCESS "search/boolean-charts.html.tmpl" %]
<div id="knob">
<input type="submit" id="[% button_name FILTER css_class_quote %]"
diff --git a/template/en/default/search/search-report-select.html.tmpl b/template/en/default/search/search-report-select.html.tmpl
index 93b4c44f8..40eeda1c1 100644
--- a/template/en/default/search/search-report-select.html.tmpl
+++ b/template/en/default/search/search-report-select.html.tmpl
@@ -17,7 +17,7 @@
<select name="[% name FILTER html %]">
<option value="">&lt;none&gt;</option>
- [% FOREACH field = report_columns.keys.sort %]
+ [% FOREACH field = report_columns.keys.sort_by_field_name(field_descs) %]
[% NEXT IF field == "classification" AND !Param('useclassification') %]
[% NEXT IF field == "target_milestone" AND !Param('usetargetmilestone') %]
[% NEXT IF field == "qa_contact" AND !Param('useqacontact') %]
diff --git a/template/en/default/search/search-report-table.html.tmpl b/template/en/default/search/search-report-table.html.tmpl
index 7e0a0022d..483fd5b07 100644
--- a/template/en/default/search/search-report-table.html.tmpl
+++ b/template/en/default/search/search-report-table.html.tmpl
@@ -21,8 +21,8 @@ var queryform = "reportform"
yui = [ 'autocomplete', 'calendar' ]
javascript = js_data
javascript_urls = [ "js/util.js", "js/TUI.js", "js/field.js" ]
- style_urls = [ "skins/standard/search_form.css" ]
- doc_section = "reporting.html#reports"
+ style_urls = ['skins/standard/buglist.css']
+ doc_section = "using/reports-and-charts.html#reports"
%]
[% PROCESS "search/search-report-select.html.tmpl" %]
@@ -35,36 +35,28 @@ var queryform = "reportform"
[% button_name = "Generate Report" %]
<form method="get" action="report.cgi" name="reportform" id="reportform">
+ <table id="tabular_reports_menu">
+ <tr>
+ <th></th>
+ <th id="reports_menu_horizontal_axis">
+ Horizontal Axis:<br>
+ [% PROCESS select name = 'x_axis_field' %]
+ </th>
+ </tr>
-<table align="center">
- <tr>
- <td>
- </td>
- <td align="center">
- <b>Horizontal Axis:</b>
- [% PROCESS select name = 'x_axis_field' %]
- </td>
- </tr>
+ <tr>
+ <th id="reports_menu_vertical_axis">
+ Vertical Axis:<br>
+ [% PROCESS select name = 'y_axis_field' %]
+ </th>
+ <th id="reports_menu_multiple_tables">
+ Multiple Tables:<br>
+ [% PROCESS select name = 'z_axis_field' %]
+ </th>
+ </tr>
+ </table>
- <tr>
- <td valign="middle" align="center">
- <b>Vertical Axis:</b><br>
- [% PROCESS select name = 'y_axis_field' %]
- </td>
- <td width="150" height="150">
- <table border="1" width="100%">
- <tr>
- <td align="center" valign="middle" height="150">
- <b>Multiple Tables:</b><br>
- [% PROCESS select name = 'z_axis_field' %]
- </td>
- </tr>
- </table>
- </td>
- </tr>
-</table>
-
-<hr>
+ <hr>
[% PROCESS search/form.html.tmpl %]
diff --git a/template/en/default/search/search-specific.html.tmpl b/template/en/default/search/search-specific.html.tmpl
index f09d4bdc0..af61ce52f 100644
--- a/template/en/default/search/search-specific.html.tmpl
+++ b/template/en/default/search/search-specific.html.tmpl
@@ -8,14 +8,15 @@
[% PROCESS global/header.html.tmpl
title = "Simple Search"
- style_urls = [ "skins/standard/search_form.css" ]
+ style_urls = ['skins/standard/buglist.css']
+ doc_section = "using/finding.html"
%]
[% WRAPPER search/tabs.html.tmpl %]
<p>
Find a specific [% terms.bug %] by entering words that describe it.
-[% terms.Bugzilla %] will search [% terms.bug %] descriptions and comments
+Bugzilla will search [% terms.bug %] descriptions and comments
for those words and return a list of matching [% terms.bugs %] sorted
by relevance.
</p>
@@ -36,7 +37,7 @@ for "crash secure SSL flash".
}
</script>
-<table summary="Search fields" class="bz_simple_search_form">
+<table class="bz_simple_search_form">
<tr>
<th>
<label for="bug_status">[% field_descs.bug_status FILTER html %]:</label>
@@ -60,30 +61,11 @@ for "crash secure SSL flash".
<label for="product">[% field_descs.product FILTER html %]:</label>
</th>
<td>
- <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>
+ [% INCLUDE "global/product-select.html.tmpl"
+ id => "product"
+ name => "product"
+ add => "All"
+ %]
</td>
</tr>
<tr>
@@ -91,28 +73,14 @@ for "crash secure SSL flash".
<label for="content">Words:</label>
</th>
<td>
- <input name="content" size="40" id="content"
- value="[% default.content.0 FILTER html %]">
- <script type="text/javascript"> <!--
- document.forms['queryform'].content.focus();
- // -->
- </script>
+ <input name="content" size="40" id="content" autofocus
+ value="[% default.content.0 FILTER html %]"
+ [%- " required" UNLESS Param('search_allow_no_criteria') %]>
</td>
</tr>
<tr>
<td></td>
- <td>
-
- [% IF Param('search_allow_no_criteria') %]
- <input type="submit" id="search" value="Search">
- [% ELSE %]
- <input type="submit" id="search" value="Search"
- onclick="if (this.form.content.value == '')
- {alert('The Words field cannot be empty. You have to ' +
- 'enter at least one word in your search criteria.');
- return false;} return true;">
- [% END %]
- </td>
+ <td><input type="submit" id="search" value="Search"></td>
</tr>
</table>
</form>
diff --git a/template/en/default/search/tabs.html.tmpl b/template/en/default/search/tabs.html.tmpl
index f7703fd92..74569dceb 100644
--- a/template/en/default/search/tabs.html.tmpl
+++ b/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"
%]