diff --git a/public/css/gogs.css b/public/css/gogs.css index 55b2e2747..c4b472335 100644 --- a/public/css/gogs.css +++ b/public/css/gogs.css @@ -1232,7 +1232,7 @@ footer .ui.language .menu { } .repository.branches .ui.list > .item { margin: 0; - line-height: 2em; + line-height: 31px; } .repository.branches .ui.list > .item:not(:last-child) { border-bottom: 1px solid #DDD; diff --git a/public/less/_repository.less b/public/less/_repository.less index 2af2e1e0b..9d4c27b7f 100644 --- a/public/less/_repository.less +++ b/public/less/_repository.less @@ -155,7 +155,7 @@ padding: 0; >.item { margin: 0; - line-height: 2em; + line-height: 31px; &:not(:last-child) { border-bottom: 1px solid #DDD; } diff --git a/templates/repo/branches/all.tmpl b/templates/repo/branches/all.tmpl index 24d3a449b..d374acaad 100644 --- a/templates/repo/branches/all.tmpl +++ b/templates/repo/branches/all.tmpl @@ -17,9 +17,9 @@ {{$.i18n.Tr "repo.branches.updated_by" $timeSince .Commit.Committer.Name | Safe}}
- {{if eq $.BranchName .Name}} + {{if and (eq $.BranchName .Name) $.IsRepositoryWriter}} {{$.i18n.Tr "repo.branches.change_default_branch"}} - {{else}} + {{else if $.IsRepositoryAdmin}} {{$.i18n.Tr "repo.pulls.new"}} {{end}}
diff --git a/templates/repo/branches/overview.tmpl b/templates/repo/branches/overview.tmpl index 16775d446..be31e7f55 100644 --- a/templates/repo/branches/overview.tmpl +++ b/templates/repo/branches/overview.tmpl @@ -15,9 +15,11 @@ {{$timeSince := TimeSince .DefaultBranch.Commit.Committer.When $.Lang}} {{$.i18n.Tr "repo.branches.updated_by" $timeSince .DefaultBranch.Commit.Committer.Name | Safe}} -
- {{.i18n.Tr "repo.branches.change_default_branch"}} -
+ {{if $.IsRepositoryAdmin}} +
+ {{.i18n.Tr "repo.branches.change_default_branch"}} +
+ {{end}} @@ -33,9 +35,11 @@ {{$timeSince := TimeSince .Commit.Committer.When $.Lang}} {{$.i18n.Tr "repo.branches.updated_by" $timeSince .Commit.Committer.Name | Safe}} -
- {{$.i18n.Tr "repo.pulls.new"}} -
+ {{if $.IsRepositoryWriter}} +
+ {{$.i18n.Tr "repo.pulls.new"}} +
+ {{end}} {{end}}