Bug 137810 - Embed diff table into the enclosing table using rowspan; use IF instead of custom mail templates

git-svn-id: svn://svn.office.custis.ru/3rdparty/bugzilla.org/trunk@1907 6955db30-a419-402b-8a0d-67ecbb4d7f56
master
vfilippov 2014-01-14 14:58:25 +00:00
parent a384d5b74f
commit 312ae1e3d9
10 changed files with 66 additions and 1432 deletions

View File

@ -43,6 +43,7 @@ use Bugzilla::Product;
use Bugzilla::Component;
use Bugzilla::Status;
use Bugzilla::Mailer;
use Bugzilla::Diff;
use Date::Parse;
use Date::Format;
@ -635,13 +636,13 @@ sub sendMail
for my $change (@$diffs)
{
my $field = Bugzilla->get_field($change->{'fieldname'});
if (($change->{'fieldname'} eq 'longdesc' || $field->{'type'} eq FIELD_TYPE_TEXTAREA) && !$change->{'both'})
my $field = Bugzilla->get_field($change->{fieldname});
if (($change->{fieldname} eq 'longdesc' || $field->{type} eq FIELD_TYPE_TEXTAREA) && !$change->{lines})
{
my $diff = new Bugzilla::Diff($change->{'removed'}, $change->{'added'});
$change->{'both'} = $diff->get_table;
$change->{'diff_removed'} = $diff->get_removed;
$change->{'diff_added'} = $diff->get_added;
my $diff = new Bugzilla::Diff($change->{removed}, $change->{added});
$change->{lines} = $diff->get_table;
$change->{diff_removed} = $diff->get_removed;
$change->{diff_added} = $diff->get_added;
}
}

View File

@ -67,7 +67,7 @@ sub get_hash
{
my ($self, $force) = @_;
$force = 0 unless $force;
if ($force || !($self->{'context'}))
if ($force || !$self->{'context'})
{
$self->{'diff'} = $self->diff($self->{old}, $self->{new});
$self->make_context;
@ -79,13 +79,13 @@ sub get_hash
return $self->{'context'};
}
# templated diff
# formatted diff
sub get_table
{
my ($self, $force) = @_;
my ($self, $force, $column) = @_;
$force = 0 unless $force;
my $diff = $self->get_hash($force);
my $result = '<table width="100%">';
my $result = [];
for (my $i = 0; $i < $self->{'context'}->{'length'}; $i++)
{
# old and new texts - [type, value]
@ -101,14 +101,12 @@ sub get_table
$nval =~ s/\n/<br\/>/g;
}
$result .= '<tr>';
$result .= '<td valign="top" width="1%">' . ($old->{'type'} eq TYPE_REM ? TYPE_REM : '') . '</td>';
$result .= '<td valign="top" width="49%"' . ($old->{'type'} eq TYPE_REM ? ' style="border: 1px solid #900;"' : '') . '>' . $oval . '</td>';
$result .= '<td valign="top" width="1%">' . ($new->{'type'} eq TYPE_ADD ? TYPE_ADD : '') . '</td>';
$result .= '<td valign="top" width="49%"' . ($new->{'type'} eq TYPE_ADD ? ' style="border: 1px solid #090;"' : '') . '>' . $nval . '</td>';
$result .= '</tr>';
push @$result, '<td style="vertical-align: top' .
($old->{'type'} eq TYPE_REM ? '; border-width: 1px 1px 1px 5px; border-style: solid; border-color: red' : '').'">' .
$oval . '</td><td style="vertical-align: top' .
($new->{'type'} eq TYPE_ADD ? '; border-width: 1px 1px 1px 5px; border-style: solid; border-color: #0a0' : '').'">' .
$nval . '</td>';
}
$result .= '</table>';
return $result;
}
@ -118,6 +116,7 @@ sub get_removed
my ($self, $force) = @_;
return $self->get_part(1, $force);
}
# get only added (with context)
sub get_added
{

View File

@ -60,20 +60,25 @@ my $operations;
($operations, $vars->{'incomplete_data'}) =
Bugzilla::Bug::GetBugActivity($bug->id);
for (my $i = 0; $i < (scalar @$operations); $i++)
for (my $i = 0; $i < scalar @$operations; $i++)
{
for (my $j = 0; $j < (scalar @{$operations->[$i]->{'changes'}}); $j++)
my $lines = 0;
for (my $j = 0; $j < scalar @{$operations->[$i]->{changes}}; $j++)
{
my $change = $operations->[$i]->{'changes'}->[$j];
my $field = Bugzilla->get_field($change->{'fieldname'});
if (($change->{'fieldname'} eq 'longdesc' || $field->{'type'} eq FIELD_TYPE_TEXTAREA))
my $change = $operations->[$i]->{changes}->[$j];
my $field = Bugzilla->get_field($change->{fieldname});
if ($change->{fieldname} eq 'longdesc' || $field->{type} eq FIELD_TYPE_TEXTAREA)
{
my $diff = new Bugzilla::Diff($change->{'removed'}, $change->{'added'});
$operations->[$i]->{'changes'}->[$j]->{'both'} = $diff->get_table;
$operations->[$i]->{'changes'}->[$j]->{'removed'} = '';
$operations->[$i]->{'changes'}->[$j]->{'added'} = '';
my $diff = new Bugzilla::Diff($change->{removed}, $change->{added})->get_table;
$operations->[$i]->{changes}->[$j]->{lines} = $diff;
$lines += scalar @$diff;
}
else
{
$lines++;
}
}
$operations->[$i]->{total_lines} = $lines;
}
$vars->{'operations'} = $operations;

View File

@ -1,279 +0,0 @@
[%# 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): André Batosti <batosti@async.com.br>
#%]
From: [% Param('mailfrom') %]
To: [% to_user.email %]
Subject: [% (isnew ? '' : 'Re: ') _ '['
_ terms.Bug _ ' ' _ bugid _ '] ' _
(severity == 'blocker' ? '[BLOCKER] ' : '') _
(severity == 'critical' ? '[CRITICAL] ' : '') _
'[' _ product _ '] ' _ summary %]
X-Bugzilla-Reason: [% reasonsheader %]
X-Bugzilla-Type: [% isnew ? 'new' : 'changed' %]
X-Bugzilla-Watch-Reason: [% reasonswatchheader %]
[% IF Param('useclassification') %]
X-Bugzilla-Classification: [% classification %]
[% END %]
[% IF severity == 'blocker' OR severity == 'critical' %]
Importance: high
X-Priority: 1
[% END %]
X-Bugzilla-Product: [% product %]
X-Bugzilla-Component: [% comp %]
[% FOREACH keyword_item = keywords.split(", ") %]
X-Bugzilla-Keywords: [% keyword_item %]
[% END%]
X-Bugzilla-Severity: [% severity %]
X-Bugzilla-Who: [% changer.login %]
X-Bugzilla-Status: [% status %]
X-Bugzilla-Priority: [% priority %]
X-Bugzilla-Assigned-To: [% assignedto %]
X-Bugzilla-Target-Milestone: [% targetmilestone %]
X-Bugzilla-Changed-Fields: [% changedfields || "None" %]
X-Bugzilla-Added-Comments: [% new_comments.size %]
[%+ threadingmarker %]
[% USE date %]
[% SET boundary = "--" _ date.now %]
Content-Type: multipart/alternative; boundary=[% boundary %]
MIME-Version: 1.0
--[% boundary %]
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
[% FILTER quoted_printable %]
[%+ urlbase %]show_bug.cgi?id=[% bugid %] (prod:[% product %].[% comp %], pri:[% priority %], sev:[% severity %], miles:[% targetmilestone %])
[%- IF diffs AND diffs.size > 0 %]
[%- SET lastwho = "" %]
[%- SET lastdep = 0 %]
[%- FOR d = diffs %]
[%- IF d.dep AND d.dep != lastdep %]
[%- SET lastdep = d.dep %]
[%- # ------ Bug <bug> Depends on bug <dep>, which changed state ------ %]
Bug [% d.bug_id %] depends on bug [% d.dep %], which changed state.
Bug [% d.dep %] summary: [% d.short_desc %]
[%+ urlbase %]show_bug.cgi?id=[% d.dep %]
[%- END %]
[%- IF d.login_name != lastwho %]
[%- # ------ <user> Changed <bug> ------ %]
[%- SET lastwho = d.login_name %]
[% d.login_name %] changed:
[% three_columns('What ', 'Removed', 'Added') -%]
----------------------------------------------------------------------------
[%- END %]
[%- # ------ What Removed Added ------ %]
[% three_columns(d.fielddesc, d.diff_removed ? d.diff_removed : d.removed, d.diff_added ? d.diff_added : d.added) %]
[%- END %]
[%- END %]
[%- # comments %]
[%- FOREACH comment = new_comments %]
[%- IF comment.count %]
--- Comment #[% comment.count %] from [% comment.author.identity %] [%+ comment.bug_when FILTER time(undef, to_user.timezone) %] ---
[% END %]
[%+ comment.body_full({ is_bugmail => 1, wo_preview => 1 }) %]
[% END %]
-- [%# Protect the trailing space of the signature marker %]
Configure [% terms.bug %]mail: [% urlbase %]userprefs.cgi?tab=email
------- You are receiving this mail because: -------
[% FOREACH relationship = reasons %]
[% SWITCH relationship %]
[% CASE constants.REL_ASSIGNEE %]
You are the assignee for the [% terms.bug %].
[% CASE constants.REL_REPORTER %]
You reported the [% terms.bug %].
[% CASE constants.REL_QA %]
You are the QA contact for the [% terms.bug %].
[% CASE constants.REL_CC %]
You are on the CC list for the [% terms.bug %]. <a href="[% urlbase %]unsubscribe.cgi?id=[% bugid %]">Remove yourself from the CC list</a>.
[% CASE constants.REL_VOTER %]
You are a voter for the [% terms.bug %].
[% CASE constants.REL_GLOBAL_WATCHER %]
You are watching all [% terms.bug %] changes.
[% END %]
[% END %]
[% FOREACH relationship = reasons_watch %]
[% SWITCH relationship %]
[% CASE constants.REL_ASSIGNEE %]
You are watching the assignee of the [% terms.bug %].
[% CASE constants.REL_REPORTER %]
You are watching the reporter.
[% CASE constants.REL_QA %]
You are watching the QA contact of the [% terms.bug %].
[% CASE constants.REL_CC %]
You are watching someone on the CC list of the [% terms.bug %].
[% CASE constants.REL_VOTER %]
You are watching a voter for the [% terms.bug %].
[% END %]
[% END %]
[% END %]
--[% boundary %]
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
[% FILTER quoted_printable %]
<style>
<!--
body { font-family: Segoe UI, sans-serif; }
.difft { padding-bottom: 5pt; font-size: 80%; }
.difft.fv th { text-align: left; }
.bz_st_UNCONFIRMED { font-style: italic; }
.bz_st_RESOLVED { text-decoration: line-through; }
.bz_st_VERIFIED { text-decoration: line-through; border: 1px dashed #2f6fab; background-color: #f9f9f9; line-height: 1.1em; }
.bz_st_CLOSED { text-decoration: line-through; border: 1px solid #2f6fab; background-color: #f9f9f9; line-height: 1.1em; }
.difft.p6 { width: 100%; max-width: 600px; }
.bz_comment_text { font-size: 100%; white-space: normal; font-family: Consolas, monospace; }
.bz_comment_text .quote { color: #65379c; border-left: solid 3px #65379c; padding-left: .5em; margin-left: .5em; }
/*-->*/
</style>
<body>
<p>
[% IF severity == 'blocker' OR severity == 'critical' %]
<a style="font-size: 120%; color: black; background-color: red; font-weight: bold;" href="[%+ urlbase %]show_bug.cgi?id=[% bugid %][% IF new_comments AND new_comments.size > 0 %]#c[% new_comments.0.count %][% END %]">&nbsp;Bug [% bugid %] [[% severity | upper %]] - [% summary | html %]&nbsp;</a>
[% ELSE %]
<a style="font-size: 120%;" href="[%+ urlbase %]show_bug.cgi?id=[% bugid %][% IF new_comments AND new_comments.size > 0 %]#c[% new_comments.0.count %][% END %]">Bug [% bugid %] - [% summary | html %]</a>
[% END %]
<br><span style="font-size: 90%">(prod:[% product %].[% comp %], pri:[% priority %], sev:[% severity %], miles:[% targetmilestone %])</span>
</p>
<hr color="#A0A0A0" size="1" />
[% IF new_comments AND new_comments.size > 0 %]
[% FOR comment = new_comments %]
<p><a href="[%+ urlbase %]show_bug.cgi?id=[% bugid %]#c[% comment.count %]">Comment #[% comment.count %]</a> from
<span class="vcard">
<a class="fn email" href="[% Param('user_mailto') %][% comment.author.email FILTER html %]">
[% (comment.author.name || comment.author.login) FILTER html %]</a>
</span>
[% comment.bug_when FILTER time(undef, to_user.timezone) %]</p>
<div class="bz_comment_text">
[%- comment.body_full({ wrap => 1, wo_preview => 1 }) FILTER absolute_uris -%]
</div>
<hr color="#A0A0A0" size="1" />
[% END %]
[% END %]
[% IF isnew AND showfieldvalues.size > 0 %]
<table class="difft fv">
[% FOR f = showfieldvalues %]
<tr><th>[% f.desc FILTER html %]:</th><td>[% f.value FILTER html %]</td></tr>
[% END %]
</table>
<hr color="#A0A0A0" size="1" />
[% END %]
[% IF diffs AND diffs.size > 0 %]
[% SET lastwho = "" %]
[% SET lastdep = 0 %]
<table class="difft p6" style="border-collapse: collapse" cellpadding="3">
[% FOR d = diffs %]
[% IF d.dep AND d.dep != lastdep %]
[%# ------ Bug <bug> Depends on bug <dep>, which changed state ------ %]
[%- SET lastdep = d.dep %]
<tr><td colspan="3">
<p><a href="[% urlbase %]show_bug.cgi?id=[% d.bug_id %]">Bug [% d.bug_id %]</a> depends
on <a href="[% urlbase %]show_bug.cgi?id=[% d.dep %]">bug [% d.dep %]</a>,
which changed state.</p>
<p><a href="[% urlbase %]show_bug.cgi?id=[% d.dep %]">Bug [% d.dep %]</a>
summary: [% d.short_desc | html %].
</td></tr>
</table>
<hr color="#A0A0A0" size="1" />
<table class="difft p6" style="border-collapse: collapse" cellpadding="3">
[% END %]
[% IF d.login_name != lastwho %]
[%# ------ <user> Changed <bug> ------ %]
[% SET lastwho = d.login_name %]
[% IF !loop.first %]
</table>
<hr color="#A0A0A0" size="1" />
<table class="difft p6" style="border-collapse: collapse" cellpadding="3">
[% END %]
<tr><td colspan="3"><a href="[% Param('user_mailto') %][% d.login_name %]">[% d.realname || d.login_name %]</a> changed:</td></tr>
<tr><th style="text-align: left">What</th><th style="text-align: left">Removed</th><th style="text-align: left">Added</th></tr>
[% END %]
[%# ------ What Removed Added ------ %]
<tr class="n"><td>
[% IF d.fieldname == 'longdesc' %]
<a href="[% urlbase %]show_bug.cgi?id=[% bugid %]#c[% d.comment_count %]">
[% IF d.comment_count > 0 %]Comment #[% d.comment_count %][% ELSE %]Description[% END %]
</a>
[% ELSE %]
[% d.fielddesc %]
[% END %]
</td>
[% IF d.both %]<td colspan="2">[% d.both %]</td>[% ELSE %]<td>[% d.removed %]</td><td>[% d.added %]</td>[% END %]
</tr>
[% END %]
</table>
<hr color="#A0A0A0" size="1" />
[% END %]
<p style="font-size: 12px; font-style: italic">
-- <br />
<a href="[% urlbase %]userprefs.cgi?tab=email">Configure [% terms.bug %]mail</a><br />
------- You are receiving this mail because: -------<br />
[% FOREACH relationship = reasons %]
[% SWITCH relationship %]
[% CASE constants.REL_ASSIGNEE %]
You are the assignee for the [% terms.bug %].
[% CASE constants.REL_REPORTER %]
You reported the [% terms.bug %].
[% CASE constants.REL_QA %]
You are the QA contact for the [% terms.bug %].
[% CASE constants.REL_CC %]
You are on the CC list for the [% terms.bug %]. <a href="[% urlbase %]unsubscribe.cgi?id=[% bugid %]">Remove yourself from the CC list</a>.
[% CASE constants.REL_VOTER %]
You are a voter for the [% terms.bug %].
[% CASE constants.REL_GLOBAL_WATCHER %]
You are watching all [% terms.bug %] changes.
[% END %]
[% END %]
[% FOREACH relationship = reasons_watch %]
[% SWITCH relationship %]
[% CASE constants.REL_ASSIGNEE %]
<br />You are watching the assignee of the [% terms.bug %].
[% CASE constants.REL_REPORTER %]
<br />You are watching the reporter.
[% CASE constants.REL_QA %]
<br />You are watching the QA contact of the [% terms.bug %].
[% CASE constants.REL_CC %]
<br />You are watching someone on the CC list of the [% terms.bug %].
[% CASE constants.REL_VOTER %]
<br />You are watching a voter for the [% terms.bug %].
[% END %]
[% END %]
</p>
</body>
[% END %]
--[% boundary %]--

View File

@ -1,279 +0,0 @@
[%# 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): André Batosti <batosti@async.com.br>
#%]
From: [% Param('mailfrom') %]
To: [% to_user.email %]
Subject: [% (isnew ? '' : 'Re: ') _ '['
_ terms.Bug _ ' ' _ bugid _ '] ' _
(severity == 'blocker' ? '[BLOCKER] ' : '') _
(severity == 'critical' ? '[CRITICAL] ' : '') _
'[' _ product _ '] ' _ summary %]
X-Bugzilla-Reason: [% reasonsheader %]
X-Bugzilla-Type: [% isnew ? 'new' : 'changed' %]
X-Bugzilla-Watch-Reason: [% reasonswatchheader %]
[% IF Param('useclassification') %]
X-Bugzilla-Classification: [% classification %]
[% END %]
[% IF severity == 'blocker' OR severity == 'critical' %]
Importance: high
X-Priority: 1
[% END %]
X-Bugzilla-Product: [% product %]
X-Bugzilla-Component: [% comp %]
[% FOREACH keyword_item = keywords.split(", ") %]
X-Bugzilla-Keywords: [% keyword_item %]
[% END%]
X-Bugzilla-Severity: [% severity %]
X-Bugzilla-Who: [% changer.login %]
X-Bugzilla-Status: [% status %]
X-Bugzilla-Priority: [% priority %]
X-Bugzilla-Assigned-To: [% assignedto %]
X-Bugzilla-Target-Milestone: [% targetmilestone %]
X-Bugzilla-Changed-Fields: [% changedfields || "None" %]
X-Bugzilla-Added-Comments: [% new_comments.size %]
[%+ threadingmarker %]
[% USE date %]
[% SET boundary = "--" _ date.now %]
Content-Type: multipart/alternative; boundary=[% boundary %]
MIME-Version: 1.0
--[% boundary %]
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
[% FILTER quoted_printable %]
[%+ urlbase %]show_bug.cgi?id=[% bugid %] (prod:[% product %].[% comp %], pri:[% priority %], sev:[% severity %], miles:[% targetmilestone %])
[%- IF diffs AND diffs.size > 0 %]
[%- SET lastwho = "" %]
[%- SET lastdep = 0 %]
[%- FOR d = diffs %]
[%- IF d.dep AND d.dep != lastdep %]
[%- SET lastdep = d.dep %]
[%- # ------ Bug <bug> Depends on bug <dep>, which changed state ------ %]
Bug [% d.bug_id %] depends on bug [% d.dep %], which changed state.
Bug [% d.dep %] summary: [% d.short_desc %]
[%+ urlbase %]show_bug.cgi?id=[% d.dep %]
[%- END %]
[%- IF d.login_name != lastwho %]
[%- # ------ <user> Changed <bug> ------ %]
[%- SET lastwho = d.login_name %]
[% d.login_name %] changed:
[% three_columns('What ', 'Removed', 'Added') -%]
----------------------------------------------------------------------------
[%- END %]
[%- # ------ What Removed Added ------ %]
[% three_columns(d.fielddesc, d.diff_removed ? d.diff_removed : d.removed, d.diff_added ? d.diff_added : d.added) %]
[%- END %]
[%- END %]
[%- # comments %]
[%- FOREACH comment = new_comments %]
[%- IF comment.count %]
--- Comment #[% comment.count %] from [% comment.author.identity %] [%+ comment.bug_when FILTER time(undef, to_user.timezone) %] ---
[% END %]
[%+ comment.body_full({ is_bugmail => 1, wo_preview => 1 }) %]
[% END %]
-- [%# Protect the trailing space of the signature marker %]
Configure [% terms.bug %]mail: [% urlbase %]userprefs.cgi?tab=email
------- You are receiving this mail because: -------
[% FOREACH relationship = reasons %]
[% SWITCH relationship %]
[% CASE constants.REL_ASSIGNEE %]
You are the assignee for the [% terms.bug %].
[% CASE constants.REL_REPORTER %]
You reported the [% terms.bug %].
[% CASE constants.REL_QA %]
You are the QA contact for the [% terms.bug %].
[% CASE constants.REL_CC %]
You are on the CC list for the [% terms.bug %]. <a href="[% urlbase %]unsubscribe.cgi?id=[% bugid %]">Remove yourself from the CC list</a>.
[% CASE constants.REL_VOTER %]
You are a voter for the [% terms.bug %].
[% CASE constants.REL_GLOBAL_WATCHER %]
You are watching all [% terms.bug %] changes.
[% END %]
[% END %]
[% FOREACH relationship = reasons_watch %]
[% SWITCH relationship %]
[% CASE constants.REL_ASSIGNEE %]
You are watching the assignee of the [% terms.bug %].
[% CASE constants.REL_REPORTER %]
You are watching the reporter.
[% CASE constants.REL_QA %]
You are watching the QA contact of the [% terms.bug %].
[% CASE constants.REL_CC %]
You are watching someone on the CC list of the [% terms.bug %].
[% CASE constants.REL_VOTER %]
You are watching a voter for the [% terms.bug %].
[% END %]
[% END %]
[% END %]
--[% boundary %]
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
[% FILTER quoted_printable %]
<style>
<!--
body { font-family: Segoe UI, sans-serif; }
.difft { padding-bottom: 5pt; font-size: 80%; }
.difft.fv th { text-align: left; }
.bz_st_UNCONFIRMED { font-style: italic; }
.bz_st_RESOLVED { text-decoration: line-through; }
.bz_st_VERIFIED { text-decoration: line-through; border: 1px dashed #2f6fab; background-color: #f9f9f9; line-height: 1.1em; }
.bz_st_CLOSED { text-decoration: line-through; border: 1px solid #2f6fab; background-color: #f9f9f9; line-height: 1.1em; }
.difft.p6 { width: 100%; max-width: 600px; }
.bz_comment_text { font-size: 100%; white-space: normal; font-family: Consolas, monospace; }
.bz_comment_text .quote { color: #65379c; border-left: solid 3px #65379c; padding-left: .5em; margin-left: .5em; }
/*-->*/
</style>
<body>
<p>
[% IF severity == 'blocker' OR severity == 'critical' %]
<a style="font-size: 120%; color: black; background-color: red; font-weight: bold;" href="[%+ urlbase %]show_bug.cgi?id=[% bugid %][% IF new_comments AND new_comments.size > 0 %]#c[% new_comments.0.count %][% END %]">&nbsp;Bug [% bugid %] [[% severity | upper %]] - [% summary | html %]&nbsp;</a>
[% ELSE %]
<a style="font-size: 120%;" href="[%+ urlbase %]show_bug.cgi?id=[% bugid %][% IF new_comments AND new_comments.size > 0 %]#c[% new_comments.0.count %][% END %]">Bug [% bugid %] - [% summary | html %]</a>
[% END %]
<br><span style="font-size: 90%">(prod:[% product %].[% comp %], pri:[% priority %], sev:[% severity %], miles:[% targetmilestone %])</span>
</p>
<hr color="#A0A0A0" size="1" />
[% IF new_comments AND new_comments.size > 0 %]
[% FOR comment = new_comments %]
<p><a href="[%+ urlbase %]show_bug.cgi?id=[% bugid %]#c[% comment.count %]">Comment #[% comment.count %]</a> from
<span class="vcard">
<a class="fn email" href="[% Param('user_mailto') %][% comment.author.email FILTER html %]">
[% (comment.author.name || comment.author.login) FILTER html %]</a>
</span>
[% comment.bug_when FILTER time(undef, to_user.timezone) %]</p>
<div class="bz_comment_text">
[%- comment.body_full({ wrap => 1, wo_preview => 1 }) FILTER absolute_uris -%]
</div>
<hr color="#A0A0A0" size="1" />
[% END %]
[% END %]
[% IF isnew AND showfieldvalues.size > 0 %]
<table class="difft fv">
[% FOR f = showfieldvalues %]
<tr><th>[% f.desc FILTER html %]:</th><td>[% f.value FILTER html %]</td></tr>
[% END %]
</table>
<hr color="#A0A0A0" size="1" />
[% END %]
[% IF diffs AND diffs.size > 0 %]
[% SET lastwho = "" %]
[% SET lastdep = 0 %]
<table class="difft p6" style="border-collapse: collapse" cellpadding="3">
[% FOR d = diffs %]
[% IF d.dep AND d.dep != lastdep %]
[%# ------ Bug <bug> Depends on bug <dep>, which changed state ------ %]
[%- SET lastdep = d.dep %]
<tr><td colspan="3">
<p><a href="[% urlbase %]show_bug.cgi?id=[% d.bug_id %]">Bug [% d.bug_id %]</a> depends
on <a href="[% urlbase %]show_bug.cgi?id=[% d.dep %]">bug [% d.dep %]</a>,
which changed state.</p>
<p><a href="[% urlbase %]show_bug.cgi?id=[% d.dep %]">Bug [% d.dep %]</a>
summary: [% d.short_desc | html %].
</td></tr>
</table>
<hr color="#A0A0A0" size="1" />
<table class="difft p6" style="border-collapse: collapse" cellpadding="3">
[% END %]
[% IF d.login_name != lastwho %]
[%# ------ <user> Changed <bug> ------ %]
[% SET lastwho = d.login_name %]
[% IF !loop.first %]
</table>
<hr color="#A0A0A0" size="1" />
<table class="difft p6" style="border-collapse: collapse" cellpadding="3">
[% END %]
<tr><td colspan="3"><a href="[% Param('user_mailto') %][% d.login_name %]">[% d.realname || d.login_name %]</a> changed:</td></tr>
<tr><th style="text-align: left">What</th><th style="text-align: left">Removed</th><th style="text-align: left">Added</th></tr>
[% END %]
[%# ------ What Removed Added ------ %]
<tr class="n"><td>
[% IF d.fieldname == 'longdesc' %]
<a href="[% urlbase %]show_bug.cgi?id=[% bugid %]#c[% d.comment_count %]">
[% IF d.comment_count > 0 %]Comment #[% d.comment_count %][% ELSE %]Description[% END %]
</a>
[% ELSE %]
[% d.fielddesc %]
[% END %]
</td>
[% IF d.both %]<td colspan="2">[% d.both %]</td>[% ELSE %]<td>[% d.removed %]</td><td>[% d.added %]</td>[% END %]
</tr>
[% END %]
</table>
<hr color="#A0A0A0" size="1" />
[% END %]
<p style="font-size: 12px; font-style: italic">
-- <br />
<a href="[% urlbase %]userprefs.cgi?tab=email">Configure [% terms.bug %]mail</a><br />
------- You are receiving this mail because: -------<br />
[% FOREACH relationship = reasons %]
[% SWITCH relationship %]
[% CASE constants.REL_ASSIGNEE %]
You are the assignee for the [% terms.bug %].
[% CASE constants.REL_REPORTER %]
You reported the [% terms.bug %].
[% CASE constants.REL_QA %]
You are the QA contact for the [% terms.bug %].
[% CASE constants.REL_CC %]
You are on the CC list for the [% terms.bug %]. <a href="[% urlbase %]unsubscribe.cgi?id=[% bugid %]">Remove yourself from the CC list</a>.
[% CASE constants.REL_VOTER %]
You are a voter for the [% terms.bug %].
[% CASE constants.REL_GLOBAL_WATCHER %]
You are watching all [% terms.bug %] changes.
[% END %]
[% END %]
[% FOREACH relationship = reasons_watch %]
[% SWITCH relationship %]
[% CASE constants.REL_ASSIGNEE %]
<br />You are watching the assignee of the [% terms.bug %].
[% CASE constants.REL_REPORTER %]
<br />You are watching the reporter.
[% CASE constants.REL_QA %]
<br />You are watching the QA contact of the [% terms.bug %].
[% CASE constants.REL_CC %]
<br />You are watching someone on the CC list of the [% terms.bug %].
[% CASE constants.REL_VOTER %]
<br />You are watching a voter for the [% terms.bug %].
[% END %]
[% END %]
</p>
</body>
[% END %]
--[% boundary %]--

View File

@ -1,279 +0,0 @@
[%# 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): André Batosti <batosti@async.com.br>
#%]
From: [% Param('mailfrom') %]
To: [% to_user.email %]
Subject: [% (isnew ? '' : 'Re: ') _ '['
_ terms.Bug _ ' ' _ bugid _ '] ' _
(severity == 'blocker' ? '[BLOCKER] ' : '') _
(severity == 'critical' ? '[CRITICAL] ' : '') _
'[' _ product _ '] ' _ summary %]
X-Bugzilla-Reason: [% reasonsheader %]
X-Bugzilla-Type: [% isnew ? 'new' : 'changed' %]
X-Bugzilla-Watch-Reason: [% reasonswatchheader %]
[% IF Param('useclassification') %]
X-Bugzilla-Classification: [% classification %]
[% END %]
[% IF severity == 'blocker' OR severity == 'critical' %]
Importance: high
X-Priority: 1
[% END %]
X-Bugzilla-Product: [% product %]
X-Bugzilla-Component: [% comp %]
[% FOREACH keyword_item = keywords.split(", ") %]
X-Bugzilla-Keywords: [% keyword_item %]
[% END%]
X-Bugzilla-Severity: [% severity %]
X-Bugzilla-Who: [% changer.login %]
X-Bugzilla-Status: [% status %]
X-Bugzilla-Priority: [% priority %]
X-Bugzilla-Assigned-To: [% assignedto %]
X-Bugzilla-Target-Milestone: [% targetmilestone %]
X-Bugzilla-Changed-Fields: [% changedfields || "None" %]
X-Bugzilla-Added-Comments: [% new_comments.size %]
[%+ threadingmarker %]
[% USE date %]
[% SET boundary = "--" _ date.now %]
Content-Type: multipart/alternative; boundary=[% boundary %]
MIME-Version: 1.0
--[% boundary %]
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
[% FILTER quoted_printable %]
[%+ urlbase %]show_bug.cgi?id=[% bugid %] (prod:[% product %].[% comp %], pri:[% priority %], sev:[% severity %], miles:[% targetmilestone %])
[%- IF diffs AND diffs.size > 0 %]
[%- SET lastwho = "" %]
[%- SET lastdep = 0 %]
[%- FOR d = diffs %]
[%- IF d.dep AND d.dep != lastdep %]
[%- SET lastdep = d.dep %]
[%- # ------ Bug <bug> Depends on bug <dep>, which changed state ------ %]
Bug [% d.bug_id %] depends on bug [% d.dep %], which changed state.
Bug [% d.dep %] summary: [% d.short_desc %]
[%+ urlbase %]show_bug.cgi?id=[% d.dep %]
[%- END %]
[%- IF d.login_name != lastwho %]
[%- # ------ <user> Changed <bug> ------ %]
[%- SET lastwho = d.login_name %]
[% d.login_name %] changed:
[% three_columns('What ', 'Removed', 'Added') -%]
----------------------------------------------------------------------------
[%- END %]
[%- # ------ What Removed Added ------ %]
[% three_columns(d.fielddesc, d.diff_removed ? d.diff_removed : d.removed, d.diff_added ? d.diff_added : d.added) %]
[%- END %]
[%- END %]
[%- # comments %]
[%- FOREACH comment = new_comments %]
[%- IF comment.count %]
--- Comment #[% comment.count %] from [% comment.author.identity %] [%+ comment.bug_when FILTER time(undef, to_user.timezone) %] ---
[% END %]
[%+ comment.body_full({ is_bugmail => 1, wo_preview => 1 }) %]
[% END %]
-- [%# Protect the trailing space of the signature marker %]
Configure [% terms.bug %]mail: [% urlbase %]userprefs.cgi?tab=email
------- You are receiving this mail because: -------
[% FOREACH relationship = reasons %]
[% SWITCH relationship %]
[% CASE constants.REL_ASSIGNEE %]
You are the assignee for the [% terms.bug %].
[% CASE constants.REL_REPORTER %]
You reported the [% terms.bug %].
[% CASE constants.REL_QA %]
You are the QA contact for the [% terms.bug %].
[% CASE constants.REL_CC %]
You are on the CC list for the [% terms.bug %]. <a href="[% urlbase %]unsubscribe.cgi?id=[% bugid %]">Remove yourself from the CC list</a>.
[% CASE constants.REL_VOTER %]
You are a voter for the [% terms.bug %].
[% CASE constants.REL_GLOBAL_WATCHER %]
You are watching all [% terms.bug %] changes.
[% END %]
[% END %]
[% FOREACH relationship = reasons_watch %]
[% SWITCH relationship %]
[% CASE constants.REL_ASSIGNEE %]
You are watching the assignee of the [% terms.bug %].
[% CASE constants.REL_REPORTER %]
You are watching the reporter.
[% CASE constants.REL_QA %]
You are watching the QA contact of the [% terms.bug %].
[% CASE constants.REL_CC %]
You are watching someone on the CC list of the [% terms.bug %].
[% CASE constants.REL_VOTER %]
You are watching a voter for the [% terms.bug %].
[% END %]
[% END %]
[% END %]
--[% boundary %]
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
[% FILTER quoted_printable %]
<style>
<!--
body { font-family: Segoe UI, sans-serif; }
.difft { padding-bottom: 5pt; font-size: 80%; }
.difft.fv th { text-align: left; }
.bz_st_UNCONFIRMED { font-style: italic; }
.bz_st_RESOLVED { text-decoration: line-through; }
.bz_st_VERIFIED { text-decoration: line-through; border: 1px dashed #2f6fab; background-color: #f9f9f9; line-height: 1.1em; }
.bz_st_CLOSED { text-decoration: line-through; border: 1px solid #2f6fab; background-color: #f9f9f9; line-height: 1.1em; }
.difft.p6 { width: 100%; max-width: 600px; }
.bz_comment_text { font-size: 100%; white-space: normal; font-family: Consolas, monospace; }
.bz_comment_text .quote { color: #65379c; border-left: solid 3px #65379c; padding-left: .5em; margin-left: .5em; }
/*-->*/
</style>
<body>
<p>
[% IF severity == 'blocker' OR severity == 'critical' %]
<a style="font-size: 120%; color: black; background-color: red; font-weight: bold;" href="[%+ urlbase %]show_bug.cgi?id=[% bugid %][% IF new_comments AND new_comments.size > 0 %]#c[% new_comments.0.count %][% END %]">&nbsp;Bug [% bugid %] [[% severity | upper %]] - [% summary | html %]&nbsp;</a>
[% ELSE %]
<a style="font-size: 120%;" href="[%+ urlbase %]show_bug.cgi?id=[% bugid %][% IF new_comments AND new_comments.size > 0 %]#c[% new_comments.0.count %][% END %]">Bug [% bugid %] - [% summary | html %]</a>
[% END %]
<br><span style="font-size: 90%">(prod:[% product %].[% comp %], pri:[% priority %], sev:[% severity %], miles:[% targetmilestone %])</span>
</p>
<hr color="#A0A0A0" size="1" />
[% IF new_comments AND new_comments.size > 0 %]
[% FOR comment = new_comments %]
<p><a href="[%+ urlbase %]show_bug.cgi?id=[% bugid %]#c[% comment.count %]">Comment #[% comment.count %]</a> from
<span class="vcard">
<a class="fn email" href="[% Param('user_mailto') %][% comment.author.email FILTER html %]">
[% (comment.author.name || comment.author.login) FILTER html %]</a>
</span>
[% comment.bug_when FILTER time(undef, to_user.timezone) %]</p>
<div class="bz_comment_text">
[%- comment.body_full({ wrap => 1, wo_preview => 1 }) FILTER absolute_uris -%]
</div>
<hr color="#A0A0A0" size="1" />
[% END %]
[% END %]
[% IF isnew AND showfieldvalues.size > 0 %]
<table class="difft fv">
[% FOR f = showfieldvalues %]
<tr><th>[% f.desc FILTER html %]:</th><td>[% f.value FILTER html %]</td></tr>
[% END %]
</table>
<hr color="#A0A0A0" size="1" />
[% END %]
[% IF diffs AND diffs.size > 0 %]
[% SET lastwho = "" %]
[% SET lastdep = 0 %]
<table class="difft p6" style="border-collapse: collapse" cellpadding="3">
[% FOR d = diffs %]
[% IF d.dep AND d.dep != lastdep %]
[%# ------ Bug <bug> Depends on bug <dep>, which changed state ------ %]
[%- SET lastdep = d.dep %]
<tr><td colspan="3">
<p><a href="[% urlbase %]show_bug.cgi?id=[% d.bug_id %]">Bug [% d.bug_id %]</a> depends
on <a href="[% urlbase %]show_bug.cgi?id=[% d.dep %]">bug [% d.dep %]</a>,
which changed state.</p>
<p><a href="[% urlbase %]show_bug.cgi?id=[% d.dep %]">Bug [% d.dep %]</a>
summary: [% d.short_desc | html %].
</td></tr>
</table>
<hr color="#A0A0A0" size="1" />
<table class="difft p6" style="border-collapse: collapse" cellpadding="3">
[% END %]
[% IF d.login_name != lastwho %]
[%# ------ <user> Changed <bug> ------ %]
[% SET lastwho = d.login_name %]
[% IF !loop.first %]
</table>
<hr color="#A0A0A0" size="1" />
<table class="difft p6" style="border-collapse: collapse" cellpadding="3">
[% END %]
<tr><td colspan="3"><a href="[% Param('user_mailto') %][% d.login_name %]">[% d.realname || d.login_name %]</a> changed:</td></tr>
<tr><th style="text-align: left">What</th><th style="text-align: left">Removed</th><th style="text-align: left">Added</th></tr>
[% END %]
[%# ------ What Removed Added ------ %]
<tr class="n"><td>
[% IF d.fieldname == 'longdesc' %]
<a href="[% urlbase %]show_bug.cgi?id=[% bugid %]#c[% d.comment_count %]">
[% IF d.comment_count > 0 %]Comment #[% d.comment_count %][% ELSE %]Description[% END %]
</a>
[% ELSE %]
[% d.fielddesc %]
[% END %]
</td>
[% IF d.both %]<td colspan="2">[% d.both %]</td>[% ELSE %]<td>[% d.removed %]</td><td>[% d.added %]</td>[% END %]
</tr>
[% END %]
</table>
<hr color="#A0A0A0" size="1" />
[% END %]
<p style="font-size: 12px; font-style: italic">
-- <br />
<a href="[% urlbase %]userprefs.cgi?tab=email">Configure [% terms.bug %]mail</a><br />
------- You are receiving this mail because: -------<br />
[% FOREACH relationship = reasons %]
[% SWITCH relationship %]
[% CASE constants.REL_ASSIGNEE %]
You are the assignee for the [% terms.bug %].
[% CASE constants.REL_REPORTER %]
You reported the [% terms.bug %].
[% CASE constants.REL_QA %]
You are the QA contact for the [% terms.bug %].
[% CASE constants.REL_CC %]
You are on the CC list for the [% terms.bug %]. <a href="[% urlbase %]unsubscribe.cgi?id=[% bugid %]">Remove yourself from the CC list</a>.
[% CASE constants.REL_VOTER %]
You are a voter for the [% terms.bug %].
[% CASE constants.REL_GLOBAL_WATCHER %]
You are watching all [% terms.bug %] changes.
[% END %]
[% END %]
[% FOREACH relationship = reasons_watch %]
[% SWITCH relationship %]
[% CASE constants.REL_ASSIGNEE %]
<br />You are watching the assignee of the [% terms.bug %].
[% CASE constants.REL_REPORTER %]
<br />You are watching the reporter.
[% CASE constants.REL_QA %]
<br />You are watching the QA contact of the [% terms.bug %].
[% CASE constants.REL_CC %]
<br />You are watching someone on the CC list of the [% terms.bug %].
[% CASE constants.REL_VOTER %]
<br />You are watching a voter for the [% terms.bug %].
[% END %]
[% END %]
</p>
</body>
[% END %]
--[% boundary %]--

View File

@ -1,279 +0,0 @@
[%# 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): André Batosti <batosti@async.com.br>
#%]
From: [% Param('mailfrom') %]
To: [% to_user.email %]
Subject: [% (isnew ? '' : 'Re: ') _ '['
_ terms.Bug _ ' ' _ bugid _ '] ' _
(severity == 'blocker' ? '[BLOCKER] ' : '') _
(severity == 'critical' ? '[CRITICAL] ' : '') _
'[' _ product _ '] ' _ summary %]
X-Bugzilla-Reason: [% reasonsheader %]
X-Bugzilla-Type: [% isnew ? 'new' : 'changed' %]
X-Bugzilla-Watch-Reason: [% reasonswatchheader %]
[% IF Param('useclassification') %]
X-Bugzilla-Classification: [% classification %]
[% END %]
[% IF severity == 'blocker' OR severity == 'critical' %]
Importance: high
X-Priority: 1
[% END %]
X-Bugzilla-Product: [% product %]
X-Bugzilla-Component: [% comp %]
[% FOREACH keyword_item = keywords.split(", ") %]
X-Bugzilla-Keywords: [% keyword_item %]
[% END%]
X-Bugzilla-Severity: [% severity %]
X-Bugzilla-Who: [% changer.login %]
X-Bugzilla-Status: [% status %]
X-Bugzilla-Priority: [% priority %]
X-Bugzilla-Assigned-To: [% assignedto %]
X-Bugzilla-Target-Milestone: [% targetmilestone %]
X-Bugzilla-Changed-Fields: [% changedfields || "None" %]
X-Bugzilla-Added-Comments: [% new_comments.size %]
[%+ threadingmarker %]
[% USE date %]
[% SET boundary = "--" _ date.now %]
Content-Type: multipart/alternative; boundary=[% boundary %]
MIME-Version: 1.0
--[% boundary %]
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
[% FILTER quoted_printable %]
[%+ urlbase %]show_bug.cgi?id=[% bugid %] (prod:[% product %].[% comp %], pri:[% priority %], sev:[% severity %], miles:[% targetmilestone %])
[%- IF diffs AND diffs.size > 0 %]
[%- SET lastwho = "" %]
[%- SET lastdep = 0 %]
[%- FOR d = diffs %]
[%- IF d.dep AND d.dep != lastdep %]
[%- SET lastdep = d.dep %]
[%- # ------ Bug <bug> Depends on bug <dep>, which changed state ------ %]
Bug [% d.bug_id %] depends on bug [% d.dep %], which changed state.
Bug [% d.dep %] summary: [% d.short_desc %]
[%+ urlbase %]show_bug.cgi?id=[% d.dep %]
[%- END %]
[%- IF d.login_name != lastwho %]
[%- # ------ <user> Changed <bug> ------ %]
[%- SET lastwho = d.login_name %]
[% d.login_name %] changed:
[% three_columns('What ', 'Removed', 'Added') -%]
----------------------------------------------------------------------------
[%- END %]
[%- # ------ What Removed Added ------ %]
[% three_columns(d.fielddesc, d.diff_removed ? d.diff_removed : d.removed, d.diff_added ? d.diff_added : d.added) %]
[%- END %]
[%- END %]
[%- # comments %]
[%- FOREACH comment = new_comments %]
[%- IF comment.count %]
--- Comment #[% comment.count %] from [% comment.author.identity %] [%+ comment.bug_when FILTER time(undef, to_user.timezone) %] ---
[% END %]
[%+ comment.body_full({ is_bugmail => 1, wo_preview => 1 }) %]
[% END %]
-- [%# Protect the trailing space of the signature marker %]
Configure [% terms.bug %]mail: [% urlbase %]userprefs.cgi?tab=email
------- You are receiving this mail because: -------
[% FOREACH relationship = reasons %]
[% SWITCH relationship %]
[% CASE constants.REL_ASSIGNEE %]
You are the assignee for the [% terms.bug %].
[% CASE constants.REL_REPORTER %]
You reported the [% terms.bug %].
[% CASE constants.REL_QA %]
You are the QA contact for the [% terms.bug %].
[% CASE constants.REL_CC %]
You are on the CC list for the [% terms.bug %]. <a href="[% urlbase %]unsubscribe.cgi?id=[% bugid %]">Remove yourself from the CC list</a>.
[% CASE constants.REL_VOTER %]
You are a voter for the [% terms.bug %].
[% CASE constants.REL_GLOBAL_WATCHER %]
You are watching all [% terms.bug %] changes.
[% END %]
[% END %]
[% FOREACH relationship = reasons_watch %]
[% SWITCH relationship %]
[% CASE constants.REL_ASSIGNEE %]
You are watching the assignee of the [% terms.bug %].
[% CASE constants.REL_REPORTER %]
You are watching the reporter.
[% CASE constants.REL_QA %]
You are watching the QA contact of the [% terms.bug %].
[% CASE constants.REL_CC %]
You are watching someone on the CC list of the [% terms.bug %].
[% CASE constants.REL_VOTER %]
You are watching a voter for the [% terms.bug %].
[% END %]
[% END %]
[% END %]
--[% boundary %]
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
[% FILTER quoted_printable %]
<style>
<!--
body { font-family: Segoe UI, sans-serif; }
.difft { padding-bottom: 5pt; font-size: 80%; }
.difft.fv th { text-align: left; }
.bz_st_UNCONFIRMED { font-style: italic; }
.bz_st_RESOLVED { text-decoration: line-through; }
.bz_st_VERIFIED { text-decoration: line-through; border: 1px dashed #2f6fab; background-color: #f9f9f9; line-height: 1.1em; }
.bz_st_CLOSED { text-decoration: line-through; border: 1px solid #2f6fab; background-color: #f9f9f9; line-height: 1.1em; }
.difft.p6 { width: 100%; max-width: 600px; }
.bz_comment_text { font-size: 100%; white-space: normal; font-family: Consolas, monospace; }
.bz_comment_text .quote { color: #65379c; border-left: solid 3px #65379c; padding-left: .5em; margin-left: .5em; }
/*-->*/
</style>
<body>
<p>
[% IF severity == 'blocker' OR severity == 'critical' %]
<a style="font-size: 120%; color: black; background-color: red; font-weight: bold;" href="[%+ urlbase %]show_bug.cgi?id=[% bugid %][% IF new_comments AND new_comments.size > 0 %]#c[% new_comments.0.count %][% END %]">&nbsp;Bug [% bugid %] [[% severity | upper %]] - [% summary | html %]&nbsp;</a>
[% ELSE %]
<a style="font-size: 120%;" href="[%+ urlbase %]show_bug.cgi?id=[% bugid %][% IF new_comments AND new_comments.size > 0 %]#c[% new_comments.0.count %][% END %]">Bug [% bugid %] - [% summary | html %]</a>
[% END %]
<br><span style="font-size: 90%">(prod:[% product %].[% comp %], pri:[% priority %], sev:[% severity %], miles:[% targetmilestone %])</span>
</p>
<hr color="#A0A0A0" size="1" />
[% IF new_comments AND new_comments.size > 0 %]
[% FOR comment = new_comments %]
<p><a href="[%+ urlbase %]show_bug.cgi?id=[% bugid %]#c[% comment.count %]">Comment #[% comment.count %]</a> from
<span class="vcard">
<a class="fn email" href="[% Param('user_mailto') %][% comment.author.email FILTER html %]">
[% (comment.author.name || comment.author.login) FILTER html %]</a>
</span>
[% comment.bug_when FILTER time(undef, to_user.timezone) %]</p>
<div class="bz_comment_text">
[%- comment.body_full({ wrap => 1, wo_preview => 1 }) FILTER absolute_uris -%]
</div>
<hr color="#A0A0A0" size="1" />
[% END %]
[% END %]
[% IF isnew AND showfieldvalues.size > 0 %]
<table class="difft fv">
[% FOR f = showfieldvalues %]
<tr><th>[% f.desc FILTER html %]:</th><td>[% f.value FILTER html %]</td></tr>
[% END %]
</table>
<hr color="#A0A0A0" size="1" />
[% END %]
[% IF diffs AND diffs.size > 0 %]
[% SET lastwho = "" %]
[% SET lastdep = 0 %]
<table class="difft p6" style="border-collapse: collapse" cellpadding="3">
[% FOR d = diffs %]
[% IF d.dep AND d.dep != lastdep %]
[%# ------ Bug <bug> Depends on bug <dep>, which changed state ------ %]
[%- SET lastdep = d.dep %]
<tr><td colspan="3">
<p><a href="[% urlbase %]show_bug.cgi?id=[% d.bug_id %]">Bug [% d.bug_id %]</a> depends
on <a href="[% urlbase %]show_bug.cgi?id=[% d.dep %]">bug [% d.dep %]</a>,
which changed state.</p>
<p><a href="[% urlbase %]show_bug.cgi?id=[% d.dep %]">Bug [% d.dep %]</a>
summary: [% d.short_desc | html %].
</td></tr>
</table>
<hr color="#A0A0A0" size="1" />
<table class="difft p6" style="border-collapse: collapse" cellpadding="3">
[% END %]
[% IF d.login_name != lastwho %]
[%# ------ <user> Changed <bug> ------ %]
[% SET lastwho = d.login_name %]
[% IF !loop.first %]
</table>
<hr color="#A0A0A0" size="1" />
<table class="difft p6" style="border-collapse: collapse" cellpadding="3">
[% END %]
<tr><td colspan="3"><a href="[% Param('user_mailto') %][% d.login_name %]">[% d.realname || d.login_name %]</a> changed:</td></tr>
<tr><th style="text-align: left">What</th><th style="text-align: left">Removed</th><th style="text-align: left">Added</th></tr>
[% END %]
[%# ------ What Removed Added ------ %]
<tr class="n"><td>
[% IF d.fieldname == 'longdesc' %]
<a href="[% urlbase %]show_bug.cgi?id=[% bugid %]#c[% d.comment_count %]">
[% IF d.comment_count > 0 %]Comment #[% d.comment_count %][% ELSE %]Description[% END %]
</a>
[% ELSE %]
[% d.fielddesc %]
[% END %]
</td>
[% IF d.both %]<td colspan="2">[% d.both %]</td>[% ELSE %]<td>[% d.removed %]</td><td>[% d.added %]</td>[% END %]
</tr>
[% END %]
</table>
<hr color="#A0A0A0" size="1" />
[% END %]
<p style="font-size: 12px; font-style: italic">
-- <br />
<a href="[% urlbase %]userprefs.cgi?tab=email">Configure [% terms.bug %]mail</a><br />
------- You are receiving this mail because: -------<br />
[% FOREACH relationship = reasons %]
[% SWITCH relationship %]
[% CASE constants.REL_ASSIGNEE %]
You are the assignee for the [% terms.bug %].
[% CASE constants.REL_REPORTER %]
You reported the [% terms.bug %].
[% CASE constants.REL_QA %]
You are the QA contact for the [% terms.bug %].
[% CASE constants.REL_CC %]
You are on the CC list for the [% terms.bug %]. <a href="[% urlbase %]unsubscribe.cgi?id=[% bugid %]">Remove yourself from the CC list</a>.
[% CASE constants.REL_VOTER %]
You are a voter for the [% terms.bug %].
[% CASE constants.REL_GLOBAL_WATCHER %]
You are watching all [% terms.bug %] changes.
[% END %]
[% END %]
[% FOREACH relationship = reasons_watch %]
[% SWITCH relationship %]
[% CASE constants.REL_ASSIGNEE %]
<br />You are watching the assignee of the [% terms.bug %].
[% CASE constants.REL_REPORTER %]
<br />You are watching the reporter.
[% CASE constants.REL_QA %]
<br />You are watching the QA contact of the [% terms.bug %].
[% CASE constants.REL_CC %]
<br />You are watching someone on the CC list of the [% terms.bug %].
[% CASE constants.REL_VOTER %]
<br />You are watching a voter for the [% terms.bug %].
[% END %]
[% END %]
</p>
</body>
[% END %]
--[% boundary %]--

View File

@ -1,279 +0,0 @@
[%# 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): André Batosti <batosti@async.com.br>
#%]
From: [% Param('mailfrom') %]
To: [% to_user.email %]
Subject: [% (isnew ? '' : 'Re: ') _ '['
_ terms.Bug _ ' ' _ bugid _ '] ' _
(severity == 'blocker' ? '[BLOCKER] ' : '') _
(severity == 'critical' ? '[CRITICAL] ' : '') _
'[' _ product _ '] ' _ summary %]
X-Bugzilla-Reason: [% reasonsheader %]
X-Bugzilla-Type: [% isnew ? 'new' : 'changed' %]
X-Bugzilla-Watch-Reason: [% reasonswatchheader %]
[% IF Param('useclassification') %]
X-Bugzilla-Classification: [% classification %]
[% END %]
[% IF severity == 'blocker' OR severity == 'critical' %]
Importance: high
X-Priority: 1
[% END %]
X-Bugzilla-Product: [% product %]
X-Bugzilla-Component: [% comp %]
[% FOREACH keyword_item = keywords.split(", ") %]
X-Bugzilla-Keywords: [% keyword_item %]
[% END%]
X-Bugzilla-Severity: [% severity %]
X-Bugzilla-Who: [% changer.login %]
X-Bugzilla-Status: [% status %]
X-Bugzilla-Priority: [% priority %]
X-Bugzilla-Assigned-To: [% assignedto %]
X-Bugzilla-Target-Milestone: [% targetmilestone %]
X-Bugzilla-Changed-Fields: [% changedfields || "None" %]
X-Bugzilla-Added-Comments: [% new_comments.size %]
[%+ threadingmarker %]
[% USE date %]
[% SET boundary = "--" _ date.now %]
Content-Type: multipart/alternative; boundary=[% boundary %]
MIME-Version: 1.0
--[% boundary %]
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
[% FILTER quoted_printable %]
[%+ urlbase %]show_bug.cgi?id=[% bugid %] (prod:[% product %].[% comp %], pri:[% priority %], sev:[% severity %], miles:[% targetmilestone %])
[%- IF diffs AND diffs.size > 0 %]
[%- SET lastwho = "" %]
[%- SET lastdep = 0 %]
[%- FOR d = diffs %]
[%- IF d.dep AND d.dep != lastdep %]
[%- SET lastdep = d.dep %]
[%- # ------ Bug <bug> Depends on bug <dep>, which changed state ------ %]
Bug [% d.bug_id %] depends on bug [% d.dep %], which changed state.
Bug [% d.dep %] summary: [% d.short_desc %]
[%+ urlbase %]show_bug.cgi?id=[% d.dep %]
[%- END %]
[%- IF d.login_name != lastwho %]
[%- # ------ <user> Changed <bug> ------ %]
[%- SET lastwho = d.login_name %]
[% d.login_name %] changed:
[% three_columns('What ', 'Removed', 'Added') -%]
----------------------------------------------------------------------------
[%- END %]
[%- # ------ What Removed Added ------ %]
[% three_columns(d.fielddesc, d.diff_removed ? d.diff_removed : d.removed, d.diff_added ? d.diff_added : d.added) %]
[%- END %]
[%- END %]
[%- # comments %]
[%- FOREACH comment = new_comments %]
[%- IF comment.count %]
--- Comment #[% comment.count %] from [% comment.author.identity %] [%+ comment.bug_when FILTER time(undef, to_user.timezone) %] ---
[% END %]
[%+ comment.body_full({ is_bugmail => 1, wo_preview => 1 }) %]
[% END %]
-- [%# Protect the trailing space of the signature marker %]
Configure [% terms.bug %]mail: [% urlbase %]userprefs.cgi?tab=email
------- You are receiving this mail because: -------
[% FOREACH relationship = reasons %]
[% SWITCH relationship %]
[% CASE constants.REL_ASSIGNEE %]
You are the assignee for the [% terms.bug %].
[% CASE constants.REL_REPORTER %]
You reported the [% terms.bug %].
[% CASE constants.REL_QA %]
You are the QA contact for the [% terms.bug %].
[% CASE constants.REL_CC %]
You are on the CC list for the [% terms.bug %]. <a href="[% urlbase %]unsubscribe.cgi?id=[% bugid %]">Remove yourself from the CC list</a>.
[% CASE constants.REL_VOTER %]
You are a voter for the [% terms.bug %].
[% CASE constants.REL_GLOBAL_WATCHER %]
You are watching all [% terms.bug %] changes.
[% END %]
[% END %]
[% FOREACH relationship = reasons_watch %]
[% SWITCH relationship %]
[% CASE constants.REL_ASSIGNEE %]
You are watching the assignee of the [% terms.bug %].
[% CASE constants.REL_REPORTER %]
You are watching the reporter.
[% CASE constants.REL_QA %]
You are watching the QA contact of the [% terms.bug %].
[% CASE constants.REL_CC %]
You are watching someone on the CC list of the [% terms.bug %].
[% CASE constants.REL_VOTER %]
You are watching a voter for the [% terms.bug %].
[% END %]
[% END %]
[% END %]
--[% boundary %]
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
[% FILTER quoted_printable %]
<style>
<!--
body { font-family: Segoe UI, sans-serif; }
.difft { padding-bottom: 5pt; font-size: 80%; }
.difft.fv th { text-align: left; }
.bz_st_UNCONFIRMED { font-style: italic; }
.bz_st_RESOLVED { text-decoration: line-through; }
.bz_st_VERIFIED { text-decoration: line-through; border: 1px dashed #2f6fab; background-color: #f9f9f9; line-height: 1.1em; }
.bz_st_CLOSED { text-decoration: line-through; border: 1px solid #2f6fab; background-color: #f9f9f9; line-height: 1.1em; }
.difft.p6 { width: 100%; max-width: 600px; }
.bz_comment_text { font-size: 100%; white-space: normal; font-family: Consolas, monospace; }
.bz_comment_text .quote { color: #65379c; border-left: solid 3px #65379c; padding-left: .5em; margin-left: .5em; }
/*-->*/
</style>
<body>
<p>
[% IF severity == 'blocker' OR severity == 'critical' %]
<a style="font-size: 120%; color: black; background-color: red; font-weight: bold;" href="[%+ urlbase %]show_bug.cgi?id=[% bugid %][% IF new_comments AND new_comments.size > 0 %]#c[% new_comments.0.count %][% END %]">&nbsp;Bug [% bugid %] [[% severity | upper %]] - [% summary | html %]&nbsp;</a>
[% ELSE %]
<a style="font-size: 120%;" href="[%+ urlbase %]show_bug.cgi?id=[% bugid %][% IF new_comments AND new_comments.size > 0 %]#c[% new_comments.0.count %][% END %]">Bug [% bugid %] - [% summary | html %]</a>
[% END %]
<br><span style="font-size: 90%">(prod:[% product %].[% comp %], pri:[% priority %], sev:[% severity %], miles:[% targetmilestone %])</span>
</p>
<hr color="#A0A0A0" size="1" />
[% IF new_comments AND new_comments.size > 0 %]
[% FOR comment = new_comments %]
<p><a href="[%+ urlbase %]show_bug.cgi?id=[% bugid %]#c[% comment.count %]">Comment #[% comment.count %]</a> from
<span class="vcard">
<a class="fn email" href="[% Param('user_mailto') %][% comment.author.email FILTER html %]">
[% (comment.author.name || comment.author.login) FILTER html %]</a>
</span>
[% comment.bug_when FILTER time(undef, to_user.timezone) %]</p>
<div class="bz_comment_text">
[%- comment.body_full({ wrap => 1, wo_preview => 1 }) FILTER absolute_uris -%]
</div>
<hr color="#A0A0A0" size="1" />
[% END %]
[% END %]
[% IF isnew AND showfieldvalues.size > 0 %]
<table class="difft fv">
[% FOR f = showfieldvalues %]
<tr><th>[% f.desc FILTER html %]:</th><td>[% f.value FILTER html %]</td></tr>
[% END %]
</table>
<hr color="#A0A0A0" size="1" />
[% END %]
[% IF diffs AND diffs.size > 0 %]
[% SET lastwho = "" %]
[% SET lastdep = 0 %]
<table class="difft p6" style="border-collapse: collapse" cellpadding="3">
[% FOR d = diffs %]
[% IF d.dep AND d.dep != lastdep %]
[%# ------ Bug <bug> Depends on bug <dep>, which changed state ------ %]
[%- SET lastdep = d.dep %]
<tr><td colspan="3">
<p><a href="[% urlbase %]show_bug.cgi?id=[% d.bug_id %]">Bug [% d.bug_id %]</a> depends
on <a href="[% urlbase %]show_bug.cgi?id=[% d.dep %]">bug [% d.dep %]</a>,
which changed state.</p>
<p><a href="[% urlbase %]show_bug.cgi?id=[% d.dep %]">Bug [% d.dep %]</a>
summary: [% d.short_desc | html %].
</td></tr>
</table>
<hr color="#A0A0A0" size="1" />
<table class="difft p6" style="border-collapse: collapse" cellpadding="3">
[% END %]
[% IF d.login_name != lastwho %]
[%# ------ <user> Changed <bug> ------ %]
[% SET lastwho = d.login_name %]
[% IF !loop.first %]
</table>
<hr color="#A0A0A0" size="1" />
<table class="difft p6" style="border-collapse: collapse" cellpadding="3">
[% END %]
<tr><td colspan="3"><a href="[% Param('user_mailto') %][% d.login_name %]">[% d.realname || d.login_name %]</a> changed:</td></tr>
<tr><th style="text-align: left">What</th><th style="text-align: left">Removed</th><th style="text-align: left">Added</th></tr>
[% END %]
[%# ------ What Removed Added ------ %]
<tr class="n"><td>
[% IF d.fieldname == 'longdesc' %]
<a href="[% urlbase %]show_bug.cgi?id=[% bugid %]#c[% d.comment_count %]">
[% IF d.comment_count > 0 %]Comment #[% d.comment_count %][% ELSE %]Description[% END %]
</a>
[% ELSE %]
[% d.fielddesc %]
[% END %]
</td>
[% IF d.both %]<td colspan="2">[% d.both %]</td>[% ELSE %]<td>[% d.removed %]</td><td>[% d.added %]</td>[% END %]
</tr>
[% END %]
</table>
<hr color="#A0A0A0" size="1" />
[% END %]
<p style="font-size: 12px; font-style: italic">
-- <br />
<a href="[% urlbase %]userprefs.cgi?tab=email">Configure [% terms.bug %]mail</a><br />
------- You are receiving this mail because: -------<br />
[% FOREACH relationship = reasons %]
[% SWITCH relationship %]
[% CASE constants.REL_ASSIGNEE %]
You are the assignee for the [% terms.bug %].
[% CASE constants.REL_REPORTER %]
You reported the [% terms.bug %].
[% CASE constants.REL_QA %]
You are the QA contact for the [% terms.bug %].
[% CASE constants.REL_CC %]
You are on the CC list for the [% terms.bug %]. <a href="[% urlbase %]unsubscribe.cgi?id=[% bugid %]">Remove yourself from the CC list</a>.
[% CASE constants.REL_VOTER %]
You are a voter for the [% terms.bug %].
[% CASE constants.REL_GLOBAL_WATCHER %]
You are watching all [% terms.bug %] changes.
[% END %]
[% END %]
[% FOREACH relationship = reasons_watch %]
[% SWITCH relationship %]
[% CASE constants.REL_ASSIGNEE %]
<br />You are watching the assignee of the [% terms.bug %].
[% CASE constants.REL_REPORTER %]
<br />You are watching the reporter.
[% CASE constants.REL_QA %]
<br />You are watching the QA contact of the [% terms.bug %].
[% CASE constants.REL_CC %]
<br />You are watching someone on the CC list of the [% terms.bug %].
[% CASE constants.REL_VOTER %]
<br />You are watching a voter for the [% terms.bug %].
[% END %]
[% END %]
</p>
</body>
[% END %]
--[% boundary %]--

View File

@ -58,15 +58,15 @@
[% FOREACH operation = operations %]
[% op_loop = loop.count %]
<tr>
<td rowspan="[% operation.changes.size %]" valign="top">
<td rowspan="[% operation.total_lines %]" valign="top">
[% operation.who FILTER email FILTER html %]
</td>
<td rowspan="[% operation.changes.size %]" valign="top">
<td rowspan="[% operation.total_lines %]" valign="top">
[% operation.when FILTER time %]
</td>
[% FOREACH change = operation.changes %]
[% "</tr><tr>" IF loop.index > 0 %]
<td>
<td valign="top"[% IF change.lines %] rowspan="[% change.lines.size %]"[% END %]>
[% IF change.attachid %]
<a href="attachment.cgi?id=[% change.attachid %]">
Attachment #[% change.attachid %]</a>
@ -78,18 +78,21 @@
[% ELSE %]
Description
[% END %]
[% IF change.removed.length > 85 || change.added.length > 85 %]
[% IF !change.lines && (change.removed.length > 85 || change.added.length > 85) %]
<br/><a href="#" id="link_[% op_loop %]_[% loop.count %]" onclick="showFullComment('[% op_loop %]_[% loop.count %]'); return false;">Show full text</a>
[% END %]
[% ELSE %]
[%+ field_descs.${change.fieldname} || Bugzilla.get_field(change.fieldname).description FILTER html %]
[% END %]
</td>
[% IF change.both %]
<td colspan="2">[% change.both %]</td>
[% IF change.lines %]
[% FOR l = change.lines %]
[% "</tr><tr>" IF loop.index > 0 %]
[% l %]
[% END %]
[% ELSE %]
[% PROCESS change_column change_type = change.removed op_type = "removed" op_count = loop.count op_loop = op_loop %]
[% PROCESS change_column change_type = change.added op_type = "added" op_count = loop.count op_short_comment %]
[% PROCESS change_column change_type = change.removed op_type = "removed" op_count = loop.count op_loop = op_loop %]
[% PROCESS change_column change_type = change.added op_type = "added" op_count = loop.count op_short_comment %]
[% END %]
[% END %]
</tr>

View File

@ -20,7 +20,19 @@
From: [% Param('mailfrom') %]
To: [% to_user.email %]
Subject: [% (isnew ? '' : 'Re: ') _ '[' _ terms.Bug _ ' ' _ bugid _ '] ' _ (severity == 'blocker' ? '[BLOCKER] ' : '') _ (severity == 'critical' ? '[CRITICAL] ' : '') _ summary %]
[% IF product == 'СМ-ОК' || product == 'СМ-RMS' || product == 'СМ-View' || product == 'СМ-МРТ' || product == 'СМ-Опт' %]
Subject: [% (isnew ? '' : 'Re: ') _ '['
_ terms.Bug _ ' ' _ bugid _ '] ' _
(severity == 'blocker' ? '[BLOCKER] ' : '') _
(severity == 'critical' ? '[CRITICAL] ' : '') _
'[' _ product _ '] ' _ summary %]
[% ELSE %]
Subject: [% (isnew ? '' : 'Re: ') _ '['
_ terms.Bug _ ' ' _ bugid _ '] ' _
(severity == 'blocker' ? '[BLOCKER] ' : '') _
(severity == 'critical' ? '[CRITICAL] ' : '') _
summary %]
[% END %]
X-Bugzilla-Reason: [% reasonsheader %]
X-Bugzilla-Type: [% isnew ? 'new' : 'changed' %]
X-Bugzilla-Watch-Reason: [% reasonswatchheader %]
@ -218,7 +230,8 @@ body { font-family: Segoe UI, sans-serif; }
[% END %]
[%# ------ What Removed Added ------ %]
<tr class="n"><td>
<tr class="n">
<td valign="top"[% IF d.lines %] rowspan="[% d.lines.size %]"[% END %]>
[% IF d.fieldname == 'longdesc' %]
<a href="[% urlbase %]show_bug.cgi?id=[% bugid %]#c[% d.comment_count %]">
[% IF d.comment_count > 0 %]Comment #[% d.comment_count %][% ELSE %]Description[% END %]
@ -227,7 +240,15 @@ body { font-family: Segoe UI, sans-serif; }
[% d.fielddesc %]
[% END %]
</td>
[% IF d.both %]<td colspan="2">[% d.both %]</td>[% ELSE %]<td>[% d.removed %]</td><td>[% d.added %]</td>[% END %]
[% IF d.lines %]
[% FOR l = d.lines %]
[% "</tr><tr>" IF loop.index > 0 %]
[% l %]
[% END %]
[% ELSE %]
<td>[% d.removed %]</td>
<td>[% d.added %]</td>
[% END %]
</tr>
[% END %]