forked from forgejo/forgejo
[GITEA] Make reference URL absolute
- Backport of #2100 - Make the reference URL in the "Reference in New issue" feature absolute again as it wouldn't render as a link otherwise. - Adds integration test. - Regression by769be877f2
- Resolves #2012 (cherry picked from commitc74bae2897
)
This commit is contained in:
parent
0fbf761d19
commit
a8ce03660f
2 changed files with 30 additions and 2 deletions
|
@ -5,9 +5,9 @@
|
|||
<div class="menu">
|
||||
{{$referenceUrl := ""}}
|
||||
{{if .issue}}
|
||||
{{$referenceUrl = printf "%s#%s" .ctxData.Issue.Link .item.HashTag}}
|
||||
{{$referenceUrl = printf "%s#%s" .ctxData.Issue.HTMLURL .item.HashTag}}
|
||||
{{else}}
|
||||
{{$referenceUrl = printf "%s/files#%s" .ctxData.Issue.Link .item.HashTag}}
|
||||
{{$referenceUrl = printf "%s/files#%s" .ctxData.Issue.HTMLURL .item.HashTag}}
|
||||
{{end}}
|
||||
<div class="item context js-aria-clickable" data-clipboard-text-type="url" data-clipboard-text="{{$referenceUrl}}">{{ctx.Locale.Tr "repo.issues.context.copy_link"}}</div>
|
||||
{{if and .ctxData.IsSigned (not .ctxData.Repository.IsArchived)}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue