Remove unit types commits and settings (#2161)

* Remove unit types commits and settings

* Can not limit units in administrator teams

* Limit changing units only to teams with read and write access mode

* Small code optimization
This commit is contained in:
Lauris BH
2017-07-17 05:04:43 +03:00
committed by Lunny Xiao
parent 047a67a90b
commit f33e6ae09e
20 changed files with 174 additions and 104 deletions

View File

@ -73,7 +73,7 @@
</a>
{{end}}
{{if and (.Repository.EnableUnit $.UnitTypeCommits) (not .IsBareRepo)}}
{{if and (.Repository.EnableUnit $.UnitTypeCode) (not .IsBareRepo)}}
<a class="{{if (or (.PageIsCommits) (.PageIsDiff))}}active{{end}} item" href="{{.RepoLink}}/commits/{{EscapePound .BranchName}}">
<i class="octicon octicon-history"></i> {{.i18n.Tr "repo.commits"}} <span class="ui {{if not .CommitsCount}}gray{{else}}blue{{end}} small label">{{.CommitsCount}}</span>
</a>