From 496013d2cc0586cde9db0ace761292594fcae995 Mon Sep 17 00:00:00 2001 From: "myk%mozilla.org" <> Date: Tue, 12 Mar 2002 21:54:53 +0000 Subject: Fix for bug 103778: Rewrites and templatizes buglist.cgi. Patch by Myk Melez . r=bbaetz,gerv --- template/default/buglist/buglist-rdf.rdf.tmpl | 52 ++++ template/default/buglist/buglist-simple.html.tmpl | 44 +++ template/default/buglist/buglist.html.tmpl | 160 ++++++++++ template/default/buglist/change-form.tmpl | 339 ++++++++++++++++++++++ template/default/buglist/server-push.html.tmpl | 35 +++ template/default/buglist/table.tmpl | 142 +++++++++ template/default/global/header | 9 + template/default/global/message.html.tmpl | 4 +- 8 files changed, 783 insertions(+), 2 deletions(-) create mode 100644 template/default/buglist/buglist-rdf.rdf.tmpl create mode 100644 template/default/buglist/buglist-simple.html.tmpl create mode 100644 template/default/buglist/buglist.html.tmpl create mode 100644 template/default/buglist/change-form.tmpl create mode 100644 template/default/buglist/server-push.html.tmpl create mode 100644 template/default/buglist/table.tmpl (limited to 'template') diff --git a/template/default/buglist/buglist-rdf.rdf.tmpl b/template/default/buglist/buglist-rdf.rdf.tmpl new file mode 100644 index 000000000..4cf480dcc --- /dev/null +++ b/template/default/buglist/buglist-rdf.rdf.tmpl @@ -0,0 +1,52 @@ +[%# 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): Myk Melez + #%] + + + + + + + + + [% FOREACH bug = bugs %] +
  • + + + + [% bug.id %] + + [% FOREACH column = displaycolumns %] + [% bug.$column FILTER html %] + [% END %] + + + +
  • + + [% END %] + +
    + +
    + +
    + +
    diff --git a/template/default/buglist/buglist-simple.html.tmpl b/template/default/buglist/buglist-simple.html.tmpl new file mode 100644 index 000000000..c2e4e6823 --- /dev/null +++ b/template/default/buglist/buglist-simple.html.tmpl @@ -0,0 +1,44 @@ +[%# 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): Myk Melez + #%] + +[%############################################################################%] +[%# Initialization #%] +[%############################################################################%] + +[% DEFAULT title = "Bug List" %] +[% title = title FILTER html %] + + +[%############################################################################%] +[%# Bug Table #%] +[%############################################################################%] + + + + + [% title %] + + + + + [% PROCESS buglist/table.tmpl %] + + + diff --git a/template/default/buglist/buglist.html.tmpl b/template/default/buglist/buglist.html.tmpl new file mode 100644 index 000000000..f9ea46bec --- /dev/null +++ b/template/default/buglist/buglist.html.tmpl @@ -0,0 +1,160 @@ +[%# 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): Myk Melez + #%] + +[%############################################################################%] +[%# Template Initialization #%] +[%############################################################################%] + +[% DEFAULT title = "Bug List" %] +[% style_url = "css/buglist.css" %] + + +[%############################################################################%] +[%# Page Header #%] +[%############################################################################%] + +[% PROCESS global/header + title = title + style = style +%] + +
    + [% currenttime %]
    + + [% IF debug %] +

    [% query FILTER html %]

    + [% END %] + + [% IF quip %] + [% quip %] + [% END %] + +
    + +[% IF toolong %] +

    + This list is too long for Bugzilla's little mind; the + Next/Prev/First/Last buttons won't appear on individual bugs. +

    +[% END %] + +
    + + +[%############################################################################%] +[%# Preceding Status Line #%] +[%############################################################################%] + +[% IF bugs.size > 9 %] + [% bugs.size %] bugs found. +[% END %] + + +[%############################################################################%] +[%# Start of Change Form #%] +[%############################################################################%] + +[% IF dotweak %] +
    +[% END %] + + +[%############################################################################%] +[%# Bug Table #%] +[%############################################################################%] + +[% FLUSH %] +[% PROCESS buglist/table.tmpl %] + +[%############################################################################%] +[%# Succeeding Status Line #%] +[%############################################################################%] + +[% IF bugs.count == 0 %] + Zarro Boogs found. +

    + Query Page +   Enter New Bug + Edit this query +

    + +[% ELSIF bugs.count == 1 %] + One bug found. + +[% ELSE %] + [% bugs.size %] bugs found. + +[% END %] + +
    + + +[%############################################################################%] +[%# Rest of Change Form #%] +[%############################################################################%] + +[% IF dotweak %] + + [% PROCESS "buglist/change-form.tmpl" %] + +
    + +
    + +[% END %] + + +[%############################################################################%] +[%# Navigation Bar #%] +[%############################################################################%] + +[% IF bugs.size > 0 %] +
    + + + + Query Page    + Enter New Bug    + Change Columns    + + [% IF bugs.size > 1 && caneditbugs && !dotweak %] + Change Several + Bugs at Once +    + [% END %] + + [% IF bugowners %] + Send Mail to Bug Owners    + [% END %] + + Edit this Query    + +
    + +[% END %] + + +[%############################################################################%] +[%# Page Footer #%] +[%############################################################################%] + +[% PROCESS global/footer %] + diff --git a/template/default/buglist/change-form.tmpl b/template/default/buglist/change-form.tmpl new file mode 100644 index 000000000..8498a0ab8 --- /dev/null +++ b/template/default/buglist/change-form.tmpl @@ -0,0 +1,339 @@ +[%# 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): Myk Melez + #%] + + + +
    + +

    + To change multiple bugs: +

      +
    1. Check the bugs you want to change above.
    2. +
    3. Make your changes in the form fields below. If the change + you are making requires an explanation, include it in + the comments box.
    4. +
    5. Click the Commit button.
    6. +
    +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [% IF Param("useqacontact") %] + + + + + [% END %] + + + + + + + + + [% IF use_keywords %] + + + + + + + [% END %] + + + + + + + + + + + +
    + [% PROCESS selectmenu menuname = "product" + menuitems = products %] + + [% PROCESS selectmenu menuname = "version" + menuitems = versions %] +
    + + + [% PROCESS selectmenu menuname = "rep_platform" + menuitems = platforms %] + + + + [% PROCESS selectmenu menuname = "priority" + menuitems = priorities %] +
    + [% PROCESS selectmenu menuname = "component" + menuitems = components %] + + + + [% PROCESS selectmenu menuname = "severity" + menuitems = severities %] +
    + [% PROCESS selectmenu menuname = "target_milestone" + menuitems = targetmilestones %] +
    + +
    + + +
    + + + + +
    Depends on: + + +
    Blocks: + + +
    + + + +
    +
    + +[% IF groups.size > 0 %] + + Groupset:
    + + + + + [% FOREACH group = groups %] + + + + [% IF group.isactive %] + + [% ELSE %] + + [% foundinactive = 1 %] + [% END %] + + + + + [% END %] + +
    Don't
    change
    this group
    restriction +
    Remove
    bugs
    from this
    group +
    Add
    bugs
    to this
    group +
    Group Name: +
    + + + + + +   + [% IF group.isactive %] + [% group.description %] + [% ELSE %] + [% group.description FILTER strike %] + [% END %] +
    + + [% IF foundinactive %] + (Note: Bugs may not be added to inactive + groups, only removed.)
    + [% END %] + +[% END %] + + + +[% knum = 0 %] + +
    + +[% IF bugstatuses.size == 1 && bugstatuses.0 == unconfirmedstate %] + [% knum = knum + 1 %] + + Confirm bugs (change status to NEW) +
    +[% END %] + +[% knum = knum + 1 %] + +
    + +[%# If all the bugs being changed are open, allow the user to close them. %] +[% IF !bugstatuses.containsany(closedstates) %] + [% knum = knum + 1 %] + +
    + + [% knum = knum + 1 %] + + +
    + +[% END %] + +[%# If all the bugs are closed, allow the user to reopen them. %] +[% IF !bugstatuses.containsany(openstates) %] + [% knum = knum + 1 %] + +
    +[% END %] + +[% IF bugstatuses.size == 1 %] + [% IF bugstatuses.contains('RESOLVED') %] + [% knum = knum + 1 %] + +
    + [% ELSIF bugstatuses.contains('VERIFIED') %] + [% knum = knum + 1 %] + +
    + [% END %] +[% END %] + +[% knum = knum + 1 %] + + +
    + +[% knum = knum + 1 %] + +
    + + + +[% IF ismover %] + +[% END %] + + +[%############################################################################%] +[%# Select Menu Block #%] +[%############################################################################%] + +[% BLOCK selectmenu %] + +[% END %] diff --git a/template/default/buglist/server-push.html.tmpl b/template/default/buglist/server-push.html.tmpl new file mode 100644 index 000000000..be10f7ab3 --- /dev/null +++ b/template/default/buglist/server-push.html.tmpl @@ -0,0 +1,35 @@ +[%# 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): Myk Melez + #%] + + + + Bugzilla is pondering your query + + +

    Please stand by ...

    + + [% IF debug %] +

    + [% query FILTER html %] +

    + [% END %] + + + diff --git a/template/default/buglist/table.tmpl b/template/default/buglist/table.tmpl new file mode 100644 index 000000000..092ff8d2d --- /dev/null +++ b/template/default/buglist/table.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 Netscape Communications + # Corporation. Portions created by Netscape are + # Copyright (C) 1998 Netscape Communications Corporation. All + # Rights Reserved. + # + # Contributor(s): Myk Melez + #%] + +[%############################################################################%] +[%# Initialization #%] +[%############################################################################%] + +[%# Columns whose titles or values should be abbreviated to make the list + # more compact. For columns whose titles should be abbreviated, + # the shortened title is included. For columns whose values should be + # abbreviated, a maximum length is provided along with the ellipsis that + # should be added to an abbreviated value, if any. + #%] +[% abbrev = + { + "severity" => { size => 3 , title => "Sev" } , + "priority" => { size => 3 , title => "Pri" } , + "platform" => { size => 3 , title => "Plt" } , + "status" => { size => 4 } , + "reporter" => { size => 45 , ellipsis => "..." } , + "owner" => { size => 45 , ellipsis => "..." } , + "qa_contact" => { size => 45 , ellipsis => "..." , title => "QAContact" } , + "resolution" => { size => 4 } , + "summary" => { size => 60 , ellipsis => "..." } , + "status_whiteboard" => { title => "StatusSummary" } , + "component" => { size => 8 , title => "Comp" } , + "product" => { size => 8 } , + "version" => { size => 5 , title => "Vers" } , + "os" => { size => 4 } , + "target_milestone" => { title => "TargetM" } , + } +%] + +[%############################################################################%] +[%# Table Header #%] +[%############################################################################%] + +[% tableheader = BLOCK %] + + + + [% FOREACH id = displaycolumns %] + + [% END %] + + + + + + [% IF splitheader %] + + [% FOREACH id = displaycolumns %] + [% NEXT IF loop.count() % 2 == 0 %] + [% column = columns.$id %] + [% PROCESS columnheader %] + [% END %] + + + + [% FOREACH id = displaycolumns %] + [% NEXT UNLESS loop.count() % 2 == 0 %] + [% column = columns.$id %] + [% PROCESS columnheader %] + [% END %] + + [% ELSE %] + + [% FOREACH id = displaycolumns %] + [% column = columns.$id %] + [% PROCESS columnheader %] + [% END %] + + [% END %] + + +[% END %] + +[% BLOCK columnheader %] + +[% END %] + + +[%############################################################################%] +[%# Bug Table #%] +[%############################################################################%] + +[% FOREACH bug = bugs %] + [% FLUSH IF loop.count() % 10 == 1 %] + + [%# At the beginning of every hundred bugs in the list, start a new table. %] + [% IF loop.count() % 100 == 1 %] + [% tableheader %] + [% END %] + + + + + + [% FOREACH column = displaycolumns %] + + [% END %] + + + + [%# At the end of every hundred bugs in the list, or at the end of the list, + # end the current table. + #%] + [% IF loop.last() || loop.count() % 100 == 0 %] +
    + ID +
     
    + + [%- abbrev.$id.title || column.title -%] +
    + [% IF dotweak %][% END %] + [% bug.id %] + + [%+ bug.$column.truncate(abbrev.$column.size, abbrev.$column.ellipsis) FILTER html %] +
    + [% END %] + +[% END %] + diff --git a/template/default/global/header b/template/default/global/header index 627a52571..05afe2bed 100755 --- a/template/default/global/header +++ b/template/default/global/header @@ -11,14 +11,23 @@ [% title %] + [% Param('headerhtml') %] + [% jscript %] + [% IF style %] [% END %] + + [% IF style_url %] + + [% END %] + + [% PerformSubsts(Param('bannerhtml')) %] diff --git a/template/default/global/message.html.tmpl b/template/default/global/message.html.tmpl index 03253242a..912e9f322 100644 --- a/template/default/global/message.html.tmpl +++ b/template/default/global/message.html.tmpl @@ -1,6 +1,6 @@ [% DEFAULT title = "Bugzilla Message" %] -[% INCLUDE global/header title=title %] +[% PROCESS global/header %] [%# The "header" template automatically displays the contents of a "message" variable if it finds one, so it is not necessary to display the message @@ -13,4 +13,4 @@

    [% END %] -[% INCLUDE global/footer %] +[% PROCESS global/footer %] -- cgit v1.2.3-24-g4f1b