diff options
author | Lunny Xiao | 2022-01-14 09:49:25 +0800 |
---|---|---|
committer | GitHub | 2022-01-14 02:49:25 +0100 |
commit | 14de28b876a74be3bb13d097803eb621a878ecdb (patch) | |
tree | a17cbc2bac634e56a2c5a31a5c4341f043aeb802 | |
parent | e4120bbc899810f1c98da736ef80fcce11d9ca83 (diff) |
Fix release link broken (#18253)
* Fix release link broken
* Fix unsupported compare
* Fix another place
-rw-r--r-- | templates/repo/release/list.tmpl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/repo/release/list.tmpl b/templates/repo/release/list.tmpl index 5f06bf45d..c7b16f147 100644 --- a/templates/repo/release/list.tmpl +++ b/templates/repo/release/list.tmpl @@ -99,7 +99,7 @@ <a href="{{AppSubUrl}}/{{.Publisher.Name}}">{{.Publisher.Name}}</a> </span> {{ end }} - <span class="ahead"><a href="{{$.RepoLink}}/compare/{{.TagName | EscapePound}}...{{.Target}}">{{$.i18n.Tr "repo.release.ahead.commits" .NumCommitsBehind | Str2html}}</a> {{$.i18n.Tr "repo.release.ahead.target" $.DefaultBranch}}</span> + <span class="ahead"><a href="{{$.RepoLink}}/compare/{{.TagName | EscapePound}}...{{if .Target}}{{.Target}}{{else}}{{$.DefaultBranch}}{{end}}">{{$.i18n.Tr "repo.release.ahead.commits" .NumCommitsBehind | Str2html}}</a> {{$.i18n.Tr "repo.release.ahead.target" $.DefaultBranch}}</span> </p> <div class="download"> {{if $.Permission.CanRead $.UnitTypeCode}} @@ -135,7 +135,7 @@ <span class="time">{{TimeSinceUnix .CreatedUnix $.Lang}}</span> {{end}} {{if not .IsDraft}} - | <span class="ahead"><a href="{{$.RepoLink}}/compare/{{.TagName | EscapePound}}...{{.Target}}">{{$.i18n.Tr "repo.release.ahead.commits" .NumCommitsBehind | Str2html}}</a> {{$.i18n.Tr "repo.release.ahead.target" .Target}}</span> + | <span class="ahead"><a href="{{$.RepoLink}}/compare/{{.TagName | EscapePound}}...{{if .Target}}{{.Target}}{{else}}{{$.DefaultBranch}}{{end}}">{{$.i18n.Tr "repo.release.ahead.commits" .NumCommitsBehind | Str2html}}</a> {{$.i18n.Tr "repo.release.ahead.target" .Target}}</span> {{end}} </p> <div class="markup desc"> |