aboutsummaryrefslogtreecommitdiffstats
path: root/templates/mail
diff options
context:
space:
mode:
authorDavid Svantesson <davidsvantesson@gmail.com>2019-10-25 16:46:37 +0200
committerLunny Xiao <xiaolunwen@gmail.com>2019-10-25 22:46:37 +0800
commit6aa3f8bc29cb1ed3a1b165cbf526079a751c8c71 (patch)
treed18aafe7855f9d21fb0d8d7104e7ac7b4aba72b2 /templates/mail
parentc34e58fc008d53a5ec92cadadab2b13fb4e0ae94 (diff)
downloadgitea-6aa3f8bc29cb1ed3a1b165cbf526079a751c8c71.tar.gz
gitea-6aa3f8bc29cb1ed3a1b165cbf526079a751c8c71.zip
Mail assignee when issue/pull request is assigned (#8546)
* Send email to assigned user * Only send mail if enabled * Mail also when assigned through API * Need to refactor functions from models to issue service * Refer to issue index rather than ID * Disable email notifications completly at initalization if global disable * Check of user enbled mail shall be in mail notification function only * Initialize notifications from routers init function. * Use the assigned comment when sending assigned mail * Refactor so that assignees always added as separate step when new issue/pr. * Check error from AddAssignees * Check if user can be assiged to issue or pull request * Missing return * Refactor of CanBeAssigned check. CanBeAssigned shall have same check as UI. * Clarify function names (toggle rather than update/change), and clean up. * Fix review comments. * Flash error if assignees was not added when creating issue/pr * Generate error if assignee users doesn't exist
Diffstat (limited to 'templates/mail')
-rw-r--r--templates/mail/issue/assigned.tmpl17
1 files changed, 17 insertions, 0 deletions
diff --git a/templates/mail/issue/assigned.tmpl b/templates/mail/issue/assigned.tmpl
new file mode 100644
index 0000000000..ab06ade1f4
--- /dev/null
+++ b/templates/mail/issue/assigned.tmpl
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>{{.Subject}}</title>
+</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>
+ ---
+ <br>
+ <a href="{{.Link}}">View it on Gitea</a>.
+ </p>
+
+</body>
+</html>