|
26 | 26 | <table class="ui very basic striped fixed table single line">
|
27 | 27 | <thead>
|
28 | 28 | <tr>
|
29 |
| - <th class="seven wide">{{.i18n.Tr "repo.branch.name"}}</th> |
| 29 | + <th class="six wide">{{.i18n.Tr "repo.branch.name"}}</th> |
| 30 | + <th class="two wide"></th> |
30 | 31 | <th class="two wide"></th>
|
31 | 32 | {{if and $.IsWriter (not $.IsMirror)}}
|
32 | 33 | <th class="one wide right aligned">{{.i18n.Tr "repo.branch.delete_head"}}</th>
|
|
44 | 45 | {{else}}
|
45 | 46 | <a href="{{$.RepoLink}}/src/branch/{{.Name | EscapePound}}">{{.Name}}</a>
|
46 | 47 | <p class="time">{{$.i18n.Tr "org.repo_updated"}} {{TimeSince .Commit.Committer.When $.i18n.Lang}}</p>
|
47 |
| - </td> |
48 | 48 | {{end}}
|
| 49 | + </td> |
49 | 50 | <td class="ui">
|
| 51 | + {{if not .IsDeleted}} |
50 | 52 | <div class="commit-divergence">
|
51 | 53 | <div class="bar-group">
|
52 | 54 | <div class="count count-behind">{{.CommitsBehind}}</div>
|
|
57 | 59 | <div class="bar bar-ahead" style="width: {{percentage .CommitsAhead .CommitsBehind .CommitsAhead}}%"></div>
|
58 | 60 | </div>
|
59 | 61 | </div>
|
| 62 | + {{end}} |
| 63 | + </td> |
| 64 | + <td class="right aligned"> |
| 65 | + {{if not .LatestPullRequest}} |
| 66 | + {{if not .IsDeleted}} |
| 67 | + <a href="{{$.RepoLink}}/compare/{{$.DefaultBranch | EscapePound}}...{{if ne $.Repository.Owner.Name $.Owner.Name}}{{$.Owner.Name}}:{{end}}{{.Name | EscapePound}}"> |
| 68 | + <button id="new-pull-request" class="ui compact basic button">{{$.i18n.Tr "repo.pulls.compare_changes"}}</button> |
| 69 | + </a> |
| 70 | + {{end}} |
| 71 | + {{else}} |
| 72 | + <a href="{{$.RepoLink}}/pulls/{{.LatestPullRequest.Issue.Index}}">#{{.LatestPullRequest.Issue.Index}}</a> |
| 73 | + {{if .LatestPullRequest.HasMerged}} |
| 74 | + <a href="{{$.RepoLink}}/pulls/{{.LatestPullRequest.Issue.Index}}" class="ui purple small label"><i class="octicon octicon-git-pull-request"></i> {{$.i18n.Tr "repo.pulls.merged"}}</a> |
| 75 | + {{else if .LatestPullRequest.Issue.IsClosed}} |
| 76 | + <a href="{{$.RepoLink}}/pulls/{{.LatestPullRequest.Issue.Index}}" class="ui red small label"><i class="octicon octicon-issue-closed"></i> {{$.i18n.Tr "repo.issues.closed_title"}}</a> |
| 77 | + {{else}} |
| 78 | + <a href="{{$.RepoLink}}/pulls/{{.LatestPullRequest.Issue.Index}}" class="ui green small label"><i class="octicon octicon-issue-opened"></i> {{$.i18n.Tr "repo.issues.open_title"}}</a> |
| 79 | + {{end}} |
| 80 | + {{end}} |
60 | 81 | </td>
|
61 | 82 | {{if and $.IsWriter (not $.IsMirror)}}
|
62 | 83 | <td class="right aligned">
|
|
0 commit comments