From 63c7d007bf63aa5018939c78a07863eb1fb375f8 Mon Sep 17 00:00:00 2001 From: "gerv%gerv.net" <> Date: Mon, 19 Nov 2001 06:20:20 +0000 Subject: Bug 98707. Query.cgi rewrite, reformatting and templatisation. Patch by me, layout by mpt and others, r=justdave,matty. Wahey! --- template/default/query/query.atml | 778 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 778 insertions(+) create mode 100644 template/default/query/query.atml (limited to 'template') diff --git a/template/default/query/query.atml b/template/default/query/query.atml new file mode 100644 index 000000000..ab1ce4d48 --- /dev/null +++ b/template/default/query/query.atml @@ -0,0 +1,778 @@ +[%# 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 Netscape Communications + # Corporation. Portions created by Netscape are + # Copyright (C) 1998 Netscape Communications Corporation. All + # Rights Reserved. + # + # Contributor(s): Chris Lahey [javascript fixes] + # Christian Reis [javascript rewrite] + # Gervase Markham + #%] + +[% INCLUDE global/header + title = "Search for bugs" + extra = " onLoad=\"selectProduct(document.forms['queryform']);\"" +%] + +[%# Note: use Template comments and not JS ones here, to avoid bloating + what we actually send to the browser %] + + + +[% 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" } ] %] + +
+ +[%# *** Summary *** %] + + + + + + + + +
Summary: + + + + + +
+ +[%# *** Product Component Version Target *** %] + + + + + + +[%# *** Comment URL Whiteboard Keywords *** %] + + + + +
+ + + + + + + [% IF (Param("usetargetmilestone")) %] + + [% END %] + + + + + [%# Can't use the select block here because of onChange and the fact that + 'component' is a toolkit reserved word - we use 'component_' instead. %] + + + + + [% PROCESS select sel = { name => 'version', size => 5 } %] + + [% IF target_milestone.size > 0 %] + [% PROCESS select sel = { name => 'target_milestone', size => 5 } %] + [% END %] + +
Program:Component:Version:Target:
+ + + +
+
+ + [% FOREACH field = [ + { name => "long_desc", description => "A comment" }, + { name => "bug_file_loc", description => "The URL" }, + { name => "status_whiteboard", description => "Whiteboard" } ] %] + + [% UNLESS field.name == 'status_whiteboard' AND NOT Param('usestatuswhiteboard') %] + + + + + + [% END %] + [% END %] + + [% IF have_keywords %] + + + + + + [% END %] + +
[% field.description %]: + +
Keywords: + + + +
+
+ +
+ +[%# *** Status Resolution Severity Priority Hardware OS *** %] + + + + + + + + + + + + + [% 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 } %] + +
Status:Resolution:Severity:Priority:Hardware:OS:
+ +

+ +[%# *** Email Numbering Votes *** %] + + + + + +[%# *** Bug Changes *** %] + + + + +[%# *** Action Selection *** %] + + + + +
+
+ + + Email and Numbering + + + + + + [% FOREACH n = [1, 2] %] + + [% END %] + +
+ + + + + + + + + + + + + [% IF Param('useqacontact') %] + + + + [% END %] + + + + + + + + + + + + +
+ Any of: +
bug owner
reporter
QA Contact
CC list member
commenter
+ +
+ +
+ + +
+
+ + + + + + + + + + + + + +
+ + bugs numbered: + + +
(comma-separated list)
+ Only bugs with at least: + + votes +
+ +
+
+
+ Bug Changes + +
+
Only bugs changed in the last
+
days
+
+ +
+
Only bugs where any of the fields
+
+ +
+ +
were changed between
+
+ + and +
(YYYY-MM-DD) +
+
to this value: (optional)
+
+ +
+
+ +
+
+ + [% IF NOT userid %] + + [% ELSE %] +
+ Run this query +
+ + [% IF namedqueries.size > 0 %] +

+ + + + + + + + + + + +
+ + Load my remembered query: + + +
+ + Run my remembered query: +
+ + Forget my remembered query: +
+

+ [% END %] + + + Remember this as my default query +
+ + Remember this query, and name it: + +
      + and put it in my page footer +
+ [% END %] +

+ Sort results by: + + + + [% IF userdefaultquery %] +

+ + Set my default query back to the system default +

+ [% END %] +

+
+ +[%# *** Boolean Charts *** %] + +


+ +[% types = [ + { name => "noop", description => "---" }, + { name => "equals", description => "is equal to" }, + { name => "notequals", description => "is not equal to" }, + { name => "substring", description => "contains the string" }, + { name => "casesubstring", description => "contains the string (exact case)" }, + { name => "notsubstring", description => "does not contain the string" }, + { name => "allwordssubstr", description => "contains all of the strings" }, + { name => "anywordssubstr", description => "contains any 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" } ] %] + +

+ + + Advanced Querying Using Boolean Charts: + +

+ +[%# Whoever wrote the original version of boolean charts had a seriously twisted mind %] + +[% jsmagic = "onclick=\"document.forms[0].action='query.cgi#chart'; document.forms[0].method='POST'; return 1;\"" %] + +[% FOREACH chart = default.charts %] + [% chartnum = loop.count - 1 %] + + [% FOREACH row = chart %] + [% rownum = loop.count - 1 %] + + [% FOREACH col = row %] + [% colnum = loop.count - 1 %] + + + [% IF NOT col == row.last %] + + [% ELSE %] + + [% END %] + + [% END %] + + + [% IF NOT row == chart.last %] + + + + [% ELSE %] + + + + [% END %] + + [% END %] +
+ + + + + + + Or + + [% newor = colnum + 1 %] + +
And
+ [% newand = rownum + 1; newchart = chartnum + 1 %] + +       + +       +
+
+[% END %] + +

Give me a clue about how to use this form.

+ +
+ +[% INCLUDE global/footer %] + +[%############################################################################%] +[%# Block for SELECT fields #%] +[%############################################################################%] + +[% BLOCK select %] + + + +[% END %] -- cgit v1.2.3-24-g4f1b