summaryrefslogtreecommitdiffstats
path: root/extensions/RequestNagger/template
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/RequestNagger/template')
-rw-r--r--extensions/RequestNagger/template/en/default/email/request_nagging-requestee.html.tmpl90
-rw-r--r--extensions/RequestNagger/template/en/default/email/request_nagging-user-header.txt.tmpl (renamed from extensions/RequestNagger/template/en/default/email/request_nagging-requestee-header.txt.tmpl)20
-rw-r--r--extensions/RequestNagger/template/en/default/email/request_nagging-user.html.tmpl115
-rw-r--r--extensions/RequestNagger/template/en/default/email/request_nagging-user.txt.tmpl (renamed from extensions/RequestNagger/template/en/default/email/request_nagging-requestee.txt.tmpl)45
-rw-r--r--extensions/RequestNagger/template/en/default/email/request_nagging-watching-header.txt.tmpl8
-rw-r--r--extensions/RequestNagger/template/en/default/email/request_nagging-watching.html.tmpl121
-rw-r--r--extensions/RequestNagger/template/en/default/email/request_nagging-watching.txt.tmpl61
7 files changed, 280 insertions, 180 deletions
diff --git a/extensions/RequestNagger/template/en/default/email/request_nagging-requestee.html.tmpl b/extensions/RequestNagger/template/en/default/email/request_nagging-requestee.html.tmpl
deleted file mode 100644
index bdaaabb97..000000000
--- a/extensions/RequestNagger/template/en/default/email/request_nagging-requestee.html.tmpl
+++ /dev/null
@@ -1,90 +0,0 @@
-[%# This Source Code Form is subject to the terms of the Mozilla Public
- # License, v. 2.0. If a copy of the MPL was not distributed with this
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
- #
- # This Source Code Form is "Incompatible With Secondary Licenses", as
- # defined by the Mozilla Public License, v. 2.0.
- #%]
-
-[% PROCESS "global/field-descs.none.tmpl" %]
-
-<!doctype html>
-<html>
-
-<head>
- <title>[[% terms.Bugzilla %]] Your Overdue Requests</title>
-</head>
-
-<body bgcolor="#ffffff">
-
-<p>
- The following is a list of requests people have made of you, which are
- currently overdue. To avoid disappointing others, please deal with them as
- quickly as possible.
-</p>
-
-[% requests = requests.item(recipient.login) %]
-[% FOREACH type = requests.typelist %]
-
- <h3>
- [% type FILTER upper FILTER html %] requests
- <span style="font-size: x-small; font-weight: normal">
- (<a href="[% urlbase FILTER none %]buglist.cgi?bug_id=
- [% FOREACH request = requests.types.$type %]
- [% request.bug.id FILTER none %]
- [% "%2C" UNLESS loop.last %]
- [% END %]">buglist</a>)
- </span>
- </h3>
-
- <ul>
- [% FOREACH request = requests.types.$type %]
- <li>
- <a href="[% urlbase FILTER none %]show_bug.cgi?id=[% request.bug.id FILTER none %]"
- title="[% request.bug.tooltip FILTER html %]">
- [% request.bug.id FILTER none %] - [% request.bug.short_desc FILTER html %]
- </a><br>
- <b>[%+ request.flag.age FILTER html %]</b> from [% request.requester.identity FILTER html %]<br>
- <div style="font-size: x-small">
- [% IF request.attachment %]
- <a href="[% urlbase FILTER none %]attachment.cgi?id=[% request.attachment.id FILTER none %]&amp;action=edit">Details</a>
- [% IF request.attachment.ispatch %]
- | <a href="[% urlbase FILTER none %]attachment.cgi?id=[% request.attachment.id FILTER none %]&amp;action=diff">Diff</a>
- | <a href="[% urlbase FILTER none %]review?bug=[% request.bug.id FILTER none %]&amp;attachment=[% request.attachment.id FILTER none %]">Review</a>
- [% END %]
- |
- [% END %]
- <a href="[% urlbase FILTER none %]request_defer?flag=[% request.flag.id FILTER none %]">Defer</a>
- </div>
- <br>
- </li>
- [% END %]
- </ul>
-
-[% END %]
-
-<div>
- <hr style="border: 1px dashed #969696">
- [% IF requests.types.item('review').size || requests.types.item('feedback').size %]
- <a href="https://wiki.mozilla.org/BMO/Handling_Requests">
- Guidance on handling requests
- </a><br>
- [% END %]
- <a href="[% urlbase FILTER none %]request.cgi?action=queue&amp;requestee=[% recipient.login FILTER uri %]&amp;group=type">
- See all your overdue requests
- </a><br>
- <a href="[% urlbase FILTER none %]userprefs.cgi#request_nagging">
- Opt out of these emails
- </a><br>
-</div>
-
-<div style="font-size: 90%; color: #666666">
- <hr style="border: 1px dashed #969696">
- <b>You are receiving this mail because:</b>
- <ul>
- <li>You have overdue requests.</li>
- </ul>
-</div>
-@@body-headers@@
-</body>
-</html>
diff --git a/extensions/RequestNagger/template/en/default/email/request_nagging-requestee-header.txt.tmpl b/extensions/RequestNagger/template/en/default/email/request_nagging-user-header.txt.tmpl
index 8ad9d6cb1..6bb9e997b 100644
--- a/extensions/RequestNagger/template/en/default/email/request_nagging-requestee-header.txt.tmpl
+++ b/extensions/RequestNagger/template/en/default/email/request_nagging-user-header.txt.tmpl
@@ -6,14 +6,20 @@
# defined by the Mozilla Public License, v. 2.0.
#%]
-[% PROCESS "global/field-descs.none.tmpl" %]
-[% PROCESS "global/reason-descs.none.tmpl" %]
+[%
+ PROCESS "global/field-descs.none.tmpl";
+ PROCESS "global/reason-descs.none.tmpl";
+ summary = requests.item(recipient.login).summary;
+%]
+
From: [% Param('mailfrom') %]
To: [% recipient.email %]
-Subject: [[% terms.Bugzilla %]] Your Overdue Requests
- ([% FOREACH type = requests.item(recipient.email).typelist %]
- [%- requests.item(recipient.email).types.item(type).size %] [%+ type %]
- [% ", " UNLESS loop.last %]
- [% END %])
+Subject: [[% terms.Bugzilla %]] Overdue Requests
+ [% IF summary.requestee %]
+ (Of you: [% summary.requestee %])
+ [% END %]
+ [% IF summary.setter %]
+ (By you: [% summary.setter %])
+ [% END %]
Date: [% date %]
X-Bugzilla-Type: nag
diff --git a/extensions/RequestNagger/template/en/default/email/request_nagging-user.html.tmpl b/extensions/RequestNagger/template/en/default/email/request_nagging-user.html.tmpl
new file mode 100644
index 000000000..9aeb73f61
--- /dev/null
+++ b/extensions/RequestNagger/template/en/default/email/request_nagging-user.html.tmpl
@@ -0,0 +1,115 @@
+[%# This Source Code Form is subject to the terms of the Mozilla Public
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ #
+ # This Source Code Form is "Incompatible With Secondary Licenses", as
+ # defined by the Mozilla Public License, v. 2.0.
+ #%]
+
+[%
+ PROCESS "global/field-descs.none.tmpl";
+ requestee = requests.item(recipient.login).requestee;
+ setter = requests.item(recipient.login).setter;
+ summary = requests.item(recipient.login).summary;
+ types = requests.item(recipient.login).types;
+%]
+
+<!doctype html>
+<html>
+
+<head>
+ <title>[[% terms.Bugzilla %]] Your Overdue Requests</title>
+</head>
+
+<body bgcolor="#ffffff">
+
+[% IF requestee.size %]
+ <h3>Overdue requests requiring action from you:</h3>
+ <div>[% summary.requestee FILTER html %]</div>
+ [% PROCESS requests report="requestee" requests=requestee %]
+[% END %]
+
+[% IF requestee.size && setter.size %]
+ <hr>
+[% END %]
+
+[% IF setter.size %]
+ <h3>Overdue requests you have requested:</h3>
+ <div>[% summary.setter FILTER html %]</div>
+ [% PROCESS requests report="setter" requests=setter %]
+[% END %]
+
+[% BLOCK requests %]
+ [% FOREACH type IN types.item(report) %]
+ <h3>
+ [% type FILTER upper FILTER html %] requests
+ <span style="font-size: x-small; font-weight: normal">
+ (<a href="[% urlbase FILTER none %]buglist.cgi?bug_id=
+ [% FOREACH request IN requests.item(type) %]
+ [% request.bug.id FILTER none %]
+ [% "%2C" UNLESS loop.last %]
+ [% END %]">buglist</a>)
+ </span>
+ </h3>
+
+ <ul>
+ [% FOREACH request IN requests.item(type) %]
+ <li>
+ <a href="[% urlbase FILTER none %]show_bug.cgi?id=[% request.bug.id FILTER none %]"
+ title="[% request.bug.tooltip FILTER html %]">
+ [% request.bug.id FILTER none %] - [% request.bug.short_desc FILTER html %]
+ </a><br>
+ <b>[%+ request.flag.age FILTER html %]</b>
+ [% IF report == "requestee" %]
+ from [% request.setter.realname || request.setter.login FILTER html %]
+ [% ELSIF request.requestee %]
+ to [% request.requestee.realname || request.setter.login FILTER html %]
+ [% ELSE %]
+ to <i>anyone</i>
+ [% END %]
+ <br>
+ [% IF report == "requestee" %]
+ <div style="font-size: x-small">
+ [% IF request.attachment %]
+ <a href="[% urlbase FILTER none %]attachment.cgi?id=[% request.attachment.id FILTER none %]&amp;action=edit">Details</a>
+ [% IF request.attachment.ispatch %]
+ | <a href="[% urlbase FILTER none %]attachment.cgi?id=[% request.attachment.id FILTER none %]&amp;action=diff">Diff</a>
+ | <a href="[% urlbase FILTER none %]review?bug=[% request.bug.id FILTER none %]&amp;attachment=[% request.attachment.id FILTER none %]">Review</a>
+ [% END %]
+ |
+ [% END %]
+ <a href="[% urlbase FILTER none %]request_defer?flag=[% request.flag.id FILTER none %]">Defer</a>
+ </div>
+ [% END %]
+ <br>
+ </li>
+ [% END %]
+ </ul>
+ [% END %]
+[% END %]
+
+<div>
+ <hr style="border: 1px dashed #969696">
+ [% IF requestee.item('review').size || requestee.item('feedback').size %]
+ <a href="https://wiki.mozilla.org/BMO/Handling_Requests">
+ Guidance on handling requests
+ </a><br>
+ [% END %]
+ <a href="[% urlbase FILTER none %]request.cgi?action=queue&amp;requestee=[% recipient.login FILTER uri %]&amp;group=type">
+ See all your overdue requests
+ </a><br>
+ <a href="[% urlbase FILTER none %]userprefs.cgi#request_nagging">
+ Opt out of these emails
+ </a><br>
+</div>
+
+<div style="font-size: 90%; color: #666666">
+ <hr style="border: 1px dashed #969696">
+ <b>You are receiving this mail because:</b>
+ <ul>
+ <li>You have overdue requests.</li>
+ </ul>
+</div>
+@@body-headers@@
+</body>
+</html>
diff --git a/extensions/RequestNagger/template/en/default/email/request_nagging-requestee.txt.tmpl b/extensions/RequestNagger/template/en/default/email/request_nagging-user.txt.tmpl
index 4e3f67090..5138f5f00 100644
--- a/extensions/RequestNagger/template/en/default/email/request_nagging-requestee.txt.tmpl
+++ b/extensions/RequestNagger/template/en/default/email/request_nagging-user.txt.tmpl
@@ -6,31 +6,58 @@
# defined by the Mozilla Public License, v. 2.0.
#%]
-[% PROCESS "global/field-descs.none.tmpl" %]
+[%
+ PROCESS "global/field-descs.none.tmpl";
+ requestee = requests.item(recipient.login).requestee;
+ setter = requests.item(recipient.login).setter;
+ summary = requests.item(recipient.login).summary;
+ types = requests.item(recipient.login).types;
+%]
-The following is a list of requests people have made of you, which are
-currently overdue. To avoid disappointing others, please deal with them as
-quickly as possible.
+[% IF requestee.size %]
+Overdue requests requiring action from you:
+[%+ summary.requestee %]
-[% requests = requests.item(recipient.login) %]
-[% FOREACH type = requests.typelist %]
+[%+ PROCESS requests report="requestee" request_list=requestee %]
+[% END %]
+
+[% IF requestee.size && setter.size %]
+-
+[% END %]
+
+[% IF setter.size %]
+Overdue requests you have requested:
+[%+ summary.setter %]
+
+[%+ PROCESS requests report="setter" request_list=setter %]
+[% END %]
+
+[% BLOCK requests %]
+[% FOREACH type IN types.item(report) %]
:: [% type FILTER upper FILTER html %] requests
-[% FOREACH request = requests.types.$type %]
+[% FOREACH request IN request_list.item(type) %]
[[% terms.Bug %] [%+ request.bug.id %]] [% request.bug.short_desc %]
- [%+ request.flag.age %] from [% request.requester.identity %]
+ [% IF report == "requestee" %]
+ [%+ request.flag.age %] from [% request.setter.realname || request.setter.login %]
+ [% ELSE %]
+ [%+ request.flag.age %] to [% request.requestee.realname || request.requestee.login %]
+ [% END %]
[%+ urlbase %]show_bug.cgi?id=[% request.bug.id +%]
[% IF request.attachment && request.attachment.ispatch %]
Review: [% urlbase %]review?bug=[% request.bug.id %]&attachment=[% request.attachment.id %]
[% END %]
+ [% IF report == "requestee" %]
Defer: [% urlbase %]request_defer?flag=[% request.flag.id %]
+ [% END %]
[% END %]
[% END %]
+[% END %]
::
-[% IF requests.types.item('review').size || requests.types.item('feedback').size %]
+[% IF requestee.item('review').size || requestee.item('feedback').size %]
Guidance on handling requests:
https://wiki.mozilla.org/BMO/Handling_Requests
[% END %]
diff --git a/extensions/RequestNagger/template/en/default/email/request_nagging-watching-header.txt.tmpl b/extensions/RequestNagger/template/en/default/email/request_nagging-watching-header.txt.tmpl
index 261e92f13..d825cb459 100644
--- a/extensions/RequestNagger/template/en/default/email/request_nagging-watching-header.txt.tmpl
+++ b/extensions/RequestNagger/template/en/default/email/request_nagging-watching-header.txt.tmpl
@@ -6,10 +6,12 @@
# defined by the Mozilla Public License, v. 2.0.
#%]
-[% PROCESS "global/field-descs.none.tmpl" %]
-[% PROCESS "global/reason-descs.none.tmpl" %]
+[%
+ PROCESS "global/field-descs.none.tmpl";
+ PROCESS "global/reason-descs.none.tmpl";
+%]
From: [% Param('mailfrom') %]
To: [% recipient.email %]
-Subject: [[% terms.Bugzilla %]] Overdue Requests Report
+Subject: [[% terms.Bugzilla %]] Overdue Requests
Date: [% date %]
X-Bugzilla-Type: nag-watch
diff --git a/extensions/RequestNagger/template/en/default/email/request_nagging-watching.html.tmpl b/extensions/RequestNagger/template/en/default/email/request_nagging-watching.html.tmpl
index 91fb36e1d..14e4d7f4e 100644
--- a/extensions/RequestNagger/template/en/default/email/request_nagging-watching.html.tmpl
+++ b/extensions/RequestNagger/template/en/default/email/request_nagging-watching.html.tmpl
@@ -18,70 +18,55 @@
<body bgcolor="#ffffff">
<p>
- The following is a list of people who you are watching that have overdue
- requests.
+ The following is a list of people who you are watching that are involved in
+ overdue requests.
</p>
-<hr>
-
[% FOREACH login = requests.keys.sort %]
- [% requestee = requests.$login.requestee %]
- [% requestee.identity FILTER html %]
+ [%
+ target = requests.item(login).target;
+ requestee = requests.item(login).requestee;
+ setter = requests.item(login).setter;
+ summary = requests.item(login).summary;
+ bug_ids = requests.item(login).bug_ids;
+ %]
+ <h3>
+ [% target.realname || target.login FILTER html %]
+ </h3>
<ul>
- <li>
- [%+ FOREACH type = requests.$login.typelist %]
- [% requests.$login.types.item(type).size %] [%+ type FILTER html %]
- [% ", " UNLESS loop.last %]
- [% END %]
+ [% IF requestee.size %]
+ <li>
+ Requested of: [% summary.requestee FILTER html %]
+ (<a href="[% urlbase FILTER none %]buglist.cgi?bug_id=[% bug_ids.requestee.join(",") FILTER uri %]">buglist</a>)
+ </li>
+ [% END %]
+ [% IF setter.size %]
+ <li>
+ Waiting on: [% summary.setter FILTER html %]
+ (<a href="[% urlbase FILTER none %]buglist.cgi?bug_id=[% bug_ids.setter.join(",") FILTER uri %]">buglist</a>)
+ </li>
+ [% END %]
</li>
</ul>
[% END %]
[% FOREACH login = requests.keys.sort %]
- [% requestee = requests.$login.requestee %]
-
- [% bug_ids = [] %]
- [% FOREACH type = requests.$login.typelist %]
- [% FOREACH request = requests.$login.types.$type %]
- [% bug_ids.push(request.bug.id) %]
- [% END %]
- [% END %]
+ [%
+ target = requests.item(login).target;
+ requestee = requests.item(login).requestee;
+ setter = requests.item(login).setter;
+ summary = requests.item(login).summary;
+ types = requests.item(login).types;
+ %]
<hr>
+
<h3>
- [% requestee.identity FILTER html %]
- <span style="font-size: x-small; font-weight: normal">
- (<a href="[% urlbase FILTER none %]buglist.cgi?bug_id=[% bug_ids.join(",") FILTER uri %]">buglist</a>)
- </span><br>
- <span style="font-size: x-small; font-weight: normal">
- [% FOREACH type = requests.$login.typelist %]
- [% requests.$login.types.item(type).size %] [%+ type FILTER html %]
- [% ", " UNLESS loop.last %]
- [% END %]
- </span>
+ [% target.realname || target.login FILTER html %]<br>
</h3>
- [% FOREACH type = requests.$login.typelist %]
-
- <h3>[% type FILTER upper FILTER html %] requests</h3>
-
- <ul>
- [% FOREACH request = requests.$login.types.$type %]
- <li>
- <a href="[% urlbase FILTER none %]show_bug.cgi?id=[% request.bug.id FILTER none %]"
- title="[% request.bug.tooltip FILTER html %]">
- [% request.bug.id FILTER none %] - [% request.bug.short_desc FILTER html %]
- </a><br>
- <b>[%+ request.flag.age FILTER html %]</b> from [% request.requester.identity FILTER html %]<br>
- [% IF request.flag.deferred %]
- Deferred until [%+ request.flag.deferred.ymd FILTER html %]<br>
- [% END %]
- <br>
- </li>
- [% END %]
- </ul>
-
- [% END %]
+ [% PROCESS requests report="requestee" request_list=requestee %]
+ [% PROCESS requests report="setter" request_list=setter %]
[% END %]
@@ -102,3 +87,39 @@
@@body-headers@@
</body>
</html>
+
+[% BLOCK requests %]
+ [% RETURN UNLESS request_list.size %]
+ [% FOREACH type IN types.item(report) %]
+
+ <h3>
+ [% type FILTER upper FILTER html %]
+ [%= report == "requestee" ? "requested of" : "waiting on" FILTER none %]
+ </h3>
+
+ <ul>
+ [% FOREACH request IN request_list.item(type) %]
+ <li>
+ <a href="[% urlbase FILTER none %]show_bug.cgi?id=[% request.bug.id FILTER none %]"
+ title="[% request.bug.tooltip FILTER html %]">
+ [% request.bug.id FILTER none %] - [% request.bug.short_desc FILTER html %]
+ </a><br>
+
+ <b>[% request.flag.age FILTER html %]</b>
+ [% IF report == "requestee" %]
+ from [% request.setter.realname || request.setter.login FILTER html %]
+ [% ELSE %]
+ to [% request.requestee.realname || request.requestee.login FILTER html %]
+ [% END %]
+
+ [% IF request.flag.deferred %]
+ <br>
+ Deferred until [%+ request.flag.deferred.ymd FILTER html %]<br>
+ [% END %]
+ </li>
+ [% END %]
+ </ul>
+
+ [% END %]
+
+[% END %]
diff --git a/extensions/RequestNagger/template/en/default/email/request_nagging-watching.txt.tmpl b/extensions/RequestNagger/template/en/default/email/request_nagging-watching.txt.tmpl
index 8bc5a3b7c..0e80cc73c 100644
--- a/extensions/RequestNagger/template/en/default/email/request_nagging-watching.txt.tmpl
+++ b/extensions/RequestNagger/template/en/default/email/request_nagging-watching.txt.tmpl
@@ -8,32 +8,28 @@
[% PROCESS "global/field-descs.none.tmpl" %]
-The following is a list of people who you are watching that have overdue
-requests.
+[% FOREACH login IN requests.keys.sort %]
+[%
+ target = requests.item(login).target;
+ requestee = requests.item(login).requestee;
+ setter = requests.item(login).setter;
+ summary = requests.item(login).summary;
+ types = requests.item(login).types;
+%]
-[% FOREACH login = requests.keys.sort %]
-[% requestee = requests.$login.requestee %]
::
-:: [% requestee.identity %]
-:: [% FOREACH type = requests.$login.typelist %]
- [%- requests.$login.types.item(type).size %] [%+ type %]
- [% ", " UNLESS loop.last %]
- [% END %]
+:: [% target.identity %]
+[% IF requestee.size %]
+:: Requested of: [% summary.requestee %]
+[% END %]
+[% IF setter.size %]
+:: Waiting on: [% summary.setter %]
+[% END %]
::
-[% FOREACH type = requests.$login.typelist %]
-:: [% type FILTER upper FILTER html %] requests
+[%+ PROCESS requests report="requestee" request_list=requestee %]
-[% FOREACH request = requests.$login.types.$type %]
-[[% terms.Bug %] [%+ request.bug.id %]] [% request.bug.short_desc %]
- [%+ request.flag.age %] from [% request.requester.identity %]
- [%+ urlbase %]show_bug.cgi?id=[% request.bug.id +%]
- [% IF request.flag.deferred %]
- Deferred until [%+ request.flag.deferred.ymd %]
- [% END %]
-
-[% END %]
-[% END %]
+[%+ PROCESS requests report="setter" request_list=setter %]
[% END %]
@@ -47,3 +43,26 @@ You are receiving this mail because: you are watching someone with overdue
requests.
@@body-headers@@
+
+[% BLOCK requests %]
+[% RETURN UNLESS request_list.size %]
+
+[% FOREACH type IN types.item(report) %]
+:: [% type FILTER upper %] [%= report == "requestee" ? "requested of" : "waiting on" %]
+
+[% FOREACH request IN request_list.item(type) %]
+[[% terms.Bug %] [%+ request.bug.id %]] [% request.bug.short_desc %]
+ [% IF report == "requestee" %]
+ [%+ request.flag.age %] from [% request.setter.realname || request.setter.login %]
+ [% ELSE %]
+ [%+ request.flag.age %] to [% request.requestee.realname || request.requestee.login %]
+ [% END %]
+ [%+ urlbase %]show_bug.cgi?id=[% request.bug.id +%]
+ [% IF request.flag.deferred %]
+ Deferred until [%+ request.flag.deferred.ymd %]
+ [% END %]
+
+[% END %]
+[% END %]
+
+[% END %]