diff options
author | Lauris BH <lauris@nix.lv> | 2017-07-17 05:04:43 +0300 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-07-17 10:04:43 +0800 |
commit | f33e6ae09ec27e898bb8f2cc44d587ea3b8e0dee (patch) | |
tree | 2c6a268356fcb5fd73ee468055869b129b14c6ed /templates | |
parent | 047a67a90b455a077e8b6f6deaad6b7ec4b50810 (diff) | |
download | gitea-f33e6ae09ec27e898bb8f2cc44d587ea3b8e0dee.tar.gz gitea-f33e6ae09ec27e898bb8f2cc44d587ea3b8e0dee.zip |
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
Diffstat (limited to 'templates')
-rw-r--r-- | templates/org/team/new.tmpl | 4 | ||||
-rw-r--r-- | templates/repo/header.tmpl | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/templates/org/team/new.tmpl b/templates/org/team/new.tmpl index 2f7c5b268f..79338394bf 100644 --- a/templates/org/team/new.tmpl +++ b/templates/org/team/new.tmpl @@ -50,9 +50,8 @@ </div> </div> <div class="ui divider"></div> - {{end}} - <div class="required grouped field"> + <div class="team-units required grouped field"{{if eq .Team.Authorize 3}} style="display: none"{{end}}> <label>{{.i18n.Tr "org.team_unit_desc"}}</label> <br> {{range $t, $unit := $.Units}} @@ -66,6 +65,7 @@ {{end}} </div> <div class="ui divider"></div> + {{end}} <div class="field"> {{if .PageIsOrgTeamsNew}} diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl index 1b41a22e1c..ed90491309 100644 --- a/templates/repo/header.tmpl +++ b/templates/repo/header.tmpl @@ -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> |