Upgrade most change emails with HTML

Add HTML templates for change emails which do not require additional
template data to be provided in order for it to be formatted in HTML.
Introduces a HeaderHtml template counterpart to FooterHtml.

In this change, there are minimal visual deviations from the plain-text
emails. URLs are added as anchor tags. Commit messages, diffs and "cover
letter"s are set in PRE tags to preserve whitespace and to use monospace
fonts. HR tags are used instead of the text-based horizontal rules in
the text emails.

Change email types upgraded with this change:

* Abandon Change
* Delete Reviewer
* Delete Vote
* New Change
* New Patch Set
* Restore Change
* Revert Change

Change-Id: Ic1171d6288335aa69e12f076558e861934bfa150
This commit is contained in:
Wyatt Allen
2016-09-02 10:56:05 -07:00
parent 2962ec29c7
commit f94255f94e
21 changed files with 538 additions and 1 deletions

View File

@@ -0,0 +1,44 @@
/**
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
{namespace com.google.gerrit.server.mail.template}
/**
* @param change
* @param coverLetter
* @param email
* @param fromName
*/
{template .DeleteVoteHtml autoescape="strict" kind="html"}
<p>
{$fromName} removed a vote on this change.
</p>
{if $email.changeUrl}
<p>
{call .ViewChangeButton data="all" /}
</p>
{/if}
<p>
Change subject: {$change.subject}
</p>
<hr/>
{if $coverLetter}
<pre>{$coverLetter}</pre>
{/if}
{/template}