File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 17
17
<span class="ui text light grey">{{$.i18n.Tr "repo.branches.updated_by" $timeSince .Commit.Committer.Name | Safe}}</span>
18
18
</div>
19
19
<div class="ui four wide column">
20
- {{if and (eq $.BranchName .Name) $.IsRepositoryWriter }}
20
+ {{if and (and ( eq $.BranchName .Name) $.IsRepositoryAdmin) (not $.Repository.IsMirror) }}
21
21
<a class="ui basic blue button" href="{{$.RepoLink}}/settings/branches">{{$.i18n.Tr "repo.branches.change_default_branch"}}</a>
22
22
{{else if and $.IsRepositoryWriter $.AllowPullRequest}}
23
- <a class="ui basic button" href="{{$.RepoLink}}/compare/{{$.DefaultBranch.Name }}...{{.Name}}"><i class="octicon octicon-git-pull-request"></i> {{$.i18n.Tr "repo.pulls.new"}}</a>
23
+ <a class="ui basic button" href="{{$.RepoLink}}/compare/{{$.BranchName }}...{{.Name}}"><i class="octicon octicon-git-pull-request"></i> {{$.i18n.Tr "repo.pulls.new"}}</a>
24
24
{{end}}
25
25
</div>
26
26
</div>
Original file line number Diff line number Diff line change 15
15
{{$timeSince := TimeSince .DefaultBranch.Commit.Committer.When $.Lang}}
16
16
<span class="ui text light grey">{{$.i18n.Tr "repo.branches.updated_by" $timeSince .DefaultBranch.Commit.Committer.Name | Safe}}</span>
17
17
</div>
18
- {{if $.IsRepositoryAdmin}}
18
+ {{if and $.IsRepositoryAdmin (not $.Repository.IsMirror) }}
19
19
<div class="ui four wide column">
20
20
<a class="ui basic blue button" href="{{$.RepoLink}}/settings/branches">{{.i18n.Tr "repo.branches.change_default_branch"}}</a>
21
21
</div>
37
37
</div>
38
38
{{if and $.IsRepositoryWriter $.AllowPullRequest}}
39
39
<div class="ui four wide column">
40
- <a class="ui basic button" href="{{$.RepoLink}}/compare/{{$.DefaultBranch.Name }}...{{.Name}}"><i class="octicon octicon-git-pull-request"></i> {{$.i18n.Tr "repo.pulls.new"}}</a>
40
+ <a class="ui basic button" href="{{$.RepoLink}}/compare/{{$.BranchName }}...{{.Name}}"><i class="octicon octicon-git-pull-request"></i> {{$.i18n.Tr "repo.pulls.new"}}</a>
41
41
</div>
42
42
{{end}}
43
43
</div>
52
52
<div class="ui attached segment list">
53
53
{{range .StaleBranches}}
54
54
<div class="item ui grid">
55
- <div class="ui fourteen wide column">
55
+ <div class="ui eleven wide column">
56
56
{{if .IsProtected}}<i class="octicon octicon-shield"></i> {{end}}<a class="markdown" href="{{$.RepoLink}}/src/{{.Name}}"><code>{{.Name}}</code></a>
57
57
{{$timeSince := TimeSince .Commit.Committer.When $.Lang}}
58
58
<span class="ui text light grey">{{$.i18n.Tr "repo.branches.updated_by" $timeSince .Commit.Committer.Name | Safe}}</span>
59
59
</div>
60
+ {{if and $.IsRepositoryWriter $.AllowPullRequest}}
61
+ <div class="ui four wide column">
62
+ <a class="ui basic button" href="{{$.RepoLink}}/compare/{{$.BranchName}}...{{.Name}}"><i class="octicon octicon-git-pull-request"></i> {{$.i18n.Tr "repo.pulls.new"}}</a>
63
+ </div>
64
+ {{end}}
60
65
</div>
61
66
{{end}}
62
67
</div>
You can’t perform that action at this time.
0 commit comments