Merge "Add HTML template for change comment emails"

This commit is contained in:
Wyatt Allen
2016-10-19 20:23:49 +00:00
committed by Gerrit Code Review
6 changed files with 179 additions and 1 deletions

View File

@@ -136,11 +136,17 @@ public class CommentSender extends ReplyToChangeSender {
@Override
public void formatChange() throws EmailException {
appendText(textTemplate("Comment"));
if (useHtml()) {
appendHtml(soyHtmlTemplate("CommentHtml"));
}
}
@Override
public void formatFooter() throws EmailException {
appendText(textTemplate("CommentFooter"));
if (useHtml()) {
appendHtml(soyHtmlTemplate("CommentFooterHtml"));
}
}
/**
@@ -469,6 +475,7 @@ public class CommentSender extends ReplyToChangeSender {
commentData.put("isRobotComment", true);
commentData.put("robotId", robotComment.robotId);
commentData.put("robotRunId", robotComment.robotRunId);
commentData.put("robotUrl", robotComment.url);
} else {
commentData.put("isRobotComment", false);
}
@@ -521,4 +528,9 @@ public class CommentSender extends ReplyToChangeSender {
return "";
}
}
@Override
protected boolean supportsHtml() {
return true;
}
}

View File

@@ -44,7 +44,9 @@ public class MailSoyTofuProvider implements Provider<SoyTofu> {
"ChangeFooterHtml.soy",
"ChangeSubject.soy",
"Comment.soy",
"CommentHtml.soy",
"CommentFooter.soy",
"CommentFooterHtml.soy",
"DeleteReviewer.soy",
"DeleteReviewerHtml.soy",
"DeleteVote.soy",