Allow multiple branches, pull requests

This commit is contained in:
Lunny Xiao 2024-08-29 11:50:03 -07:00
parent 6feb5a1e17
commit bb988483bd
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A
2 changed files with 17 additions and 10 deletions

View File

@ -1627,6 +1627,7 @@ issues.maybefixed = May be fixed by %s
issues.create_branch_from_issue_success = Create branch %s from issue successfully
issues.pr.completed = Completed
issues.pr.conflicted = Merge conflicts
issues.branch.latest = Latest commit %s
issues.link.created = Created %s
issues.num_participants = %d Participants
issues.attachment.open_tab = `Click to see "%s" in a new tab`

View File

@ -1,8 +1,8 @@
<span class="text"><strong>{{ctx.Locale.Tr "repo.issues.development"}}</strong></span>
<div class="ui devlinks list">
{{if not .DevLinks}}
<div>
<a class="tw-mt-1 fluid ui show-modal" data-modal="#create_branch">{{ctx.Locale.Tr "repo.branch.new_branch"}}</a>
{{end}}
</div>
{{range .DevLinks}}
{{if .PullRequest}}
<span>{{template "shared/issueicon" .PullRequest.Issue}}
@ -25,14 +25,20 @@
{{end}}
</div>
{{else if and .Branch .DisplayBranch}}
<span>
{{svg "octicon-git-branch" 14}}
<a href="{{.Branch.Repo.Link}}/src/branch/{{.Branch.Name}}" class="item">
<span class="gt-ellipsis">{{.Branch.Name}}</span>
</a>
</span>
<div>Latest commit {{DateTime "short" .Branch.CommitTime}}</div>
<a href="{{$.Issue.Repo.Link}}/compare/{{$.Issue.Repo.DefaultBranch}}...{{.Branch.Repo.FullName}}:{{.Branch.Name}}">{{ctx.Locale.Tr "repo.pulls.new"}}</a>
<div class="tw-flex tw-justify-between">
<div class="tw-flex tw-left tw-items-center tw-h-full">
{{svg "octicon-git-branch" 14}}
<a href="{{.Branch.Repo.Link}}/src/branch/{{.Branch.Name}}">
<span class="gt-ellipsis">{{.Branch.Name}}</span>
</a>
</div>
<div class="tw-right">
<a class="ui button mini compact basic icon" href="{{$.Issue.Repo.Link}}/compare/{{$.Issue.Repo.DefaultBranch}}...{{.Branch.Repo.FullName}}:{{.Branch.Name}}">
{{svg "octicon-git-pull-request"}}
</a>
</div>
</div>
<div>{{ctx.Locale.Tr "repo.issues.branch.latest" (DateTime "short" .Branch.CommitTime)}}</div>
{{end}}
{{end}}
</div>