mirror of https://github.com/gogs/gogs.git
repo/branches: hide buttons for regular users
parent
5c7cb1594b
commit
9713016637
|
@ -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;
|
||||
|
|
|
@ -155,7 +155,7 @@
|
|||
padding: 0;
|
||||
>.item {
|
||||
margin: 0;
|
||||
line-height: 2em;
|
||||
line-height: 31px;
|
||||
&:not(:last-child) {
|
||||
border-bottom: 1px solid #DDD;
|
||||
}
|
||||
|
|
|
@ -17,9 +17,9 @@
|
|||
<span class="ui text light grey">{{$.i18n.Tr "repo.branches.updated_by" $timeSince .Commit.Committer.Name | Safe}}</span>
|
||||
</div>
|
||||
<div class="ui four wide column">
|
||||
{{if eq $.BranchName .Name}}
|
||||
{{if and (eq $.BranchName .Name) $.IsRepositoryWriter}}
|
||||
<a class="ui basic blue button" href="{{$.RepoLink}}/settings/branches">{{$.i18n.Tr "repo.branches.change_default_branch"}}</a>
|
||||
{{else}}
|
||||
{{else if $.IsRepositoryAdmin}}
|
||||
<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>
|
||||
{{end}}
|
||||
</div>
|
||||
|
|
|
@ -15,9 +15,11 @@
|
|||
{{$timeSince := TimeSince .DefaultBranch.Commit.Committer.When $.Lang}}
|
||||
<span class="ui text light grey">{{$.i18n.Tr "repo.branches.updated_by" $timeSince .DefaultBranch.Commit.Committer.Name | Safe}}</span>
|
||||
</div>
|
||||
<div class="ui four wide column">
|
||||
<a class="ui basic blue button" href="{{$.RepoLink}}/settings/branches">{{.i18n.Tr "repo.branches.change_default_branch"}}</a>
|
||||
</div>
|
||||
{{if $.IsRepositoryAdmin}}
|
||||
<div class="ui four wide column">
|
||||
<a class="ui basic blue button" href="{{$.RepoLink}}/settings/branches">{{.i18n.Tr "repo.branches.change_default_branch"}}</a>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -33,9 +35,11 @@
|
|||
{{$timeSince := TimeSince .Commit.Committer.When $.Lang}}
|
||||
<span class="ui text light grey">{{$.i18n.Tr "repo.branches.updated_by" $timeSince .Commit.Committer.Name | Safe}}</span>
|
||||
</div>
|
||||
<div class="ui four wide column">
|
||||
<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>
|
||||
</div>
|
||||
{{if $.IsRepositoryWriter}}
|
||||
<div class="ui four wide column">
|
||||
<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>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue