From cce0280bc6d98dbe6ba73e59b092e469f3435dd0 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Sat, 6 Dec 2008 19:44:42 +0000 Subject: Bug 463002 - Show a description of what you searched for, at the top of buglist.cgi Patch By Max Kanat-Alexander r=bbaetz, a=mkanat --- template/en/default/global/field-descs.none.tmpl | 28 ++++++++++ template/en/default/list/list.html.tmpl | 27 +++++++--- .../en/default/search/boolean-charts.html.tmpl | 58 ++++++++++---------- template/en/default/search/form.html.tmpl | 62 ++++++++-------------- template/en/default/search/type-select.html.tmpl | 29 ++++++++++ 5 files changed, 130 insertions(+), 74 deletions(-) create mode 100644 template/en/default/search/type-select.html.tmpl (limited to 'template') diff --git a/template/en/default/global/field-descs.none.tmpl b/template/en/default/global/field-descs.none.tmpl index 7d89bd5c2..324edb592 100644 --- a/template/en/default/global/field-descs.none.tmpl +++ b/template/en/default/global/field-descs.none.tmpl @@ -99,6 +99,34 @@ [% END %] [% END %] +[% SET search_descs = { + "noop" => "---", + "equals" => "is equal to", + "notequals" => "is not equal to", + "anyexact" => "is equal to any of the strings", + "substring" => "contains the string", + "casesubstring" => "contains the string (exact case)", + "notsubstring" => "does not contain the string", + "anywordssubstr" => "contains any of the strings", + "allwordssubstr" => "contains all of the strings", + "nowordssubstr" => "contains none of the strings", + "regexp" => "matches regular expression", + "notregexp" => "does not match regular expression", + "lessthan" => "is less than", + "lessthaneq" => "is less than or equal to", + "greaterthan" => "is greater than", + "greaterthaneq" => "is greater than or equal to", + "anywords" => "contains any of the words", + "allwords" => "contains all of the words", + "nowords" => "contains none of the words", + "changedbefore" => "changed before", + "changedafter" => "changed after", + "changedfrom" => "changed from", + "changedto" => "changed to", + "changedby" => "changed by", + "matches" => "matches", +} %] + [% field_types = { ${constants.FIELD_TYPE_UNKNOWN} => "Unknown Type", ${constants.FIELD_TYPE_FREETEXT} => "Free Text", ${constants.FIELD_TYPE_SINGLE_SELECT} => "Drop Down", diff --git a/template/en/default/list/list.html.tmpl b/template/en/default/list/list.html.tmpl index 8d67e6c41..467e4dfc7 100644 --- a/template/en/default/list/list.html.tmpl +++ b/template/en/default/list/list.html.tmpl @@ -28,7 +28,7 @@ [%# Template Initialization #%] [%############################################################################%] -[% PROCESS global/variables.none.tmpl %] +[% PROCESS "global/field-descs.none.tmpl" %] [% title = "$terms.Bug List" %] [% IF searchname || defaultsavename %] @@ -58,11 +58,6 @@ [% IF debug %] -

- [% FOREACH debugline = debugdata %] - [% debugline FILTER html %]
- [% END %] -

[% query FILTER html %]

[% IF query_explain.defined %]
[% query_explain FILTER html %]
@@ -85,6 +80,26 @@ [% END %] +[% SET shown_types = [ + 'notequal', 'regexp', 'notregexp', 'lessthan', 'lessthaneq', + 'greaterthan', 'greaterthaneq', 'changedbefore', 'changedafter', + 'changedfrom', 'changedto', 'changedby', +] %] + +
[%############################################################################%] diff --git a/template/en/default/search/boolean-charts.html.tmpl b/template/en/default/search/boolean-charts.html.tmpl index 97a10d4ab..db21be681 100644 --- a/template/en/default/search/boolean-charts.html.tmpl +++ b/template/en/default/search/boolean-charts.html.tmpl @@ -17,31 +17,34 @@ # # Contributor(s): Gervase Markham #%] + +[% PROCESS "global/field-descs.none.tmpl" %] [% types = [ - { name => "noop", description => "---" }, - { name => "equals", description => "is equal to" }, - { name => "notequals", description => "is not equal to" }, - { name => "anyexact", description => "is equal to any of the strings" }, - { name => "substring", description => "contains the string" }, - { name => "casesubstring", description => "contains the string (exact case)" }, - { name => "notsubstring", description => "does not contain the string" }, - { name => "anywordssubstr", description => "contains any of the strings" }, - { name => "allwordssubstr", description => "contains all of the strings" }, - { name => "nowordssubstr", description => "contains none of the strings" }, - { name => "regexp", description => "contains regexp" }, - { name => "notregexp", description => "does not contain regexp" }, - { name => "lessthan", description => "is less than" }, - { name => "greaterthan", description => "is greater than" }, - { name => "anywords", description => "contains any of the words" }, - { name => "allwords", description => "contains all of the words" }, - { name => "nowords", description => "contains none of the words" }, - { name => "changedbefore", description => "changed before" }, - { name => "changedafter", description => "changed after" }, - { name => "changedfrom", description => "changed from" }, - { name => "changedto", description => "changed to" }, - { name => "changedby", description => "changed by" }, - { name => "matches", description => "matches" } ] %] + "noop", + "equals", + "notequals", + "anyexact", + "substring", + "casesubstring", + "notsubstring", + "anywordssubstr", + "allwordssubstr", + "nowordssubstr", + "regexp", + "notregexp", + "lessthan", + "greaterthan", + "anywords", + "allwords", + "nowords", + "changedbefore", + "changedafter", + "changedfrom", + "changedto", + "changedby", + "matches", +] %]

@@ -80,12 +83,9 @@ [% END %] - + [% INCLUDE "search/type-select.html.tmpl" + name = "type${chartnum}-${rownum}-${colnum}", + types = types, selected = col.type %] diff --git a/template/en/default/search/form.html.tmpl b/template/en/default/search/form.html.tmpl index 05b52dca4..46df426c1 100644 --- a/template/en/default/search/form.html.tmpl +++ b/template/en/default/search/form.html.tmpl @@ -20,6 +20,8 @@ # Gervase Markham #%] +[% PROCESS "global/field-descs.none.tmpl" %] + - -[% PROCESS global/variables.none.tmpl %] - -[% query_variants = [ - { value => "allwordssubstr", description => "contains all of the words/strings" }, - { value => "anywordssubstr", description => "contains any of the words/strings" }, - { value => "substring", description => "contains the string" }, - { value => "casesubstring", description => "contains the string (exact case)" }, - { value => "allwords", description => "contains all of the words" }, - { value => "anywords", description => "contains any of the words" }, - { value => "regexp", description => "matches the regexp" }, - { value => "notregexp", description => "doesn't match the regexp" } ] %] - -[% PROCESS "global/field-descs.none.tmpl" %] +[% query_types = [ + "allwordssubstr", + "anywordssubstr", + "substring", + "casesubstring", + "allwords", + "anywords", + "regexp", + "notregexp", +] %] [%# If we resubmit to ourselves, we need to know if we are using a format. %] [% thisformat = query_format != '' ? query_format : format %] @@ -130,12 +128,9 @@ function doOnSelectProduct(selectmode) { : - + [% INCLUDE "search/type-select.html.tmpl" + name = "short_desc_type", + types = query_types, selected = default.short_desc_type.0 %] "long_desc", description => "A Comment", + { name => "longdesc", description => "A Comment", accesskey => 'c' }, { name => "bug_file_loc", description => "The URL", accesskey => 'u' }, @@ -278,13 +273,9 @@ function doOnSelectProduct(selectmode) { : - + [% INCLUDE "search/type-select.html.tmpl" + name = field.name _ "_type", + types = query_types, selected = default.$type.0 %] @@ -300,17 +291,10 @@ function doOnSelectProduct(selectmode) { : - + [% INCLUDE "search/type-select.html.tmpl" + name = "keywords_type", + types = ['allwords', 'anywords', 'nowords'], + selected = default.keywords_type.0 %] + #%] + +[% PROCESS "global/field-descs.none.tmpl" %] + + -- cgit v1.2.3-24-g4f1b