diff options
author | David Svantesson <davidsvantesson@gmail.com> | 2020-01-17 08:34:37 +0100 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2020-01-17 09:34:37 +0200 |
commit | 3c07d03c0388d3b86138572401281b51f2db9282 (patch) | |
tree | 06eecf8b818ee8721a5dbfdd688eb5f45e5bef51 /templates/org | |
parent | 36943e56d66a2d711a6b0c27219ce91a3ddc020a (diff) | |
download | gitea-3c07d03c0388d3b86138572401281b51f2db9282.tar.gz gitea-3c07d03c0388d3b86138572401281b51f2db9282.zip |
Add setting to set default and global disabled repository units. (#8788)
* Add possibility to global disable repo units.
* Add Default Repo Unit app.ini setting.
* Hide units
* Hide disabled repo units
* Minor fixes
* Indicate disabled units in team settings.
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'templates/org')
-rw-r--r-- | templates/org/team/new.tmpl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/templates/org/team/new.tmpl b/templates/org/team/new.tmpl index c38fa4d940..228f86824a 100644 --- a/templates/org/team/new.tmpl +++ b/templates/org/team/new.tmpl @@ -81,10 +81,14 @@ <label>{{.i18n.Tr "org.team_unit_desc"}}</label> <br> {{range $t, $unit := $.Units}} + {{if $unit.Type.UnitGlobalDisabled}} + <div class="field poping up" data-content="{{$.i18n.Tr "repo.unit_disabled"}}"> + {{else}} <div class="field"> + {{end}} <div class="ui toggle checkbox"> <input type="checkbox" class="hidden" name="units" value="{{$unit.Type.Value}}"{{if or (eq $.Team.ID 0) ($.Team.UnitEnabled $unit.Type)}} checked{{end}}> - <label>{{$.i18n.Tr $unit.NameKey}}</label> + <label>{{$.i18n.Tr $unit.NameKey}}{{if $unit.Type.UnitGlobalDisabled}} {{$.i18n.Tr "org.team_unit_disabled"}}{{end}}</label> <span class="help">{{$.i18n.Tr $unit.DescKey}}</span> </div> </div> |