From ba702dcd7ac9b2e6c4d46ad21c7bfacfd6883189 Mon Sep 17 00:00:00 2001 From: Dexter Morgan Date: Wed, 20 Feb 2013 16:07:49 +0000 Subject: Add 4.0 branch --- .../en/default/search/boolean-charts.html.tmpl | 27 +- template/en/default/search/field.html.tmpl | 142 +++++ template/en/default/search/form.html.tmpl | 704 +++++++-------------- .../en/default/search/search-advanced.html.tmpl | 29 +- .../default/search/search-create-series.html.tmpl | 5 +- .../default/search/search-report-graph.html.tmpl | 17 +- .../default/search/search-report-select.html.tmpl | 8 +- .../default/search/search-report-table.html.tmpl | 23 +- 8 files changed, 436 insertions(+), 519 deletions(-) create mode 100644 template/en/default/search/field.html.tmpl (limited to 'template/en/default/search') diff --git a/template/en/default/search/boolean-charts.html.tmpl b/template/en/default/search/boolean-charts.html.tmpl index 1b79a45..90b5c79 100644 --- a/template/en/default/search/boolean-charts.html.tmpl +++ b/template/en/default/search/boolean-charts.html.tmpl @@ -34,7 +34,9 @@ "regexp", "notregexp", "lessthan", + "lessthaneq", "greaterthan", + "greaterthaneq", "anywords", "allwords", "nowords", @@ -46,13 +48,18 @@ "matches", "notmatches", ] %] - -

- - Advanced Searching Using Boolean Charts: - -

- + +
+
+ + Custom Search Didn't find what + you're looking for above? This area allows for ANDs, ORs, + and other more complex searches. +
+
[%# Whoever wrote the original version of boolean charts had a seriously twisted mind %] [% jsmagic = "onclick=\"this.form.action='query.cgi#chart'; this.form.method='POST'; return 1;\"" %] @@ -87,9 +94,8 @@ [% INCLUDE "search/type-select.html.tmpl" name = "type${chartnum}-${rownum}-${colnum}", types = types, selected = col.type %] - + value="[% col.value FILTER html %]"> [% UNLESS loop.last %] @@ -132,5 +138,6 @@ [% END %] -
+ [% "
" IF NOT loop.last %] [% END %] +
\ No newline at end of file diff --git a/template/en/default/search/field.html.tmpl b/template/en/default/search/field.html.tmpl new file mode 100644 index 0000000..defc94c --- /dev/null +++ b/template/en/default/search/field.html.tmpl @@ -0,0 +1,142 @@ +[%# The contents of this file are subject to the Mozilla Public + # License Version 1.1 (the "License"); you may not use this file + # except in compliance with the License. You may obtain a copy of + # the License at http://www.mozilla.org/MPL/ + # + # Software distributed under the License is distributed on an "AS + # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + # implied. See the License for the specific language governing + # rights and limitations under the License. + # + # The Original Code is the Bugzilla Bug Tracking System. + # + # The Initial Developer of the Original Code is Guy Pyrzak + # Portions created by the Initial Developer are Copyright (C) 2010 the + # Initial Developer. All Rights Reserved. + # + # Contributor(s): Guy Pyrzak + # Reed Loden + # + #%] +[%# INTERFACE: + # field: a Bugzilla::Field object + # value: the value or values that should be used to prepopulate the field + # accesskey: the access key used to access the field more quickly + # onchange: js to run when the change event fires on the field + # type_selected: used by the free text to indicate which type of text + # search was selected for a particular field + #%] + +[% SWITCH field.type %] + [% CASE [ constants.FIELD_TYPE_FREETEXT, + constants.FIELD_TYPE_TEXTAREA, + constants.FIELD_TYPE_UNKNOWN ] %] + [% INCLUDE "bug/field-label.html.tmpl" + field = field + tag_name = "span" + editable = 1 + %] + [% INCLUDE "search/type-select.html.tmpl" + name = field.name _ "_type", + types = types, + selected = type_selected + %] + + [% CASE constants.FIELD_TYPE_KEYWORDS %] + [% INCLUDE "bug/field-label.html.tmpl" + field = field + tag_name = "span" + editable = 1 + %] + [% INCLUDE "search/type-select.html.tmpl" + name = field.name _ "_type", + types = types, + selected = type_selected + %] +
+ +
+
+ + [% CASE constants.FIELD_TYPE_DATETIME %] + [% INCLUDE "bug/field-label.html.tmpl" + field = field + tag_name = "span" + editable = 1 + %] + from + + + to + + (YYYY-MM-DD or relative dates) + + + + [% CASE [ constants.FIELD_TYPE_SINGLE_SELECT, + constants.FIELD_TYPE_MULTI_SELECT ] %] +
+ [% INCLUDE "bug/field-label.html.tmpl" + field = field + editable = 1 + tag_name = "span" + %] + +
+ [% END %] diff --git a/template/en/default/search/form.html.tmpl b/template/en/default/search/form.html.tmpl index 2e2ae73..f310420 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,389 +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" + 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 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 %] + [% 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 %], + [%+ field_descs.op_sys FILTER html %] + +
[%# *** 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 Votes *** %] - - - - - + [% Hook.process('email_numbering_end') %] + [%# *** Bug Changes *** %] - - - -
-
- - - [% IF Param('usevotes') %] - Email Addresses, [% terms.Bug %] Numbers, and Votes - [% ELSE %] - Email Addresses and [% terms.Bug %] Numbers - [% END %] - - - - - - - [% FOREACH n = [1, 2] %] - - [% END %] - -
- - - - - - - - - - - - - [% IF Param('useqacontact') %] - - - - [% END %] - - - - - - - - - - - - -
+ + +[%# *** Email Numbering *** %] +
+
+ Search By People + Narrow results to a role (i.e. [% field_descs.assigned_to FILTER html %], + [%+ field_descs.reporter FILTER html %], [% field_descs.commenter FILTER html %], + etc.) a person has on [% terms.abug %] + +
+
+ [% 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}" } %] -
- -
- - -
-
- - - - - - - - - - [% IF Param('usevotes') %] - - - - + [% IF feature_enabled('jsonrpc') %] +
+ [% END %] + + [% IF feature_enabled('jsonrpc') %] +
+
+ + [% END %] + [% END %] -
- - : - - -
(comma-separated list)
- : - - - votes -
- - -
-
-
- [% 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 %] diff --git a/template/en/default/search/search-advanced.html.tmpl b/template/en/default/search/search-advanced.html.tmpl index cb0519a..ef7fa76 100644 --- a/template/en/default/search/search-advanced.html.tmpl +++ b/template/en/default/search/search-advanced.html.tmpl @@ -36,10 +36,11 @@ var queryform = "queryform" [% PROCESS global/header.html.tmpl title = "Search for $terms.bugs" - onload = "doOnSelectProduct(0); enableHelp();" + onload = "doOnSelectProduct(0);" javascript = js_data - javascript_urls = [ "js/productform.js" "js/util.js" "js/help.js" ] - style_urls = [ "skins/standard/help.css" ] + yui = [ 'autocomplete', 'calendar' ] + javascript_urls = [ "js/productform.js", "js/util.js", "js/TUI.js", "js/field.js"] + style_urls = [ "skins/standard/search_form.css" ] doc_section = "query.html" style = "dl.bug_changes dt { margin-top: 15px; @@ -50,30 +51,16 @@ var queryform = "queryform" [% button_name = "Search" %] -[%# The decent help requires Javascript %] - +

    Hover your mouse over each field label to get help for that field.

    -
    + [% PROCESS search/form.html.tmpl %] -[% PROCESS search/knob.html.tmpl %] - -
    - [% PROCESS "search/boolean-charts.html.tmpl" %] +[% PROCESS search/knob.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 da1011e..c425fbd 100644 --- a/template/en/default/search/search-create-series.html.tmpl +++ b/template/en/default/search/search-create-series.html.tmpl @@ -33,8 +33,10 @@ [% PROCESS global/header.html.tmpl title = "Create New Data Set" onload = "doOnSelectProduct(0);" + yui = [ 'autocomplete', 'calendar' ] javascript = js_data - javascript_urls = [ "js/productform.js" ] + javascript_urls = [ "js/util.js", "js/productform.js", "js/TUI.js", "js/field.js" ] + style_urls = [ "skins/standard/search_form.css" ] doc_section = "reporting.html#charts-new-series" %] @@ -52,6 +54,7 @@ [% PROCESS reports/series.html.tmpl button_name = "Create Data Set" %] +