summaryrefslogtreecommitdiffstats
path: root/templates/mail
diff options
context:
space:
mode:
Diffstat (limited to 'templates/mail')
-rw-r--r--templates/mail/issue/assigned.tmpl4
-rw-r--r--templates/mail/issue/comment.tmpl16
-rw-r--r--templates/mail/issue/default.tmpl31
-rw-r--r--templates/mail/issue/mention.tmpl17
4 files changed, 33 insertions, 35 deletions
diff --git a/templates/mail/issue/assigned.tmpl b/templates/mail/issue/assigned.tmpl
index ab06ade1f4..997e2447fc 100644
--- a/templates/mail/issue/assigned.tmpl
+++ b/templates/mail/issue/assigned.tmpl
@@ -6,11 +6,11 @@
</head>
<body>
- <p>@{{.Doer.Name}} assigned you to the {{if eq .Issue.IsPull true}}pull request{{else}}issue{{end}} <a href="{{.Link}}">#{{.Issue.Index}}</a> in repository {{.Issue.Repo.FullName}}.</p>
+ <p>@{{.Doer.Name}} assigned you to the {{if .IsPull}}pull request{{else}}issue{{end}} <a href="{{.Link}}">#{{.Issue.Index}}</a> in repository {{.Repo}}.</p>
<p>
---
<br>
- <a href="{{.Link}}">View it on Gitea</a>.
+ <a href="{{.Link}}">View it on {{AppName}}</a>.
</p>
</body>
diff --git a/templates/mail/issue/comment.tmpl b/templates/mail/issue/comment.tmpl
deleted file mode 100644
index cc86addaf0..0000000000
--- a/templates/mail/issue/comment.tmpl
+++ /dev/null
@@ -1,16 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>{{.Subject}}</title>
-</head>
-
-<body>
- <p>{{.Body | Str2html}}</p>
- <p>
- ---
- <br>
- <a href="{{.Link}}">View it on Gitea</a>.
- </p>
-</body>
-</html>
diff --git a/templates/mail/issue/default.tmpl b/templates/mail/issue/default.tmpl
new file mode 100644
index 0000000000..ee15d6d8e1
--- /dev/null
+++ b/templates/mail/issue/default.tmpl
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>{{.Subject}}</title>
+</head>
+
+<body>
+ {{if .IsMention}}<p>@{{.Doer.Name}} mentioned you:</p>{{end}}
+ <p>
+ {{- if eq .Body ""}}
+ {{if eq .ActionName "new"}}
+ Created #{{.Issue.Index}}.
+ {{else if eq .ActionName "close"}}
+ Closed #{{.Issue.Index}}.
+ {{else if eq .ActionName "reopen"}}
+ Reopened #{{.Issue.Index}}.
+ {{else}}
+ Empty comment on #{{.Issue.Index}}.
+ {{end}}
+ {{else}}
+ {{.Body | Str2html}}
+ {{end -}}
+ </p>
+ <p>
+ ---
+ <br>
+ <a href="{{.Link}}">View it on {{AppName}}</a>.
+ </p>
+</body>
+</html>
diff --git a/templates/mail/issue/mention.tmpl b/templates/mail/issue/mention.tmpl
deleted file mode 100644
index 032eea053d..0000000000
--- a/templates/mail/issue/mention.tmpl
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>{{.Subject}}</title>
-</head>
-
-<body>
- <p>@{{.Doer.Name}} mentioned you:</p>
- <p>{{.Body | Str2html}}</p>
- <p>
- ---
- <br>
- <a href="{{.Link}}">View it on Gitea</a>.
- </p>
-</body>
-</html>