mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-19 08:51:10 +00:00
Use `!` instead of `#` for references in the sidebar of pull requests. This is useful when the repository uses a external issue tracker to avoid it being redirected to the external issue tracker. Resolves forgejo/forgejo#8713 Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8890 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Reviewed-by: Beowulf <beowulf@beocode.eu> Co-authored-by: jank1619 <jank1619@noreply.codeberg.org> Co-committed-by: jank1619 <jank1619@noreply.codeberg.org>
19 lines
710 B
Go HTML Template
19 lines
710 B
Go HTML Template
<div class="ui reference">
|
|
{{$issueReferenceLink := ""}}
|
|
{{if .Issue.IsPull}}
|
|
{{$issueReferenceLink = printf "%s!%d" .Issue.Repo.FullName .Issue.Index}}
|
|
{{else}}
|
|
{{$issueReferenceLink = printf "%s#%d" .Issue.Repo.FullName .Issue.Index}}
|
|
{{end}}
|
|
<span class="text">
|
|
<strong>
|
|
{{ctx.Locale.Tr "discussion.sidebar.reference"}}
|
|
</strong>
|
|
</span>
|
|
<div class="ui equal width compact grid">
|
|
<div class="row tw-items-center" data-tooltip-content="{{$issueReferenceLink}}">
|
|
<span class="text column truncate">{{$issueReferenceLink}}</span>
|
|
<button class="ui two wide button column tw-p-2" data-clipboard-text="{{$issueReferenceLink}}">{{svg "octicon-copy" 14}}</button>
|
|
</div>
|
|
</div>
|
|
</div>
|