code.gitea.io/gitea@v1.22.3/templates/mail/issue/default.tmpl (about) 1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 5 <title>{{.Subject}}</title> 6 7 <style> 8 blockquote { padding-left: 1em; margin: 1em 0; border-left: 1px solid grey; color: #777} 9 .footer { font-size:small; color:#666;} 10 {{if .ReviewComments}} 11 .review { padding-left: 1em; margin: 1em 0; } 12 .review > pre { padding: 1em; border-left: 1px solid grey; } 13 {{end}} 14 </style> 15 16 </head> 17 18 <body> 19 {{if .IsMention}}<p>{{.locale.Tr "mail.issue.x_mentioned_you" .Doer.Name}}</p>{{end}} 20 {{if eq .ActionName "push"}} 21 <p> 22 {{if .Comment.IsForcePush}} 23 {{$oldCommitUrl := printf "%s/commit/%s" .Comment.Issue.PullRequest.BaseRepo.HTMLURL .Comment.OldCommit}} 24 {{$oldShortSha := ShortSha .Comment.OldCommit}} 25 {{$oldCommitLink := HTMLFormat "<a href='%[1]s'><b>%[2]s</b></a>" $oldCommitUrl $oldShortSha}} 26 27 {{$newCommitUrl := printf "%s/commit/%s" .Comment.Issue.PullRequest.BaseRepo.HTMLURL .Comment.NewCommit}} 28 {{$newShortSha := ShortSha .Comment.NewCommit}} 29 {{$newCommitLink := HTMLFormat "<a href='%[1]s'><b>%[2]s</b></a>" $newCommitUrl $newShortSha}} 30 31 {{.locale.Tr "mail.issue.action.force_push" .Doer.Name .Comment.Issue.PullRequest.HeadBranch $oldCommitLink $newCommitLink}} 32 {{else}} 33 {{.locale.TrN (len .Comment.Commits) "mail.issue.action.push_1" "mail.issue.action.push_n" .Doer.Name .Comment.Issue.PullRequest.HeadBranch (len .Comment.Commits)}} 34 {{end}} 35 </p> 36 {{end}} 37 <p> 38 {{if eq .ActionName "close"}} 39 {{.locale.Tr "mail.issue.action.close" .Doer.Name .Issue.Index}} 40 {{else if eq .ActionName "reopen"}} 41 {{.locale.Tr "mail.issue.action.reopen" .Doer.Name .Issue.Index}} 42 {{else if eq .ActionName "merge"}} 43 {{.locale.Tr "mail.issue.action.merge" .Doer.Name .Issue.Index .Issue.PullRequest.BaseBranch}} 44 {{else if eq .ActionName "approve"}} 45 {{.locale.Tr "mail.issue.action.approve" .Doer.Name}} 46 {{else if eq .ActionName "reject"}} 47 {{.locale.Tr "mail.issue.action.reject" .Doer.Name}} 48 {{else if eq .ActionName "review"}} 49 {{.locale.Tr "mail.issue.action.review" .Doer.Name}} 50 {{else if eq .ActionName "review_dismissed"}} 51 {{.locale.Tr "mail.issue.action.review_dismissed" .Doer.Name .Comment.Review.Reviewer.Name}} 52 {{else if eq .ActionName "ready_for_review"}} 53 {{.locale.Tr "mail.issue.action.ready_for_review" .Doer.Name}} 54 {{end}} 55 56 {{- if eq .Body ""}} 57 {{if eq .ActionName "new"}} 58 {{.locale.Tr "mail.issue.action.new" .Doer.Name .Issue.Index}} 59 {{end}} 60 {{else}} 61 {{.Body}} 62 {{end -}} 63 {{- range .ReviewComments}} 64 <hr> 65 {{$.locale.Tr "mail.issue.in_tree_path" .TreePath}} 66 <div class="review"> 67 <pre>{{.Patch}}</pre> 68 <div>{{.RenderedContent}}</div> 69 </div> 70 {{end -}} 71 {{if eq .ActionName "push"}} 72 <ul> 73 {{range .Comment.Commits}} 74 <li> 75 <a href="{{$.Comment.Issue.PullRequest.BaseRepo.HTMLURL}}/commit/{{.ID}}"> 76 {{ShortSha .ID.String}} 77 </a> - {{.Summary}} 78 </li> 79 {{end}} 80 </ul> 81 {{end}} 82 </p> 83 <div class="footer"> 84 <p> 85 --- 86 <br> 87 <a href="{{.Link}}">{{.locale.Tr "mail.view_it_on" AppName}}</a>{{if .CanReply}} {{.locale.Tr "mail.reply"}}{{end}}. 88 </p> 89 </div> 90 </body> 91 </html>