diff --git a/templates/repo/branches/all.tmpl b/templates/repo/branches/all.tmpl index f962884d3..d4ea30769 100644 --- a/templates/repo/branches/all.tmpl +++ b/templates/repo/branches/all.tmpl @@ -17,10 +17,10 @@ {{$.i18n.Tr "repo.branches.updated_by" $timeSince .Commit.Committer.Name | Safe}}
- {{if and (eq $.BranchName .Name) $.IsRepositoryWriter}} + {{if and (and (eq $.BranchName .Name) $.IsRepositoryAdmin) (not $.Repository.IsMirror)}} {{$.i18n.Tr "repo.branches.change_default_branch"}} {{else if and $.IsRepositoryWriter $.AllowPullRequest}} - {{$.i18n.Tr "repo.pulls.new"}} + {{$.i18n.Tr "repo.pulls.new"}} {{end}}
diff --git a/templates/repo/branches/overview.tmpl b/templates/repo/branches/overview.tmpl index 921bce247..f46143693 100644 --- a/templates/repo/branches/overview.tmpl +++ b/templates/repo/branches/overview.tmpl @@ -15,7 +15,7 @@ {{$timeSince := TimeSince .DefaultBranch.Commit.Committer.When $.Lang}} {{$.i18n.Tr "repo.branches.updated_by" $timeSince .DefaultBranch.Commit.Committer.Name | Safe}} - {{if $.IsRepositoryAdmin}} + {{if and $.IsRepositoryAdmin (not $.Repository.IsMirror)}}
{{.i18n.Tr "repo.branches.change_default_branch"}}
@@ -37,7 +37,7 @@ {{if and $.IsRepositoryWriter $.AllowPullRequest}}
- {{$.i18n.Tr "repo.pulls.new"}} + {{$.i18n.Tr "repo.pulls.new"}}
{{end}} @@ -52,11 +52,16 @@
{{range .StaleBranches}}
-
+
{{if .IsProtected}} {{end}}{{.Name}} {{$timeSince := TimeSince .Commit.Committer.When $.Lang}} {{$.i18n.Tr "repo.branches.updated_by" $timeSince .Commit.Committer.Name | Safe}}
+ {{if and $.IsRepositoryWriter $.AllowPullRequest}} + + {{end}}
{{end}}