summaryrefslogtreecommitdiffstats
path: root/template/en/default/whine
diff options
context:
space:
mode:
authorbugreport%peshkin.net <>2004-08-05 06:36:23 +0200
committerbugreport%peshkin.net <>2004-08-05 06:36:23 +0200
commitf6c796ad212c7cc62687cd02e3808245a993f6b1 (patch)
treef5113059e78234e47ce4739848ac506fc0cf7047 /template/en/default/whine
parente9402c22563ea5c7ddd699f5b50e8e1454f44a90 (diff)
downloadbugzilla-f6c796ad212c7cc62687cd02e3808245a993f6b1.tar.gz
bugzilla-f6c796ad212c7cc62687cd02e3808245a993f6b1.tar.xz
Bug 185090: Add revamped whining system
patch by: Erik r=joel r=jouni a=justdave
Diffstat (limited to 'template/en/default/whine')
-rw-r--r--template/en/default/whine/mail.html.tmpl96
-rw-r--r--template/en/default/whine/mail.txt.tmpl69
-rw-r--r--template/en/default/whine/multipart-mime.txt.tmpl52
-rw-r--r--template/en/default/whine/schedule.html.tmpl406
4 files changed, 623 insertions, 0 deletions
diff --git a/template/en/default/whine/mail.html.tmpl b/template/en/default/whine/mail.html.tmpl
new file mode 100644
index 000000000..9d85c0962
--- /dev/null
+++ b/template/en/default/whine/mail.html.tmpl
@@ -0,0 +1,96 @@
+[%# 1.0@bugzilla.org %]
+[%# 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): Erik Stambaugh <erik@dasbistro.com>
+ #%]
+
+[%# INTERFACE:
+ # subject: subject line of message
+ # body: message body, shown before the query tables
+ # queries: array of hashes containing:
+ # bugs: array containing hashes of fieldnames->values for each bug
+ # title: the title given in the whine scheduling mechanism
+ # author: user object for the person who scheduled this whine
+ # recipient: user object for the intended recipient of the message
+ #%]
+
+[% PROCESS global/variables.none.tmpl %]
+
+[%# assignee_login_string is a literal string used for getting the
+ # assignee's name out of the bug data %]
+[% SET assignee_login_string="map_assigned_to.login_name" %]
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+ <head>
+ <title>
+ [[% terms.Bugzilla %]] [% subject FILTER html %]
+ </title>
+ </head>
+ <body bgcolor="#FFFFFF">
+
+ <p align="left">
+ [% body FILTER html %]
+ </p>
+
+ <p align="left">
+ [% IF author.login == recipient.login %]
+ <a href="[%+ Param('urlbase') FILTER html %]editwhines.cgi">Click
+ here to edit your whine schedule</a>
+ [% ELSE %]
+ This search was scheduled by [% author.login FILTER html %].
+ [% END %]
+ </p>
+
+
+[% FOREACH query=queries %]
+
+ <h2>[%+ query.title FILTER html %]</h2>
+
+ <table width="100%">
+ <tr>
+ <th align="left">ID</th>
+ <th align="left">Sev</th>
+ <th align="left">Pri</th>
+ <th align="left">Plt</th>
+ <th align="left">Assignee</th>
+ <th align="left">Status</th>
+ <th align="left">Resolution</th>
+ <th align="left">Summary</th>
+ </tr>
+
+ [% FOREACH bug=query.bugs %]
+ <tr>
+ <td align="left"><a href="[%+ Param('urlbase') FILTER html %]show_bug.cgi?id=
+ [%- bug.bug_id %]">[% bug.bug_id %]</a></td>
+ <td align="left">[% bug.bug_severity FILTER html %]</td>
+ <td align="left">[% bug.priority FILTER html %]</td>
+ <td align="left">[% bug.rep_platform FILTER html %]</td>
+ <td align="left">[% bug.$assignee_login_string FILTER html %]</td>
+ <td align="left">[% bug.bug_status FILTER html %]</td>
+ <td align="left">[% bug.resolution FILTER html %]</td>
+ <td align="left">[% bug.short_desc FILTER html %]</td>
+ </tr>
+ [% END %]
+ </table>
+[% END %]
+
+ </body>
+</html>
+
+
diff --git a/template/en/default/whine/mail.txt.tmpl b/template/en/default/whine/mail.txt.tmpl
new file mode 100644
index 000000000..1694203c1
--- /dev/null
+++ b/template/en/default/whine/mail.txt.tmpl
@@ -0,0 +1,69 @@
+[%# 1.0@bugzilla.org %]
+[%# 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): Erik Stambaugh <erik@dasbistro.com>
+ #%]
+
+[%# INTERFACE:
+ # subject: subject line of message
+ # body: message body, shown before the query tables
+ # queries: array of hashes containing:
+ # bugs: array containing hashes of fieldnames->values for each bug
+ # title: the title given in the whine scheduling mechanism
+ # author: user object for the person who scheduled this whine
+ # recipient: user object for the intended recipient of the message
+ #%]
+
+[% PROCESS global/variables.none.tmpl %]
+
+[%# assignee_login_string is a literal string used for getting the
+ # assignee's name out of the bug data %]
+[% SET assignee_login_string="map_assigned_to.login_name" %]
+
+[% body %]
+
+[% IF author.login == recipient.login %]
+ To edit your whine schedule, visit the following URL:
+ [%+ Param('urlbase') %]editwhines.cgi
+[% ELSE %]
+ This search was scheduled by [% author.login %].
+[% END %]
+
+
+[% FOREACH query=queries %]
+
+[%+ query.title +%]
+[%+ "-" FILTER repeat(query.title.length) %]
+
+ [% FOREACH bug=query.bugs %]
+ [% terms.Bug +%] [%+ bug.bug_id %]:
+ [%+ Param('urlbase') %]show_bug.cgi?id=[% bug.bug_id +%]
+ Priority: [%+ bug.priority -%]
+ Severity: [%+ bug.bug_severity -%]
+ Platform: [%+ bug.rep_platform %]
+ Assignee: [%+ bug.$assignee_login_string %]
+ Status: [%+ bug.bug_status %]
+ [%- IF bug.resolution -%] Resolution: [% bug.resolution -%]
+ [%- END %]
+ Summary: [% bug.short_desc %]
+
+ [% END %]
+
+[% END %]
+
+
diff --git a/template/en/default/whine/multipart-mime.txt.tmpl b/template/en/default/whine/multipart-mime.txt.tmpl
new file mode 100644
index 000000000..7d5334d04
--- /dev/null
+++ b/template/en/default/whine/multipart-mime.txt.tmpl
@@ -0,0 +1,52 @@
+[%# 1.0@bugzilla.org %]
+[%# 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): Erik Stambaugh <erik@dasbistro.com>
+ #%]
+
+[%# INTERFACE:
+ # subject: subject line of message
+ # alternatives: array of hashes containing:
+ # type: MIME type
+ # content: verbatim content
+ # boundary: a string that has been generated to be a unique boundary
+ # recipient: user object for the intended recipient of the message
+ # from: Bugzilla system email address
+ #%]
+
+[% PROCESS global/variables.none.tmpl %]
+
+From: [% from %]
+To: [% recipient.login %]
+Subject: [[% terms.Bugzilla %]] [% subject %]
+MIME-Version: 1.0
+Content-Type: multipart/alternative; boundary="[% boundary %]"
+
+
+This is a MIME multipart message. It is possible that your mail program
+doesn't quite handle these properly. Some or all of the information in this
+message may be unreadable.
+
+
+[% FOREACH part=alternatives %]
+
+--[% boundary %]
+Content-type: [% part.type +%]
+
+[%+ part.content %]
+[%+ END %]
diff --git a/template/en/default/whine/schedule.html.tmpl b/template/en/default/whine/schedule.html.tmpl
new file mode 100644
index 000000000..60c0f3cd8
--- /dev/null
+++ b/template/en/default/whine/schedule.html.tmpl
@@ -0,0 +1,406 @@
+[%# 1.0@bugzilla.org %]
+[%# -*- mode: html -*- %]
+[%# 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): Erik Stambaugh <erik@dasbistro.com>
+ #%]
+
+[%# INTERFACE:
+ # events: hash, keyed by event_id number. Values are anonymous hashes of:
+ # schedule: array of hashes containing schedule info:
+ # day: value in day column
+ # time: value selected in time column
+ # mailto: recipient's email address
+ # queries: as with schedule, an anonymous array containing hashes of:
+ # name: the named query's name
+ # title: title to be displayed on the results
+ # sort: integer that sets execution order on named queries
+ #%]
+
+[% PROCESS global/variables.none.tmpl %]
+
+[% title = "Set up whining" %]
+[% PROCESS global/header.html.tmpl %]
+
+<p>
+ "Whining" is when [% terms.Bugzilla %] executes a saved query at a regular interval
+ and sends the resulting list of [% terms.bugs %] via email.
+</p>
+
+<p>
+ To set up a new whine event, click "Add a new event." Enter a subject line
+ for the message that will be sent, along with a block of text that will
+ accompany the [% terms.bug %] list in the body of the message.
+</p>
+
+<p>
+ Schedules are added to an event by clicking on "Add a new schedule." A schedule
+ consists of a day, a time of day or interval of times
+ (e.g., every 15 minutes), and a target email address that may or may not be
+ alterable, depending on your privileges. Events may have more than one schedule
+ in order to run at multiple times or for different users.
+</p>
+
+<p>
+ Queries come from saved searches, which are created by executing a <a
+ href="query.cgi">search</a>, then telling [% terms.Bugzilla %] to remember
+ the search under a particular name. Add a query by clicking "Add a new
+ query", and select the desired saved search name under "Search" and add a
+ title for the [% terms.bug %] table. The optional number entered under
+ "Sort" will determine the execution order (lowest to highest) if multiple
+ queries are listed. If you check "One message per [% terms.bug %]," each [%
+ terms.bug %] that matches the search will be sent in its own email message.
+</p>
+
+<form method="post" action="editwhines.cgi">
+[%# This hidden submit button must be here to set default behavior when
+ the user presses return on a form input field #%]
+<input type="submit" value="Update / Commit" name="commit"
+ style="visibility: hidden">
+<input type="hidden" name="update" value="1">
+
+[% FOREACH event = events %]
+
+<table cellspacing="2px" cellpadding="2px" border="0" width="100%"
+ style="border: 1px solid;">
+ <tr>
+ <th align="left" bgcolor="#FFFFFF" colspan="2">
+ Event:
+ </th>
+ <td align="right">
+ <input type="submit" value="Remove Event"
+ name="remove_event_[% event.key %]">
+ </td>
+ </tr>
+
+ <tr>
+ <td valign="top" align="right">
+ Email subject line:
+ </td>
+ <td>
+ <input type="text" name="event_[% event.key %]_subject"
+ size="60" maxlength="128" value="
+ [%- event.value.subject FILTER html %]">
+ </td>
+ </tr>
+
+ <tr>
+ <td valign="top" align="right">
+ Descriptive text sent within whine message:
+ </td>
+ <td>
+ <textarea name="event_[% event.key %]_body"
+ rows="5" cols="80">
+ [% event.value.body FILTER html %]</textarea>
+ </td>
+ </tr>
+
+ [% IF event.value.schedule.size == 0 %]
+
+ <tr>
+ <td valign="top" align="right">
+ Schedule:
+ </td>
+ <td align="left" bgcolor="#FFEEEE">
+ Not scheduled to run<br>
+ <input type="submit" value="Add a new schedule"
+ name="add_schedule_[% event.key %]">
+ </td>
+ </tr>
+
+ [% ELSE %]
+
+ <tr>
+ <td valign="top" align="right">
+ Schedule:
+ </td>
+ <td align="left" bgcolor="#EEFFEE">
+
+ <table>
+ <tr>
+ <th>
+ Interval
+ </th>
+ [% IF mail_others %]
+ <th>
+ Mail to
+ </th>
+ [% END %]
+ </tr>
+ [% FOREACH schedule = event.value.schedule %]
+ <tr>
+ <td align="left">
+
+ [%# these hidden fields allow us to compare old values instead
+ of reading the database to tell if a field has changed %]
+
+ <input type="hidden" value="[% schedule.day FILTER html %]"
+ name="orig_day_[% schedule.id %]">
+ <input type="hidden" value="[% schedule.time FILTER html %]"
+ name="orig_time_[% schedule.id %]">
+ [% PROCESS day_field val=schedule.day %]
+ [% PROCESS time_field val=schedule.time %]
+ </td>
+ <td align="left">
+ [% IF mail_others %]
+ <input type="hidden" name="orig_mailto_[% schedule.id %]"
+ value="[% schedule.mailto FILTER html %]">
+ <input type="text" name="mailto_[% schedule.id %]"
+ value="[% schedule.mailto FILTER html %]" size="30">
+ [% END %]
+ </td>
+ <td align="left">
+ <input type="submit" value="Remove"
+ name="remove_schedule_[% schedule.id %]">
+ </td>
+ </tr>
+ [% END %]
+
+ <tr>
+ <td>
+ <input type="submit" value="Add a new schedule"
+ name="add_schedule_[% event.key %]">
+ </td>
+ </tr>
+
+ </table>
+
+ </td>
+
+ </tr>
+
+ [% END %]
+
+ [% IF event.value.queries.size == 0 %]
+
+ <tr>
+ <td valign="top" align="right">
+ Queries:
+ </td>
+ <td align="left" colspan="1">
+ No queries <br>
+ <input type="submit" value="Add a new query" name="add_query_[% event.key %]">
+ </td>
+ <td align="right" valign="bottom">
+ <input type="submit" value="Update / Commit" name="commit">
+ </td>
+ </tr>
+
+ [% ELSE %]
+
+ <tr>
+ <td valign="top" align="right">
+ Queries:
+ </td>
+ <td align="left">
+
+ <table>
+ <tr>
+ <th>Sort</th>
+ <th>Search</th>
+ <th>Title</th>
+ </tr>
+
+ [% FOREACH query = event.value.queries %]
+
+ <tr>
+ <td align="left">
+ <input type="text" name="query_sort_[% query.id %]"
+ size="3" value="[% query.sort %]">
+ <input type="hidden" value="[% query.sort %]"
+ name="orig_query_sort_[% query.id %]">
+ </td>
+ <td align="left">
+ <input type="hidden" value="[% query.name FILTER html %]"
+ name="orig_query_name_[% query.id %]">
+ [% PROCESS query_field thisquery=query.name %]
+ </td>
+ <td align="left">
+ <input type="hidden" value="[% query.title FILTER html %]"
+ name="orig_query_title_[% query.id %]">
+ <input type="text" name="query_title_[% query.id %]"
+ size="50" value="[% query.title FILTER html %]"
+ maxlength="64">
+ </td>
+ <td align="left">
+ <input type="hidden" value="[% query.onemailperbug FILTER html %]"
+ name="orig_query_onemailperbug_[% query.id %]">
+ <input type="checkbox" [% IF query.onemailperbug == 1 %]
+ checked [% END %]name="query_onemailperbug_
+ [% query.id %]">
+ One message per [% terms.bug %]
+ </td>
+ <td align="right">
+ <input type="submit" value="Remove"
+ name="remove_query_[% query.id %]">
+ </td>
+ </tr>
+
+ [% END %]
+
+ <tr>
+ <td colspan="3">
+ <input type="submit" value="Add a new query"
+ name="add_query_[% event.key %]">
+ </td>
+ </tr>
+
+ </table>
+
+ </td>
+ <td align="right" valign="bottom">
+ <input type="submit" value="Update / Commit" name="commit">
+ </td>
+ </tr>
+
+ [% END %]
+
+</table>
+
+[% END %]
+
+<p align="left">
+ <input type="submit" value="Add a new event" name="add_event">
+</p>
+
+</form>
+
+[% PROCESS global/footer.html.tmpl %]
+
+[% BLOCK query_field +%]
+
+ [% IF available_queries.size > 0 %]
+
+ <select name="query_name_[% query.id %]">
+ [% FOREACH q = available_queries %]
+ <option [% "selected" IF q == thisquery %] value="[% q FILTER html %]">
+ [% q FILTER html %]
+ </option>
+ [% END %]
+ </select>
+
+ [% ELSE %]
+ Please visit the <a href="query.cgi">Search</a> page and save a query
+ [% END %]
+
+[%+ END %]
+
+[% BLOCK day_field +%]
+ <select name="day_[% schedule.id %]">
+ [%
+ options = [
+ ['All', 'Each day', ],
+ ['MF', 'Monday through Friday', ],
+ ['Sun', 'Sunday', ],
+ ['Mon', 'Monday', ],
+ ['Tue', 'Tuesday', ],
+ ['Wed', 'Wednesday', ],
+ ['Thu', 'Thursday', ],
+ ['Fri', 'Friday', ],
+ ['Sat', 'Saturday', ],
+ ['1', 'On the 1st of the month', ],
+ ['2', 'On the 2nd of the month', ],
+ ['3', 'On the 3rd of the month', ],
+ ['4', 'On the 4th of the month', ],
+ ['5', 'On the 5th of the month', ],
+ ['6', 'On the 6th of the month', ],
+ ['7', 'On the 7th of the month', ],
+ ['8', 'On the 8th of the month', ],
+ ['9', 'On the 9th of the month', ],
+ ['10', 'On the 10th of the month', ],
+ ['11', 'On the 11th of the month', ],
+ ['12', 'On the 12th of the month', ],
+ ['13', 'On the 13th of the month', ],
+ ['14', 'On the 14th of the month', ],
+ ['15', 'On the 15th of the month', ],
+ ['16', 'On the 16th of the month', ],
+ ['17', 'On the 17th of the month', ],
+ ['18', 'On the 18th of the month', ],
+ ['19', 'On the 19th of the month', ],
+ ['20', 'On the 20th of the month', ],
+ ['21', 'On the 21st of the month', ],
+ ['22', 'On the 22nd of the month', ],
+ ['23', 'On the 23rd of the month', ],
+ ['24', 'On the 24th of the month', ],
+ ['25', 'On the 25th of the month', ],
+ ['26', 'On the 26th of the month', ],
+ ['27', 'On the 27th of the month', ],
+ ['28', 'On the 28th of the month', ],
+ ['29', 'On the 29th of the month', ],
+ ['30', 'On the 30th of the month', ],
+ ['31', 'On the 31st of the month', ],
+ ['last', 'Last day of the month', ],
+ ]
+ %]
+
+ [% FOREACH option = options %]
+ <option value="[% option.0 %]"
+ [%- IF val == option.0 +%] selected[% END %]>
+ [%- option.1 -%]
+ </option>
+ [% END %]
+
+ </select>
+[%+ END %]
+
+[% BLOCK time_field +%]
+<select name="time_[% schedule.id %]">
+
+ [%
+ options = [
+ [ '0', 'at midnight', ],
+ [ '1', 'at 01:00', ],
+ [ '2', 'at 02:00', ],
+ [ '3', 'at 03:00', ],
+ [ '4', 'at 04:00', ],
+ [ '5', 'at 05:00', ],
+ [ '6', 'at 06:00', ],
+ [ '7', 'at 07:00', ],
+ [ '8', 'at 08:00', ],
+ [ '9', 'at 09:00', ],
+ [ '10', 'at 10:00', ],
+ [ '11', 'at 11:00', ],
+ [ '12', 'at 12:00', ],
+ [ '13', 'at 13:00', ],
+ [ '14', 'at 14:00', ],
+ [ '15', 'at 15:00', ],
+ [ '16', 'at 16:00', ],
+ [ '17', 'at 17:00', ],
+ [ '18', 'at 18:00', ],
+ [ '19', 'at 19:00', ],
+ [ '20', 'at 20:00', ],
+ [ '21', 'at 21:00', ],
+ [ '22', 'at 22:00', ],
+ [ '23', 'at 23:00', ],
+ [ '60min', 'every hour', ],
+ [ '30min', 'every 30 minutes', ],
+ [ '15min', 'every 15 minutes', ],
+ ]
+ %]
+
+ [% FOREACH option = options %]
+ <option value="[% option.0 %]"
+ [%- IF val == option.0 +%] selected[% END %]>
+ [%- option.1 -%]
+ </option>
+ [% END %]
+
+</select>
+
+[%+ END %]
+