aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo
diff options
context:
space:
mode:
authorGiteabot <teabot@gitea.io>2024-03-02 20:26:54 +0800
committerGitHub <noreply@github.com>2024-03-02 12:26:54 +0000
commit401cc394d52c6126d3cbca1e1367c4e4da5110f9 (patch)
tree3a8881855a8c3c4a762aba16c1862a66776545b4 /templates/repo
parent3a8877c058fd8583f28711750cf26716526200c4 (diff)
downloadgitea-401cc394d52c6126d3cbca1e1367c4e4da5110f9.tar.gz
gitea-401cc394d52c6126d3cbca1e1367c4e4da5110f9.zip
Fix incorrect subpath in links (#29535) (#29541)
Backport #29535 by wxiaoguang * `$referenceUrl`: it is constructed by "Issue.Link", which already has the "AppSubURL" * `window.location.href`: AppSubURL could be empty string, so it needs the trailing slash Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'templates/repo')
-rw-r--r--templates/repo/diff/comments.tmpl2
-rw-r--r--templates/repo/diff/conversation.tmpl2
2 files changed, 2 insertions, 2 deletions
diff --git a/templates/repo/diff/comments.tmpl b/templates/repo/diff/comments.tmpl
index 1e9af5c4a1..47a4502efd 100644
--- a/templates/repo/diff/comments.tmpl
+++ b/templates/repo/diff/comments.tmpl
@@ -33,7 +33,7 @@
<div class="comment-header-right actions gt-df gt-ac">
{{if .Invalidated}}
{{$referenceUrl := printf "%s#%s" $.root.Issue.Link .HashTag}}
- <a href="{{AppSubUrl}}{{$referenceUrl}}" class="ui label basic small" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.review.outdated_description"}}">
+ <a href="{{$referenceUrl}}" class="ui label basic small" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.review.outdated_description"}}">
{{ctx.Locale.Tr "repo.issues.review.outdated"}}
</a>
{{end}}
diff --git a/templates/repo/diff/conversation.tmpl b/templates/repo/diff/conversation.tmpl
index feca7b6c0b..aaeac3c550 100644
--- a/templates/repo/diff/conversation.tmpl
+++ b/templates/repo/diff/conversation.tmpl
@@ -14,7 +14,7 @@
We only handle the case $resolved=true and $invalid=true in this template because if the comment is not resolved it has the outdated label in the comments area (not the header above).
The case $resolved=false and $invalid=true is handled in repo/diff/comments.tmpl
-->
- <a href="{{AppSubUrl}}{{$referenceUrl}}" class="ui label basic small gt-ml-3" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.review.outdated_description"}}">
+ <a href="{{$referenceUrl}}" class="ui label basic small gt-ml-3" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.review.outdated_description"}}">
{{ctx.Locale.Tr "repo.issues.review.outdated"}}
</a>
{{end}}