From 9fd857307079b57f515fa394cd8f0aefc64336e0 Mon Sep 17 00:00:00 2001 From: Guy Pyrzak Date: Sun, 6 Jun 2010 01:40:18 -0700 Subject: Bug 450301: What Simplify searching UI, initial improvements to the advanced search ui. r=mkanat, a=mkanat --- template/en/default/search/form.html.tmpl | 673 ++++++++++-------------------- 1 file changed, 229 insertions(+), 444 deletions(-) (limited to 'template/en/default/search/form.html.tmpl') diff --git a/template/en/default/search/form.html.tmpl b/template/en/default/search/form.html.tmpl index 63ca03565..c7e6f96a8 100644 --- a/template/en/default/search/form.html.tmpl +++ b/template/en/default/search/form.html.tmpl @@ -18,6 +18,7 @@ # Contributor(s): Chris Lahey [javascript fixes] # Christian Reis [javascript rewrite] # Gervase Markham + # Guy Pyrzak #%] [% PROCESS "global/field-descs.none.tmpl" %] @@ -103,6 +104,17 @@ function doOnSelectProduct(selectmode) { } } +// Hide the Advanced Fields by default, unless the user has a cookie +// that specifies otherwise. +// ▸ and ▾ are both utf8 escaped characters for right +// and down facing arrows respectivly. +TUI_alternates['history_query'] = '►'; +TUI_alternates['people_query'] = '►'; +TUI_alternates['information_query'] = '►'; + +TUI_hide_default('history_query'); +TUI_hide_default('people_query'); +TUI_hide_default('information_query'); [% query_types = [ @@ -122,383 +134,202 @@ function doOnSelectProduct(selectmode) { [%# *** Summary *** %] - - - - - - - + -[%# *** Classification Product Component Version Target *** %] - - - +[%# *** Classification Product Component *** %] + +[% Hook.process('before_selects_top') %] +[% IF Param('useclassification') %] + [% fake_classfication = { name => bug_fields.classification.name, + type => constants.FIELD_TYPE_SINGLE_SELECT } %] + [% INCLUDE "search/field.html.tmpl" + field => fake_classfication + accesskey => "c" + onchange => "doOnSelectProduct(1);" + value => default.classification + %] +[% END %] +[% INCLUDE "search/field.html.tmpl" + field => bug_fields.product + accesskey => "p" + onchange => "doOnSelectProduct(2);" + value => default.product +%] +[% INCLUDE "search/field.html.tmpl" + field => bug_fields.component + accesskey => "m" + onchange => "doOnSelectProduct(2);" + value => default.component +%] +[% INCLUDE "search/field.html.tmpl" + field => bug_fields.bug_status + accesskey => "a" + value => default.bug_status +%] +[% INCLUDE "search/field.html.tmpl" + field => bug_fields.resolution + accesskey => "r" + value => default.resolution +%] + +[% Hook.process('after_selects_top') %] + +
+
+ + Detailed [% terms.Bug %] Information + + Narrow results by the following fields: + [%+ field_descs.longdesc %]s, [%+ field_descs.bug_file_loc %], + [% IF Param('usestatuswhiteboard') %] [%+ field_descs.status_whiteboard %], [%+ END %] + [% IF use_keywords %] [%+ field_descs.keywords %], [%+ END %] + [% IF user.is_timetracker %] [%+ field_descs.deadline %], [%+ END %] + [% terms.Bug %] Numbers, [%+ field_descs.version %], + [% IF Param('usetargetmilestone') %] [%+ field_descs.target_milestone %], [%+ END %] + [% field_descs.bug_severity %], [%+ field_descs.priority%], [%+ field_descs.rep_platform %], + [%+ field_descs.op_sys %] + +
[%# *** Comment URL Whiteboard Keywords *** %] - +
[% SET freetext_fields = [ - { name => "longdesc", description => "A Comment", - accesskey => 'c' }, - { name => "bug_file_loc", description => "The URL", - accesskey => 'u' }, - { name => "status_whiteboard", description => "Whiteboard", - accesskey => 'w' } + { field => bug_fields.longdesc, accesskey => 'c' }, + { field => bug_fields.bug_file_loc, accesskey => 'u' }, + { field => bug_fields.status_whiteboard, accesskey => 'w' }, + { field => bug_fields.keywords, accesskey => 'k', + qtypes => ['allwords', 'anywords', 'nowords', 'regexp', 'notregexp'] } ] %] - [% Hook.process('before_freetext_fields') %] - [% FOREACH field = freetext_fields %] - [% NEXT IF field.name == 'status_whiteboard' + + [%# loop through a bunch of free text fields and print out their text stuff %] + [% FOREACH field_container = freetext_fields %] + [% NEXT IF field_container.field.name == 'status_whiteboard' AND NOT Param('usestatuswhiteboard') %] -
- - - - - - [% END %] - - [% IF use_keywords %] - - - - - + [% NEXT IF field_container.field.name == 'keywords' + AND NOT use_keywords + %] +
+ [% type = field_container.field.name _ "_type" %] + [% INCLUDE "search/field.html.tmpl" + field => field_container.field + types => field_container.qtypes || query_types + accesskey => field_container.accesskey + value => default.${field_container.field.name}.0 + type_selected => default.$type.0 + %] +
[% END %] [%# Deadline %] [% IF user.is_timetracker %] - - - - - +
+ [% INCLUDE "search/field.html.tmpl" + field = bug_fields.deadline + accesskey = "l" + value = [ default.deadlinefrom.0, default.deadlineto.0 ] + %] +
[% END %] +
+ +
+ +
(comma-separated list)
+
+ should be + the results +
+ [% Hook.process('after_freetext_fields') %] -
- : - - [% INCLUDE "search/type-select.html.tmpl" - name = "short_desc_type", - types = query_types, selected = default.short_desc_type.0 %] - - +
+ [% INCLUDE "search/field.html.tmpl" + field = bug_fields.short_desc + types = query_types + value = default.short_desc.0 + type_selected = default.short_desc_type.0 + accesskey = "s" + %] -
+ [% IF button_name %] [% END %] -
- - - [% Hook.process('before_selects_top') %] - [% IF Param('useclassification') %] - - [% END %] - - - - [% IF Param('usetargetmilestone') %] - - [% END %] - [% Hook.process('after_selects_top') %] - -
- - - - - - - -
- : -
- -
-
- - - - - - [%# Can't use the select block here because of the onChange %] - - -
- : -
- -
-
- - - - - - [%# Can't use the select block here because 'component' is a toolkit - reserved word - we use 'component_' instead. %] - - -
- : -
- -
-
- - - - - - [% PROCESS select sel = { name => 'version', - size => 5 } %] - -
- : -
-
- - - - - - [% PROCESS select sel = { name => 'target_milestone', - size => 5 } %] - -
- : -
-
-
- : - - [% type = field.name _ "_type" %] - [% INCLUDE "search/type-select.html.tmpl" - name = type, - types = query_types, selected = default.$type.0 %] - -
- : - - [% INCLUDE "search/type-select.html.tmpl" - name = "keywords_type", - types = ['allwords', 'anywords', 'nowords', 'regexp', 'notregexp'], - selected = default.keywords_type.0 %] - - -
- : - - from - to - - (YYYY-MM-DD or relative dates) -
- -
- -[%# *** Status Resolution Severity Priority Hardware OS *** %] - - - + [%# *** Status Resolution Severity Priority Hardware OS *** %] +
[% Hook.process('before_selects_bottom') %] -
- - - - - + [% fake_version_field = { name => bug_fields.version.name, + type => constants.FIELD_TYPE_SINGLE_SELECT }%] + [% INCLUDE "search/field.html.tmpl" + field => fake_version_field + value => default.version + %] + [% IF Param('usetargetmilestone') %] + [% fake_target_milestone_field = { name => bug_fields.target_milestone.name , + type => constants.FIELD_TYPE_SINGLE_SELECT } %] + [% INCLUDE "search/field.html.tmpl" + field => fake_target_milestone_field + value => default.target_milestone + %] + [% END %] + [% INCLUDE "search/field.html.tmpl" + field => bug_fields.bug_severity + accesskey=> "v" + value => default.bug_severity + %] + [% INCLUDE "search/field.html.tmpl" + field => bug_fields.priority + accesskey => "i" + value => default.priority + %] + [% INCLUDE "search/field.html.tmpl" + field => bug_fields.rep_platform + accesskey =>"h" + value => default.rep_platform + %] + [% INCLUDE "search/field.html.tmpl" + field => bug_fields.op_sys + accesskey =>"o" + value => default.op_sys + %] [% Hook.process('after_selects_bottom') %] - -
- - - - - - [% PROCESS select sel = { name => 'bug_status', - size => 7 } %] - -
- : -
-
- - - - - - [% PROCESS select sel = { name => 'resolution', - size => 7 } %] - -
- : -
-
- - - - - - [% PROCESS select sel = { name => 'bug_severity', - size => 7 }%] - -
- : -
-
- - - - - - [% PROCESS select sel = { name => 'priority', - size => 7 } %] - -
- : -
-
- - - - - - [% PROCESS select sel = { name => 'rep_platform', - size => 7 } %] - -
- : -
-
- - - - - - [% PROCESS select sel = { name => 'op_sys', - size => 7 } %] - -
- : -
-
- + + [%# *** Email Numbering *** %] - - - - - + [% Hook.process('email_numbering_end') %] + [%# *** Bug Changes *** %] - - - -
-
- - Email Addresses and [% terms.Bug %] Numbers - - - - - - [% FOREACH n = [1, 2] %] - + + [% END %] - -
- - - - - - - - - - - - - [% IF Param('useqacontact') %] - - - - [% END %] - - - - - - - - - - - - -
+
+
+ Search By People + Narrow results to a role (ie. [% field_descs.assigned_to%], [% field_descs.reporter %], + [% field_descs.commenter %], etc.) a person has on a [% terms.bug %] + +
+
+ [% FOREACH n = [1, 2, 3] %] +
Any of: -
- - -
- - -
- - -
- - -
- - -
+ [% PROCESS role_types field = { count => n, name => "emailassigned_to", + label=> "the ${terms.Bug} ${field_descs.assigned_to}" } %] + [% PROCESS role_types field = { count => n, name => "emailreporter", + label=> "the ${field_descs.reporter}" } %] + [% IF Param('useqacontact') %] + [% PROCESS role_types field = { count => n, name => "emailqa_contact", + label=> "the ${field_descs.qa_contact}" } %] + [% END %] + [% PROCESS role_types field = { count => n, name => "emailcc", + label=> "a ${field_descs.cc} list member" } %] + [% PROCESS role_types field = { count => n, name => "emaillongdesc", + label=> " a ${field_descs.commenter}" } %] -
- -
- - -
-
- - - - - - - - - - [% Hook.process('email_numbering_end') %] -
- - : - - -
(comma-separated list)
- - -
-
-
- [% terms.Bug %] Changes - - -
-
- : -
-
- - and -
(YYYY-MM-DD or relative dates) -
-
- : -
-
+
+
+ Search By Change History + Narrow results to how fields have changed during a specific time period +
+
    +
  • + [%# Create array, so we can sort it by description #%] [% chfields = [] %] [% FOREACH field = chfield %] [% chfields.push({value => field, desc => (field_descs.$field || field) }) %] [% END %] - -
-
and :
-
+ +
  • + -
  • -
    - -
    -
    + +
  • + + + + and +
    + + +
    + (YYYY-MM-DD or relative dates) + +
  • + [%############################################################################%] -[%# Block for SELECT fields #%] +[%# Block for email role type use to select which email to search through #%] [%############################################################################%] - -[% BLOCK select %] - - - +[% BLOCK role_types %] +
    + + +
    [% END %] -- cgit v1.2.3-24-g4f1b