Merge "Upgrade most change emails with HTML"
This commit is contained in:
		| @@ -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 .AbandonedHtml autoescape="strict" kind="html"} | ||||
|   <p> | ||||
|     {$fromName} has abandoned 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} | ||||
| @@ -0,0 +1,49 @@ | ||||
| /** | ||||
|  * 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 branch | ||||
|  * @param change | ||||
|  * @param changeId | ||||
|  * @param email | ||||
|  * @param messageClass | ||||
|  * @param patchSet | ||||
|  * @param projectName | ||||
|  */ | ||||
| {template .ChangeFooterHtml autoescape="strict" kind="html"} | ||||
|   {if $email.changeUrl or $email.settingsUrl} | ||||
|     <p> | ||||
|       {if $email.changeUrl} | ||||
|         To view, visit <a href="{$email.changeUrl}">this change</a>. | ||||
|       {/if} | ||||
|       {if $email.changeUrl and $email.settingsUrl}{sp}{/if} | ||||
|       {if $email.settingsUrl} | ||||
|         To unsubscribe, visit <a href="{$email.settingsUrl}">settings</a>. | ||||
|       {/if} | ||||
|     </p> | ||||
|   {/if} | ||||
|  | ||||
|   <p style="color: #555;"> | ||||
|     Gerrit-MessageType: {$messageClass}<br/> | ||||
|     Gerrit-Change-Id: {$changeId}<br/> | ||||
|     Gerrit-PatchSet: {$patchSet.patchSetId}<br/> | ||||
|     Gerrit-Project: {$projectName}<br/> | ||||
|     Gerrit-Branch: {$branch.shortName}<br/> | ||||
|     Gerrit-Owner: {$change.ownerEmail} | ||||
|   </p> | ||||
| {/template} | ||||
| @@ -0,0 +1,49 @@ | ||||
| /** | ||||
|  * 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 .DeleteReviewerHtml autoescape="strict" kind="html"} | ||||
|   <p> | ||||
|     {$fromName} has removed{sp} | ||||
|     {foreach $reviewerName in $email.reviewerNames} | ||||
|       {if not isFirst($reviewerName)},{sp}{/if} | ||||
|       {$reviewerName} | ||||
|     {/foreach}{sp} | ||||
|     from 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} | ||||
| @@ -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} | ||||
| @@ -0,0 +1,20 @@ | ||||
| /** | ||||
|  * 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} | ||||
|  | ||||
| {template .HeaderHtml autoescape="strict" kind="html"} | ||||
| {/template} | ||||
| @@ -0,0 +1,78 @@ | ||||
| /** | ||||
|  * 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 email | ||||
|  * @param fromName | ||||
|  * @param patchSet | ||||
|  * @param projectName | ||||
|  */ | ||||
| {template .NewChangeHtml autoescape="strict" kind="html"} | ||||
|   {if $email.reviewerNames} | ||||
|     <p> | ||||
|       Hello{sp} | ||||
|       {foreach $reviewerName in $email.reviewerNames} | ||||
|         {if not isFirst($reviewerName)},{sp}{/if} | ||||
|         {$reviewerName} | ||||
|       {/foreach}, | ||||
|     </p> | ||||
|  | ||||
|     <p> | ||||
|       I'd like you to do a code review. | ||||
|     </p> | ||||
|  | ||||
|     {if $email.changeUrl} | ||||
|       <p> | ||||
|         Please visit <a href="{$email.changeUrl}">this change</a> to review. | ||||
|       </p> | ||||
|     {/if} | ||||
|   {else} | ||||
|     <p> | ||||
|       {$fromName} has uploaded a new change for review. | ||||
|     </p> | ||||
|  | ||||
|     {if $email.changeUrl} | ||||
|       <p> | ||||
|         {call .ViewChangeButton data="all" /} | ||||
|       </p> | ||||
|     {/if} | ||||
|   {/if} | ||||
|  | ||||
|   <p> | ||||
|     Change subject: {$change.subject} | ||||
|   </p> | ||||
|   <hr/> | ||||
|  | ||||
|   <pre> | ||||
|     {$email.changeDetail} | ||||
|   </pre> | ||||
|  | ||||
|   {if $email.sshHost} | ||||
|     <pre> | ||||
|       git pull ssh:{print '//'}{$email.sshHost}/{$projectName} | ||||
|           {sp}{$patchSet.refName} | ||||
|     </pre> | ||||
|   {/if} | ||||
|  | ||||
|   {if $email.includeDiff} | ||||
|     <pre> | ||||
|       {$email.unifiedDiff} | ||||
|     </pre> | ||||
|   {/if} | ||||
| {/template} | ||||
| @@ -0,0 +1,72 @@ | ||||
| /** | ||||
|  * 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 email | ||||
|  * @param fromName | ||||
|  * @param patchSet | ||||
|  * @param projectName | ||||
|  */ | ||||
| {template .ReplacePatchSetHtml autoescape="strict" kind="html"} | ||||
|   {if $email.reviewerNames} | ||||
|     <p> | ||||
|       Hello{sp} | ||||
|       {foreach $reviewerName in $email.reviewerNames} | ||||
|         {$reviewerName},{sp} | ||||
|       {/foreach} | ||||
|     </p> | ||||
|  | ||||
|     <p> | ||||
|       I'd like you to reexamine a change. | ||||
|     </p> | ||||
|  | ||||
|     {if $email.changeUrl} | ||||
|       <p> | ||||
|         Please visit <a href="{$email.changeUrl}">this change</a> to look at{sp} | ||||
|         the new patch set (#{$patchSet.patchSetId}). | ||||
|       </p> | ||||
|     {/if} | ||||
|   {else} | ||||
|     <p> | ||||
|       {$fromName} has uploaded a new patch set (#{$patchSet.patchSetId}). | ||||
|     </p> | ||||
|  | ||||
|     {if $email.changeUrl} | ||||
|       <p> | ||||
|         {call .ViewChangeButton data="all" /} | ||||
|       </p> | ||||
|     {/if} | ||||
|   {/if} | ||||
|  | ||||
|   <p> | ||||
|     Change subject: {$change.subject} | ||||
|   </p> | ||||
|   <hr/> | ||||
|  | ||||
|   <pre> | ||||
|     {$email.changeDetail} | ||||
|   </pre> | ||||
|  | ||||
|   {if $email.sshHost} | ||||
|     <pre> | ||||
|       git pull ssh:{print '//'}{$email.sshHost}/{$projectName}{sp} | ||||
|           {$patchSet.refName} | ||||
|     </pre> | ||||
|   {/if} | ||||
| {/template} | ||||
| @@ -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 .RestoredHtml autoescape="strict" kind="html"} | ||||
|   <p> | ||||
|     {$fromName} has restored 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} | ||||
| @@ -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 .RevertedHtml autoescape="strict" kind="html"} | ||||
|   <p> | ||||
|     {$fromName} has reverted 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} | ||||
| @@ -0,0 +1,25 @@ | ||||
| /** | ||||
|  * 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} | ||||
|  | ||||
| /** | ||||
|  * Private template to generate "View Change" buttons. | ||||
|  * @param email | ||||
|  */ | ||||
| {template .ViewChangeButton private="true" autoescape="strict" kind="html"} | ||||
|   <a href="{$email.changeUrl}">View Change</a> | ||||
| {/template} | ||||
		Reference in New Issue
	
	Block a user
	 Wyatt Allen
					Wyatt Allen