1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-01-20 16:50:28 -05:00

Remove source branch from pr list, fix #5009, #6080 (#6522)

### What?
It removes the source branch that is not necessary in the PR list (see #5009). It adds a little chevron to the right in front of the target branch. That could be replaced by words (“into”), or removed, if preferred. But, I think it looks decent like that.
### Screenshots
#### Before
![image](/attachments/be3c9817-2207-4610-b6bd-70304436f81d)
#### After
![image](/attachments/a7c84d2f-1592-4a82-aecc-d038f9495ef7)
### Testing
Run the development version of forgejo from the PR. For any existing repository with PRs, open the pulls list.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6522
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Robert Wolff <mahlzahn@posteo.de>
Co-committed-by: Robert Wolff <mahlzahn@posteo.de>
This commit is contained in:
Robert Wolff 2025-01-16 23:59:21 +00:00 committed by Otto
parent 907ab8bdef
commit cefd786685

View file

@ -70,21 +70,13 @@
{{end}}
{{if .IsPull}}
<div class="branches flex-text-inline">
{{svg "gitea-double-chevron-right" 12}}
<div class="branch">
<a href="{{.PullRequest.BaseRepo.Link}}/src/branch/{{PathEscapeSegments .PullRequest.BaseBranch}}">
{{/* inline to remove the spaces between spans */}}
{{if ne .RepoID .PullRequest.BaseRepoID}}<span class="truncated-name">{{.PullRequest.BaseRepo.OwnerName}}</span>:{{end}}<span class="truncated-name">{{.PullRequest.BaseBranch}}</span>
</a>
</div>
{{svg "gitea-double-chevron-left" 12}}
{{if .PullRequest.HeadRepo}}
<div class="branch">
<a href="{{.PullRequest.HeadRepo.Link}}/src/branch/{{PathEscapeSegments .PullRequest.HeadBranch}}">
{{/* inline to remove the spaces between spans */}}
{{if ne .RepoID .PullRequest.HeadRepoID}}<span class="truncated-name">{{.PullRequest.HeadRepo.OwnerName}}</span>:{{end}}<span class="truncated-name">{{.PullRequest.HeadBranch}}</span>
</a>
</div>
{{end}}
</div>
{{end}}
{{if and .Milestone (ne $.listType "milestone")}}