templates: adjust mail notification to always have "new issue" message (#88242) #20

Merged
fpeters merged 1 commits from wip/88242-email into main 2024-03-15 17:53:37 +01:00
Owner

Cette fois-ci en partant du template de gitea 1.21 plutôt que de la branche main toute différente.

Cette fois-ci en partant du template de gitea 1.21 plutôt que de la branche main toute différente.
fpeters added 1 commit 2024-03-15 17:45:20 +01:00
Author
Owner

Et celle-ci fonctionne bien; par rapport au gabarit de base elle fait

--- a/templates/mail/issue/default.tmpl
+++ b/templates/mail/issue/default.tmpl
@@ -53,11 +53,10 @@
                        {{.locale.Tr "mail.issue.action.ready_for_review" (Escape .Doer.Name) | Str2html}}
                {{end}}

-               {{- if eq .Body ""}}
-                       {{if eq .ActionName "new"}}
-                               {{.locale.Tr "mail.issue.action.new" (Escape .Doer.Name) .Issue.Index | Str2html}}
-                       {{end}}
-               {{else}}
+               {{if eq .ActionName "new"}}
+                       {{.locale.Tr "mail.issue.action.new" (Escape .Doer.Name) .Issue.Index | Str2html}}
+               {{end}}
+               {{- if .Body}}
                        {{.Body | Str2html}}
                {{end -}}
                {{- range .ReviewComments}}
Et celle-ci fonctionne bien; par rapport au gabarit de base elle fait ``` --- a/templates/mail/issue/default.tmpl +++ b/templates/mail/issue/default.tmpl @@ -53,11 +53,10 @@ {{.locale.Tr "mail.issue.action.ready_for_review" (Escape .Doer.Name) | Str2html}} {{end}} - {{- if eq .Body ""}} - {{if eq .ActionName "new"}} - {{.locale.Tr "mail.issue.action.new" (Escape .Doer.Name) .Issue.Index | Str2html}} - {{end}} - {{else}} + {{if eq .ActionName "new"}} + {{.locale.Tr "mail.issue.action.new" (Escape .Doer.Name) .Issue.Index | Str2html}} + {{end}} + {{- if .Body}} {{.Body | Str2html}} {{end -}} {{- range .ReviewComments}} ```
lguerin approved these changes 2024-03-15 17:49:40 +01:00
fpeters merged commit 5766a235f5 into main 2024-03-15 17:53:37 +01:00
fpeters deleted branch wip/88242-email 2024-03-15 17:53:37 +01:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: entrouvert/gitea-eo-custom#20
No description provided.