Skip to content

Commit bb98848

Browse files
committed
Allow multiple branches, pull requests
1 parent 6feb5a1 commit bb98848

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed

options/locale/locale_en-US.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1627,6 +1627,7 @@ issues.maybefixed = May be fixed by %s
16271627
issues.create_branch_from_issue_success = Create branch %s from issue successfully
16281628
issues.pr.completed = Completed
16291629
issues.pr.conflicted = Merge conflicts
1630+
issues.branch.latest = Latest commit %s
16301631
issues.link.created = Created %s
16311632
issues.num_participants = %d Participants
16321633
issues.attachment.open_tab = `Click to see "%s" in a new tab`

templates/repo/issue/view_content/sidebar_development.tmpl

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<span class="text"><strong>{{ctx.Locale.Tr "repo.issues.development"}}</strong></span>
22
<div class="ui devlinks list">
3-
{{if not .DevLinks}}
3+
<div>
44
<a class="tw-mt-1 fluid ui show-modal" data-modal="#create_branch">{{ctx.Locale.Tr "repo.branch.new_branch"}}</a>
5-
{{end}}
5+
</div>
66
{{range .DevLinks}}
77
{{if .PullRequest}}
88
<span>{{template "shared/issueicon" .PullRequest.Issue}}
@@ -25,14 +25,20 @@
2525
{{end}}
2626
</div>
2727
{{else if and .Branch .DisplayBranch}}
28-
<span>
29-
{{svg "octicon-git-branch" 14}}
30-
<a href="{{.Branch.Repo.Link}}/src/branch/{{.Branch.Name}}" class="item">
31-
<span class="gt-ellipsis">{{.Branch.Name}}</span>
32-
</a>
33-
</span>
34-
<div>Latest commit {{DateTime "short" .Branch.CommitTime}}</div>
35-
<a href="{{$.Issue.Repo.Link}}/compare/{{$.Issue.Repo.DefaultBranch}}...{{.Branch.Repo.FullName}}:{{.Branch.Name}}">{{ctx.Locale.Tr "repo.pulls.new"}}</a>
28+
<div class="tw-flex tw-justify-between">
29+
<div class="tw-flex tw-left tw-items-center tw-h-full">
30+
{{svg "octicon-git-branch" 14}}
31+
<a href="{{.Branch.Repo.Link}}/src/branch/{{.Branch.Name}}">
32+
<span class="gt-ellipsis">{{.Branch.Name}}</span>
33+
</a>
34+
</div>
35+
<div class="tw-right">
36+
<a class="ui button mini compact basic icon" href="{{$.Issue.Repo.Link}}/compare/{{$.Issue.Repo.DefaultBranch}}...{{.Branch.Repo.FullName}}:{{.Branch.Name}}">
37+
{{svg "octicon-git-pull-request"}}
38+
</a>
39+
</div>
40+
</div>
41+
<div>{{ctx.Locale.Tr "repo.issues.branch.latest" (DateTime "short" .Branch.CommitTime)}}</div>
3642
{{end}}
3743
{{end}}
3844
</div>

0 commit comments

Comments
 (0)