summaryrefslogtreecommitdiffstats
path: root/templates/mail
diff options
context:
space:
mode:
authorguillep2k <18600385+guillep2k@users.noreply.github.com>2019-11-15 09:59:21 -0300
committerzeripath <art27@cantab.net>2019-11-15 12:59:21 +0000
commit9930d47be2516ba4dc33ddfc382f9a829628929d (patch)
treebafde602be9cc642bfdd6860c92d805c1cce897d /templates/mail
parent97dc314652422d392b26e7ea1ef3991903c6f22c (diff)
downloadgitea-9930d47be2516ba4dc33ddfc382f9a829628929d.tar.gz
gitea-9930d47be2516ba4dc33ddfc382f9a829628929d.zip
Add review comments to mail notifications (#8996)
Diffstat (limited to 'templates/mail')
-rw-r--r--templates/mail/issue/default.tmpl14
1 files changed, 13 insertions, 1 deletions
diff --git a/templates/mail/issue/default.tmpl b/templates/mail/issue/default.tmpl
index ee15d6d8e1..223ff7ffdc 100644
--- a/templates/mail/issue/default.tmpl
+++ b/templates/mail/issue/default.tmpl
@@ -3,6 +3,12 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{{.Subject}}</title>
+ {{if .ReviewComments}}
+ <style>
+ .review { padding-left: 1em; margin: 1em 0; }
+ .review > pre { padding: 1em; border-left: 1px solid grey; }
+ </style>
+ {{end}}
</head>
<body>
@@ -15,12 +21,18 @@
Closed #{{.Issue.Index}}.
{{else if eq .ActionName "reopen"}}
Reopened #{{.Issue.Index}}.
- {{else}}
+ {{else if ne .ReviewComments}}
Empty comment on #{{.Issue.Index}}.
{{end}}
{{else}}
{{.Body | Str2html}}
{{end -}}
+ {{- range .ReviewComments}}
+ <div class="review">
+ <pre>{{.Patch}}</pre>
+ <div>{{.RenderedContent | Safe}}</div>
+ </div>
+ {{end -}}
</p>
<p>
---