Mercurial > gemma
changeset 2895:92812bf2f008
Improve notification email contents
* Add "Gemma: " to the email subject lines so they stand out better
in the inbox. As the body of some emails already has "Gemma" hardcoded,
this is consistent.
* Fix formatting in the import notification emails to have a space
between ending of the status sentence and the next sentence.
author | Bernhard Reiter <bernhard@intevation.de> |
---|---|
date | Tue, 02 Apr 2019 12:58:11 +0200 |
parents | 13cd92b99d22 |
children | a1320a9696fa |
files | pkg/controllers/user.go pkg/imports/email.go |
diffstat | 2 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/pkg/controllers/user.go Tue Apr 02 12:02:57 2019 +0200 +++ b/pkg/controllers/user.go Tue Apr 02 12:58:11 2019 +0200 @@ -403,10 +403,10 @@ var bodyTmpl *template.Template if userData.Role == "sys_admin" { - subject = "Sysadmin Notification TEST" + subject = "Gemma: Sysadmin Notification TEST" bodyTmpl = testSysadminNotifyMailTmpl } else if userData.Role == "waterway_admin" { - subject = "Waterway Admin Notification TEST" + subject = "Gemma: Waterway Admin Notification TEST" bodyTmpl = testWWAdminNotifyMailTmpl } else { err = JSONError{
--- a/pkg/imports/email.go Tue Apr 02 12:02:57 2019 +0200 +++ b/pkg/imports/email.go Tue Apr 02 12:58:11 2019 +0200 @@ -28,7 +28,7 @@ const ( selectEmailSQL = `SELECT email_address FROM users.list_users WHERE username = $1` - importNotificationMailSubject = `import notification mail` + importNotificationMailSubject = `Gemma: import notification mail` ) var ( @@ -38,11 +38,11 @@ a {{ .Description }} import on server {{ .Server }} triggered this email notification. -{{ if eq .State "accepted" }}The imported data were successfully integrated into the database.{{ end -}} -{{ if eq .State "unchanged" }}The import has not changed any data in the database.{{ end -}} -{{ if eq .State "failed" }}The import failed for some reasons.{{ end -}} +{{ if eq .State "accepted" }}The imported data were successfully integrated into the database. {{ end -}} +{{ if eq .State "unchanged" }}The import has not changed any data in the database. {{ end -}} +{{ if eq .State "failed" }}The import failed for some reasons. {{ end -}} {{ if eq .State "pending" }}The imported data could be integrated into the database -but your final decision is needed.{{ end -}} +but your final decision is needed. {{ end -}} Please follow this link to have a closer look at the details: