forked from p85947160/gitea
* Commit Graph: Pull-Requests should not link to issues (#15734) Use `/pulls` and simplify code. * reverse #15734 partial and comment (#15740) * reverse & comment * Update templates/repo/graph/commits.tmpl Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net> * Use pulls in commit graph unless pulls are disabled Fix #15370 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: KN4CK3R <KN4CK3R@users.noreply.github.com> Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
parent
22d700edfd
commit
78710946f2
|
@ -33,14 +33,9 @@
|
|||
{{range $commit.Refs}}
|
||||
{{$refGroup := .RefGroup}}
|
||||
{{if eq $refGroup "pull"}}
|
||||
{{if $.HidePRRefs}}
|
||||
{{if (containGeneric $.SelectedBranches .Name) }}
|
||||
<a class="ui labelled icon button basic tiny" href="{{$.RepoLink}}/issues/{{.ShortName|PathEscape}}">
|
||||
{{svg "octicon-git-pull-request" 16 "mr-2"}}#{{.ShortName}}
|
||||
</a>
|
||||
{{end}}
|
||||
{{else}}
|
||||
<a class="ui labelled icon button basic tiny" href="{{$.RepoLink}}/issues/{{.ShortName|PathEscape}}">
|
||||
{{if or (not $.HidePRRefs) (containGeneric $.SelectedBranches .Name)}}
|
||||
<!-- it's intended to use issues not pulls, if it's a pull you will get redirected -->
|
||||
<a class="ui labelled icon button basic tiny" href="{{$.RepoLink}}/{{if $.Repository.UnitEnabled $.UnitTypePullRequests}}pulls{{else}}issues{{end}}/{{.ShortName|PathEscape}}">
|
||||
{{svg "octicon-git-pull-request" 16 "mr-2"}}#{{.ShortName}}
|
||||
</a>
|
||||
{{end}}
|
||||
|
|
Loading…
Reference in New Issue