mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-30 21:26:17 +01:00
Revert relative links to absolute links in mail templates (#23267)
Follow #21986 , fix regression. The mail templates should always use `AppURL` (the full absolute URL)
This commit is contained in:
parent
2f49b55c19
commit
807e8e280c
3 changed files with 6 additions and 6 deletions
|
@ -8,7 +8,7 @@
|
||||||
<title>{{.Subject}}</title>
|
<title>{{.Subject}}</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
{{$repo_url := printf "<a href='%s'>%s</a>" (Escape .Issue.Repo.Link) (Escape .Issue.Repo.FullName)}}
|
{{$repo_url := printf "<a href='%s'>%s</a>" (Escape .Issue.Repo.HTMLURL) (Escape .Issue.Repo.FullName)}}
|
||||||
{{$link := printf "<a href='%s'>#%d</a>" (Escape .Link) .Issue.Index}}
|
{{$link := printf "<a href='%s'>#%d</a>" (Escape .Link) .Issue.Index}}
|
||||||
<body>
|
<body>
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -20,11 +20,11 @@
|
||||||
{{if eq .ActionName "push"}}
|
{{if eq .ActionName "push"}}
|
||||||
<p>
|
<p>
|
||||||
{{if .Comment.IsForcePush}}
|
{{if .Comment.IsForcePush}}
|
||||||
{{$oldCommitUrl := printf "%s/commit/%s" .Comment.Issue.PullRequest.BaseRepo.Link .Comment.OldCommit}}
|
{{$oldCommitUrl := printf "%s/commit/%s" .Comment.Issue.PullRequest.BaseRepo.HTMLURL .Comment.OldCommit}}
|
||||||
{{$oldShortSha := ShortSha .Comment.OldCommit}}
|
{{$oldShortSha := ShortSha .Comment.OldCommit}}
|
||||||
{{$oldCommitLink := printf "<a href='%[1]s'><b>%[2]s</b></a>" (Escape $oldCommitUrl) (Escape $oldShortSha)}}
|
{{$oldCommitLink := printf "<a href='%[1]s'><b>%[2]s</b></a>" (Escape $oldCommitUrl) (Escape $oldShortSha)}}
|
||||||
|
|
||||||
{{$newCommitUrl := printf "%s/commit/%s" .Comment.Issue.PullRequest.BaseRepo.Link .Comment.NewCommit}}
|
{{$newCommitUrl := printf "%s/commit/%s" .Comment.Issue.PullRequest.BaseRepo.HTMLURL .Comment.NewCommit}}
|
||||||
{{$newShortSha := ShortSha .Comment.NewCommit}}
|
{{$newShortSha := ShortSha .Comment.NewCommit}}
|
||||||
{{$newCommitLink := printf "<a href='%[1]s'><b>%[2]s</b></a>" (Escape $newCommitUrl) (Escape $newShortSha)}}
|
{{$newCommitLink := printf "<a href='%[1]s'><b>%[2]s</b></a>" (Escape $newCommitUrl) (Escape $newShortSha)}}
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@
|
||||||
<ul>
|
<ul>
|
||||||
{{range .Comment.Commits}}
|
{{range .Comment.Commits}}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{$.Comment.Issue.PullRequest.BaseRepo.Link}}/commit/{{.ID}}">
|
<a href="{{$.Comment.Issue.PullRequest.BaseRepo.HTMLURL}}/commit/{{.ID}}">
|
||||||
{{ShortSha .ID.String}}
|
{{ShortSha .ID.String}}
|
||||||
</a> - {{.Summary}}
|
</a> - {{.Summary}}
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -11,8 +11,8 @@
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
{{$release_url := printf "<a href='%s'>%s</a>" (.Release.Link | Escape) (.Release.TagName | Escape)}}
|
{{$release_url := printf "<a href='%s'>%s</a>" (.Release.HTMLURL | Escape) (.Release.TagName | Escape)}}
|
||||||
{{$repo_url := printf "<a href='%s'>%s</a>" (.Release.Repo.Link | Escape) (.Release.Repo.FullName | Escape)}}
|
{{$repo_url := printf "<a href='%s'>%s</a>" (.Release.Repo.HTMLURL | Escape) (.Release.Repo.FullName | Escape)}}
|
||||||
<body>
|
<body>
|
||||||
<p>
|
<p>
|
||||||
{{.locale.Tr "mail.release.new.text" .Release.Publisher.Name $release_url $repo_url | Str2html}}
|
{{.locale.Tr "mail.release.new.text" .Release.Publisher.Name $release_url $repo_url | Str2html}}
|
||||||
|
|
Loading…
Reference in a new issue